Debug module

debug_deleteChainSlice

Deletes a slice of a chain from the tree on all branches (Nethermind specific).
Invocation
{"method":"debug_deleteChainSlice","params":[startNumber]}
Parameter
Type
Description
startNumber
Quantity
Returned type
Description
Quantity
Example request of debug_deleteChainSlice
curl --data '{"method":"debug_deleteChainSlice","params":[startNumber],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

debug_getBlockRlp

Retrieves a block in the RLP-serialized form.
Invocation
{"method":"debug_getBlockRlp","params":[number]}
Parameter
Type
Description
number
Quantity
Returned type
Description
Data
Example request of debug_getBlockRlp
curl --data '{"method":"debug_getBlockRlp","params":[number],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

debug_getBlockRlpByHash

Retrieves a block in the RLP-serialized form.
Invocation
{"method":"debug_getBlockRlpByHash","params":[hash]}
Parameter
Type
Description
hash
Hash
Returned type
Description
Data
Example request of debug_getBlockRlpByHash
curl --data '{"method":"debug_getBlockRlpByHash","params":[hash],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

debug_getChainLevel

Retrieves a representation of tree branches on a given chain level (Nethermind specific).
Invocation
{"method":"debug_getChainLevel","params":[number]}
Parameter
Type
Description
number
Quantity
Returned type
Description
ChainLevelForRpc object
Example request of debug_getChainLevel
Objects in debug_getChainLevel
curl --data '{"method":"debug_getChainLevel","params":[number],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
ChainLevelForRpc
Field name
Type
BlockInfos
BlockInfoForRpc[] object
HasBlockOnMainChain
Boolean
BlockInfoForRpc[]
Field name
Type
BlockHash
Hash
TotalDifficulty
Quantity
WasProcessed
Boolean
IsFinalized
Boolean

debug_getConfigValue

Retrieves the Nethermind configuration value, e.g. JsonRpc.Enabled
Invocation
{"method":"debug_getConfigValue","params":[category, name]}
Parameter
Type
Description
category
String
name
String
Returned type
Description
Object
Example request of debug_getConfigValue
curl --data '{"method":"debug_getConfigValue","params":[category, name],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

debug_insertReceipts

Insert receipts for the block after verifying receipts root correctness.
Invocation
{"method":"debug_insertReceipts","params":[blockParameter, receiptForRpc]}
Parameter
Type
Description
blockParameter
BlockParameter object
receiptForRpc
ReceiptForRpc[] object
Returned type
Description
Boolean
Example request of debug_insertReceipts
Objects in debug_insertReceipts
curl --data '{"method":"debug_insertReceipts","params":[blockParameter, receiptForRpc],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
  • Quantity or String (latest, earliest, pending)
ReceiptForRpc[]
Field name
Type
TransactionHash
Hash
TransactionIndex
Quantity
BlockHash
Hash
BlockNumber
Quantity
CumulativeGasUsed
Quantity
GasUsed
Quantity
EffectiveGasPrice
Quantity
From
Address
To
Address
ContractAddress
Address
Logs
LogEntryForRpc[] object
LogsBloom
Bloom Object
Root
Hash
Status
Quantity
Error
String
Type
TxType object

debug_migrateReceipts

Sets the block number up to which receipts will be migrated to (Nethermind specific).
Invocation
{"method":"debug_migrateReceipts","params":[blockNumber]}
Parameter
Type
Description
blockNumber
Quantity
Returned type
Description
Boolean
Example request of debug_migrateReceipts
curl --data '{"method":"debug_migrateReceipts","params":[blockNumber],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

debug_resetHead

Updates / resets head block - use only when the node got stuck due to DB / memory corruption (Nethermind specific).
Invocation
{"method":"debug_resetHead","params":[blockHash]}
Parameter
Type
Description
blockHash
Hash
Returned type
Description
Boolean
Example request of debug_resetHead
curl --data '{"method":"debug_resetHead","params":[blockHash],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

debug_traceBlock

Returns the full stack trace of all invoked opcodes of all transactions that were included in the block specified. The parent of the block must be present or it will fail.
Invocation
{"method":"debug_traceBlock","params":[blockRlp, options]}
Parameter
Type
Description
blockRlp
Data
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceBlock
Objects in debug_traceBlock
curl --data '{"method":"debug_traceBlock","params":[blockRlp, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array

debug_traceBlockByHash

Similar to debug_traceBlock, this method accepts a block hash and replays the block that is already present in the database.
Invocation
{"method":"debug_traceBlockByHash","params":[blockHash, options]}
Parameter
Type
Description
blockHash
Hash
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceBlockByHash
Objects in debug_traceBlockByHash
curl --data '{"method":"debug_traceBlockByHash","params":[blockHash, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array

debug_traceBlockByNumber

Similar to debug_traceBlock, this method accepts a block number as well as "latest" or "finalized" and replays the block that is already present in the database.
Invocation
{"method":"debug_traceBlockByNumber","params":[blockParameter, options]}
Parameter
Type
Description
blockParameter
BlockParameter object
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceBlockByNumber
Objects in debug_traceBlockByNumber
curl --data '{"method":"debug_traceBlockByNumber","params":[blockParameter, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
  • Quantity or String (latest, earliest, pending)
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array

debug_traceCall

This method lets you run an eth_call within the context of the given block execution using the final state of parent block as the base. The block can be specified either by hash or by number. It takes the same input object as a eth_call. It returns the same output as debug_traceTransaction.
Invocation
{"method":"debug_traceCall","params":[call, blockParameter, options]}
Parameter
Type
Description
call
TransactionForRpc object
blockParameter
BlockParameter object
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceCall
Objects in debug_traceCall
curl --data '{"method":"debug_traceCall","params":[call, blockParameter, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
TransactionForRpc
Field name
Type
Hash
Hash
Nonce
Quantity
BlockHash
Hash
BlockNumber
Quantity
TransactionIndex
Quantity
From
Address
To
Address
Value
Quantity
GasPrice
Quantity
MaxPriorityFeePerGas
Quantity
MaxFeePerGas
Quantity
Gas
Quantity
Data
Data
Input
Data
ChainId
Quantity
Type
TxType object
AccessList
AccessListItemForRpc[] object
V
Quantity
S
Quantity
R
Quantity
YParity
Quantity
TxType
AccessListItemForRpc[]
Field name
Type
Address
Address
StorageKeys
Array
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
  • Quantity or String (latest, earliest, pending)
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array

debug_traceTransaction

This method will attempt to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it will finally attempt to execute the transaction that corresponds to the given hash.
Invocation
{"method":"debug_traceTransaction","params":[transactionHash, options]}
Parameter
Type
Description
transactionHash
Hash
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceTransaction
Objects in debug_traceTransaction
curl --data '{"method":"debug_traceTransaction","params":[transactionHash, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array

debug_traceTransactionByBlockAndIndex

Invocation
{"method":"debug_traceTransactionByBlockAndIndex","params":[blockParameter, txIndex, options]}
Parameter
Type
Description
blockParameter
BlockParameter object
txIndex
Quantity
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceTransactionByBlockAndIndex
Objects in debug_traceTransactionByBlockAndIndex
curl --data '{"method":"debug_traceTransactionByBlockAndIndex","params":[blockParameter, txIndex, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
BlockParameter
Field name
Type
Type
BlockParameterType object
BlockNumber
Quantity
BlockHash
Hash
RequireCanonical
Boolean
BlockParameterType
  • Quantity or String (latest, earliest, pending)
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array

debug_traceTransactionByBlockhashAndIndex

Invocation
{"method":"debug_traceTransactionByBlockhashAndIndex","params":[blockHash, txIndex, options]}
Parameter
Type
Description
blockHash
Hash
txIndex
Quantity
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceTransactionByBlockhashAndIndex
Objects in debug_traceTransactionByBlockhashAndIndex
curl --data '{"method":"debug_traceTransactionByBlockhashAndIndex","params":[blockHash, txIndex, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array

debug_traceTransactionInBlockByHash

Invocation
{"method":"debug_traceTransactionInBlockByHash","params":[blockRlp, transactionHash, options]}
Parameter
Type
Description
blockRlp
Data
transactionHash
Hash
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceTransactionInBlockByHash
Objects in debug_traceTransactionInBlockByHash
curl --data '{"method":"debug_traceTransactionInBlockByHash","params":[blockRlp, transactionHash, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array

debug_traceTransactionInBlockByIndex

Invocation
{"method":"debug_traceTransactionInBlockByIndex","params":[blockRlp, txIndex, options]}
Parameter
Type
Description
blockRlp
Data
txIndex
Quantity
options
GethTraceOptions object
Returned type
Description
GethLikeTxTrace object
Example request of debug_traceTransactionInBlockByIndex
Objects in debug_traceTransactionInBlockByIndex
curl --data '{"method":"debug_traceTransactionInBlockByIndex","params":[blockRlp, txIndex, options],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
GethTraceOptions
Field name
Type
DisableStorage
Boolean
DisableMemory
Boolean
DisableStack
Boolean
Tracer
String
Timeout
String
GethLikeTxTrace
Field name
Type
StoragesByDepth
Array
Gas
Quantity
Failed
Boolean
ReturnValue
Data
Entries
Array
Copy link
On this page
debug_deleteChainSlice
debug_getBlockRlp
debug_getBlockRlpByHash
debug_getChainLevel
debug_getConfigValue
debug_insertReceipts
debug_migrateReceipts
debug_resetHead
debug_traceBlock
debug_traceBlockByHash
debug_traceBlockByNumber
debug_traceCall
debug_traceTransaction
debug_traceTransactionByBlockAndIndex
debug_traceTransactionByBlockhashAndIndex
debug_traceTransactionInBlockByHash
debug_traceTransactionInBlockByIndex