Appearance
debug_executionWitnessByBlockHash
served · same as reth
The same as debug_executionWitness, for the block with the given hash (a method of reth).
When to use
Use it to get the witness of a block by its hash.
Example
bash
curl -s -X POST -H 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id": 1, "method": "debug_executionWitnessByBlockHash", "params": ["0x858de064f6074a70052fc0e58230cfcb585f2e964d5a96357556b0b04589aa1c"]}' \
http://127.0.0.1:8547json
{
"jsonrpc": "2.0",
"id": 1,
"method": "debug_executionWitnessByBlockHash",
"params": [
"0x858de064f6074a70052fc0e58230cfcb585f2e964d5a96357556b0b04589aa1c"
]
}Response
Live mainnet, block 26221739, 2026-10-18. Checked against reth 2.7: equal.
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"state": [
"0xf851a0fc6dc19b6b1890423bfdd4d57120740a05070874f34dda151c5cdfe3756fd10780808080808080a0bb750afcbd1f6c301d6f18a2d04496843455b898631fcf5b4ca002eb9231e79f8080808080808080",
"0xf90211a0bb8f84a706f5b750658f959ded93d038cdc9e8c182c7be91b27786cea06d6f2fa0e82d1aef7bc18796f053492396e8df45393034ec92fd232041a58767b249ba34a0ea53f74761f532e011158ae0b2cdfa3de12c21b98a37141c117f3cdf07b3a676a078ef17c6fddc85e72f45f32b6d37384b8e8d1dbe9d5231067024fc1f0685eb2aa04e8f8a88cd1f43e136acdfbb5541322db7927ff0b5a1dd5b833563e353755060a06a6e80e2de81aa5281f030cbc8bedf902451ac32df5c3cb4c14257c61e42... 666 more characters",
"0xf9015180a0cc6baea7ae417bcafce985cb2bb88638a7c113a3401f5ed45b429de35106cd87a061e2b4cc73b87527ddfa2556569e3d41103a1195be666c9cfb79e0622673ffc2a0164ff7d340de7c457f385d1d9f278e73c1026e3d1f34215cb8da6fad9473691280a016a4bc166ca6743fcbafe3f9660bce120e6c0991bd0f742df93ddf436040a907a08fc69aa97a1d84aadef07bfb6f7afb925a9b4a273f04161098ddf2507e16828080a072eb6a5f3f2568b77e175423278353ea02d3b7aaa8c72ae349f2c8... 282 more characters",
"... 1 more items"
],
"codes": [
"0x6080604052600436106102d15760003560e01c80637d25a05e11610179578063bb0b6a53116100d6578063d045a0dc1161008a578063f2fde38b11610064578063f2fde38b146108b7578063fc0c546a14610515578063ff7bd03d146108d757600080fd5b8063d045a0dc14610831578063d424388514610844578063dd62ed3e1461086457600080fd5b8063bd815db0116100bb578063bd815db0146107dd578063c7c7f5b3146107f0578063ca5eb5e11461081157600080fd5b8063bb0b6a531461079057... 29222 more characters",
"0x608060405234801561000f575f80fd5b5060043610610091575f3560e01c8063313ce56711610064578063313ce5671461013157806370a082311461014f57806395d89b411461017f578063a9059cbb1461019d578063dd62ed3e146101cd57610091565b806306fdde0314610095578063095ea7b3146100b357806318160ddd146100e357806323b872dd14610101575b5f80fd5b61009d6101fd565b6040516100aa9190610a75565b60405180910390f35b6100cd60048036038101906100c89190610b26... 6762 more characters",
"0x60806040526004361061004e5760003560e01c8063439fab9114610133578063adac3e15146101e6578063c1a851301461020d578063f2011f6614610222578063ffa1ad741461024c576100a0565b366100a0576040805162461bcd60e51b815260206004820181905260248201527f434f4e54524143545f4e4f545f45585045435445445f544f5f52454345495645604482015290519081900360640190fd5b60006100b76000356001600160e01b0319166102d6565b90506001600160a01b03811661010f... 9696 more characters",
"... 1 more items"
],
"keys": [
"0x3613706fa62ef72ce20587e1e77db0366f40dcbc",
"0x81d40f21f12a8f0e3252bccb954d722d4c464b64",
"0xacefe251da006887da41c063d06cc82a060824ba",
"... 1 more items"
],
"headers": [
"0xf90286a0dbb649637f01329893e7215eccc00ab2d11cc2acc4856a2dfad2dcc5bd3127d4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347944838b106fce9647bdf1e7877bf73ce8b0bad5f97a01874407b85c9e419196f51a4e0032c13d654c782b841d04fdf982f7e390f07baa0e3ce91d338b3dc0bfe5e8a5df93c087654178d1843daf7f4afffaa625801407da0e99cc1967d3b2be98b0fef4f63ba372d8ab6f7e514a598efdbf7305ab61cec65b9010075bf7d7b6d757d... 900 more characters"
]
}
}The witness of a block near the head, by its hash. Shortened to the first 4 items of each list (the full answer had 10074 state, 350 codes, 2159 keys, 1 headers). Compared with reth as sets: the order of the items is not defined.
Parameters
| Name | Type | Required | Meaning |
|---|---|---|---|
hash | 32-byte hash | yes | The hash of the block. |
mode | string, legacy or canonical | no | The form of the witness, as in debug_executionWitness. Default: legacy. |
Returns
The witness of the block, as debug_executionWitness returns it.
Notes and limits
- It works for the head and the 127 blocks before it, and only for a block of the canonical chain.
Errors
| Code | Message | When |
|---|---|---|
| -32001 | block not found: hash 0x... | No block of the canonical chain has this hash. |
| -32603 | failed to apply blockhash contract call: database error: Database error: insufficient changesets to revert to block #N. Available changeset range: A..=B | The state of the parent block is gone: it is more than 128 blocks below the head. |
| -32602 | Invalid params | A parameter is missing or does not parse. data has the text of reth, with the position. |
Compared with reth
The live example above gives the same answer on Cinder and on reth 2.7.
Related methods
Schema (OpenRPC)
Parameter hash: Hash32
json
{
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}Parameter mode: string
json
{
"type": "string",
"enum": [
"legacy",
"canonical"
]
}Result: ExecutionWitness
json
{
"type": "object",
"required": [
"state",
"codes",
"keys",
"headers"
],
"properties": {
"state": {
"type": "array",
"items": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"description": "The RLP of each trie node."
},
"codes": {
"type": "array",
"items": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"description": "The contract codes."
},
"keys": {
"type": "array",
"items": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"description": "The addresses (20 bytes) and storage slots (32 bytes) that the block uses."
},
"headers": {
"type": "array",
"items": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"description": "The RLP of the headers from the oldest block that BLOCKHASH reads to the parent, oldest first."
}
}
}