This repository documents the non standard methods of the debug_
namespace of Go Ethereum client RPC
The repository is organized in folder <=> method basis, meaning every method in the namespace has its own folder of the same name.
Every folder contains the next files:
README.md
file, documenting the method in more details in the following structure- Name of the method
- Input parameters, which are always ordered set of variables (a tuple)
- Return, which can either be
- None
- object
- array of objects
- Single Value, but named for easier reading.
- Example: debug_dbAncients where it returns a
uint64
but we named itnumberOfItems
in the readme for easier readability
- Example: debug_dbAncients where it returns a
.ts
file, documenting the data types of the method
Because some data types can be shared or aliased between different methods,
there is also a "shared" folder containing .ts
files to be used between the method definitions
To add a new method to the repo, you can use the scaffold_new_method.js helper script
by running: node scaffold_new_method.js [method_name]
Example: node scaffold_new_method.js debug_accountRange
Which will generate new files and directories.
Geth comes with a bundle of built-in tracers, each providing various data about a transaction. Alternatively a custom tracer can be implemented in either Go or Javascript.
Some method call results can be different based on which
tracer is picked for usage.
For example ITxTraceResult
will return different object
based on tracer
param.
All debug_trace*
method calls are setup this way.
In this repository, the next tracers have been documented:
- debug_accountRange
- debug_backtraceAt
- debug_blockProfile
- debug_chaindbCompact
- debug_chaindbProperty
- debug_cpuProfile
- debug_dbAncient
- debug_dbAncients
- debug_dbGet
- debug_dumpBlock
- debug_freeOSMemory
- debug_freezeClient
- debug_gcStats
- debug_getAccessibleState
- debug_getBadBlocks
- debug_getRawBlock
- debug_getRawHeader
- debug_getRawTransaction
- debug_getModifiedAccountsByHash
- debug_getModifiedAccountsByNumber
- debug_getRawReceipts
- debug_goTrace
- debug_intermediateRoots
- debug_memStats
- debug_mutexProfile
- debug_preimage
- debug_printBlock
- debug_setBlockProfileRate
- debug_setGCPercent
- debug_setHead
- debug_setMutexProfileFraction
- debug_setTrieFlushInterval
- debug_stacks
- debug_standardTraceBlockToFile
- debug_standardTraceBadBlockToFile
- debug_startCPUProfile
- debug_startGoTrace
- debug_stopCPUProfile
- debug_stopGoTrace
- debug_storageRangeAt
- debug_traceBadBlock
- debug_traceBlock
- debug_traceBlockByNumber
- debug_traceBlockByHash
- debug_traceBlockFromFile
- debug_traceCall
- debug_traceChain
- debug_traceTransaction
- debug_verbosity
- debug_vmodule
- debug_writeBlockProfile
- debug_writeMemProfile
- debug_writeMutexProfile