47 min read

In late 2013, a nineteen-year-old programmer named Vitalik Buterin published a white paper that asked a deceptively simple question: What if the blockchain could do more than just transfer money?

Learning Objectives

  • Compare and contrast Ethereum's account model with Bitcoin's UTXO model, identifying the tradeoffs of each approach
  • Explain Ethereum's global state as a mapping from addresses to account states stored in a Merkle Patricia Trie
  • Calculate gas costs for Ethereum transactions and explain why gas exists as a mechanism to prevent infinite computation
  • Describe the technical execution of The Merge and why transitioning a live $200B+ network from PoW to PoS was one of the greatest engineering feats in blockchain history
  • Design a state model for a decentralized application using Ethereum's account and storage primitives

Chapter 11: Ethereum Architecture: The World Computer Concept

11.1 From Digital Cash to World Computer

In late 2013, a nineteen-year-old programmer named Vitalik Buterin published a white paper that asked a deceptively simple question: What if the blockchain could do more than just transfer money?

Bitcoin had proven that a decentralized network could maintain a shared ledger without any central authority. But Bitcoin's scripting language was deliberately limited. It could express conditions like "this output can be spent if signature X is provided" or "this output can be spent after block height 500,000." It could not express arbitrary programs. You could not write a lending protocol, a voting system, or a decentralized exchange in Bitcoin Script — at least not without extraordinary contortions. Satoshi Nakamoto had made this choice intentionally, prioritizing security and simplicity for a digital cash system.

Buterin saw this limitation differently. He saw not a prudent design choice but an enormous missed opportunity. In his white paper, he proposed Ethereum: a blockchain with a built-in Turing-complete programming language that anyone could use to create arbitrary rules for ownership, transaction formats, and state transition functions. Instead of building specialized blockchains for each application — one for identity, one for financial derivatives, one for voting — developers could write programs (which Buterin called smart contracts) that ran on a single shared platform.

The metaphor that stuck was "the world computer." Not a computer in the traditional sense — Ethereum is painfully slow by conventional standards, processing roughly 15-30 transactions per second compared to the millions a modern laptop can handle — but a computer with a unique property: everyone agrees on its output. There is no administrator who can alter the records, no IT department that can roll back a transaction, no regulator who can freeze an account unilaterally. Every node in the Ethereum network executes the same programs with the same inputs and arrives at the same results. The computation is replicated, verified, and permanent. No single party can alter the outcome, censor a transaction, or shut down the machine.

This chapter explores how Ethereum achieved this vision architecturally. We will examine the account model that replaced Bitcoin's UTXO system, the global state trie that tracks every account and every byte of contract storage, the gas mechanism that prevents infinite computation, and the historic Merge that transitioned the entire network from proof-of-work to proof-of-stake while it was running — an engineering feat sometimes compared to changing the engine of an airplane mid-flight.

By the end of this chapter, you will understand not just what Ethereum is, but why it was designed the way it was — and what tradeoffs that design entails.

🔗 Connection: This chapter builds directly on Chapter 6's coverage of Bitcoin's UTXO model and Chapter 3's distributed systems fundamentals. If the UTXO model feels hazy, review Section 6.3 before proceeding — the comparison between UTXO and account models is one of the most important architectural distinctions in all of blockchain.


11.2 Account Model vs. UTXO Model

11.2.1 Revisiting Bitcoin's UTXO Model

Recall from Chapter 6 that Bitcoin does not track "balances" in the way your bank does. Instead, it tracks unspent transaction outputs (UTXOs). When Alice wants to send 3 BTC to Bob, she does not decrement her balance by 3 and increment Bob's by 3. She references one or more UTXOs she controls, proves ownership with a digital signature, and creates new UTXOs: one paying 3 BTC to Bob, and one returning the change to herself. The UTXOs she consumed are marked as spent and can never be used again.

This model has several virtues. Transactions are inherently parallel — if Alice has ten UTXOs, ten different transactions spending different UTXOs can be processed simultaneously without conflict. Privacy is enhanced because each UTXO can use a different address. And the model is stateless in a particular sense: to validate a transaction, you only need to check that the referenced UTXOs exist and are unspent, not the entire history of the account.

But the UTXO model is awkward for complex programs. Consider a smart contract that maintains a counter, incrementing it each time someone calls a function. In a UTXO model, each increment would consume the old UTXO containing the current counter value and create a new UTXO with the incremented value. If two users try to increment the counter simultaneously, both would reference the same UTXO, and only one transaction could succeed. The other would be invalid — it references a UTXO that no longer exists. This is manageable for simple transfers but becomes a nightmare for contracts that maintain complex, shared state.

11.2.2 Ethereum's Account Model

Ethereum abandoned UTXOs entirely. Instead, it uses an account model that will feel intuitive if you have ever used a bank account or, frankly, any computer system that tracks user state. Every entity in Ethereum — whether a human user or a smart contract — is represented by an account with an address and a persistent state.

An Ethereum account has four fields:

  1. Nonce: A counter that tracks the number of transactions sent from this account (for externally owned accounts) or the number of contracts created by this account (for contract accounts). The nonce prevents replay attacks — the same signed transaction cannot be submitted twice because the nonce must increment with each transaction.

  2. Balance: The amount of Ether (ETH) held by the account, denominated in wei (1 ETH = 10^18 wei). This is a simple integer that increases when the account receives ETH and decreases when it sends ETH.

  3. Storage Hash: A 256-bit hash of the root node of the account's storage trie. This field is only meaningful for contract accounts — it references the persistent key-value store where the contract keeps its data. For externally owned accounts, this is the hash of an empty trie.

  4. Code Hash: A hash of the EVM bytecode associated with this account. For externally owned accounts (controlled by humans with private keys), this is the hash of the empty string. For contract accounts, this is the hash of the immutable code that executes when the contract is called.

When Alice sends 1 ETH to Bob, the state transition is conceptually simple: Alice's balance decreases by 1 ETH (plus gas fees), her nonce increments by 1, and Bob's balance increases by 1 ETH. There are no UTXOs to consume and create — just two account states that get updated in place.

💡 Key Insight: The account model makes Ethereum feel like a conventional database in many ways. Each account is a "row" with fields that get updated. This familiarity is precisely why Buterin chose it — it maps naturally to the kind of state management that complex applications need. A lending protocol tracks balances. A voting contract tracks who has voted. A decentralized exchange tracks order books. All of these are stateful applications that want to read and write persistent data, and the account model makes this natural.

11.2.3 Side-by-Side Comparison

The differences between these two models have profound implications for everything from transaction validation to privacy to scalability:

Property UTXO Model (Bitcoin) Account Model (Ethereum)
State representation Set of unspent outputs Map of addresses to account states
Balance tracking Sum of UTXOs controlled by a key Explicit balance field per account
Transaction structure Inputs (consumed UTXOs) and outputs (new UTXOs) Sender, recipient, value, data, nonce
Parallelism Natural — independent UTXOs can be spent in parallel Requires ordering — nonce must be sequential
Replay protection Inherent — each UTXO can only be spent once Nonce-based — each nonce can only be used once
Privacy Better — fresh address per UTXO is standard Worse — account reuse is the norm
State size Grows with number of UTXOs (~100M for Bitcoin) Grows with number of accounts and contract storage (~1B state objects for Ethereum)
Complex state Awkward — requires careful UTXO management Natural — contracts have persistent key-value storage
Light client verification Straightforward — Merkle proof of UTXO inclusion Harder — must verify state root against block header
Fungibility Each UTXO has a history that can be traced Balances are fungible — no "tainted coins" in the balance

⚠️ Common Misconception: "The account model is simply better than the UTXO model." This is wrong. Each model optimizes for different properties. Bitcoin's UTXO model is superior for simple value transfers, privacy, and parallel validation. Ethereum's account model is superior for stateful computation and developer ergonomics. Some newer blockchains (like Cardano) use extended UTXO models that attempt to combine the advantages of both, though not without their own tradeoffs.

11.2.4 Why Ethereum Chose Accounts

Buterin's 2014 rationale for the account model came down to three arguments:

Space savings. In the UTXO model, every output must be stored individually. If an account receives 1,000 micro-payments, it has 1,000 UTXOs. In the account model, it has a single balance field. For a platform expecting millions of smart contract interactions, this difference matters.

Greater fungibility. UTXOs have individual histories. A UTXO that passed through a sanctioned address carries that taint. In the account model, ETH in your balance is just a number — there is no concept of "which ETH" you received from whom. This matters both philosophically (fungibility is a desirable property of money) and practically (it simplifies contract logic).

Simplicity. Smart contracts need to read and write state. In the account model, a contract can simply read storage[key] and write storage[key] = value. In the UTXO model, the equivalent operation requires creating and consuming UTXOs in a carefully orchestrated dance that is far more complex to reason about.

The price of these advantages is real. The account model introduces new challenges around transaction ordering (nonce management), privacy (address reuse), and state growth (every account exists forever unless explicitly cleaned up). We will encounter each of these costs throughout this chapter and the chapters that follow.


11.3 Two Types of Accounts

Ethereum has exactly two types of accounts, and understanding the distinction is essential to understanding everything else about the platform.

11.3.1 Externally Owned Accounts (EOAs)

An externally owned account is controlled by a private key held by a human (or, more precisely, by any entity in possession of the key — it could be a hardware wallet, a browser extension, or a script). EOAs have three defining characteristics:

  • They can initiate transactions. Only EOAs can start the chain of execution. If you want to call a smart contract, interact with a DeFi protocol, or transfer ETH, you must sign a transaction with an EOA's private key.
  • They have no code. An EOA's code hash is the hash of the empty string (keccak256("")). It cannot execute logic.
  • They pay gas fees. The gas cost for any transaction is deducted from the EOA that signed it.

Creating an EOA costs nothing and requires no on-chain transaction. You generate a private key (256 random bits), derive the public key using elliptic curve multiplication on the secp256k1 curve, take the Keccak-256 hash of the public key, and use the last 20 bytes as the address. The account "exists" the moment anyone sends it ETH or references it in a transaction.

11.3.2 Contract Accounts

A contract account is created by deploying code to the Ethereum blockchain. Once deployed, the contract lives at a deterministic address and can:

  • Hold ETH just like an EOA.
  • Execute code when called by a transaction or by another contract. The code is immutable — once deployed, it cannot be changed (though upgradeable proxy patterns work around this at the application layer, as we will see in Chapter 15).
  • Maintain persistent storage — a key-value store where the contract can save data between calls. This storage is the storageHash field in the account state.
  • Call other contracts — a contract can send messages (internal transactions) to other contracts, creating chains of execution.

What a contract account cannot do is initiate a transaction on its own. Contracts are reactive: they execute only when poked by an external transaction. This is a fundamental limitation. If you want a contract to perform an action at a specific time (say, execute a trade at midnight), you need an off-chain agent — an EOA-controlled bot — to submit the triggering transaction. (This limitation spawned an entire category of infrastructure called "keepers" or "automation networks," which we will revisit in Chapter 18.)

📊 By the Numbers: As of early 2025, Ethereum has approximately 270 million unique addresses that have been involved in at least one transaction. Of these, roughly 60 million are contract accounts. The vast majority of addresses are EOAs, but the vast majority of interesting activity flows through contracts.

11.3.3 How EOAs and Contracts Interact

The flow of execution on Ethereum always begins with an EOA signing a transaction. Consider a user swapping tokens on a decentralized exchange:

  1. Alice (EOA) signs a transaction calling the swap() function on the DEX Router contract.
  2. The DEX Router contract calls the Token A contract to transfer Alice's Token A to the liquidity pool.
  3. The Token A contract updates its internal storage (Alice's balance decreases, pool's balance increases).
  4. The DEX Router contract calls the Token B contract to transfer Token B from the pool to Alice.
  5. The Token B contract updates its internal storage (pool's balance decreases, Alice's balance increases).
  6. The DEX Router contract emits an event logging the swap details.

All of this — the entire chain of calls — happens within a single transaction. If any step fails (say, the pool does not have enough Token B), the entire transaction reverts. Every state change is undone. This is the atomic execution guarantee of the EVM.

💡 Key Insight: The EOA/contract distinction creates a clear separation between authorization (who can initiate actions — only private key holders) and logic (what actions do — defined by contract code). This separation is one of Ethereum's most important security properties. Contracts cannot spontaneously decide to drain your funds; they can only execute when called, and they execute exactly the code that was deployed.

11.3.4 Account Abstraction: Blurring the Line

The rigid EOA/contract distinction has long been a source of friction. EOAs cannot implement custom authentication (like multi-signature requirements or social recovery), cannot batch multiple actions into a single transaction, and cannot pay gas fees in tokens other than ETH. ERC-4337, ratified in 2023, introduced account abstraction — a mechanism that allows smart contract wallets to act as primary accounts, with custom validation logic, gas sponsorship, and batched transactions. We will explore account abstraction in detail in Chapter 18, but it is worth noting here because it represents a fundamental evolution of the account model described in this section.


11.4 The Global State

11.4.1 State as a Function

The single most important mental model for understanding Ethereum is this:

Ethereum is a state machine. The global state represents the current condition of every account. Transactions are inputs that cause state transitions. Each block contains an ordered list of transactions that transform the state from one valid configuration to the next.

Formally:

new_state = STF(old_state, transaction)

Where STF is the state transition function implemented by the Ethereum Virtual Machine. Given the current state and a transaction, the STF produces a new state deterministically. Every node in the network computes the same function with the same inputs and arrives at the same output. This is what makes the "world computer" metaphor work — everyone agrees on the computation's result because everyone performs the same computation.

The state itself is a mapping from 160-bit addresses to account states:

state: address → {nonce, balance, storageHash, codeHash}

For contract accounts, the storageHash points to a separate trie containing the contract's persistent storage — a mapping from 256-bit keys to 256-bit values. This means the global state is actually a trie of tries: the top-level state trie maps addresses to account objects, and each contract account's storage is itself a trie.

To make this concrete: when you check your ETH balance on MetaMask or Etherscan, the query ultimately resolves to looking up your address in the state trie and reading the balance field. When a DeFi protocol checks how many tokens you hold, it looks up the token contract's address in the state trie, follows the storageHash to the contract's storage trie, and reads the storage slot corresponding to balances[your_address]. Every read, every write, every interaction with Ethereum ultimately touches this trie.

💡 Key Insight: The state transition function must be completely deterministic. Given the same starting state and the same transaction, every node in the network must arrive at exactly the same new state — down to the last bit. This is why Ethereum cannot use floating-point arithmetic (which produces different results on different hardware), cannot access external data sources during execution (which might return different values at different times), and cannot use random number generators (which by definition produce different outputs). Determinism is not a nice-to-have; it is the foundation of consensus.

11.4.2 The Merkle Patricia Trie

Ethereum stores its global state in a data structure called a Modified Merkle Patricia Trie (MPT). This is a combination of two ideas:

Patricia Trie (Practical Algorithm To Retrieve Information Coded in Alphanumeric): A space-optimized trie (prefix tree) where nodes that have only one child are merged with their parent. Instead of having a separate node for each character in a key, the Patricia trie compresses paths, storing common prefixes once and branching only where keys diverge.

Merkle Tree: A tree where each node's hash is computed from the hashes of its children. This means the root hash is a cryptographic commitment to the entire contents of the tree. Change any leaf, and the root hash changes. This allows efficient verification: to prove that a particular account has a particular state, you need only provide the path from the leaf to the root (a Merkle proof), not the entire tree.

The combination gives Ethereum a data structure that supports:

  • Efficient lookups: Finding the state of any account by its address.
  • Efficient updates: Changing a single account's state requires updating only the nodes along the path from that account to the root.
  • Cryptographic verification: The state root — a single 256-bit hash — commits to the entire global state. This root is included in every block header.
  • Efficient proofs: A light client can verify any claim about any account's state using a Merkle proof against the state root, without storing the entire state.

🧪 Try It Yourself: Run code/state_trie.py to see a simplified Merkle Patricia Trie in action. The script demonstrates how inserting accounts into the trie changes the root hash, and how a Merkle proof can verify account state without access to the full trie.

11.4.3 Three Tries in Every Block

Each Ethereum block header contains roots for three separate tries:

  1. State Trie Root (stateRoot): The root of the global state trie after all transactions in the block have been executed. This is the "snapshot" of the entire Ethereum world at this block.

  2. Transactions Trie Root (transactionsRoot): The root of a trie containing all transactions included in this block. Unlike the state trie, this is block-specific — it does not persist across blocks.

  3. Receipts Trie Root (receiptsRoot): The root of a trie containing the receipt for each transaction (success/failure status, gas used, logs emitted). This enables efficient queries about transaction outcomes.

The state trie is by far the largest and most important. It is the accumulated state of the entire network since the genesis block in 2015. The transaction and receipt tries are reconstructed for each block and are comparatively small.

11.4.4 State Transitions in Detail

Let us trace a complete state transition for a simple ETH transfer. Alice (address 0xAlice) sends 1 ETH to Bob (address 0xBob). Before the transaction:

state[0xAlice] = {nonce: 5, balance: 10 ETH, storageHash: EMPTY, codeHash: EMPTY_CODE}
state[0xBob]   = {nonce: 0, balance: 3 ETH, storageHash: EMPTY, codeHash: EMPTY_CODE}

Alice signs a transaction: {from: 0xAlice, to: 0xBob, value: 1 ETH, nonce: 5, gasLimit: 21000, maxFeePerGas: 30 gwei}. The state transition function processes it:

  1. Validate: Check that Alice's nonce matches the transaction nonce (5 == 5). Check that Alice has sufficient balance for the value plus maximum gas cost (1 ETH + 21,000 * 30 gwei = 1.00063 ETH; Alice has 10 ETH, so this passes).
  2. Deduct gas: Reserve the maximum gas cost from Alice's balance.
  3. Execute: Transfer 1 ETH from Alice to Bob. For a simple transfer, this is the entire execution — there is no contract code to run.
  4. Refund unused gas: A simple transfer uses exactly 21,000 gas. If Alice set a higher gas limit, the unused portion is refunded.
  5. Pay validator: The gas fee (21,000 * base fee) is burned via EIP-1559, and any priority fee goes to the block's validator.
  6. Increment nonce: Alice's nonce becomes 6.

After the transaction:

state[0xAlice] = {nonce: 6, balance: 8.99937 ETH, storageHash: EMPTY, codeHash: EMPTY_CODE}
state[0xBob]   = {nonce: 0, balance: 4 ETH, storageHash: EMPTY, codeHash: EMPTY_CODE}

The state trie is updated: the leaf nodes for Alice and Bob are modified, all parent nodes along their paths are recomputed, and a new state root emerges. This new root is included in the block header.

🔗 Connection: This state transition model is why the ordering of transactions within a block matters enormously. If Bob also has a transaction in the same block, whether it processes before or after Alice's transfer affects whether Bob's balance includes Alice's 1 ETH. Transaction ordering — and the ability of block proposers to choose ordering — is the root of the MEV (Maximal Extractable Value) problem we will examine in Chapter 20.


11.5 Gas: The Fuel of Computation

11.5.1 The Halting Problem and Why Gas Must Exist

In 1936, Alan Turing proved that no algorithm can determine, in general, whether an arbitrary program will eventually halt or run forever. This is the halting problem, and it is undecidable — not merely unsolved, but provably unsolvable.

Ethereum runs arbitrary programs submitted by anyone. Some of those programs might contain infinite loops — either accidentally (a bug) or maliciously (a denial-of-service attack). Without some mechanism to bound computation, a single malicious transaction could force every node in the network to execute an infinite loop, grinding the entire system to a halt.

Gas is Ethereum's solution. Every computational step, every byte of storage written, every byte of data included in a transaction costs a specific amount of gas. The sender of a transaction specifies a gas limit — the maximum amount of gas the transaction may consume. If execution exhausts the gas limit before completing, the transaction reverts: all state changes are undone, but the gas fee is still charged (the validator did the work, after all). The sender has paid for computation whether or not that computation succeeded.

This elegantly sidesteps the halting problem. Ethereum does not need to determine whether a program will halt; it simply requires the sender to pay for each step. If the program runs too long, it runs out of gas and stops. The economic cost of gas ensures that infinite computation is infinitely expensive — which is to say, impossible.

💡 Key Insight: Gas separates the cost of computation from the unit of currency. Gas is measured in abstract units; the price of gas (in ETH) fluctuates with demand. This means that the cost of running a smart contract is determined by network congestion, not by the price of ETH. A simple transfer always costs 21,000 gas whether ETH is worth $100 or $10,000.

11.5.2 Gas Costs for Common Operations

Every opcode in the EVM has a fixed gas cost defined in the Ethereum Yellow Paper (and updated through EIPs over the years). Some representative costs:

Operation Gas Cost Rationale
Addition (ADD) 3 Trivial computation
Multiplication (MUL) 5 Slightly more than addition
Storage write (new slot) (SSTORE) 20,000 Writing to disk is expensive
Storage write (existing slot) 5,000 Updating existing data is cheaper
Storage read (SLOAD) 2,100 Disk reads are cheaper than writes
Simple ETH transfer 21,000 Base cost of any transaction
Contract creation 32,000 + 200/byte Creating code is costly
SHA3/Keccak-256 30 + 6/word Cryptographic operations
External call (CALL) 2,600 (warm) / 100 (cold access base varies) Cross-contract calls
Log emission (LOG0) 375 + 8/byte Event emission

Notice the massive disparity: an ADD costs 3 gas, but writing a new storage slot costs 20,000 gas — a ratio of nearly 7,000:1. This reflects the true cost to the network. Arithmetic is cheap — it happens in memory and is discarded after the transaction. Storage writes are expensive because they change the global state permanently. Every full node must store that new value until the end of time (or until it is overwritten or the account is cleared).

⚠️ Common Misconception: "Gas is wasted when a transaction fails." Partially true, partially not. The gas is consumed (the validator did compute your failing transaction), but the EVM provides a gas refund mechanism: if your contract deletes storage entries (setting them to zero), you receive a partial refund, incentivizing state cleanup. The refund was originally up to 50% of gas used but was reduced to a maximum of 20% by EIP-3529 in the London hard fork.

11.5.3 Gas Limit and Block Gas Limit

There are two distinct gas limits in play:

Transaction gas limit: Set by the transaction sender. This is the maximum gas the sender is willing to use for this transaction. If the transaction uses less, the remainder is refunded. If it would use more, execution halts and the transaction reverts (but gas already consumed is not refunded).

Block gas limit: The maximum total gas for all transactions in a single block. As of 2025, this is approximately 36 million gas (raised from 30 million in early 2024 via EIP proposals). This means a block can contain at most about 1,700 simple transfers (36M / 21,000) or far fewer complex contract interactions. The block gas limit is the fundamental bottleneck that determines Ethereum's throughput.

📊 By the Numbers: At 36 million gas per block and 12-second block times, Ethereum processes roughly 3 million gas per second. A Uniswap V3 token swap costs approximately 150,000 gas. This means Ethereum can process about 20 Uniswap swaps per second at the base layer — a far cry from the thousands of transactions per second that centralized exchanges handle, and the reason Layer 2 scaling (Chapter 23) is so critical.

11.5.4 EIP-1559: The Fee Market Revolution

Before August 2021, Ethereum used a simple first-price auction for gas: users bid a gas price, and miners included the highest-bidding transactions. This created terrible user experience. Gas prices were unpredictable, users frequently overpaid, and wallet software struggled to estimate appropriate prices.

EIP-1559 (included in the London hard fork) fundamentally restructured the fee market:

Base fee: A protocol-determined per-gas price that adjusts algorithmically based on network utilization. When blocks are more than 50% full, the base fee increases (by up to 12.5% per block). When blocks are less than 50% full, the base fee decreases. This creates a predictable, transparent price signal.

Priority fee (tip): An optional per-gas tip paid directly to the block proposer to incentivize inclusion. During normal congestion, a minimal tip (1-2 gwei) suffices. During extreme congestion, higher tips may be necessary.

Max fee: The maximum per-gas price the sender is willing to pay (base fee + priority fee). If the base fee exceeds the max fee, the transaction waits in the mempool.

The burn: Here is the revolutionary part: the base fee is burned — destroyed permanently. It is not paid to miners (now validators). This means that when network usage is high, ETH is being removed from circulation faster than new ETH is issued through staking rewards. In periods of high demand, Ethereum becomes deflationary.

The formula for the actual gas cost is:

actual cost = gas_used * (base_fee + priority_fee)
refund = (max_fee - base_fee - priority_fee) * gas_used  [if max_fee > base_fee + priority_fee]

The elegance of EIP-1559 lies in its self-correcting nature. If demand spikes (say, a popular NFT mint causes a rush of transactions), the base fee rises rapidly — up to 12.5% per block, which means it can double in roughly six blocks (72 seconds). This escalating cost discourages low-value transactions, ensuring that the most valuable transactions can still be included. When the spike passes and blocks drop below 50% utilization, the base fee decreases, making the network affordable again. The result is a fee market that responds to demand in real time, without requiring users to guess what other users will bid.

The burn mechanism also created a new narrative around ETH as an asset. Under PoW, ETH was perpetually inflationary — new ETH was created with every mined block. Under PoS with EIP-1559, the net issuance depends on the balance between staking rewards (inflationary) and base fee burns (deflationary). During periods of high network usage — DeFi summer, NFT booms, memecoin frenzies — more ETH is burned than issued, making the supply shrink. Proponents call this "ultrasound money," a play on Bitcoin's "sound money" narrative. Critics note that deflationary monetary policy can discourage spending, but the debate itself highlights how deeply EIP-1559 changed Ethereum's economic character.

🧪 Try It Yourself: Run code/gas_calculator.py to explore gas costs for different transaction types and network conditions. The script lets you model how EIP-1559 base fees adjust in response to block utilization.


11.6 Turing Completeness: Power and Peril

11.6.1 What Turing Completeness Actually Means

A system is Turing complete if it can simulate any Turing machine — which, informally, means it can compute anything that is computable. Every general-purpose programming language (Python, Java, C++) is Turing complete. So is the EVM's bytecode instruction set.

In practical terms, Turing completeness means Solidity (and other EVM languages) can express:

  • Loops (for, while, recursion through internal function calls)
  • Conditional branching (if/else, switch)
  • Arbitrary data structures (arrays, mappings, structs)
  • Complex mathematical operations (not just addition and comparison but arbitrary computation)

Bitcoin Script is intentionally not Turing complete. It lacks loops, general-purpose data structures, and recursion. This is not a deficiency — it is a security feature. Bitcoin Script can express conditions for spending outputs, but it cannot express arbitrary programs. This makes it much easier to reason about what a Bitcoin script can and cannot do.

11.6.2 Why Turing Completeness Matters

Turing completeness is what allows Ethereum to be a general-purpose platform rather than a specialized one. Without it, you could not build:

  • Decentralized exchanges with complex order matching and automated market making
  • Lending protocols with dynamic interest rates based on utilization
  • DAOs with voting, delegation, and treasury management
  • NFT contracts with custom royalty logic and on-chain metadata
  • Prediction markets with resolution mechanisms
  • Layer 2 rollups with fraud proofs and state verification

Each of these requires loops, complex state management, and conditional logic that is beyond the expressive power of Bitcoin Script.

11.6.3 The Expanded Attack Surface

Turing completeness comes at a steep price: it is impossible to determine what a Turing-complete program will do without running it. This has profound security implications:

Reentrancy attacks. When contract A calls contract B, contract B can call back into contract A before A's state updates are complete. This is how the DAO hack of 2016 drained $60 million — the attacking contract repeatedly called the withdrawal function before the balance was updated. In a non-Turing-complete system, this circular calling pattern would be impossible.

Gas estimation difficulty. Because execution paths depend on runtime state, it is impossible to precisely predict how much gas a transaction will consume. Wallets must estimate, and estimates can be wrong — especially for contracts with complex branching logic.

Undecidable properties. It is impossible to algorithmically determine whether a given smart contract has bugs, will behave as intended, or contains vulnerabilities. Formal verification techniques can prove properties of specific contracts, but no tool can analyze arbitrary EVM bytecode and declare it "safe." This is a direct consequence of the halting problem.

Complexity as attack surface. More expressiveness means more ways to write bugs. Solidity has footguns that simpler languages avoid: integer overflow (mitigated since Solidity 0.8), reentrancy, delegatecall vulnerabilities, storage collision, access control errors, and dozens more. The history of DeFi exploits is substantially a history of bugs made possible by Turing-complete smart contracts.

⚠️ Common Misconception: "Turing completeness means Ethereum can compute anything." More precisely, it means Ethereum can compute anything computable — but subject to gas limits. In practice, Ethereum computation is severely constrained. You cannot train a machine learning model on-chain. You cannot run a database query over millions of records. The gas limit ensures that only modest computations are economically feasible. Ethereum is Turing-complete in theory but gas-limited in practice.

11.6.4 Bounded Computation: Turing Completeness with Training Wheels

The combination of Turing completeness and the gas mechanism creates a system that is technically capable of arbitrary computation but economically constrained to modest computation. This is an elegant balance:

  • Expressiveness: Developers can write any program they need.
  • Safety: Infinite loops and runaway computation are impossible — gas runs out.
  • Cost alignment: Complex computation costs more, reflecting its true burden on the network.
  • Predictability: While you cannot know exactly what a program will do, you know it will terminate within the gas limit.

This "bounded Turing completeness" is one of the key architectural innovations of Ethereum. It solves the halting problem not by restricting the programming language but by making computation a scarce, priced resource.

11.6.5 The DAO: When Turing Completeness Bites

No discussion of Turing completeness on Ethereum is complete without the event that nearly destroyed the network in its infancy. On June 17, 2016, an attacker exploited a reentrancy vulnerability in The DAO — a decentralized autonomous organization that had raised $150 million in ETH — and drained approximately 3.6 million ETH (roughly $60 million at the time).

The attack exploited a pattern that is only possible in a Turing-complete environment. The DAO's withdrawal function sent ETH to the caller before updating the caller's balance in storage. The attacker deployed a contract whose fallback function — code that executes automatically when the contract receives ETH — called the withdrawal function again. Because the balance had not yet been updated (the first call was still in progress), the second call passed the balance check and sent more ETH. The attacker's contract called back again, and again, and again, draining funds in a recursive loop that only stopped when the gas limit was reached.

In a non-Turing-complete language like Bitcoin Script, this attack is impossible. There are no callbacks, no recursive calls, no fallback functions. The victim's script either releases the funds or does not — there is no opportunity for an attacker to insert logic into the middle of the execution.

The DAO hack led to a controversial hard fork on July 20, 2016, which reversed the attacker's transactions and returned the stolen funds. The fork split the community: the forked chain kept the name "Ethereum," while the unforked chain became "Ethereum Classic." The episode remains the most vivid illustration of Turing completeness's cost: the same expressiveness that enables complex applications also enables complex attacks.

📊 By the Numbers: According to a 2023 report from blockchain security firm Rekt, over $7 billion has been lost to smart contract exploits since 2016. The categories of vulnerability — reentrancy, integer overflow, oracle manipulation, access control failures, flash loan attacks — are all consequences of Turing-complete contracts interacting with complex state in ways their developers did not anticipate.

11.6.6 The Spectrum of Smart Contract Languages

It is worth noting that "Turing complete" is not the only option. Several blockchain projects have explored restricted smart contract languages that sacrifice expressiveness for safety:

  • Bitcoin Script: Deliberately non-Turing-complete. Stack-based, no loops, no state. Extremely safe but extremely limited.
  • Solidity (Ethereum): Fully Turing-complete. Maximum expressiveness, maximum risk.
  • Plutus (Cardano): Based on Haskell and the extended UTXO model. Turing-complete but with functional programming discipline that eliminates certain classes of bugs.
  • Move (Sui, Aptos): Designed with resource safety as a first-class concept. Variables cannot be accidentally copied or discarded, preventing certain asset-handling bugs at the language level.
  • Cairo (Starknet): Designed for provable computation. Programs in Cairo can generate zero-knowledge proofs of their own execution.

Each point on this spectrum represents a different answer to the fundamental question: how much expressiveness is worth how much risk? Ethereum chose maximum expressiveness and relies on external tools — audits, formal verification, bug bounties — to manage the resulting risk. Whether this was the right choice remains one of the most actively debated questions in blockchain design.


11.7 The Merge: Ethereum's Greatest Engineering Feat

11.7.1 The Context: Why Proof-of-Work Had to Go

From its launch on July 30, 2015, through September 15, 2022, Ethereum ran on proof-of-work consensus — fundamentally the same mechanism Bitcoin uses. Miners competed to solve cryptographic puzzles, consuming enormous amounts of electricity. At its peak, Ethereum's annual energy consumption rivaled that of Chile, producing roughly 35 million tonnes of CO2 per year.

The Ethereum community had always planned to transition to proof-of-stake. Vitalik Buterin's original roadmap included the switch, and the 2014 Ethereum Yellow Paper noted PoS as a future upgrade. But "planning" and "executing" are separated by an ocean of engineering challenges.

11.7.2 The Beacon Chain: Building the New Engine

Rather than modifying the existing proof-of-work chain, the Ethereum developers took a parallel approach. On December 1, 2020, they launched the Beacon Chain — a completely new proof-of-stake blockchain that initially ran alongside the existing PoW chain. The Beacon Chain did not process transactions or execute smart contracts. Its sole job was to run the proof-of-stake consensus mechanism, manage validators, and prove that PoS worked at scale.

Validators deposited 32 ETH each into a deposit contract on the PoW chain, which the Beacon Chain tracked. By the time of the Merge, over 400,000 validators had staked more than 13 million ETH — roughly $20 billion at the time. The Beacon Chain ran flawlessly for nearly two years, processing epochs and finalizing checkpoints without a single consensus failure.

11.7.3 The Merge Itself: Changing Engines Mid-Flight

The Merge occurred on September 15, 2022, at block 15,537,393. Here is what happened technically:

  1. The existing PoW chain (now called the execution layer) continued producing blocks as normal, up to a predetermined Terminal Total Difficulty (TTD) of 58,750,000,000,000,000,000,000.

  2. When the PoW chain reached the TTD, it stopped relying on proof-of-work. From that point forward, block production was governed by the Beacon Chain (now called the consensus layer).

  3. The execution layer became a component of the consensus layer. Instead of miners competing to produce blocks, validators on the Beacon Chain were randomly selected to propose blocks. The execution layer still processed transactions and executed smart contracts — it just no longer decided who got to produce the next block.

The metaphor of "changing the engine of an airplane mid-flight" is apt. The Ethereum network had approximately $200 billion in value locked in DeFi protocols, thousands of dApps running, millions of users interacting — and the consensus mechanism was swapped out without stopping anything. No downtime. No forked chain. No lost transactions.

📊 By the Numbers: The Merge reduced Ethereum's energy consumption by approximately 99.95% — from roughly 83 TWh/year to roughly 0.01 TWh/year. ETH issuance dropped by about 90%, from approximately 13,000 ETH/day (PoW mining rewards) to approximately 1,700 ETH/day (PoS staking rewards). Combined with EIP-1559 burning, Ethereum became net deflationary during periods of high network usage.

11.7.4 Shadow Forks: Testing in Production

One of the most innovative testing strategies was the shadow fork. The Ethereum Foundation team, led by Marius van der Wijden, created copies of the mainnet state and ran the Merge transition on those copies. This was not a testnet with synthetic activity — it was the real Ethereum state, with real contract code and real account balances, running through the Merge transition.

Shadow forks revealed critical bugs that would not have been found on testnets:

  • Client diversity issues: Different Ethereum clients (Geth, Nethermind, Besu, Erigon) handle edge cases differently. Shadow forks exposed disagreements between clients that could have caused chain splits.
  • MEV relay failures: Flashbots and other MEV infrastructure needed to be compatible with the new block production mechanism. Shadow forks tested this integration.
  • State access patterns: Real mainnet state is far more complex than testnet state. Some state access patterns only appear with real-world contract storage.

Nine shadow forks of mainnet were conducted between April and August 2022. Each one found issues. Each one was fixed before the real Merge.

11.7.5 The Difficulty Bomb

Ethereum included a "difficulty bomb" (also called the "ice age") — a mechanism that exponentially increased mining difficulty over time, making PoW blocks progressively slower. This was a commitment device: it forced the community to either complete the transition to PoS or actively choose to delay it by voting to defuse the bomb. The bomb was delayed multiple times (through EIPs 3554, 4345, 5133, etc.) as the Merge's timeline shifted, but it served its purpose — it made the PoW status quo increasingly untenable.

11.7.6 What Could Have Gone Wrong

The Merge was not without risk. If any of the following had occurred, the consequences could have been severe:

  • Consensus failure: If execution layer and consensus layer clients disagreed on the state of the chain after the transition, the network could have split into multiple chains, each with a different view of reality. Billions of dollars in DeFi positions would have been duplicated across chains, creating chaos.
  • Validator failure: If a significant fraction of validators went offline at the moment of the Merge (due to misconfiguration, bugs, or network issues), block production could have stalled. With no PoW fallback, the chain would simply stop until enough validators came back online.
  • Client bugs: A single critical bug in any major Ethereum client could have caused nodes running that client to diverge from the rest of the network. This is why client diversity — having multiple independent implementations of the Ethereum protocol — was emphasized so heavily before the Merge.
  • Miner resistance: PoW miners stood to lose their revenue stream. Some organized around ETHW (Ethereum PoW), a fork that continued with proof-of-work. While ETHW launched, it quickly became irrelevant — the economic consensus overwhelmingly followed the PoS chain.

None of these catastrophic scenarios materialized. The Merge completed in approximately 12 minutes. The first PoS block was validated by a validator known as "Lido" at slot 4,700,013 of the Beacon Chain. No funds were lost. No chain split persisted. It was, by any measure, one of the greatest engineering feats in the history of distributed systems.

💡 Key Insight: The Merge succeeded because the Ethereum community invested years in testing infrastructure — devnets, testnets, shadow forks — before touching mainnet. This stands in sharp contrast to the "move fast and break things" culture of much of crypto. When you are managing $200 billion in other people's money, thoroughness is not optional.


11.8 Ethereum's State Growth Problem

11.8.1 The Unbounded State

Every account that has ever held ETH, every storage slot that a smart contract has ever written to, every byte of contract code that has ever been deployed — all of it is part of Ethereum's global state. And that state only grows.

Unlike transaction history (which can be pruned once it is no longer needed for validation), state is live. When a user calls a smart contract, the EVM must be able to read the contract's storage. If that storage was written three years ago and has not been accessed since, it still must be available. Every full node must store the entire state — and as of 2025, the state occupies over 300 gigabytes of disk space (for an archive node, much more).

📊 By the Numbers: Ethereum's state has grown from approximately 1 GB in 2016 to over 300 GB (archive node format) by 2025. The state trie contains approximately 1.4 billion state objects (account entries plus storage slots). Each year, approximately 100-200 million new state objects are created. At this rate, state size could exceed a terabyte within a few years.

11.8.2 Why State Growth Matters

State growth threatens Ethereum's decentralization in a concrete way. Running a full node requires storing the entire state. As the state grows:

  • Hardware requirements increase: Nodes need more RAM (state should ideally be cached for performance), more disk space (SSD required for acceptable performance), and more bandwidth (syncing the state takes longer).
  • Sync times increase: A new node joining the network must download and verify the entire state. This already takes hours to days, depending on hardware and bandwidth.
  • Geographic centralization: As hardware requirements grow, fewer individuals can afford to run nodes. Node operation gravitates toward cloud providers in regions with cheap infrastructure. This undermines the decentralization that is the entire point.

11.8.3 Proposed Solutions

The Ethereum community is actively researching several approaches to the state growth problem:

State expiry: Accounts and storage slots that have not been accessed for a long period (say, two years) would be moved to a "historical" state that is not required for block validation. If a user needs to access expired state, they would need to provide a Merkle proof of the expired state's existence (a "witness") with their transaction. This puts the burden of proof on the user who needs old state, rather than on every node in the network.

Verkle Trees: A proposed replacement for the Merkle Patricia Trie that uses vector commitments instead of hash-based commitments. Verkle trees produce dramatically smaller proofs (roughly 100-200 bytes vs. several kilobytes for MPT proofs), making stateless clients more practical. A stateless client would not store the state at all — it would receive the necessary state data (witnesses) with each block and verify them against the state root.

EIP-4444: History expiry: While not directly about state, this proposal would allow nodes to stop serving historical blocks and receipts older than one year. This would reduce the storage requirements for full nodes and is a step toward a more modular architecture where historical data is preserved by specialized archival services rather than every node.

State rent: An early proposal (now largely abandoned) where accounts would pay ongoing "rent" for the state they occupy. Accounts that ran out of rent would be evicted from the state. This was simple in concept but created terrible user experience — imagine your smart contract being evicted because you forgot to top up its rent.

⚠️ Common Misconception: "State growth will kill Ethereum." While the concern is real, several mitigating factors are in play. Hardware costs continue to decrease. Client software continues to optimize state storage (Erigon, for example, uses a flat key-value store rather than a trie structure on disk, dramatically reducing storage overhead). And the proposed solutions above are actively being implemented. State growth is a serious engineering challenge, not an existential threat — but it is a challenge that must be addressed.

11.8.4 A Concrete Example: The Cost of One Storage Slot

To appreciate the scale of the state growth problem, consider what happens at the level of a single storage slot. When someone mints an NFT on a popular collection, the NFT contract writes the token owner's address to a storage slot (e.g., ownerOf[tokenId] = msg.sender). This one write:

  • Costs the minter 20,000 gas (approximately $1.50 at typical gas prices).
  • Creates a 64-byte entry in the contract's storage trie (32-byte key + 32-byte value).
  • Is replicated across every full node in the network — roughly 6,000 nodes.
  • Will persist until the storage slot is explicitly overwritten or cleared.
  • Adds to the state that every new node must download during sync.

Now multiply this by the tens of millions of NFTs minted, the billions of DeFi storage writes, and the hundreds of millions of token balance updates since 2015. Each one created a state object that persists. Each one makes syncing a new node slightly harder. Each one contributes to the hardware requirements that determine who can and who cannot participate in Ethereum's decentralization.

The gas cost (20,000 gas) is a one-time payment. The storage cost is permanent. This mismatch — paying once for a perpetual burden — is the root of the state growth problem. Various proposals for "state rent" attempted to align these incentives, but the user experience implications (imagine your tokens disappearing because you did not pay rent) have kept state rent off the implementation roadmap. The search for a better solution continues.


11.9 Progressive Project: Designing Our Voting dApp State Model

11.9.1 Where We Are in the Project

In Chapter 10, we defined the conceptual requirements for our decentralized voting system: what it should do, who the participants are, and what properties (transparency, immutability, access control) it must have. Now we translate those requirements into Ethereum's architectural primitives.

This is the state modeling step — arguably the most important design step in building any Ethereum application. Before writing a single line of Solidity, we need to answer: What data does our contract store? How is it structured? What state transitions does it support? How do Ethereum's account model and storage constraints shape our design?

11.9.2 Identifying the State

Our voting dApp needs to track:

Proposals: Each proposal has an ID, a description (or a hash of the description, since storing long strings on-chain is expensive), and a vote count for each option (for/against, or multiple choices).

Voters: We need to know who is eligible to vote, whether each eligible voter has already voted, and (optionally) how they voted. We need to prevent double-voting.

Election metadata: The election administrator, the start time, the end time, and whether the election is currently active.

In Ethereum terms, these translate to:

// Proposal struct
struct Proposal {
    bytes32 descriptionHash;  // IPFS hash of full description
    uint256 yesVotes;
    uint256 noVotes;
    bool exists;
}

// Contract storage
mapping(uint256 => Proposal) public proposals;      // proposalId => Proposal
mapping(address => bool) public eligibleVoters;       // who can vote
mapping(address => mapping(uint256 => bool)) public hasVoted;  // voter => proposalId => voted?
address public admin;
uint256 public electionStart;
uint256 public electionEnd;
uint256 public proposalCount;

11.9.3 Mapping to Ethereum's Architecture

Let us connect each element to what we learned in this chapter:

Accounts involved: - Admin EOA: The election administrator who deploys the contract and registers eligible voters. - Voter EOAs: Each eligible voter's address. They sign transactions to cast votes. - Voting Contract Account: The smart contract holding all election state. It has code (the voting logic) and storage (the proposals and votes).

State transitions: 1. createProposal(descriptionHash) — Only admin can call. Adds a new proposal to the proposals mapping. Increments proposalCount. 2. registerVoter(voterAddress) — Only admin can call. Sets eligibleVoters[voterAddress] = true. 3. castVote(proposalId, voteChoice) — Only eligible voters who have not yet voted on this proposal can call. Checks eligibleVoters[msg.sender] and !hasVoted[msg.sender][proposalId]. Updates the vote count and sets hasVoted[msg.sender][proposalId] = true.

Each of these is a transaction initiated by an EOA, calling a function on the contract account, which modifies the contract's storage in the global state trie.

Gas considerations: - Writing hasVoted[voter][proposalId] = true costs 20,000 gas (new storage slot) the first time. This is the most expensive single operation in casting a vote. - Reading eligibleVoters[voter] costs 2,100 gas (storage read). - A typical castVote transaction might cost approximately 60,000-80,000 gas total, depending on the complexity of the checks.

State model diagram:

Global State Trie
├── 0xAdmin (EOA)
│   ├── nonce: 15
│   └── balance: 2.5 ETH
├── 0xVoter1 (EOA)
│   ├── nonce: 3
│   └── balance: 0.1 ETH
├── 0xVotingContract (Contract)
│   ├── nonce: 0
│   ├── balance: 0 ETH
│   ├── codeHash: 0xabc...  (voting contract bytecode)
│   └── storageRoot: 0xdef...
│       ├── slot[0]: admin address
│       ├── slot[1]: electionStart
│       ├── slot[2]: electionEnd
│       ├── slot[3]: proposalCount = 2
│       ├── slot[keccak256(0, proposals)]: Proposal 0 data
│       ├── slot[keccak256(1, proposals)]: Proposal 1 data
│       ├── slot[keccak256(0xVoter1, eligibleVoters)]: true
│       └── slot[keccak256(0xVoter1, 0, hasVoted)]: true

11.9.4 Design Decisions and Tradeoffs

Several architectural decisions deserve explicit attention:

Storing descriptions off-chain. We store only a hash of the proposal description, not the full text. Storing a 500-character description on-chain would cost approximately 320,000 gas (about $5-50 depending on gas prices). Instead, we store the full text on IPFS and record the IPFS hash on-chain. This is a common pattern: put the minimum necessary data on-chain, store the rest off-chain, and use a cryptographic hash to link them.

Using mappings instead of arrays. Ethereum mappings (mapping(key => value)) are stored as individual storage slots keyed by keccak256(key, slot_number). They do not support iteration — you cannot loop over all voters. This is a deliberate design choice: iteration over a large mapping could exhaust the gas limit. If we need to list all proposals, we maintain a separate counter (proposalCount) and access proposals by index.

Time-based access control. The electionStart and electionEnd fields use block.timestamp, which is set by the block proposer and is only guaranteed accurate to within about 12 seconds. For a multi-day election, this imprecision is irrelevant. For a last-second vote, it could matter.

🧪 Try It Yourself: Run code/account_model.py to simulate the account model interactions in our voting dApp. The script models EOA and contract accounts, executes state transitions for voter registration and vote casting, and displays the state changes at each step.

11.9.5 Next Steps

In Chapter 12, we will dive deep into the EVM — the machine that actually executes our voting contract's bytecode. In Chapter 13, we will write the Solidity code for this state model and deploy it to a test network. The architectural planning we have done here will make the coding dramatically easier: we know exactly what data we are storing, where it lives, and how it changes.


11.10 Summary and Looking Forward

This chapter has covered the architectural foundations that make Ethereum fundamentally different from Bitcoin:

The account model replaces Bitcoin's UTXO system with persistent accounts that have balances, nonces, and (for contracts) storage and code. This makes stateful computation natural but introduces challenges around privacy, state growth, and transaction ordering.

The global state is the complete mapping of every account's state, stored in a Modified Merkle Patricia Trie and committed to a single 256-bit root hash in each block header. Ethereum is, at its core, a state machine: transactions are inputs, the EVM is the state transition function, and the state trie records the results.

Gas is the mechanism that makes Turing-complete computation safe on a decentralized network. By pricing every computational step, Ethereum ensures that infinite loops are infinitely expensive and that the cost of computation reflects its true burden on the network. EIP-1559 refined the gas market with algorithmically-adjusted base fees and a burn mechanism.

Turing completeness gives Ethereum the expressive power to support arbitrary applications — but at the cost of an expanded attack surface, undecidable properties, and the entire category of smart contract vulnerabilities that populate the DeFi exploit headlines.

The Merge demonstrated that a live, $200B+ network could transition its consensus mechanism without downtime — one of the great engineering achievements in distributed systems history. The transition from PoW to PoS reduced energy consumption by 99.95% and fundamentally changed Ethereum's economic model.

State growth remains an open engineering challenge. As Ethereum's state approaches 1.4 billion objects and counting, solutions like Verkle trees, state expiry, and stateless clients are being actively developed.

In Chapter 12, we descend from architecture to implementation. We will open the hood of the Ethereum Virtual Machine and examine the bytecode instruction set that executes our smart contracts, the stack-based execution model, the memory layout, and the calling conventions that make contract-to-contract interaction possible. If this chapter described the what of Ethereum's design, Chapter 12 describes the how.


Key Takeaways

  1. Ethereum uses an account model rather than Bitcoin's UTXO model, providing natural support for stateful computation at the cost of reduced privacy and increased state growth.

  2. There are exactly two types of accounts: externally owned accounts (EOAs) controlled by private keys, and contract accounts controlled by code. Only EOAs can initiate transactions.

  3. The global state is the mapping from every address to its account state, stored in a Modified Merkle Patricia Trie and committed to a state root in each block header.

  4. Gas solves the halting problem economically: every computational step costs gas, ensuring that infinite loops are infinitely expensive. EIP-1559 introduced a base fee (burned) and priority fee (paid to validators).

  5. Turing completeness enables arbitrary computation but expands the attack surface — reentrancy, gas estimation challenges, and undecidable security properties are direct consequences.

  6. The Merge (September 15, 2022) transitioned Ethereum from PoW to PoS without downtime, reducing energy consumption by 99.95%. Shadow forks were the key testing innovation.

  7. State growth is an open challenge — Ethereum's state exceeds 1 billion objects and grows by hundreds of millions annually. Verkle trees, state expiry, and stateless clients are active research areas.


Further Reading