Skip to content

Repository files navigation

Blockchain Engineering

Blockchain Engineering

Understanding blockchain through code.

English · Português do Brasil

Start reading · Full contents · Progress · Glossary · Resources

Status Language Format


Blockchain Engineering is an open-source technical book about Bitcoin, Ethereum, cryptography, distributed systems, monetary economics, smart contracts, DeFi, scaling, security, and blockchain infrastructure.

The book approaches blockchain from a software engineer's perspective: understand the mechanism first, then inspect it, reproduce it, and build with it.

Note

This book is about engineering, protocols, and economic context. It does not cover trading strategies or price speculation.

Book map

flowchart TD
    A[Origins] --> B[Money & Economics]
    B --> C[Cryptography]
    C --> D[Distributed Systems]
    D --> E[Blockchain Fundamentals]

    E --> F[Bitcoin]
    F --> G[Wallets]
    F --> H[Bitcoin Scaling]
    H --> I[Lightning]

    E --> J[Ethereum]
    J --> K[EVM]
    K --> L[Smart Contracts]
    L --> M[Tokens]
    M --> N[Web3 Applications]
    N --> O[DeFi]
    O --> P[Layer 2]

    F --> Q[Security]
    P --> Q
    Q --> R[Infrastructure]
Loading

Start reading

Path Start here Focus
Beginner Origins Full conceptual foundation
Software engineer Cryptography Protocols, execution, and code
Bitcoin Origins Bitcoin, wallets, forks, and Lightning
Ethereum Ethereum Accounts, EVM, contracts, DeFi, and Layer 2

Beginner path

flowchart LR
    A[Origins] --> B[Economics]
    B --> C[Cryptography]
    C --> D[Distributed Systems]
    D --> E[Blockchain]
    E --> F[Bitcoin]
    F --> G[Wallets]
    G --> H[Ethereum]
    H --> I[Smart Contracts]
    I --> J[DeFi]
Loading

Software engineer path

flowchart LR
    A[Cryptography] --> B[Blockchain]
    B --> C[Ethereum]
    C --> D[EVM]
    D --> E[Smart Contracts]
    E --> F[Tokens]
    F --> G[Web3]
    G --> H[Security]
Loading

Bitcoin path

flowchart LR
    A[Origins] --> B[Economics]
    B --> C[Cryptography]
    C --> D[Bitcoin]
    D --> E[Forks]
    D --> F[Wallets]
    D --> G[Scaling]
    G --> H[Lightning]
Loading

Explore the book

Origins: digital cash, Cypherpunks, Satoshi, and the work that came before Bitcoin
Money and Economics: money, banking, monetary policy, Austrian economics, and competing views

Austrian economics

Cryptography: hashes, keys, signatures, elliptic curves, and Merkle trees
Bitcoin: transactions, UTXOs, mining, Script, SegWit, Taproot, and monetary policy

Core concepts

Mining

Protocol

Wallets, Forks, and Scaling: key management, protocol upgrades, payment channels, and Lightning
Ethereum and EVM: accounts, state, gas, Proof of Stake, bytecode, and execution
Smart Contracts, Tokens, and Web3: Solidity, ABI, token standards, wallets, RPC, and signatures
DeFi and Layer 2: AMMs, lending, stablecoins, rollups, sequencers, and bridges
Security and Infrastructure: exploits, defensive design, nodes, RPC, indexing, and reliability

For the complete chapter-by-chapter index, see SUMMARY.md.

Learning by building

Level Project Concepts
Foundation Build a small blockchain blocks, hashes, Proof of Work
Bitcoin Decode a transaction serialization, txids, block headers, Proof of Work
Ethereum Query a node raw JSON-RPC, blocks, balances, logs
Ethereum Compile and inspect contracts Solidity, ABI, bytecode, compiler errors
Web3 Build Wallet Stats balances, RPC, contract detection, token balances
DeFi Model an AMM constant product, fees, slippage, price impact
Infrastructure Build a reorg-safe indexer blocks, events, checkpoints, reorganizations

By the end

You should be able to explain:

  • how Bitcoin prevents double spending
  • what miners actually compute
  • how wallets derive and use keys
  • why Bitcoin uses UTXOs
  • how Ethereum executes smart contracts
  • what gas pays for
  • how token standards work
  • how AMMs price assets
  • what rollups move off-chain
  • why bridges are difficult to secure
  • how blockchain applications query and index on-chain data

Sources and writing

The book prioritizes primary sources, protocol specifications, original papers, source code, and original economic texts.

See WRITING.md for research, sourcing, and editorial guidelines.

Important

Historical claims, especially claims about Satoshi Nakamoto, should distinguish documented evidence from inference and speculation.

Status

The first complete edition is finished. All 21 sections, 332 chapter and section pages, the glossary, resources, and seven runnable projects have passed the repository's link, navigation, editorial, test, and type-check checks.

See PROGRESS.md for the section-by-section record and verification commands.

Contributing

Corrections, technical reviews, clearer explanations, and links to primary sources are welcome.

See CONTRIBUTING.md.

Build the website locally

The published site uses Material for MkDocs and builds both editions from the existing Markdown files.

python3 -m venv .venv-docs
.venv-docs/bin/python -m pip install -r requirements-docs.txt
MKDOCS_BIN=.venv-docs/bin/mkdocs node scripts/build-docs.mjs
node scripts/check-built-site.mjs
python3 -m http.server 8000 --directory site

Open http://localhost:8000/ for English or http://localhost:8000/pt-BR/ for Brazilian Portuguese.

Warning

Never use production private keys, seed phrases, or meaningful funds while experimenting with code from this repository.

Disclaimer

This repository is about blockchain engineering, distributed systems, and software development.

It is not financial, investment, legal, or tax advice.

License

MIT

About

Understanding blockchain through code.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages