[Inspection] debug_dumpBlock
Retrieves the state that corresponds to the block number and returns a list of accounts (including storage and code).
NOTE: This function correctly returns the state for a few latest, currently 4, block numbers. Retrieving older block state is restricted depending on the value set for the command-line option --state.block-interval (default: 128). This means that the function performs the state retrieval against only the block numbers that are multiples of state.block-interval. For example, when state.block-interval is 128, this function returns the state for the block numbers "0x0", "0x80", "0x100", "0x180", and so on. If the block number is not a multiple of state.block-interval, it returns 'missing trie node' error.
JSONRPC: debug_dumpBlock
Request
- application/json
Body
Array [
- IntegerBlockNumber
- HexadecimalBlockNumber
- BlockTag
- BlockHash
]
params
undefined[]
required
BlockNumberOrHashOrTag
object
oneOf
the block number with type integer
number
the block number with type hexadecimal
string
the block tag [latest, pending, earliest]
string
the block hash
string
Responses
- 200
Return the block information.
- application/json
- Schema
- Example (from schema)
Schema
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
code | message | description |
---|---|---|
-32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |
-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
result
object
The block information.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": {
"accounts": {
"0000000000000000000000000000000000000035": {
"balance": "12800000000000000000",
"nonce": 0,
"root": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"codeHash": "62b00472fac99d94ccc52f5addac43d54c129cd2c6d2357c9557abea67efdec5",
"code": "6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631a39d8ef81146100805780636353586b146100a757806370a08231146100ca578063fd6b7ef8146100f8575b3360009081526001602052604081208054349081019091558154019055005b34801561008c57600080fd5b5061009561010d565b60408051918252519081900360200190f35b6100c873ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100d657600080fd5b5061009573ffffffffffffffffffffffffffffffffffffffff60043516610147565b34801561010457600080fd5b506100c8610159565b60005481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604081208054349081019091558154019055565b60016020526000908152604090205481565b336000908152600160205260408120805490829055908111156101af57604051339082156108fc029083906000818181858888f193505050501561019c576101af565b3360009081526001602052604090208190555b505600a165627a7a723058201307c3756f4e627009187dcdbc0b3e286c13b98ba9279a25bfcc18dd8bcd73e40029",
"storage": {}
},
"0000000000000000000000000000000000000036": {
"balance": "12800000000000000000",
"nonce": 1,
"root": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"codeHash": "3f34b5d7038ae652086ba4847ede2668b26a50107c5258d1412f764b942e2661",
"code": "6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631a39d8ef81146100805780636353586b146100a757806370a08231146100ca578063fd6b7ef8146100f8575b3360009081526001602052604081208054349081019091558154019055005b34801561008c57600080fd5b5061009561010d565b60408051918252519081900360200190f35b6100c873ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100d657600080fd5b5061009573ffffffffffffffffffffffffffffffffffffffff60043516610147565b34801561010457600080fd5b506100c8610159565b60005481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604081208054349081019091558154019055565b60016020526000908152604090205481565b336000908152600160205260408120805490829055908111156101af57604051339082156108fc029083906000818181858888f193505050501561019c576101af565b3360009081526001602052604090208190555b505600a165627a7a723058201307c3756f4e627009187dcdbc0b3e286c13b98ba9279a25bfcc18dd8bcd73e40029",
"storage": {}
}
},
"root": "70383c826d1161ec2f12d799023317d8da7775dd47b8502d2d7ef646d094d3a5"
}
}