Accounts, Transactions and Blocks
Accounts hold state, transactions change it, and blocks record the changes in order. This lesson explains the two account types, the fields of a transaction, the transaction types in use today, and how a transaction travels from a wallet to a finalised block.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish externally owned accounts from contract accounts.
- Describe the fields of a transaction and the transaction types in use.
- Explain how the nonce orders transactions and prevents replay.
- Trace a transaction from signing to finality.
- Interpret the status and gas fields of a receipt.
Externally owned accounts and contract accounts
Ethereum's world state maps 20-byte addresses to accounts. Every account has four fields: a nonce, a balance in wei, a code hash and a storage root. There are two kinds of account, compared below.
An EOA's private key is a random 256-bit number. The public key is derived from it with elliptic curve cryptography (secp256k1), and the address is the last 20 bytes of the Keccak-256 hash of the public key. Addresses are usually written in mixed-case hexadecimal (EIP-55), where the case of each letter is a checksum that catches typing errors. Since the Pectra upgrade (May 2025), EIP-7702 lets an EOA delegate to contract code, which wallets use for features such as batched transactions, but the account is still controlled by its key.
EOA or contract account?
What a transaction contains
A transaction is a message signed by an EOA. The following table lists the fields of a typical EIP-1559 transaction.
| Field | Purpose |
|---|---|
| nonce | The sender's transaction count; each transaction must use the next number, which orders them and prevents replay |
| to | The recipient address; empty for contract creation |
| value | Wei transferred to the recipient |
| data (input) | Calldata: an encoded function call, or creation bytecode for a deployment |
| gas (gas limit) | The most gas the transaction may use |
| maxFeePerGas, maxPriorityFeePerGas | The fee the sender is willing to pay per unit of gas |
| chainId | The network the transaction is valid on |
| v, r, s | The signature, from which nodes recover the sender's address |
There is no "from" field: nodes recover the sender from the signature. Transaction types in use are legacy (type 0, with a single gasPrice), access-list (type 1), EIP-1559 (type 2, the default), blob transactions used by rollups (type 3) and set-code transactions for EIP-7702 (type 4).
Transaction fields
The transaction lifecycle
The following sequence shows how a transaction moves from a wallet into the chain.
-
Sign
The wallet builds the transaction, fills in the nonce, gas limit and fees, and signs it with the private key.
-
Broadcast
A node receives it through
eth_sendRawTransaction, checks the signature, nonce and balance, and gossips it to peers. -
Wait in the mempool
The transaction is pending and publicly visible in nodes' transaction pools.
-
Include
A block proposer selects it, usually by priority fee, executes it and includes it in a block with a receipt.
-
Confirm and finalise
Later blocks build on that block; after about two epochs, the block is finalised.
A transaction can fail at different points. If its nonce is already used, or its sender cannot pay the maximum fee, nodes reject it before inclusion. If its execution reverts or runs out of gas, it is still included in a block, its receipt has status 0, its state changes are undone and the gas it used is paid.
The following diagram shows the stages and where a transaction can fail.

Where did it fail?
Blocks
A block has a header and a body. The header holds the parent block's hash, the block number, timestamp, gas limit, gas used, base fee, the fee recipient (the proposer's chosen address) and three Merkle-Patricia trie roots: the state root, the transactions root and the receipts root. These roots let anyone prove that a transaction, receipt or account value belongs to a block without downloading everything.
Blocks are proposed every 12 seconds. The block gas limit caps the total gas of a block and is adjusted gradually by validators; since the Fusaka upgrade, one transaction may use at most 16,777,216 gas regardless of the block limit.
Inside a block header
A stuck transaction
A user sends three transactions from the same account with nonces 7, 8 and 9. Transaction 7 was sent with a very low maximum fee and is still pending; 8 and 9 had high fees. Why have none of them been included?
Transactions from one account must be included in nonce order. Nonce 7 cannot be included while its maximum fee is below the base fee, so 8 and 9 wait behind it, however high their fees. The user can replace transaction 7 by sending a new transaction with nonce 7 and a higher fee (wallets call this speeding up), or cancel it by sending a zero-value transaction to themselves with nonce 7. Once nonce 7 is included, 8 and 9 follow.
Reading a receipt
A developer's script reports that a transaction to a contract was mined, but the contract's state did not change. The receipt shows status: 0 and gasUsed: 29874. What happened?
Status 0 means the transaction reverted: it was included in a block, but all its state changes were undone. The 29,874 gas consumed up to the revert was still paid. The developer should simulate the same call with eth_call or estimateGas to read the revert reason, then fix the input or the contract. Checking status, not only whether a receipt exists, is essential in any application that sends transactions.
A transaction has no "from" field. How do nodes know who sent it?
Show answer
They recover the sender's public key, and therefore address, from the signature (v, r, s) and the transaction data. Only the holder of the private key could have produced that signature.
Exam Tips
Remember for the exam
- EOAs are controlled by keys and start transactions; contract accounts run only when called.
- The nonce orders an account's transactions; a pending low nonce blocks higher ones.
- There is no from field: the sender is recovered from the signature.
- A reverted transaction is still mined, has status 0 and pays for gas used.