Ethereum
trace_replayBlockTransactions
When you need the deepest possible view of an Ethereum block, trace_replayBlockTransactions re-executes every transaction in it from scratch and returns whichever combination of trace, vmTrace, and stateDiff you ask for, per transaction. It's the block-wide counterpart to trace_replayTransaction: same selectable outputs, but applied to the full transaction list in execution order. Because it actually replays each transaction against the prior state, it can report the exact balance, nonce, code, and storage deltas every ETH transfer and contract call produced. This runs on Ethereum mainnet (chain ID 1) through the trace namespace at https://ethereum.therpc.io/YOUR_API_KEY, served by an archive node. Give it a block (number or tag) and at least one trace type.
Use cases
- Request
["stateDiff"]and get a complete write-by-write audit of every transaction in the block, the kind of feed a chain-analytics pipeline ingests to track exactly what each transaction changed on-chain. - Reconstruct all balance movements in the block for accounting. The state diffs capture ETH credited and debited even when no Transfer event was emitted.
- Replay a known MEV block with
["trace","vmTrace"]to follow the full execution flow across every transaction and see how a bundle of swaps and liquidations fit together in one slot.
Parameters
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockParameter | string | Yes | Block whose transactions to replay. |
| 2 | traceTypes | array | Yes | One or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required. |
Response
| Type | Description |
|---|---|
| array | Array of per-transaction replay results in block order. Each element has the same shape as trace_replayTransaction output, plus `transactionHash`. |
Example request
Try it live in the Ethereum playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32601 | Method not found | trace namespace not enabled or not supported by this client. |
-32602 | Invalid params | blockParameter is malformed or traceTypes is empty or contains unknown values. |
-32000 | block not found | Block does not exist or archive trace data is unavailable for that block. |
Common pitfalls
- This is the heaviest call in the trace namespace. It replays every transaction in the block and computes each requested view for all of them, so a dense mainnet block can push the node to a timeout. That's why its CU cost is the highest of the trace methods.
- A trace-enabled archive node is mandatory; a standard full node cannot replay historical block state.
- Asking for all three trace types on a packed block can balloon into hundreds of megabytes of JSON. Request the narrowest set you can and stream rather than buffer the response.
Supported networks
- Mainnet — Chain ID: 1
- Sepolia — Chain ID: 11155111
See also
Parameters
hex block number or "latest" | "earliest" | "pending"
["trace"] | ["trace","vmTrace","stateDiff"]