Documentation ¶
Index ¶
- func NewDB(fetcher w3vm.Fetcher, kv *BadgerKV) *db
- type BadgerKV
- func (db *BadgerKV) ContractCode(addr common.Address, codeHash common.Hash) ([]byte, error)
- func (db *BadgerKV) GetAccount(addr common.Address) (account *fetcher.Account, err error)
- func (db *BadgerKV) GetStorage(addr common.Address, key []byte) (v common.Hash, err error)
- func (db *BadgerKV) ProcessState(s fetcher.TraceBlock[fetcher.PrestateTrace]) error
- func (db *BadgerKV) UpdateAccount(addr common.Address, account *fetcher.Account) (err error)
- func (db *BadgerKV) UpdateContractCode(addr common.Address, codeHash common.Hash, code []byte) error
- func (db *BadgerKV) UpdateStorage(addr common.Address, key, value []byte) error
- type W3Backend
- func (b *W3Backend) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (b *W3Backend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
- func (*W3Backend) ChainConfig() *params.ChainConfig
- func (*W3Backend) ChainDb() ethdb.Database
- func (*W3Backend) Engine() consensus.Engine
- func (b *W3Backend) GetHeader(hash common.Hash, _ uint64) *types.Header
- func (*W3Backend) GetTransaction(context.Context, common.Hash) (*types.Transaction, common.Hash, uint64, uint64, error)
- func (b *W3Backend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (b *W3Backend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
- func (*W3Backend) RPCGasCap() uint64
- func (b *W3Backend) SetHead(block *types.Block)
- func (b *W3Backend) StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error)
- func (b *W3Backend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64, base *state.StateDB, ...) (*state.StateDB, tracers.StateReleaseFunc, error)
- func (*W3Backend) StateAtTransaction(ctx context.Context, block *types.Block, txIndex int, reexec uint64) (*core.Message, vm.BlockContext, *state.StateDB, tracers.StateReleaseFunc, ...)
- type W3Engine
- func (*W3Engine) APIs(chain consensus.ChainHeaderReader) []rpc.API
- func (*W3Engine) Author(header *types.Header) (common.Address, error)
- func (*W3Engine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int
- func (*W3Engine) Close() error
- func (*W3Engine) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...)
- func (*W3Engine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error)
- func (*W3Engine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error
- func (*W3Engine) Seal(chain consensus.ChainHeaderReader, block *types.Block, ...) error
- func (*W3Engine) SealHash(header *types.Header) common.Hash
- func (*W3Engine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error
- func (*W3Engine) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error)
- func (*W3Engine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadgerKV ¶
type BadgerKV struct {
// contains filtered or unexported fields
}
func NewBadgerKV ¶
func NewBadgerKV() *BadgerKV
func (*BadgerKV) ContractCode ¶
func (*BadgerKV) GetAccount ¶
func (*BadgerKV) GetStorage ¶
func (*BadgerKV) ProcessState ¶
func (db *BadgerKV) ProcessState(s fetcher.TraceBlock[fetcher.PrestateTrace]) error
func (*BadgerKV) UpdateAccount ¶
func (*BadgerKV) UpdateContractCode ¶
type W3Backend ¶
type W3Backend struct {
// contains filtered or unexported fields
}
func NewW3Backend ¶
func (*W3Backend) BlockByHash ¶
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) GetTransaction ¶
func (*W3Backend) GetTransaction(context.Context, common.Hash) (*types.Transaction, common.Hash, uint64, uint64, error)
GetTransaction implements tracers.Backend.
func (*W3Backend) HeaderByHash ¶
func (*W3Backend) HeaderByNumber ¶
func (b *W3Backend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
HeaderByNumber implements tracers.Backend.
func (*W3Backend) StateAndHeaderByNumberOrHash ¶
type W3Engine ¶
type W3Engine struct { }
func (*W3Engine) APIs ¶
func (*W3Engine) APIs(chain consensus.ChainHeaderReader) []rpc.API
APIs 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) 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) Seal ¶
func (*W3Engine) Seal(chain consensus.ChainHeaderReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error
Seal implements consensus.Engine.
func (*W3Engine) VerifyHeader ¶
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 ¶
VerifyUncles implements consensus.Engine.
Click to show internal directories.
Click to hide internal directories.