debug_intermediateRoots - Robinhood
debug_intermediateRoots. Returns the intermediate state roots produced while executing a block's transactions.
debug_intermediateRoots - robinhood [Value: 20CU]
Re-executes every transaction in a block and returns the state root produced after each one
Use cases
- Pinpoint which transaction caused an unexpected state change
- Debug a state-root mismatch between clients on a specific block
- Build fine-grained, per-transaction state-diff tooling
Constraints
- Re-executes every transaction in the block, which is resource-intensive
- Requires an archive node for blocks other than recent ones
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://lb.drpc.live/robinhood/{API-KEY} \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"debug_intermediateRoots",
"params":["0xf4aab7a559489b816aca197b9a9315b5363a9932c52c3e8bfcf4152588ee096a"],
"id":1,
"jsonrpc":"2.0"}'
Response
200
{
"jsonrpc": "2.0",
"id": 1,
"result": [
"0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
"0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28"
]
}Request params
idinteger
jsonrpcstring
methodstring
array
blockHashstring
The hash of the block to compute intermediate roots for.
optionsobject
(optional) Tracing options for the re-execution.
array
timeoutstring
Timeout for the computation, as a Go duration string (e.g. "5s"). Defaults to 5s.
reexecinteger
Number of blocks to re-execute to reconstruct historical state. Defaults to 128.
Response
200
The state root hashes produced after each transaction in the block, in orderResponse params
object
idinteger
jsonrpcstring
resultarray_of_strings
The state root hash after each transaction was applied, in transaction order.