Opening a wallet usually displays your balance almost instantly. It is natural to assume that the blockchain must directly store “how many coins a given address currently has,” and that the wallet simply reads that number.
Yet the first impression many people have of a blockchain is often a series of transaction records: who transferred how many coins to whom, and when. This raises a question: if the chain mainly records individual transactions, why can a wallet immediately know the current balance? That question is the entry point to understanding blockchain state.
What Does a Node Look At When You Check Your Balance?
Start with a thought experiment. Suppose a bank stored only the full transfer history and no current balance for each account. Every time you checked your balance, the bank would have to start from the first transaction after your account was opened, add all incoming amounts, subtract all outgoing amounts, and finally calculate a number. Doing this once might be acceptable, but if many users checked their balances every day, the cost would quickly become impractical.
So banks usually store two kinds of information at the same time:
- Transaction history: a chronological record of “what happened.”
- Account balances: a record of “what the current result is.”
A blockchain needs a similar distinction. A blockchain ledger does not have only one layer called “the transaction list.” It contains at least two key kinds of information:
- An ordered transaction history: transactions are packed into blocks and linked in order.
- The current result after transaction execution: that is, the current world state, usually called state.
Transaction history answers “what happened in the past”; state answers “what the world looks like now, after those transactions have been executed.”
Here, let us briefly review two background concepts. A transaction is a request to change the ledger, such as “transfer 10 tokens from address A to address B”; a block is a collection of transactions arranged in a certain order. An address is like an account identifier, used to receive, hold, or send assets. State often organizes the current result around addresses.
The bank analogy helps explain the difference between “history” and “balance,” but it has limits: a bank is a centralized database, while a blockchain’s state must be computed and verified by multiple nodes according to the same rules. The analogy cannot explain blockchain verification mechanisms; it only shows why “storing only history” creates query costs.
What Is State? A Snapshot of the Current World
In a blockchain context, state can be understood as a snapshot of the current world result after all confirmed transactions have been executed.
In account-model blockchains, state usually includes:
- the balance of each address;
- the nonce of each address;
- data stored by smart contracts, that is, contract storage;
- and other account information defined by the protocol.
Here, nonce can be understood simply as a count of how many transactions an address has already sent. It is used for transaction ordering and to prevent certain forms of duplicate submission. Different chains may define nonce slightly differently, but in the account model it is part of state.
You can think of it as a table that is constantly updated:
| Address or contract | Part of the current state |
|---|---|
| Address A | Balance 80 |
| Address B | Balance 70 |
| Contract C | A certain stored value is 42 |
This table is only illustrative. In real systems, state is organized in more complex ways, and different blockchains may use different models. For example, some chains use the UTXO model, while others use the account model. This article does not attempt a full comparison of the two; it focuses on the shared idea: state represents “who has what now and what is stored in contracts.”
It is especially important to note that state does not exist out of nowhere, nor is it permanently unchanged. It is the result of executing transaction history according to rules. When new transactions arrive, state changes from one version to another.
In other words, blockchain “immutability” mainly means that the historical order of transactions and the rules of state transition are difficult to rewrite arbitrarily; it does not mean that current balances never change. Balances certainly change; what changes is the current state, while what should not be arbitrarily rewritten is the transaction history that causes those changes.
Transactions Drive State Transitions
Now that we understand state as “the current result,” we also need to understand how it changes.
A blockchain can be viewed as a deterministic state machine. A state machine has a current state, inputs, and a new state obtained by processing those inputs according to rules. For a blockchain:
- the current state is S1;
- the input is a transaction;
- the execution rules are defined by the protocol and contracts;
- the output is the new state S2.
Consider a simple set of numbers. Suppose the initial state is:
- Alice: 100
- Bob: 50
The first transaction: Alice transfers 20 to Bob. After execution, the state becomes:
- Alice: 80
- Bob: 70
The second transaction: Bob transfers 10 to Alice. After execution, the state becomes:
- Alice: 90
- Bob: 60
The key here is not just that the numbers change, but order. In a blockchain, transactions are executed in block order, and the result of each transaction becomes the precondition for the next. If the order differs, the result may differ.
More importantly, this process is deterministic: given the same initial state, the same transaction order, and the same execution rules, any honest executor will arrive at the same new state. This is exactly what allows nodes to verify each other’s results. Nodes do not need to trust a central institution saying “the balance is now this”; they can execute transactions themselves, compute the state, and check whether the results agree.
Valid transactions cause state changes. Invalid transactions do not produce the expected changes to assets or contract state; in real systems, however, the handling of failed transactions depends on the rules of the specific chain. Some chains include failed transactions in blocks as well, possibly charging fees or updating the sender’s transaction count. To understand the main flow, it is enough to grasp the core: transactions are the input to state transitions, and state is the result after execution.
This numerical example is also simplified: it ignores fees, contract internal storage, failed transactions, and other details. It is used only to illustrate “how a transaction sequence deterministically changes a state snapshot.”
Why Not Record Only Transactions?
Since transaction history already records every step, why do nodes need to maintain state separately?
The reason lies in efficiency and verifiability.
To answer “what is Alice’s balance now” using only transaction history, a node would have to start from the genesis block, replay all relevant transactions in order, and keep calculating up to the latest one. If a chain has been running for years and processes millions of transactions each year, checking a single balance could require recomputing a large amount of history. For wallets, exchanges, block explorers, and smart contract interactions, this cost is unacceptable.
Verifying a new transaction also requires the current state. For example, if Alice wants to send another 100 coins, the node needs to quickly check:
- Is Alice’s current balance sufficient?
- Does this transaction’s nonce match expectations?
- Are the conditions required for the contract call satisfied?
- Would the transaction violate protocol rules?
If every verification replayed the entire history, the system would become extremely inefficient. Maintaining current state is equivalent to letting nodes keep a “latest result,” so they can quickly check whether new transactions are valid.
Therefore, transaction history and state are not substitutes for each other:
- Transaction history is used for auditing, tracing, and replay;
- state is used for efficiently querying current results and verifying new transactions.
In theory, state can be recomputed from transaction history. Full nodes maintain state not because transaction history is worthless, but because real-world use requires quickly obtaining current results. Calling state a “redundant cache” is inaccurate; it is a necessary design that allows a blockchain to support everyday queries and contract execution.
How Blockchains Commit to State: The State Root
The next question is this: state can be large, containing a large amount of account and contract data. A blockchain cannot copy the full state into every block, can it?
Usually it does not. What is stored in the block header is a cryptographic commitment to the current state, commonly in the form of a state root.
A hash digest can be understood simply as a “fingerprint” of a piece of data: if the data does not change, the fingerprint does not change; if the data changes, the fingerprint usually changes. The state root is the commitment obtained by applying a cryptographic digest to the current world state. It does not contain every account’s full balance, but it can be used to check whether a given state matches the result accepted by the chain.
Take Ethereum as an example: its block header contains a stateRoot field, which commits to the world state after transaction execution. After executing the transactions in a block, nodes calculate the new state root and compare it with the state root in the block header. If the two do not match, it means the execution result differs from what the block producer claimed, and the block is rejected.
This also clarifies a common misunderstanding: a blockchain does not directly write every account’s full current balance into every block. The full state is usually maintained locally by full nodes; the block header stores a summary commitment such as the state root. When a wallet queries a balance, it usually reads the state maintained by a node through that node, rather than reading the balance directly from some field in the block header.
The state root also provides verification benefits. With the state root and the corresponding proof, a light node can verify whether a certain account or storage value belongs to this state without storing the full state itself. The specific proof structure involves more complex data structures, which this article does not cover; the key point is to understand: a blockchain makes a verifiable commitment to the current state rather than stuffing the full state into every block.
The Division of Labor Between Transaction History and State
At this point, another misunderstanding easily arises: since state is so important, does a blockchain mainly record state rather than transactions?
No. More accurately: a blockchain both stores an ordered transaction history and commits to the state result after transaction execution.
Transaction history is like a complete video recording, recording what happened at every step; state is like the current score, telling you the result right now. The recording can reconstruct the score, but when the game is still going on, relying on the current score alone is more efficient. This metaphor also has limits: a blockchain’s state is not maintained by a single referee, but computed and verified by multiple nodes according to rules.
The division of labor between the two can be understood as follows:
- transaction history provides an auditable sequence of events;
- state provides a queryable, verifiable current result;
- state can be recomputed from transaction history, so full nodes can verify rather than blindly trust;
- nodes may also choose to retain older state or rebuild state by replaying transactions, but this requires storage and computation costs.
In real systems, different nodes store different things. Full nodes usually maintain current state and verify transactions; archive nodes retain more historical state, making it easier to query data from a past moment; light nodes store only a small amount of information and rely on state roots and proofs for verification. There is no need here to go deep into the implementation details of each node type; it is enough to know that transaction history and state together form the complete ledger, rather than being an either-or choice.
Putting State Back into the Blockchain Mental Model
Now we can return to the original question: why do blockchains record state, not just transactions?
Because transactions describe changes, while state describes the result after those changes. To support balance queries, verify new transactions, and execute smart contracts, a blockchain must know the current state. Storing only transaction history can in theory recompute state, but the cost grows with history and cannot support real-world use.
The core relationship can be compressed into one sentence:
Transactions answer “what happened,” while state answers “what is now.”
Transactions are events, state is the result; transactions are input, state transitions are output. Through ordered transactions and deterministic rules, a blockchain derives a new state from an old state and makes a cryptographic commitment to the current result using a state root. Transaction history remains important for auditing and replay; but state makes the blockchain a usable payment and computation system, not merely a growing historical log.
When you later see data such as account balances, contract storage, or TVL, you can understand them as references to or computations over some state. When you encounter deeper topics such as state bloat, state expiry, or stateless clients, you can also return to this basic model: a blockchain needs not only to remember what happened in the past, but also to know what is now.