Documentation ¶
Overview ¶
Copyright 2022 Evmos Foundation This file is part of the Evmos Network packages.
Evmos is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Evmos packages are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Evmos packages. If not, see https://github.com/evmos/evmos/blob/main/LICENSE
Copyright 2022 Evmos Foundation This file is part of the Evmos Network packages.
Evmos is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Evmos packages are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Evmos packages. If not, see https://github.com/evmos/evmos/blob/main/LICENSE
Index ¶
- func ExpandHome(p string) (string, error)
- type API
- func (a *API) BlockProfile(file string, nsec uint) error
- func (a *API) CpuProfile(file string, nsec uint) error
- func (a *API) FreeOSMemory()
- func (a *API) GcStats() *debug.GCStats
- func (a *API) GetBlockRlp(number uint64) (hexutil.Bytes, error)
- func (a *API) GetHeaderRlp(number uint64) (hexutil.Bytes, error)
- func (a *API) GoTrace(file string, nsec uint) error
- func (a *API) IntermediateRoots(hash common.Hash, _ *evmtypes.TraceConfig) ([]common.Hash, error)
- func (a *API) MemStats() *runtime.MemStats
- func (a *API) MutexProfile(file string, nsec uint) error
- func (a *API) PrintBlock(number uint64) (string, error)
- func (a *API) SeedHash(number uint64) (string, error)
- func (a *API) SetBlockProfileRate(rate int)
- func (a *API) SetGCPercent(v int) int
- func (a *API) SetMutexProfileFraction(rate int)
- func (a *API) Stacks() string
- func (a *API) StartCPUProfile(file string) error
- func (a *API) StartGoTrace(file string) error
- func (a *API) StopCPUProfile() error
- func (a *API) StopGoTrace() error
- func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error)
- func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error)
- func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) (interface{}, error)
- func (a *API) WriteBlockProfile(file string) error
- func (a *API) WriteMemProfile(file string) error
- func (a *API) 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 API ¶
type API struct {
// contains filtered or unexported fields
}
API is the collection of tracing APIs exposed over the private debugging endpoint.
func NewAPI ¶
func NewAPI( ctx *server.Context, backend backend.EVMBackend, ) *API
NewAPI creates a new API definition for the tracing methods of the Ethereum service.
func (*API) 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 (*API) CpuProfile ¶
CpuProfile turns on CPU profiling for nsec seconds and writes profile data to file.
func (*API) GetBlockRlp ¶
GetBlockRlp retrieves the RLP encoded for of a single block.
func (*API) GetHeaderRlp ¶
GetHeaderRlp retrieves the RLP encoded for of a single header.
func (*API) IntermediateRoots ¶
IntermediateRoots executes a block, and returns a list of intermediate roots: the stateroot after each transaction.
func (*API) 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 (*API) PrintBlock ¶
PrintBlock retrieves a block and returns its pretty printed form.
func (*API) SetBlockProfileRate ¶
SetBlockProfileRate sets the rate of goroutine block profile data collection. rate 0 disables block profiling.
func (*API) SetGCPercent ¶
SetGCPercent sets the garbage collection target percentage. It returns the previous setting. A negative value disables GC.
func (*API) SetMutexProfileFraction ¶
SetMutexProfileFraction sets the rate of mutex profiling.
func (*API) StartCPUProfile ¶
StartCPUProfile turns on CPU profiling, writing to the given file.
func (*API) StartGoTrace ¶
StartGoTrace turns on tracing, writing to the given file.
func (*API) StopCPUProfile ¶
StopCPUProfile stops an ongoing CPU profile.
func (*API) TraceBlockByHash ¶
func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error)
TraceBlockByHash returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*API) TraceBlockByNumber ¶
func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error)
TraceBlockByNumber returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*API) TraceTransaction ¶
TraceTransaction returns the structured logs created during the execution of EVM and returns them as a JSON object.
func (*API) WriteBlockProfile ¶
WriteBlockProfile writes a goroutine blocking profile to the given file.
func (*API) 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 (*API) WriteMutexProfile ¶
WriteMutexProfile writes a goroutine blocking profile to the given file.