go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

Debug namespace re-structure

Open s1na opened this issue 2 years ago • 6 comments

The debug namespace is cluttered with a mix of methods used for low-level client debugging and anything that wasn't standardised into the eth namespace. Creating this issue to track and decide how to go forward with this.

I'll start with a list of all the methods (50 in total):

  • eth:

    • Public:
      • DumpBlock (can be potentially modified to make use of snapshots when available)
      • AccountRange
    • Private:
      • Preimage
      • GetBadBlocks
      • StorageRangeAt
      • GetModifiedAccountsByNumber
      • GetModifiedAccountsByHash
      • GetAccessibleState
  • les (private):

    • FreezeClient
  • internal/ethapi:

    • Public:
      • GetHeaderRlp
      • GetBlockRlp
      • TestSignCliqueBlock
      • PrintBlock
      • SeedHash
    • Private:
      • ChaindbProperty (we can list the possible properties on the website)
      • ChaindbCompact
      • SetHead
      • DbGet
  • eth/tracers (private):

    • TraceChain
    • TraceBlockByNumber
    • TraceBlockByHash
    • TraceBlock
    • TraceBlockFromFile
    • TraceBadBlock
    • StandardTraceBlockToFile
    • IntermediateRoots
    • StandardTraceBadBlockToFile
    • TraceTransaction
    • TraceCall
  • internal/debug:

    • Verbosity
    • Vmodule
    • BacktraceAt
    • MemStats
    • GcStats
    • CpuProfile
    • StartCPUProfile
    • StopCPUProfile
    • GoTrace
    • StartGoTrace
    • StopGoTrace
    • BlockProfile
    • SetBlockProfileRate
    • WriteBlockProfile
    • MutexProfile
    • SetMutexProfileFraction
    • WriteMutexProfile
    • WriteMemProfile
    • Stacks
    • FreeOSMemory
    • SetGCPercent

    This is the list of methods not documented on the website:

    ['intermediateroots', 'tracebadblock', 'chaindbcompact', 'getheaderrlp', 'accountrange', 'setmutexprofilefraction', 'getmodifiedaccountsbyhash', 'mutexprofile', 'preimage', 'writemutexprofile', 'storagerangeat', 'freezeclient', 'printblock', 'chaindbproperty', 'dbget', 'testsigncliqueblock', 'getmodifiedaccountsbynumber', 'setgcpercent', 'freeosmemory', 'tracechain', 'getbadblocks', 'getaccessiblestate']
    

    Also traceChain is not exposed to JS (Edit: Ah I remember/see now it's because traceChain returns a subscription)

s1na avatar May 03 '22 15:05 s1na