debug_dumpBlock - Robinhood
debug_dumpBlock. Retrieves the full state of a block as a JSON dump for debugging.
debug_dumpBlock - robinhood [Value: 40CU]
Retrieves the full state of every account in the database as of a given block, including balances, nonces, code, and storage
Use cases
- Produce a full state snapshot of a block for migration
- Debug unexpected state by inspecting accounts at a specific height
- Seed a local test chain with the exact state of a block
Constraints
- Very resource-intensive on chains with a large state trie
- 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_dumpBlock",
"params":["0xc3007d"],
"id":1,
"jsonrpc":"2.0"}'
Response
200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"root": "0x9f73691f6dabca4f0a99b05d0a701995506aa311dcaa9ce9833d6f4ca474c162",
"accounts": {
"0x0599d52c37544c07605f470e5e20c1b266de8588": {
"balance": "1000000000000000000",
"nonce": 4,
"root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47",
"code": "0x",
"storage": {}
}
}
}
}Request params
idinteger
jsonrpcstring
methodstring
array
blockNumberstring
Block number in hex, or a block tag, to dump the state of.
- latest [default] - The most recent block in the blockchain (default).
- earliest - The first block, also known as the genesis block.
- pending - Transactions that have been broadcast but not yet included in a block.
Response
200
The full state dump for the requested blockResponse params
object
idinteger
jsonrpcstring
resultobject
The full state dump.
object
rootstring
The state root hash of the block.
accountsobject
A map of every account address to its account data.
object
balancestring
The account balance, in Wei.
nonceinteger
The account nonce.
rootstring
The account's storage root hash.
codeHashstring
The hash of the account's contract code.
codestring
The contract bytecode.
storageobject
The account's storage slots.