Documentation ¶
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, _ *evmsupport.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(_ 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 evmsupport.TraceConfig) ([]*evmtxs.TxTraceResult, error)
- func (a *DebugAPI) TraceBlockByNumber(height rpc.BlockNumber, config evmsupport.TraceConfig) ([]*evmtxs.TxTraceResult, error)
- func (a *DebugAPI) TraceTransaction(hash common.Hash, config evmsupport.TraceConfig) (interface{}, error)
- func (a *DebugAPI) WriteBlockProfile(file string) error
- func (a *DebugAPI) WriteMemProfile(file string) error
- func (a *DebugAPI) WriteMutexProfile(file string) error
- type DebugBackend
- type HandlerT
- type NetAPI
- type NetBackend
- type Web3API
- type Web3Backend
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 NewDebugAPI ¶
func NewDebugAPI( backend DebugBackend, ) *DebugAPI
NewDebugAPI creates a new DebugAPI 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 ¶
func (a *DebugAPI) IntermediateRoots(hash common.Hash, _ *evmsupport.TraceConfig) ([]common.Hash, error)
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 evmsupport.TraceConfig) ([]*evmtxs.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 evmsupport.TraceConfig) ([]*evmtxs.TxTraceResult, error)
TraceBlockByNumber returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*DebugAPI) TraceTransaction ¶
func (a *DebugAPI) TraceTransaction(hash common.Hash, config evmsupport.TraceConfig) (interface{}, error)
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 DebugAPI, it must be set on the command line.
func (*DebugAPI) WriteMutexProfile ¶
WriteMutexProfile writes a goroutine blocking profile to the given file.
type DebugBackend ¶
type DebugBackend interface { TraceTransaction(hash common.Hash, config *evmsupport.TraceConfig) (interface{}, error) TraceBlock(height rpc.BlockNumber, config *evmsupport.TraceConfig, block *tmrpctypes.ResultBlock, ) ([]*evmtxs.TxTraceResult, error) CosmosBlockByHash(blockHash common.Hash) (*tmrpctypes.ResultBlock, error) CosmosBlockByNumber(blockNum rpc.BlockNumber) (*tmrpctypes.ResultBlock, error) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*ethtypes.Header, error) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*ethtypes.Block, error) }
type HandlerT ¶
type HandlerT struct {
// contains filtered or unexported fields
}
HandlerT keeps track of the cpu profiler and trace execution
type NetBackend ¶
type NetBackend interface { NetAPI }
NetBackend is the collection of methods required to satisfy the net RPC DebugAPI.
type Web3Backend ¶
type Web3Backend interface {
ClientVersion() string
}
Web3Backend is the collection of methods required to satisfy the net RPC DebugAPI.
func NewWeb3API ¶
func NewWeb3API(b Web3Backend) Web3Backend
NewWeb3API creates a new web3 DebugAPI instance.