Documentation ¶
Overview ¶
Copyright (c) 2023-2024 Nibi, Inc.
Copyright (c) 2023-2024 Nibi, Inc.
Index ¶
- func ExpandHome(p string) (string, error)
- type DebugAPI
- func (a *DebugAPI) BlockProfile(file string, nsec uint) error
- func (a *DebugAPI) CpuProfile(file string, nsec uint) error
- func (a *DebugAPI) FreeOSMemory()
- func (a *DebugAPI) GcStats() *debug.GCStats
- func (a *DebugAPI) GetBlockRlp(number uint64) (hexutil.Bytes, error)
- func (a *DebugAPI) GetHeaderRlp(number uint64) (hexutil.Bytes, error)
- func (a *DebugAPI) GoTrace(file string, nsec uint) error
- func (a *DebugAPI) IntermediateRoots(hash common.Hash, _ *evm.TraceConfig) ([]common.Hash, error)
- func (a *DebugAPI) MemStats() *runtime.MemStats
- func (a *DebugAPI) MutexProfile(file string, nsec uint) error
- func (a *DebugAPI) PrintBlock(number uint64) (string, error)
- func (a *DebugAPI) SeedHash(number uint64) (string, error)
- func (a *DebugAPI) SetBlockProfileRate(rate int)
- func (a *DebugAPI) SetGCPercent(v int) int
- func (a *DebugAPI) SetMutexProfileFraction(rate int)
- func (a *DebugAPI) Stacks() string
- func (a *DebugAPI) StartCPUProfile(file string) error
- func (a *DebugAPI) StartGoTrace(file string) error
- func (a *DebugAPI) StopCPUProfile() error
- func (a *DebugAPI) StopGoTrace() error
- func (a *DebugAPI) TraceBlockByHash(hash common.Hash, config *evm.TraceConfig) ([]*evm.TxTraceResult, error)
- func (a *DebugAPI) TraceBlockByNumber(height rpc.BlockNumber, config *evm.TraceConfig) ([]*evm.TxTraceResult, error)
- func (a *DebugAPI) TraceCall(args evm.JsonTxArgs, blockNrOrHash rpc.BlockNumberOrHash, ...) (any, error)
- func (a *DebugAPI) TraceTransaction(hash common.Hash, config *evm.TraceConfig) (any, error)
- func (a *DebugAPI) WriteBlockProfile(file string) error
- func (a *DebugAPI) WriteMemProfile(file string) error
- func (a *DebugAPI) WriteMutexProfile(file string) error
- type HandlerT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandHome ¶
ExpandHome expands home directory in file paths. ~someuser/tmp will not be expanded.
Types ¶
type DebugAPI ¶
type DebugAPI struct {
// contains filtered or unexported fields
}
DebugAPI is the collection of tracing APIs exposed over the private debugging endpoint.
func NewImplDebugAPI ¶
NewImplDebugAPI creates a new API definition for the tracing methods of the Ethereum service.
func (*DebugAPI) BlockProfile ¶
BlockProfile turns on goroutine profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.
func (*DebugAPI) CpuProfile ¶
CpuProfile turns on CPU profiling for nsec seconds and writes profile data to file.
func (*DebugAPI) FreeOSMemory ¶
func (a *DebugAPI) FreeOSMemory()
FreeOSMemory forces a garbage collection.
func (*DebugAPI) GetBlockRlp ¶
GetBlockRlp retrieves the RLP encoded for of a single block.
func (*DebugAPI) GetHeaderRlp ¶
GetHeaderRlp retrieves the RLP encoded for of a single header.
func (*DebugAPI) IntermediateRoots ¶
IntermediateRoots executes a block, and returns a list of intermediate roots: the stateroot after each transaction.
func (*DebugAPI) MutexProfile ¶
MutexProfile turns on mutex profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.
func (*DebugAPI) PrintBlock ¶
PrintBlock retrieves a block and returns its pretty printed form.
func (*DebugAPI) SetBlockProfileRate ¶
SetBlockProfileRate sets the rate of goroutine block profile data collection. rate 0 disables block profiling.
func (*DebugAPI) SetGCPercent ¶
SetGCPercent sets the garbage collection target percentage. It returns the previous setting. A negative value disables GC.
func (*DebugAPI) SetMutexProfileFraction ¶
SetMutexProfileFraction sets the rate of mutex profiling.
func (*DebugAPI) StartCPUProfile ¶
StartCPUProfile turns on CPU profiling, writing to the given file.
func (*DebugAPI) StartGoTrace ¶
StartGoTrace turns on tracing, writing to the given file.
func (*DebugAPI) StopCPUProfile ¶
StopCPUProfile stops an ongoing CPU profile.
func (*DebugAPI) StopGoTrace ¶
StopGoTrace stops an ongoing trace.
func (*DebugAPI) TraceBlockByHash ¶
func (a *DebugAPI) TraceBlockByHash(hash common.Hash, config *evm.TraceConfig) ([]*evm.TxTraceResult, error)
TraceBlockByHash returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*DebugAPI) TraceBlockByNumber ¶
func (a *DebugAPI) TraceBlockByNumber(height rpc.BlockNumber, config *evm.TraceConfig) ([]*evm.TxTraceResult, error)
TraceBlockByNumber returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*DebugAPI) TraceCall ¶
func (a *DebugAPI) TraceCall( args evm.JsonTxArgs, blockNrOrHash rpc.BlockNumberOrHash, config *evm.TraceConfig, ) (any, error)
TraceCall implements eth debug_traceCall method which lets you run an eth_call within the context of the given block execution using the final state of parent block as the base. Method returns the structured logs created during the execution of EVM. The method returns the same output as debug_traceTransaction. https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debugtracecall
func (*DebugAPI) TraceTransaction ¶
TraceTransaction returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*DebugAPI) WriteBlockProfile ¶
WriteBlockProfile writes a goroutine blocking profile to the given file.
func (*DebugAPI) WriteMemProfile ¶
WriteMemProfile writes an allocation profile to the given file. Note that the profiling rate cannot be set through the API, it must be set on the command line.
func (*DebugAPI) WriteMutexProfile ¶
WriteMutexProfile writes a goroutine blocking profile to the given file.