Last updated
Last updated
NOTE All other debug namespace APIs EXCEPT FOR the following APIs are restricted with rpc.unsafe-debug.disable
flag:
APIs, however with limited functionality (only are allowed)
debug_dumpBlock, debug_dumpStateTrie, debug_getBlockRlp, debug_getModifiedAccountsByHash, debug_getModifiedAccountsByNumber, debug_getBadBlocks, debug_getModifiedStorageNodesByNumber
debug_metrics
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.
Parameters
NOTE: In versions earlier than Klaytn v1.7.0, only hex string type is available.
Return Value
Example
Console
HTTP RPC
Retrieves all state/storage tries of the given state root.
Parameters
Return Value
Example
Console
HTTP RPC
Retrieves and returns the RLP-encoded block by the block number.
Parameters
NOTE: In versions earlier than Klaytn v1.7.0, only integer type is available.
Return Value
Example
Console
HTTP RPC
Returns all accounts that have changed between the two blocks specified by their block hashes. Changes made in endBlockHash
are included, but changes made in startBlockHash
are not. If endBlockHash
is not given, it returns the accounts modified in the startBlockHash
. A change is defined as a difference in nonce, balance, code hash, or storage hash.
Parameters
Return Value
Example
Console
HTTP RPC
Returns all accounts that have changed between the two blocks specified by their block numbers. Changes made in endBlockNum
are included, but changes made in startBlockNum
are not. If endBlockNum
is not given, it returns the accounts modified in the startBlockNum
. A change is defined as a difference in nonce, balance, code hash, or storage hash.
Parameters
Return Value
Example
Console
HTTP RPC
Returns the preimage for a sha3 hash, if known.
Parameters
Return Value
Example
Console
HTTP RPC
Returns a list of the last 'bad blocks' that the client has seen on the network.
Parameters
None
Return Value
Example
Console
HTTP RPC
Retrieves a block and returns its pretty printed form.
Parameters
NOTE: In versions earlier than Klaytn v1.7.0, only integer type is available.
Return Value
Example
Console
HTTP RPC
WARNING
: This API is not yet implemented and always returns "not yet implemented API" error.
Sets the current head of the local chain by block number.
NOTE: This is a destructive action and may severely damage your chain. Use with extreme caution.
Parameters
Return Value
None
Example
Console
HTTP RPC
Retrieves the seed hash of a block.
Parameters
Return Value
Example
Console
HTTP RPC
The startWarmUp
iterates the latest state trie to warm-up the trie cache. The iteration will be automatically stopped if 90% of the trie cache is full. The method returns an error if it fails in starting a warm-up, or null
if it successfully has started it.
Parameters
None
Return Value
Example
Console
HTTP RPC
The startContractWarmUp
iterates the latest storage trie of the given contract address to warm-up the trie cache. The iteration will be automatically stopped if 90% of the trie cache is full. The method returns an error if it fails in starting a warm-up or the given address is not a contract address, or null
if it successfully has started it.
Parameters
Return Value
Example
Console
HTTP RPC
The stopWarmUp
stops the currently running warm-up. This method takes no parameters, and returns null
or an error depending on a warm-up was stopped or not.
Parameters
None
Return Value
Example
Console
HTTP RPC
The startCollectingTrieStats
iterates the latest state or storage trie to collect trie statistics. It collects storage trie statistics of the contract in the given address. If an empty address(="0x00...00") is given, it collects statistics of the whole state trie. Statistics will be logged every minute before end, containing overall and depth-by-depth information. The method returns an error if it fails in starting a task, or null
if it successfully has started it.
Parameters
Return Value
Example
Console
HTTP RPC
Log
References: