The trace_replayBlockTransactions
method replays all transactions in a specified block and returns detailed trace information for each transaction. This provides insights into the execution flow of transactions, allowing for detailed analysis and debugging.
This method replays all transactions in a block with detailed trace information.
Block number in hex format or block tag (latest, earliest, pending)
Array of trace types to include in the response
Array of trace results for each transaction in the block
Output data from the transaction
State differences caused by the transaction (if requested)
State changes for an address
Array of trace objects
Details about the call action
Type of call (call, delegatecall, etc.)
Sender address
Gas provided for the call
Input data for the call
Recipient address
Value transferred in wei
Result of the call
Amount of gas used
Output data from the call
Number of subtraces
Address path of trace location in the call tree
Type of trace
Hash of the transaction
Virtual machine execution trace (if requested)
EVM bytecode being executed
Array of executed operations
Gas cost of the operation
Execution result of the operation
Program counter
Information about call sub-execution
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"stateDiff": {
"0x1234567890123456789012345678901234567890": {
"balance": {
"*": {
"from": "0x100",
"to": "0x110"
}
},
"code": "=",
"nonce": {
"*": {
"from": "0x10",
"to": "0x11"
}
},
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000001": {
"*": {
"from": "0x0000000000000000000000000000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
}
}
}
},
"trace": [
{
"action": {
"callType": "call",
"from": "0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
"gas": "0x4c40d",
"input": "0xa9059cbb000000000000000000000000ea674fdde714fd979de3edf0f56aa9716b898ec80000000000000000000000000000000000000000000000002b5e3af16b1880000",
"to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"value": "0x0"
},
"result": {
"gasUsed": "0x9868",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"transactionHash": "0x69f8de1af3129dc3b1adb5b3c1577476f737f9335f156e177b48c2ed88f3f7c4",
"vmTrace": {
"code": "0x60606040...",
"ops": [
{
"cost": 3,
"ex": {
"mem": null,
"push": ["0x60"],
"store": null,
"used": 16723979
},
"pc": 0,
"sub": null
}
// Additional ops...
]
}
}
// Additional transaction traces...
]
}
The traceTypes
parameter accepts an array of the following values:
You can request any combination of these trace types.
The state diff format uses the following symbols:
The VM trace contains:
The trace format shows the execution path:
The blockNumber
parameter accepts:
0x1b4
)latest
: The most recent mined blockearliest
: The genesis blockpending
: Currently pending block (transactions waiting to be mined)