live

package
v0.0.0-...-6138ca8 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTxGasDimensionByOpcodeLogger

func NewTxGasDimensionByOpcodeLogger(
	cfg json.RawMessage,
) (*tracing.Hooks, error)

gasDimensionTracer returns a new tracer that traces gas usage for each opcode against the dimension of that opcode takes a context, and json input for configuration parameters

Types

type TxGasDimensionByOpcodeLiveTraceErrorInfo

type TxGasDimensionByOpcodeLiveTraceErrorInfo struct {
	TxHash       string      `json:"txHash"`
	BlockNumber  string      `json:"blockNumber"`
	Error        string      `json:"error"`
	TracerError  string      `json:"tracerError,omitempty"`
	Status       uint64      `json:"status"`
	GasUsed      uint64      `json:"gasUsed"`
	GasUsedForL1 uint64      `json:"gasUsedForL1"`
	GasUsedForL2 uint64      `json:"gasUsedForL2"`
	IntrinsicGas uint64      `json:"intrinsicGas"`
	Dimensions   interface{} `json:"dimensions,omitempty"`
}

an struct to capture information about errors in tracer execution

type TxGasDimensionByOpcodeLiveTracer

type TxGasDimensionByOpcodeLiveTracer struct {
	Path        string              `json:"path"` // Path to directory for output
	ChainConfig *params.ChainConfig // chain config, needed for the tracer
	// contains filtered or unexported fields
}

gasDimensionTracer struct

func (*TxGasDimensionByOpcodeLiveTracer) OnBlockEnd

func (t *TxGasDimensionByOpcodeLiveTracer) OnBlockEnd(err error)

func (*TxGasDimensionByOpcodeLiveTracer) OnBlockEndMetrics

func (t *TxGasDimensionByOpcodeLiveTracer) OnBlockEndMetrics(blockNumber uint64, blockInsertDuration time.Duration)

func (*TxGasDimensionByOpcodeLiveTracer) OnBlockStart

func (*TxGasDimensionByOpcodeLiveTracer) OnFault

func (t *TxGasDimensionByOpcodeLiveTracer) OnFault(
	pc uint64,
	op byte,
	gas, cost uint64,
	scope tracing.OpContext,
	depth int,
	err error,
)

func (*TxGasDimensionByOpcodeLiveTracer) OnOpcode

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

func (*TxGasDimensionByOpcodeLiveTracer) OnTxEnd

func (t *TxGasDimensionByOpcodeLiveTracer) OnTxEnd(
	receipt *types.Receipt,
	err error,
)

func (*TxGasDimensionByOpcodeLiveTracer) OnTxStart

Jump to

Keyboard shortcuts

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