Ethereum

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

#NameTypeRequiredDescription
1blockParameterstringYesBlock whose transactions to replay.
2traceTypesarrayYesOne or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required.

Response

TypeDescription
arrayArray of per-transaction replay results in block order. Each element has the same shape as trace_replayTransaction output, plus `transactionHash`.

Example request

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "trace_replayBlockTransactions",
"params": [
"latest",
[
"trace"
]
],
"id": 1
}'

Try it live in the Ethereum playground.

Errors & troubleshooting

CodeMessageCause
-32601Method not foundtrace namespace not enabled or not supported by this client.
-32602Invalid paramsblockParameter is malformed or traceTypes is empty or contains unknown values.
-32000block not foundBlock 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"]

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"trace_replayBlockTransactions","params":["",[]]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.