Documentation
¶
Index ¶
- func CustomTraceMapReduce(fromBlock, toBlock uint64, consumer TraceConsumer, ctx context.Context, ...) (err error)
- func NewWorkersPool(lock sync.Locker, accumulator *shards.Accumulator, logger log.Logger, ...) (reconWorkers []*Worker, applyWorker *Worker, rws *state.ResultsQueue, ...)
- type CallTracer
- func (ct *CallTracer) CaptureEnd(output []byte, usedGas uint64, err error)
- func (ct *CallTracer) CaptureEnter(typ vm.OpCode, from libcommon.Address, to libcommon.Address, precompile bool, ...)
- func (ct *CallTracer) CaptureExit(output []byte, usedGas uint64, err error)
- func (ct *CallTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, ...)
- func (ct *CallTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcommon.Address, precompile bool, ...)
- func (ct *CallTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, ...)
- func (ct *CallTracer) CaptureTxEnd(restGas uint64)
- func (ct *CallTracer) CaptureTxStart(gasLimit uint64)
- func (ct *CallTracer) Froms() map[libcommon.Address]struct{}
- func (ct *CallTracer) Reset()
- func (ct *CallTracer) Tos() map[libcommon.Address]struct{}
- type ExecArgs
- type GenericTracer
- type HistoricalTraceWorker
- func NewHistoricalTraceWorker(consumer TraceConsumer, in *state.QueueWithRetry, out *state.ResultsQueue, ...) *HistoricalTraceWorker
- func NewHistoricalTraceWorkers(consumer TraceConsumer, cfg *ExecArgs, ctx context.Context, toTxNum uint64, ...) (g *errgroup.Group, applyWorker *HistoricalTraceWorker, clearFunc func())
- type Resetable
- type TraceConsumer
- type TraceWorker
- func (e *TraceWorker) ChangeBlock(header *types.Header)
- func (e *TraceWorker) Close()
- func (e *TraceWorker) ExecTxn(txNum uint64, txIndex int, txn types.Transaction, gasBailout bool) (*evmtypes.ExecutionResult, error)
- func (e *TraceWorker) GetLogs(txIndex int, txnHash common.Hash, blockNumber uint64, blockHash common.Hash) []*types.Log
- func (e *TraceWorker) GetRawLogs(txIdx int) types.Logs
- type Worker
- func (rw *Worker) DiscardReadList()
- func (rw *Worker) LogLRUStats()
- func (rw *Worker) ResetState(rs *state.StateV3, accumulator *shards.Accumulator)
- func (rw *Worker) ResetTx(chainTx kv.Tx)
- func (rw *Worker) Run() error
- func (rw *Worker) RunTxTask(txTask *state.TxTask, isMining bool)
- func (rw *Worker) RunTxTaskNoLock(txTask *state.TxTask, isMining bool)
- func (rw *Worker) SetReader(reader state.ResettableStateReader)
- func (rw *Worker) Tx() kv.Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomTraceMapReduce ¶
func CustomTraceMapReduce(fromBlock, toBlock uint64, consumer TraceConsumer, ctx context.Context, tx kv.TemporalTx, cfg *ExecArgs, logger log.Logger) (err error)
func NewWorkersPool ¶
func NewWorkersPool(lock sync.Locker, accumulator *shards.Accumulator, logger log.Logger, ctx context.Context, background bool, chainDb kv.RoDB, rs *state.StateV3, in *state.QueueWithRetry, blockReader services.FullBlockReader, chainConfig *chain.Config, genesis *types.Genesis, engine consensus.Engine, workerCount int, dirs datadir.Dirs, isMining bool) (reconWorkers []*Worker, applyWorker *Worker, rws *state.ResultsQueue, clear func(), wait func())
Types ¶
type CallTracer ¶
type CallTracer struct {
// contains filtered or unexported fields
}
func NewCallTracer ¶
func NewCallTracer() *CallTracer
func (*CallTracer) CaptureEnd ¶
func (ct *CallTracer) CaptureEnd(output []byte, usedGas uint64, err error)
func (*CallTracer) CaptureEnter ¶
func (*CallTracer) CaptureExit ¶
func (ct *CallTracer) CaptureExit(output []byte, usedGas uint64, err error)
func (*CallTracer) CaptureFault ¶
func (ct *CallTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error)
func (*CallTracer) CaptureStart ¶
func (*CallTracer) CaptureState ¶
func (ct *CallTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error)
func (*CallTracer) CaptureTxEnd ¶
func (ct *CallTracer) CaptureTxEnd(restGas uint64)
func (*CallTracer) CaptureTxStart ¶
func (ct *CallTracer) CaptureTxStart(gasLimit uint64)
func (*CallTracer) Froms ¶
func (ct *CallTracer) Froms() map[libcommon.Address]struct{}
func (*CallTracer) Reset ¶
func (ct *CallTracer) Reset()
func (*CallTracer) Tos ¶
func (ct *CallTracer) Tos() map[libcommon.Address]struct{}
type ExecArgs ¶
type ExecArgs struct { ChainDB kv.RoDB Genesis *types.Genesis BlockReader services.FullBlockReader Prune prune.Mode Engine consensus.Engine Dirs datadir.Dirs ChainConfig *chain.Config Workers int }
immutable (aka. global) params required for block execution. can instantiate once at app-start
type GenericTracer ¶
type GenericTracer interface { vm.EVMLogger SetTransaction(tx types.Transaction) Found() bool }
type HistoricalTraceWorker ¶
type HistoricalTraceWorker struct {
// contains filtered or unexported fields
}
func NewHistoricalTraceWorker ¶
func NewHistoricalTraceWorker( consumer TraceConsumer, in *state.QueueWithRetry, out *state.ResultsQueue, background bool, ctx context.Context, execArgs *ExecArgs, logger log.Logger, ) *HistoricalTraceWorker
func NewHistoricalTraceWorkers ¶
func NewHistoricalTraceWorkers(consumer TraceConsumer, cfg *ExecArgs, ctx context.Context, toTxNum uint64, in *state.QueueWithRetry, workerCount int, outputTxNum *atomic.Uint64, logger log.Logger) (g *errgroup.Group, applyWorker *HistoricalTraceWorker, clearFunc func())
func (*HistoricalTraceWorker) ResetTx ¶
func (rw *HistoricalTraceWorker) ResetTx(chainTx kv.Tx)
func (*HistoricalTraceWorker) Run ¶
func (rw *HistoricalTraceWorker) Run() error
func (*HistoricalTraceWorker) RunTxTask ¶
func (rw *HistoricalTraceWorker) RunTxTask(txTask *state.TxTask)
type TraceConsumer ¶
type TraceWorker ¶
type TraceWorker struct {
// contains filtered or unexported fields
}
func NewTraceWorker ¶
func NewTraceWorker(tx kv.TemporalTx, cc *chain.Config, engine consensus.EngineReader, br services.HeaderReader, tracer GenericTracer) *TraceWorker
func (*TraceWorker) ChangeBlock ¶
func (e *TraceWorker) ChangeBlock(header *types.Header)
func (*TraceWorker) Close ¶
func (e *TraceWorker) Close()
func (*TraceWorker) ExecTxn ¶
func (e *TraceWorker) ExecTxn(txNum uint64, txIndex int, txn types.Transaction, gasBailout bool) (*evmtypes.ExecutionResult, error)
func (*TraceWorker) GetRawLogs ¶
func (e *TraceWorker) GetRawLogs(txIdx int) types.Logs
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(lock sync.Locker, logger log.Logger, ctx context.Context, background bool, chainDb kv.RoDB, in *state.QueueWithRetry, blockReader services.FullBlockReader, chainConfig *chain.Config, genesis *types.Genesis, results *state.ResultsQueue, engine consensus.Engine, dirs datadir.Dirs, isMining bool) *Worker
func (*Worker) DiscardReadList ¶
func (rw *Worker) DiscardReadList()
func (*Worker) LogLRUStats ¶
func (rw *Worker) LogLRUStats()
func (*Worker) ResetState ¶
func (rw *Worker) ResetState(rs *state.StateV3, accumulator *shards.Accumulator)
func (*Worker) RunTxTaskNoLock ¶
func (*Worker) SetReader ¶
func (rw *Worker) SetReader(reader state.ResettableStateReader)
Needed to set history reader when need to offset few txs from block beginning and does not break processing, like compute gas used for block and then to set state reader to continue processing on latest data.
Click to show internal directories.
Click to hide internal directories.