Glossary

State Transition

The process by which a blockchain moves from one valid state to another through the execution of transactions in a new block.

Key Takeaways

  • A state transition is the deterministic process that takes a blockchain's current state and a set of transactions, validates and executes them, and produces a new state. Every node running the same function on the same inputs must arrive at the identical result.
  • Different blockchains represent state differently: Bitcoin uses the UTXO model (a set of unspent outputs), while Ethereum uses the account model (a mapping of addresses to balances and storage).
  • Layer-2 networks like rollups prove their state transitions to the base layer using either fraud proofs (optimistic rollups) or validity proofs (ZK rollups), inheriting L1 security without re-executing every transaction on-chain.

What Is a State Transition?

A state transition is the process by which a blockchain moves from one valid configuration to another. In this context, "state" refers to the complete snapshot of all relevant data at a given block height: account balances, smart contract storage, unspent transaction outputs, and any other information the protocol tracks. When a new block of transactions is processed, the state transition function takes the current state as input, applies each transaction according to the protocol's rules, and outputs a new state.

The concept is foundational to how blockchains work. Every full node in a network independently executes the same state transition function on the same ordered set of transactions. If any node arrives at a different result, it rejects the block. This deterministic execution is what allows thousands of nodes to agree on a single, consistent ledger without trusting each other: the consensus mechanism determines which blocks to process, and the state transition function determines what those blocks mean.

How It Works

At its simplest, a state transition function can be expressed as:

S' = F(S, T)

Where:
  S  = current state
  T  = a transaction (or set of transactions)
  F  = the state transition function (protocol rules)
  S' = the resulting new state

The function F encodes all of the protocol's validation rules. It checks that each transaction is properly signed, that the sender has sufficient funds, that no double-spending occurs, and that any contract-level logic executes correctly. If a transaction violates any rule, it is rejected (or, in Ethereum's case, it may still be included but its effects are reverted while the gas fee is still consumed).

At the block level, transactions are applied sequentially. The output state of one transaction becomes the input state for the next. After all transactions in a block are processed, finalization steps such as block reward distribution produce the final post-block state. A cryptographic commitment to this state (the state root) is stored in the block header, allowing any node to verify correctness.

UTXO Model: Bitcoin

In Bitcoin, the state is the set of all unspent transaction outputs (UTXOs). Each UTXO represents a specific amount of bitcoin locked by a script that defines who can spend it. A state transition in Bitcoin works as follows:

  1. For each input in the transaction, verify that the referenced UTXO exists in the current set and that the provided digital signature satisfies its locking script
  2. Verify that the sum of input values is greater than or equal to the sum of output values (the difference becomes the miner fee)
  3. Remove consumed UTXOs from the set and add newly created UTXOs

The UTXO model treats each output as an indivisible unit: it must be fully consumed when spent, with any "change" sent back as a new output. As of early 2025, Bitcoin's UTXO set contains approximately 173 million entries and occupies around 11 GB on disk.

Account Model: Ethereum

Ethereum represents state as a mapping of 20-byte addresses to account objects. Each account contains four fields: a nonce (transaction count), a balance (in wei), a storage root (a Merkle Patricia trie encoding the contract's storage), and a code hash (hash of any associated EVM bytecode).

The Ethereum Yellow Paper formalizes the state transition function as σ' = Υ(σ, T), where σ is the world state and T is a transaction. At the block level, Π(σ, B) → σ' processes all transactions in block B sequentially. Transactions directly modify account balances and storage slots rather than consuming and creating discrete outputs.

For a deeper comparison of these two approaches, see the research article on UTXO model vs. account model.

State Transition Costs

Modifying blockchain state is expensive because every full node must store the updated data indefinitely. Ethereum uses gas to meter state access and modification costs:

OperationGas Cost
Cold storage read (SLOAD)2,100
Warm storage read (SLOAD)100
Write: zero to non-zero (SSTORE)20,000+
Write: non-zero to non-zero (SSTORE)2,900
Write: non-zero to zero (refund)4,800 refund

Writing new data to state (zero to non-zero) costs roughly 7x more than modifying existing data, reflecting the permanent storage burden that new state entries impose on the network. These costs were refined through EIP-2200, EIP-2929, and EIP-3529 to better align gas prices with the actual computational and storage costs nodes incur.

State Transitions in Rollups

Layer-2 scaling solutions, particularly rollups, execute state transitions off-chain and then prove their correctness to the base layer. This approach allows thousands of transactions to be processed without each one consuming L1 block space, while still inheriting the security of the underlying chain.

Optimistic Rollups

Optimistic rollups post batched transaction data and the resulting state root to L1, assuming the state transition is valid unless challenged. A 7-day challenge window allows any observer to submit a fraud proof if they detect an incorrect transition.

The dispute resolution process narrows the disagreement down to a single computational step through an interactive bisection protocol. That step is then re-executed on-chain. If the result diverges from what the sequencer claimed, the sequencer's bond is slashed and the batch is reverted. Arbitrum and Optimism are prominent examples.

ZK Rollups

ZK rollups take a different approach: a prover constructs a cryptographic validity proof (a zk-SNARK or zk-STARK) attesting that all transactions in the batch were executed correctly according to the state transition rules. An L1 smart contract verifies this proof on-chain.

Because the proof is mathematically verified rather than assumed correct, ZK rollups require no challenge period: transactions finalize as soon as the proof is verified on L1. The tradeoff is that generating validity proofs is computationally intensive.

For a detailed comparison of these scaling approaches, see rollup vs. state channel scaling tradeoffs.

Why It Matters

State transitions are the core mechanism that gives blockchains their utility. Every token transfer, smart contract call, UTXO spend, and DeFi interaction is ultimately a state transition. Understanding how they work clarifies several practical concerns:

  • Transaction fees reflect the cost of state transitions: operations that create new state (deploying a contract, opening a new storage slot) cost more than operations that merely read or modify existing state
  • Scalability bottlenecks trace back to state transition throughput: how many transitions a network can process per second, and how much state each node must store and serve
  • Security models for L2s are defined by how they prove state transitions to L1: the choice between fraud proofs and validity proofs determines finality time, trust assumptions, and withdrawal delays
  • Protocols like Spark and other Bitcoin L2 solutions move state transitions off-chain to achieve higher throughput while preserving the security guarantees of the base layer

Risks and Considerations

State Bloat

Every state transition that creates new data adds to the cumulative storage burden on full nodes. Over time, this leads to state bloat: the ever-growing size of the data every node must store and serve. Ethereum's state database exceeds 340 GB, and an estimated 80% of stored state has been untouched for over a year. Bitcoin's UTXO set has tripled in size since 2018.

Unchecked state growth threatens decentralization by raising hardware requirements for running full nodes. Proposed mitigations include state rent (charging for ongoing storage), state expiry (removing inactive state), Verkle trees (reducing witness sizes by approximately 23x compared to Merkle Patricia tries), and accumulator-based approaches like Utreexo for compressing Bitcoin's UTXO set.

Determinism Requirements

State transition functions must be perfectly deterministic: the same inputs must always produce the same output on every node. Any source of non-determinism (floating-point arithmetic, system clock references, uninitialized memory) can cause consensus failures where nodes disagree on the correct state. This constraint heavily influences the design of virtual machines like the EVM and Bitcoin Script.

Verification Costs

Validating state transitions requires computational resources proportional to transaction complexity. As smart contracts grow more sophisticated and transaction throughput increases, verification becomes a bottleneck. Stateless client designs aim to solve this by allowing nodes to verify blocks using compact witnesses attached to each block, rather than maintaining the full state locally. This approach, enabled by Verkle tree migration, would allow nodes to verify state transitions with witness data of approximately 150 KB rather than needing access to the entire state database.

Rollup Trust Assumptions

When state transitions move off-chain to L2s, the trust model depends on the proving mechanism. Optimistic rollups assume correctness and rely on at least one honest watcher to detect and challenge invalid transitions during the 7-day window. ZK rollups offer stronger guarantees through mathematical proofs but introduce complexity in prover infrastructure and potential bugs in circuit implementations. Both approaches represent tradeoffs between finality time, computational cost, and trust assumptions.

This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.