Academy School · Chapter 2 of 14
Blockchain Architecture
How blockchains work, how layers differ, and why design choices matter.
Chapter locked
Complete the previous chapter first.
Academy School builds each concept on the one before it. Return to the course overview to continue from your current chapter.
Return to Academy SchoolWhat a Blockchain Is
A blockchain is a shared ledger maintained by many independent computers, called nodes. Nobody owns the master copy. Each full node downloads every block, checks it against the same rules, and keeps its own copy, so a node operator never has to take a miner's or another node's word for anything.
Transactions are grouped into blocks, and each block is chained to the one before it with a cryptographic hash: a short fingerprint that changes completely if a single bit of the input changes. In Bitcoin, every block starts with an 80-byte header containing six fields: a version number, the hash of the previous block's header, a Merkle root summarising all the block's transactions, a timestamp, the difficulty target, and a nonce that miners vary while searching for a valid hash.
Worked example: editing old history
Suppose someone alters one payment in block 100. That transaction's identifier changes, so the Merkle root in block 100's header changes, so block 100's hash changes. Block 101 records the old hash in its "previous block" field, so the link breaks, and every node rejects the edited chain. To make the change stick, the attacker would have to redo the proof of work for block 100 and every block after it, faster than the honest network keeps adding new ones.
The Merkle root also makes checking cheap. Transaction hashes are paired and hashed repeatedly until one hash remains. For a block of 4,000 transactions, proving that one payment is included takes only 12 hashes (because 2 to the power 12 is 4,096), which is 12 × 32 = 384 bytes, rather than the whole block. Lightweight wallets rely on exactly this.
- Shared ledger, copied and checked by every full node.
- Hash links make silent edits to old blocks detectable.
- Merkle roots let you verify one transaction without downloading everything.
A blockchain is only as verifiable as the number of people who actually run nodes. If only the operator can check the ledger, it is a database with extra steps.
Consensus and State
State is the ledger's current condition: who owns what, plus any stored contract data. Bitcoin's state is the set of unspent coins, explained in the UTXO entry. Ethereum's state is a table of accounts, each with a balance, a nonce (a counter of transactions sent) and, for contracts, code and storage. Every transaction is a state transition. If Alice holds 5 ETH with nonce 7 and sends Bob 2 ETH, paying a 0.001 ETH fee, the new state shows Alice with 2.999 ETH and nonce 8, and Bob 2 ETH richer. Resending the same signed message fails, because nonce 7 has been used.
Consensus is how thousands of nodes agree on which transitions happened and in what order, so that everyone arrives at the same ledger state. Two families dominate.
Proof of work: probability that shrinks
Bitcoin nodes follow the valid chain with the most accumulated work. A recent block can still be replaced, but the chance falls quickly with each block added on top. The white paper's own table shows that an attacker with 10 percent of the hashrate has about a 0.09 percent chance of overtaking a payment buried under 5 blocks. Against an attacker with 30 percent, the payment must be 24 blocks deep before the odds fall below 0.1 percent, which is why larger payments wait for more confirmations.
Proof of stake: explicit finality
Ethereum switched to proof of stake in September 2022. Time is divided into 12-second slots and 32-slot epochs (6.4 minutes). When validators holding at least two-thirds of staked ETH vote for a checkpoint, and the next checkpoint gets the same, the first becomes final, normally after about two epochs, or 12.8 minutes. Reversing a finalised block would require validators holding at least one-third of all staked ETH to break the rules and be slashed. The finality entry compares the two models.
"Confirmed" means different things on different chains. Before treating a payment as settled, find out whether that chain offers probabilistic finality (wait for more blocks) or explicit finality (wait for the finalised checkpoint).
Monolithic vs Modular Design
Every blockchain must do four jobs: execution (running transactions and computing the new state), ordering and consensus (agreeing on sequence), data availability (publishing the transaction data so anyone can recheck it) and settlement (the final word on which state counts and how disputes end).
A monolithic chain such as Bitcoin does all four on one network, and every full node does all four. The trust model is easy to state: if your node accepts the chain, it is valid. The cost is that capacity is limited by what an ordinary node can process, which is why Bitcoin keeps a strict limit on block size.
A modular design separates these functions across layers. On Ethereum today, rollups execute transactions on their own systems, then post compressed transaction data to Ethereum, which provides ordering, data availability and settlement. Ethereum built dedicated space for this in the Dencun upgrade (March 2024): "blobs" of 4,096 × 32 = 131,072 bytes (128 KiB) that rollups pay for separately from normal transactions.
Worked example: how much data
At Dencun the target was 3 blobs per 12-second block: 3 × 128 KiB = 384 KiB per block. There are 7,200 blocks a day (86,400 seconds ÷ 12), so the target was about 2.6 GiB of rollup data a day. Pectra (May 2025) raised the target to 6, and after the Fusaka upgrade (December 2025) a further step on 7 January 2026 raised it to 14 blobs: 14 × 128 KiB × 7,200 is about 12.3 GiB a day. Blobs are pruned after 4,096 epochs: 4,096 × 32 × 12 seconds is about 18.2 days, so anyone who needs the data longer must store it themselves. These limits keep changing; check the current figures before relying on them.
The trade-off is that a rollup user now depends on more parts: the rollup's operator, its proof system, its bridge contract and whoever can upgrade them.
For any chain, list who performs each of the four jobs. Every distinct name on that list is a separate party whose failure can affect your funds.
Layer 1s and Layer 2s
A Layer 1 is a base chain whose own validators or miners order and finalise transactions: Bitcoin and Ethereum are examples. A Layer 2 extends a base chain's capacity or functionality by handling most activity elsewhere while still relying on the Layer 1 to settle disputes and enforce withdrawals. A sidechain with its own validators and a bridge is not the same thing: if those validators collude, the Layer 1 cannot stop them.
Worked example: two Layer 2 designs
A payment channel on Bitcoin. On the Lightning Network, Ana and Ben lock 0.01 BTC in a shared output with one on-chain transaction. They then exchange 200 signed balance updates off-chain, and finally close the channel with a second on-chain transaction. Two transactions reach the blockchain instead of 200, and either side can publish the latest signed balance on Bitcoin if the other disappears.
An optimistic rollup on Ethereum. A rollup's sequencer batches thousands of transactions and posts them to Ethereum, and anyone can challenge an incorrect state with a fraud proof. The cost is time: if you start a standard withdrawal on Monday at 09:00, you can usually claim it on Ethereum only after the challenge period of roughly seven days, so around the following Monday at 09:00. "Fast" withdrawals exist, but they work by having a third party lend you the funds, which adds a new counterparty. A zero-knowledge rollup instead posts a validity proof with each batch, which can shorten that wait.
Judge a Layer 2 by its exit. If the operator vanished tomorrow, could you withdraw to Layer 1 using only Layer 1 contracts and published data? If yes, you are mostly trusting the base chain. If no, you are trusting the operator.
Further reading
On Ledgers Academy
- Blockchain architecture: Layer 1, Layer 2 and modular chains
- Proof of work vs proof of stake
- Staking slashing
- Cross-chain bridge protocols
- Zero-knowledge proofs