v0.0.0-...-e1f3134 Latest Latest

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 25 Imported by: 0




This section is empty.


This section is empty.


func NewDB

func NewDB(fetcher w3vm.Fetcher, kv *BadgerKV) *db


type BadgerKV

type BadgerKV struct {
	// contains filtered or unexported fields

func NewBadgerKV

func NewBadgerKV() *BadgerKV

func (*BadgerKV) ContractCode

func (db *BadgerKV) ContractCode(addr common.Address, codeHash common.Hash) ([]byte, error)

func (*BadgerKV) GetAccount

func (db *BadgerKV) GetAccount(addr common.Address) (account *fetcher.Account, err error)

func (*BadgerKV) GetStorage

func (db *BadgerKV) GetStorage(addr common.Address, key []byte) (v common.Hash, err error)

func (*BadgerKV) ProcessState

func (db *BadgerKV) ProcessState(s fetcher.TraceBlock[fetcher.PrestateTrace]) error

func (*BadgerKV) UpdateAccount

func (db *BadgerKV) UpdateAccount(addr common.Address, account *fetcher.Account) (err error)

func (*BadgerKV) UpdateContractCode

func (db *BadgerKV) UpdateContractCode(addr common.Address, codeHash common.Hash, code []byte) error

func (*BadgerKV) UpdateStorage

func (db *BadgerKV) UpdateStorage(addr common.Address, key, value []byte) error

type W3Backend

type W3Backend struct {
	// contains filtered or unexported fields

func NewW3Backend

func NewW3Backend(client *w3.Client, db *db) *W3Backend

func (*W3Backend) BlockByHash

func (b *W3Backend) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)

BlockByHash implements tracers.Backend.

func (*W3Backend) BlockByNumber

func (b *W3Backend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)

BlockByNumber implements tracers.Backend.

func (*W3Backend) ChainConfig

func (*W3Backend) ChainConfig() *params.ChainConfig

ChainConfig implements tracers.Backend.

func (*W3Backend) ChainDb

func (*W3Backend) ChainDb() ethdb.Database

ChainDb implements tracers.Backend.

func (*W3Backend) Engine

func (*W3Backend) Engine() consensus.Engine

Engine implements tracers.Backend.

func (*W3Backend) GetHeader

func (b *W3Backend) GetHeader(hash common.Hash, _ uint64) *types.Header

func (*W3Backend) GetTransaction

GetTransaction implements tracers.Backend.

func (*W3Backend) HeaderByHash

func (b *W3Backend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)

func (*W3Backend) HeaderByNumber

func (b *W3Backend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)

HeaderByNumber implements tracers.Backend.

func (*W3Backend) RPCGasCap

func (*W3Backend) RPCGasCap() uint64

RPCGasCap implements tracers.Backend.

func (*W3Backend) SetHead

func (b *W3Backend) SetHead(block *types.Block)

func (*W3Backend) StateAndHeaderByNumberOrHash

func (b *W3Backend) StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error)

func (*W3Backend) StateAtBlock

func (b *W3Backend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64, base *state.StateDB, readOnly bool, preferDisk bool) (*state.StateDB, tracers.StateReleaseFunc, error)

StateAtBlock implements tracers.Backend.

func (*W3Backend) StateAtTransaction

func (*W3Backend) StateAtTransaction(ctx context.Context, block *types.Block, txIndex int, reexec uint64) (*core.Message, vm.BlockContext, *state.StateDB, tracers.StateReleaseFunc, error)

StateAtTransaction implements tracers.Backend.

type W3Engine

type W3Engine struct {

func (*W3Engine) APIs

func (*W3Engine) APIs(chain consensus.ChainHeaderReader) []rpc.API

APIs implements consensus.Engine.

func (*W3Engine) Author

func (*W3Engine) Author(header *types.Header) (common.Address, error)

Author implements consensus.Engine.

func (*W3Engine) CalcDifficulty

func (*W3Engine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int

CalcDifficulty implements consensus.Engine.

func (*W3Engine) Close

func (*W3Engine) Close() error

Close implements consensus.Engine.

func (*W3Engine) Finalize

func (*W3Engine) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, withdrawals []*types.Withdrawal)

Finalize implements consensus.Engine.

func (*W3Engine) FinalizeAndAssemble

func (*W3Engine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt, withdrawals []*types.Withdrawal) (*types.Block, error)

FinalizeAndAssemble implements consensus.Engine.

func (*W3Engine) Prepare

func (*W3Engine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error

Prepare implements consensus.Engine.

func (*W3Engine) Seal

func (*W3Engine) Seal(chain consensus.ChainHeaderReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error

Seal implements consensus.Engine.

func (*W3Engine) SealHash

func (*W3Engine) SealHash(header *types.Header) common.Hash

SealHash implements consensus.Engine.

func (*W3Engine) VerifyHeader

func (*W3Engine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error

VerifyHeader implements consensus.Engine.

func (*W3Engine) VerifyHeaders

func (*W3Engine) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error)

VerifyHeaders implements consensus.Engine.

func (*W3Engine) VerifyUncles

func (*W3Engine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error

VerifyUncles implements consensus.Engine.

Jump to

Keyboard shortcuts

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