tracers

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: LGPL-3.0 Imports: 36 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const FirehoseProtocolVersion = "3.0"

Variables

This section is empty.

Functions

func FirehoseDebug

func FirehoseDebug(msg string, args ...interface{})

func NewCosmosFirehoseTracer

func NewCosmosFirehoseTracer(backwardCompatibility bool) (*cosmostracing.Hooks, error)

func NewCosmosTracingHooksFromFirehose

func NewCosmosTracingHooksFromFirehose(hooks *tracing.Hooks, firehose *Firehose) *cosmostracing.Hooks

func NewTracingHooksFromFirehose

func NewTracingHooksFromFirehose(tracer *Firehose) *tracing.Hooks

Types

type CallStack

type CallStack struct {
	// contains filtered or unexported fields
}

func NewCallStack

func NewCallStack() *CallStack

func (*CallStack) ActiveIndex

func (s *CallStack) ActiveIndex() uint32

func (*CallStack) HasActiveCall

func (s *CallStack) HasActiveCall() bool

func (*CallStack) NextIndex

func (s *CallStack) NextIndex() uint32

func (*CallStack) Peek

func (s *CallStack) Peek() *pbeth.Call

Peek returns the top of the stack without removing it, it's the activate call.

func (*CallStack) Pop

func (s *CallStack) Pop() (out *pbeth.Call)

func (*CallStack) Push

func (s *CallStack) Push(call *pbeth.Call)

Push a call onto the stack. The `Index` and `ParentIndex` of this call are assigned by this method which knowns how to find the parent call and deal with it.

func (*CallStack) Reset

func (s *CallStack) Reset()

type DeferredCallState

type DeferredCallState struct {
	// contains filtered or unexported fields
}

DeferredCallState is a helper struct that can be used to accumulate call's state that is recorded before the Call has been started. This happens on the "starting" portion of the call/created.

func NewDeferredCallState

func NewDeferredCallState() *DeferredCallState

func (*DeferredCallState) IsEmpty

func (d *DeferredCallState) IsEmpty() bool

func (*DeferredCallState) MaybePopulateCallAndReset

func (d *DeferredCallState) MaybePopulateCallAndReset(source string, call *pbeth.Call) error

func (*DeferredCallState) Reset

func (d *DeferredCallState) Reset()

type FinalityStatus

type FinalityStatus struct {
	LastIrreversibleBlockNumber uint64
	LastIrreversibleBlockHash   []byte
}

func (*FinalityStatus) IsEmpty

func (s *FinalityStatus) IsEmpty() bool

func (*FinalityStatus) Reset

func (s *FinalityStatus) Reset()

type Firehose

type Firehose struct {
	// contains filtered or unexported fields
}

func NewFirehoseFromRawJSON

func NewFirehoseFromRawJSON(cfg json.RawMessage) (*Firehose, error)

func (*Firehose) InternalTestingBuffer

func (f *Firehose) InternalTestingBuffer() *bytes.Buffer

InternalTestingBuffer TestingBuffer is an internal method only used for testing purposes that should never be used in production code.

There is no public api guaranteed for this method.

func (*Firehose) OnBalanceChange

func (f *Firehose) OnBalanceChange(a common.Address, prev, new *big.Int, reason tracing.BalanceChangeReason)

func (*Firehose) OnBlockEnd

func (f *Firehose) OnBlockEnd(err error)

func (*Firehose) OnBlockStart

func (f *Firehose) OnBlockStart(event tracing.BlockEvent)

func (*Firehose) OnBlockchainInit

func (f *Firehose) OnBlockchainInit(chainConfig *params.ChainConfig)

func (*Firehose) OnCallEnter

func (f *Firehose) OnCallEnter(depth int, typ byte, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int)

OnCallEnter implements the EVMLogger interface to initialize the tracing operation.

func (*Firehose) OnCallExit

func (f *Firehose) OnCallExit(depth int, output []byte, gasUsed uint64, err error, reverted bool)

OnCallExit is called after the call finishes to finalize the tracing.

func (*Firehose) OnCodeChange

func (f *Firehose) OnCodeChange(a common.Address, prevCodeHash common.Hash, prev []byte, codeHash common.Hash, code []byte)

func (*Firehose) OnCosmosBlockEnd

func (f *Firehose) OnCosmosBlockEnd(event cosmostracing.CosmosEndBlockEvent, err error)

func (*Firehose) OnCosmosBlockStart

func (f *Firehose) OnCosmosBlockStart(event cosmostracing.CosmosStartBlockEvent)

func (*Firehose) OnCosmosTxStart

func (f *Firehose) OnCosmosTxStart(evm *tracing.VMContext, tx *types.Transaction, hash common.Hash, from common.Address)

func (*Firehose) OnGasChange

func (f *Firehose) OnGasChange(old, new uint64, reason tracing.GasChangeReason)

func (*Firehose) OnGenesisBlock

func (f *Firehose) OnGenesisBlock(b *types.Block, alloc types.GenesisAlloc)

func (*Firehose) OnLog

func (f *Firehose) OnLog(l *types.Log)

func (*Firehose) OnNonceChange

func (f *Firehose) OnNonceChange(a common.Address, prev, new uint64)

func (*Firehose) OnOpcode

func (f *Firehose) OnOpcode(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, rData []byte, depth int, err error)

OnOpcode implements the EVMLogger interface to trace a single step of VM execution.

func (*Firehose) OnOpcodeFault

func (f *Firehose) OnOpcodeFault(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, depth int, err error)

OnOpcodeFault implements the EVMLogger interface to trace an execution fault.

func (*Firehose) OnSkippedBlock

func (f *Firehose) OnSkippedBlock(event tracing.BlockEvent)

func (*Firehose) OnStorageChange

func (f *Firehose) OnStorageChange(a common.Address, k, prev, new common.Hash)

func (*Firehose) OnSystemCallEnd

func (f *Firehose) OnSystemCallEnd()

func (*Firehose) OnSystemCallStart

func (f *Firehose) OnSystemCallStart()

func (*Firehose) OnTxEnd

func (f *Firehose) OnTxEnd(receipt *types.Receipt, err error)

func (*Firehose) OnTxStart

func (f *Firehose) OnTxStart(evm *tracing.VMContext, tx *types.Transaction, from common.Address)

type FirehoseConfig

type FirehoseConfig struct {
	ApplyBackwardCompatibility *bool `json:"applyBackwardCompatibility"`
	// contains filtered or unexported fields
}

func (*FirehoseConfig) LogKeyValues

func (c *FirehoseConfig) LogKeyValues() []any

LogKeValues returns a list of key-values to be logged when the config is printed.

type Memory

type Memory []byte

func (Memory) GetPtr

func (m Memory) GetPtr(offset, size int64) []byte

func (Memory) GetPtrUint256

func (m Memory) GetPtrUint256(offset, size *uint256.Int) []byte

type Ordinal

type Ordinal struct {
	// contains filtered or unexported fields
}

func (*Ordinal) Next

func (o *Ordinal) Next() (out uint64)

Next gives you the next sequential ordinal value that you should use to assign to your exeuction trace (block, transaction, call, etc).

func (*Ordinal) Reset

func (o *Ordinal) Reset()

Reset resets the ordinal to zero.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL