Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - Variables
 - type AccountProofHint
 - type AgreedPrestateHint
 - type BlockByHashFn
 - type BlockHashLookupHint
 - type BlockHeaderHint
 - type CachingOracle
 - func (o *CachingOracle) BlockByHash(blockHash common.Hash, chainID eth.ChainID) *types.Block
 - func (o *CachingOracle) BlockDataByHash(agreedBlockHash, blockHash common.Hash, chainID eth.ChainID) *types.Block
 - func (o *CachingOracle) CodeByHash(codeHash common.Hash, chainID eth.ChainID) []byte
 - func (o *CachingOracle) Hinter() l2Types.OracleHinter
 - func (o *CachingOracle) NodeByHash(nodeHash common.Hash, chainID eth.ChainID) []byte
 - func (o *CachingOracle) OutputByRoot(root common.Hash, chainID eth.ChainID) eth.Output
 - func (o *CachingOracle) ReceiptsByBlockHash(blockHash common.Hash, chainID eth.ChainID) (*types.Block, types.Receipts)
 - func (o *CachingOracle) TransitionStateByRoot(root common.Hash) *interopTypes.TransitionState
 
- type CanonicalBlockHeaderOracle
 - type CodeHint
 - type FastCanonicalBlockHeaderOracle
 - type HashAndChainID
 - type KeyValueStore
 - type L2BlockDataHint
 - type L2OutputHint
 - type LegacyBlockHeaderHint
 - type LegacyCodeHint
 - type LegacyL2OutputHint
 - type LegacyStateNodeHint
 - type LegacyTransactionsHint
 - type Oracle
 - type OracleBackedL2Chain
 - func (o *OracleBackedL2Chain) AssembleAndInsertBlockWithoutSetHead(processor *engineapi.BlockProcessor) (*types.Block, error)
 - func (o *OracleBackedL2Chain) Config() *params.ChainConfig
 - func (o *OracleBackedL2Chain) CurrentFinalBlock() *types.Header
 - func (o *OracleBackedL2Chain) CurrentHeader() *types.Header
 - func (o *OracleBackedL2Chain) CurrentSafeBlock() *types.Header
 - func (o *OracleBackedL2Chain) Engine() consensus.Engine
 - func (o *OracleBackedL2Chain) GetBlock(hash common.Hash, number uint64) *types.Block
 - func (o *OracleBackedL2Chain) GetBlockByHash(hash common.Hash) *types.Block
 - func (o *OracleBackedL2Chain) GetCanonicalHash(n uint64) common.Hash
 - func (o *OracleBackedL2Chain) GetHeader(hash common.Hash, u uint64) *types.Header
 - func (o *OracleBackedL2Chain) GetHeaderByHash(hash common.Hash) *types.Header
 - func (o *OracleBackedL2Chain) GetHeaderByNumber(n uint64) *types.Header
 - func (o *OracleBackedL2Chain) GetReceiptsByBlockHash(hash common.Hash) types.Receipts
 - func (o *OracleBackedL2Chain) GetTd(hash common.Hash, number uint64) *big.Int
 - func (o *OracleBackedL2Chain) GetVMConfig() *vm.Config
 - func (o *OracleBackedL2Chain) HasBlockAndState(hash common.Hash, number uint64) bool
 - func (o *OracleBackedL2Chain) Hinter() l2Types.OracleHinter
 - func (o *OracleBackedL2Chain) InsertBlockWithoutSetHead(block *types.Block, makeWitness bool) (*stateless.Witness, error)
 - func (o *OracleBackedL2Chain) SetCanonical(head *types.Block) (common.Hash, error)
 - func (o *OracleBackedL2Chain) SetFinalized(header *types.Header)
 - func (o *OracleBackedL2Chain) SetSafe(header *types.Header)
 - func (o *OracleBackedL2Chain) StateAt(root common.Hash) (*state.StateDB, error)
 
- type OracleEngine
 - func (o *OracleEngine) ForkchoiceUpdate(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
 - func (o *OracleEngine) GetPayload(ctx context.Context, payloadInfo eth.PayloadInfo) (*eth.ExecutionPayloadEnvelope, error)
 - func (o *OracleEngine) L2BlockRefByHash(ctx context.Context, l2Hash common.Hash) (eth.L2BlockRef, error)
 - func (o *OracleEngine) L2BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L2BlockRef, error)
 - func (o *OracleEngine) L2BlockRefByNumber(ctx context.Context, n uint64) (eth.L2BlockRef, error)
 - func (o *OracleEngine) L2OutputAtBlockHash(blockHash common.Hash) (*eth.OutputV0, error)
 - func (o *OracleEngine) L2OutputRoot(l2ClaimBlockNum uint64) (common.Hash, eth.Bytes32, error)
 - func (o *OracleEngine) NewPayload(ctx context.Context, payload *eth.ExecutionPayload, ...) (*eth.PayloadStatusV1, error)
 - func (o *OracleEngine) PayloadByHash(ctx context.Context, hash common.Hash) (*eth.ExecutionPayloadEnvelope, error)
 - func (o *OracleEngine) PayloadByNumber(ctx context.Context, n uint64) (*eth.ExecutionPayloadEnvelope, error)
 - func (o *OracleEngine) SystemConfigByL2Hash(ctx context.Context, hash common.Hash) (eth.SystemConfig, error)
 
- type OracleKeyValueStore
 - func (o *OracleKeyValueStore) Close() error
 - func (o *OracleKeyValueStore) Compact(start []byte, limit []byte) error
 - func (o *OracleKeyValueStore) Delete(key []byte) error
 - func (o *OracleKeyValueStore) DeleteRange(start, end []byte) error
 - func (o *OracleKeyValueStore) Get(key []byte) ([]byte, error)
 - func (o *OracleKeyValueStore) Has(key []byte) (bool, error)
 - func (o *OracleKeyValueStore) NewBatch() ethdb.Batch
 - func (o *OracleKeyValueStore) NewBatchWithSize(size int) ethdb.Batch
 - func (o *OracleKeyValueStore) NewIterator(prefix []byte, start []byte) ethdb.Iterator
 - func (o *OracleKeyValueStore) Put(key []byte, value []byte) error
 - func (o *OracleKeyValueStore) Stat() (string, error)
 - func (o *OracleKeyValueStore) SyncKeyValue() error
 
- type PayloadWitnessHint
 - type PreimageOracle
 - func (p *PreimageOracle) BlockByHash(blockHash common.Hash, chainID eth.ChainID) *types.Block
 - func (p *PreimageOracle) BlockDataByHash(agreedBlockHash, blockHash common.Hash, chainID eth.ChainID) *types.Block
 - func (p *PreimageOracle) CodeByHash(codeHash common.Hash, chainID eth.ChainID) []byte
 - func (p *PreimageOracle) Hinter() l2Types.OracleHinter
 - func (p *PreimageOracle) LoadTransactions(blockHash common.Hash, txHash common.Hash, chainID eth.ChainID) []*types.Transaction
 - func (p *PreimageOracle) NodeByHash(nodeHash common.Hash, chainID eth.ChainID) []byte
 - func (p *PreimageOracle) OutputByRoot(l2OutputRoot common.Hash, chainID eth.ChainID) eth.Output
 - func (p *PreimageOracle) ReceiptsByBlockHash(blockHash common.Hash, chainID eth.ChainID) (*types.Block, types.Receipts)
 - func (p *PreimageOracle) TransitionStateByRoot(root common.Hash) *interopTypes.TransitionState
 
- type PreimageOracleHinter
 - func (p *PreimageOracleHinter) HintBlockExecution(parentBlockHash common.Hash, attr eth.PayloadAttributes, chainID eth.ChainID)
 - func (p *PreimageOracleHinter) HintBlockHashLookup(blockNumber uint64, headBlockHash common.Hash, l2ChainID eth.ChainID)
 - func (p *PreimageOracleHinter) HintWithdrawalsRoot(blockHash common.Hash, chainID eth.ChainID)
 
- type ReceiptsHint
 - type StateNodeHint
 - type StateOracle
 - type TransactionsHint
 
Constants ¶
const ( HintL2BlockHeader = "l2-block-header" HintL2Transactions = "l2-transactions" HintL2Receipts = "l2-receipts" HintL2Code = "l2-code" HintL2StateNode = "l2-state-node" HintL2Output = "l2-output" HintL2BlockData = "l2-block-data" HintAgreedPrestate = "agreed-pre-state" HintL2AccountProof = "l2-account-proof" HintL2PayloadWitness = "l2-payload-witness" HintL2BlockHashLookup = "l2-block-hash-lookup" )
Variables ¶
var ( ErrInvalidHeader = errors.New("invalid header") ErrUnsupportedAPIVersion = errors.New("unsupported api version") ErrUnknownLabel = errors.New("unknown label") )
var ( ErrUnsupportedL2Output = errors.New("unsupported l2 output version") ErrUnexpectedBlockHash = errors.New("unexpected block hash") )
var ErrInvalidKeyLength = errors.New("pre-images must be identified by 32-byte hash keys")
    Functions ¶
This section is empty.
Types ¶
type AccountProofHint ¶ added in v1.11.2
func (AccountProofHint) Hint ¶ added in v1.11.2
func (l AccountProofHint) Hint() string
type AgreedPrestateHint ¶ added in v1.11.0
func (AgreedPrestateHint) Hint ¶ added in v1.11.0
func (l AgreedPrestateHint) Hint() string
type BlockHashLookupHint ¶ added in v1.13.7
type BlockHashLookupHint struct {
	BlockNumber   uint64
	HeadBlockHash common.Hash
	ChainID       eth.ChainID
}
    func (BlockHashLookupHint) Hint ¶ added in v1.13.7
func (b BlockHashLookupHint) Hint() string
func (BlockHashLookupHint) String ¶ added in v1.13.7
func (b BlockHashLookupHint) String() string
type BlockHeaderHint ¶
type BlockHeaderHint HashAndChainID
func (BlockHeaderHint) Hint ¶
func (l BlockHeaderHint) Hint() string
type CachingOracle ¶
type CachingOracle struct {
	// contains filtered or unexported fields
}
    func NewCachingOracle ¶
func NewCachingOracle(oracle Oracle) *CachingOracle
func (*CachingOracle) BlockByHash ¶
func (*CachingOracle) BlockDataByHash ¶ added in v1.11.0
func (*CachingOracle) CodeByHash ¶
func (*CachingOracle) Hinter ¶ added in v1.11.2
func (o *CachingOracle) Hinter() l2Types.OracleHinter
func (*CachingOracle) NodeByHash ¶
func (*CachingOracle) OutputByRoot ¶ added in v1.1.4
func (*CachingOracle) ReceiptsByBlockHash ¶ added in v1.11.0
func (*CachingOracle) TransitionStateByRoot ¶ added in v1.11.0
func (o *CachingOracle) TransitionStateByRoot(root common.Hash) *interopTypes.TransitionState
type CanonicalBlockHeaderOracle ¶ added in v1.11.0
type CanonicalBlockHeaderOracle struct {
	// contains filtered or unexported fields
}
    func NewCanonicalBlockHeaderOracle ¶ added in v1.11.0
func NewCanonicalBlockHeaderOracle(head *types.Header, blockByHashFn BlockByHashFn) *CanonicalBlockHeaderOracle
func (*CanonicalBlockHeaderOracle) CurrentHeader ¶ added in v1.11.0
func (o *CanonicalBlockHeaderOracle) CurrentHeader() *types.Header
func (*CanonicalBlockHeaderOracle) GetHeaderByNumber ¶ added in v1.11.0
func (o *CanonicalBlockHeaderOracle) GetHeaderByNumber(n uint64) *types.Header
GetHeaderByNumber walks back from the current head to the requested block number
func (*CanonicalBlockHeaderOracle) SetCanonical ¶ added in v1.11.0
func (o *CanonicalBlockHeaderOracle) SetCanonical(head *types.Header) common.Hash
type FastCanonicalBlockHeaderOracle ¶ added in v1.11.2
type FastCanonicalBlockHeaderOracle struct {
	// contains filtered or unexported fields
}
    func NewFastCanonicalBlockHeaderOracle ¶ added in v1.11.2
func NewFastCanonicalBlockHeaderOracle( head *types.Header, blockByHashFn BlockByHashFn, chainCfg *params.ChainConfig, stateOracle StateOracle, kvdb KeyValueStore, fallback *CanonicalBlockHeaderOracle, ) *FastCanonicalBlockHeaderOracle
func (*FastCanonicalBlockHeaderOracle) CurrentHeader ¶ added in v1.11.2
func (o *FastCanonicalBlockHeaderOracle) CurrentHeader() *types.Header
func (*FastCanonicalBlockHeaderOracle) GetHeaderByNumber ¶ added in v1.11.2
func (o *FastCanonicalBlockHeaderOracle) GetHeaderByNumber(n uint64) *types.Header
func (*FastCanonicalBlockHeaderOracle) SetCanonical ¶ added in v1.11.2
func (o *FastCanonicalBlockHeaderOracle) SetCanonical(head *types.Header) common.Hash
type HashAndChainID ¶ added in v1.11.0
func (HashAndChainID) Marshal ¶ added in v1.11.0
func (h HashAndChainID) Marshal() []byte
type KeyValueStore ¶ added in v1.11.0
type KeyValueStore interface {
	ethdb.KeyValueReader
	ethdb.Batcher
	// Put inserts the given value into the key-value data store.
	Put(key []byte, value []byte) error
}
    KeyValueStore is a subset of the ethdb.KeyValueStore interface that's required for block processing.
type L2BlockDataHint ¶ added in v1.11.0
type L2BlockDataHint struct {
	AgreedBlockHash common.Hash
	BlockHash       common.Hash
	ChainID         eth.ChainID
}
    func (L2BlockDataHint) Hint ¶ added in v1.11.0
func (l L2BlockDataHint) Hint() string
type L2OutputHint ¶ added in v1.1.4
type L2OutputHint HashAndChainID
func (L2OutputHint) Hint ¶ added in v1.1.4
func (l L2OutputHint) Hint() string
type LegacyBlockHeaderHint ¶ added in v1.11.0
func (LegacyBlockHeaderHint) Hint ¶ added in v1.11.0
func (l LegacyBlockHeaderHint) Hint() string
type LegacyCodeHint ¶ added in v1.11.0
func (LegacyCodeHint) Hint ¶ added in v1.11.0
func (l LegacyCodeHint) Hint() string
type LegacyL2OutputHint ¶ added in v1.11.0
func (LegacyL2OutputHint) Hint ¶ added in v1.11.0
func (l LegacyL2OutputHint) Hint() string
type LegacyStateNodeHint ¶ added in v1.11.0
func (LegacyStateNodeHint) Hint ¶ added in v1.11.0
func (l LegacyStateNodeHint) Hint() string
type LegacyTransactionsHint ¶ added in v1.11.0
func (LegacyTransactionsHint) Hint ¶ added in v1.11.0
func (l LegacyTransactionsHint) Hint() string
type Oracle ¶
type Oracle interface {
	StateOracle
	// BlockByHash retrieves the block with the given hash.
	BlockByHash(blockHash common.Hash, chainID eth.ChainID) *types.Block
	OutputByRoot(root common.Hash, chainID eth.ChainID) eth.Output
	// BlockDataByHash retrieves the block, including all data used to construct it.
	BlockDataByHash(agreedBlockHash, blockHash common.Hash, chainID eth.ChainID) *types.Block
	TransitionStateByRoot(root common.Hash) *interopTypes.TransitionState
	ReceiptsByBlockHash(blockHash common.Hash, chainID eth.ChainID) (*types.Block, types.Receipts)
}
    Oracle defines the high-level API used to retrieve L2 data. The returned data is always the preimage of the requested hash.
type OracleBackedL2Chain ¶
type OracleBackedL2Chain struct {
	// contains filtered or unexported fields
}
    func NewOracleBackedL2Chain ¶
func NewOracleBackedL2Chain( logger log.Logger, oracle Oracle, precompileOracle engineapi.PrecompileOracle, chainCfg *params.ChainConfig, l2OutputRoot common.Hash, db KeyValueStore, ) (*OracleBackedL2Chain, error)
func NewOracleBackedL2ChainFromHead ¶ added in v1.11.0
func NewOracleBackedL2ChainFromHead( logger log.Logger, oracle Oracle, precompileOracle engineapi.PrecompileOracle, chainCfg *params.ChainConfig, head *types.Block, db KeyValueStore, ) *OracleBackedL2Chain
func (*OracleBackedL2Chain) AssembleAndInsertBlockWithoutSetHead ¶ added in v1.9.5
func (o *OracleBackedL2Chain) AssembleAndInsertBlockWithoutSetHead(processor *engineapi.BlockProcessor) (*types.Block, error)
func (*OracleBackedL2Chain) Config ¶
func (o *OracleBackedL2Chain) Config() *params.ChainConfig
func (*OracleBackedL2Chain) CurrentFinalBlock ¶
func (o *OracleBackedL2Chain) CurrentFinalBlock() *types.Header
func (*OracleBackedL2Chain) CurrentHeader ¶
func (o *OracleBackedL2Chain) CurrentHeader() *types.Header
func (*OracleBackedL2Chain) CurrentSafeBlock ¶
func (o *OracleBackedL2Chain) CurrentSafeBlock() *types.Header
func (*OracleBackedL2Chain) Engine ¶
func (o *OracleBackedL2Chain) Engine() consensus.Engine
func (*OracleBackedL2Chain) GetBlockByHash ¶
func (o *OracleBackedL2Chain) GetBlockByHash(hash common.Hash) *types.Block
func (*OracleBackedL2Chain) GetCanonicalHash ¶
func (o *OracleBackedL2Chain) GetCanonicalHash(n uint64) common.Hash
func (*OracleBackedL2Chain) GetHeaderByHash ¶
func (o *OracleBackedL2Chain) GetHeaderByHash(hash common.Hash) *types.Header
func (*OracleBackedL2Chain) GetHeaderByNumber ¶
func (o *OracleBackedL2Chain) GetHeaderByNumber(n uint64) *types.Header
func (*OracleBackedL2Chain) GetReceiptsByBlockHash ¶ added in v1.11.0
func (o *OracleBackedL2Chain) GetReceiptsByBlockHash(hash common.Hash) types.Receipts
func (*OracleBackedL2Chain) GetVMConfig ¶
func (o *OracleBackedL2Chain) GetVMConfig() *vm.Config
func (*OracleBackedL2Chain) HasBlockAndState ¶
func (o *OracleBackedL2Chain) HasBlockAndState(hash common.Hash, number uint64) bool
func (*OracleBackedL2Chain) Hinter ¶ added in v1.11.2
func (o *OracleBackedL2Chain) Hinter() l2Types.OracleHinter
func (*OracleBackedL2Chain) InsertBlockWithoutSetHead ¶
func (*OracleBackedL2Chain) SetCanonical ¶
func (*OracleBackedL2Chain) SetFinalized ¶
func (o *OracleBackedL2Chain) SetFinalized(header *types.Header)
func (*OracleBackedL2Chain) SetSafe ¶
func (o *OracleBackedL2Chain) SetSafe(header *types.Header)
type OracleEngine ¶
type OracleEngine struct {
	// contains filtered or unexported fields
}
    func NewOracleEngine ¶
func NewOracleEngine(rollupCfg *rollup.Config, logger log.Logger, backend engineapi.CachingEngineBackend, hinter l2Types.OracleHinter) *OracleEngine
func (*OracleEngine) ForkchoiceUpdate ¶
func (o *OracleEngine) ForkchoiceUpdate(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
func (*OracleEngine) GetPayload ¶
func (o *OracleEngine) GetPayload(ctx context.Context, payloadInfo eth.PayloadInfo) (*eth.ExecutionPayloadEnvelope, error)
func (*OracleEngine) L2BlockRefByHash ¶
func (o *OracleEngine) L2BlockRefByHash(ctx context.Context, l2Hash common.Hash) (eth.L2BlockRef, error)
func (*OracleEngine) L2BlockRefByLabel ¶
func (o *OracleEngine) L2BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L2BlockRef, error)
func (*OracleEngine) L2BlockRefByNumber ¶ added in v1.4.2
func (o *OracleEngine) L2BlockRefByNumber(ctx context.Context, n uint64) (eth.L2BlockRef, error)
func (*OracleEngine) L2OutputAtBlockHash ¶ added in v1.11.0
L2OutputAtBlockHash returns the L2 output at the specified block hash
func (*OracleEngine) L2OutputRoot ¶
L2OutputRoot returns the block hash and output root at the specified block number
func (*OracleEngine) NewPayload ¶
func (o *OracleEngine) NewPayload(ctx context.Context, payload *eth.ExecutionPayload, parentBeaconBlockRoot *common.Hash) (*eth.PayloadStatusV1, error)
func (*OracleEngine) PayloadByHash ¶
func (o *OracleEngine) PayloadByHash(ctx context.Context, hash common.Hash) (*eth.ExecutionPayloadEnvelope, error)
func (*OracleEngine) PayloadByNumber ¶
func (o *OracleEngine) PayloadByNumber(ctx context.Context, n uint64) (*eth.ExecutionPayloadEnvelope, error)
func (*OracleEngine) SystemConfigByL2Hash ¶
func (o *OracleEngine) SystemConfigByL2Hash(ctx context.Context, hash common.Hash) (eth.SystemConfig, error)
type OracleKeyValueStore ¶
type OracleKeyValueStore struct {
	// contains filtered or unexported fields
}
    func NewOracleBackedDB ¶
func NewOracleBackedDB(kv KeyValueStore, oracle StateOracle, chainID eth.ChainID) *OracleKeyValueStore
func (*OracleKeyValueStore) Close ¶
func (o *OracleKeyValueStore) Close() error
func (*OracleKeyValueStore) Compact ¶
func (o *OracleKeyValueStore) Compact(start []byte, limit []byte) error
func (*OracleKeyValueStore) Delete ¶
func (o *OracleKeyValueStore) Delete(key []byte) error
func (*OracleKeyValueStore) DeleteRange ¶ added in v1.11.0
func (o *OracleKeyValueStore) DeleteRange(start, end []byte) error
func (*OracleKeyValueStore) NewBatch ¶
func (o *OracleKeyValueStore) NewBatch() ethdb.Batch
func (*OracleKeyValueStore) NewBatchWithSize ¶
func (o *OracleKeyValueStore) NewBatchWithSize(size int) ethdb.Batch
func (*OracleKeyValueStore) NewIterator ¶
func (o *OracleKeyValueStore) NewIterator(prefix []byte, start []byte) ethdb.Iterator
func (*OracleKeyValueStore) Stat ¶
func (o *OracleKeyValueStore) Stat() (string, error)
func (*OracleKeyValueStore) SyncKeyValue ¶ added in v1.13.6
func (o *OracleKeyValueStore) SyncKeyValue() error
type PayloadWitnessHint ¶ added in v1.11.2
type PayloadWitnessHint struct {
	ParentBlockHash   common.Hash            `json:"parentBlockHash"`
	PayloadAttributes *eth.PayloadAttributes `json:"payloadAttributes"`
	ChainID           *eth.ChainID           `json:"chainID,omitempty"`
}
    func (PayloadWitnessHint) Hint ¶ added in v1.11.2
func (l PayloadWitnessHint) Hint() string
type PreimageOracle ¶
type PreimageOracle struct {
	// contains filtered or unexported fields
}
    PreimageOracle implements Oracle using by interfacing with the pure preimage.Oracle to fetch pre-images to decode into the requested data.
func NewPreimageOracle ¶
func (*PreimageOracle) BlockByHash ¶
func (*PreimageOracle) BlockDataByHash ¶ added in v1.11.0
func (*PreimageOracle) CodeByHash ¶
func (*PreimageOracle) Hinter ¶ added in v1.11.2
func (p *PreimageOracle) Hinter() l2Types.OracleHinter
func (*PreimageOracle) LoadTransactions ¶ added in v1.1.6
func (p *PreimageOracle) LoadTransactions(blockHash common.Hash, txHash common.Hash, chainID eth.ChainID) []*types.Transaction
func (*PreimageOracle) NodeByHash ¶
func (*PreimageOracle) OutputByRoot ¶ added in v1.1.4
func (*PreimageOracle) ReceiptsByBlockHash ¶ added in v1.11.0
func (*PreimageOracle) TransitionStateByRoot ¶ added in v1.11.0
func (p *PreimageOracle) TransitionStateByRoot(root common.Hash) *interopTypes.TransitionState
type PreimageOracleHinter ¶ added in v1.11.2
type PreimageOracleHinter struct {
	// contains filtered or unexported fields
}
    func NewPreimageHinter ¶ added in v1.11.2
func NewPreimageHinter(hint preimage.Hinter) *PreimageOracleHinter
func (*PreimageOracleHinter) HintBlockExecution ¶ added in v1.11.2
func (p *PreimageOracleHinter) HintBlockExecution(parentBlockHash common.Hash, attr eth.PayloadAttributes, chainID eth.ChainID)
func (*PreimageOracleHinter) HintBlockHashLookup ¶ added in v1.13.7
func (*PreimageOracleHinter) HintWithdrawalsRoot ¶ added in v1.11.2
func (p *PreimageOracleHinter) HintWithdrawalsRoot(blockHash common.Hash, chainID eth.ChainID)
HintWithdrawalsRoot hints that we're about to fetch the storage root of the L2ToL1MessagePasser contract.
type ReceiptsHint ¶ added in v1.11.0
type ReceiptsHint HashAndChainID
func (ReceiptsHint) Hint ¶ added in v1.11.0
func (l ReceiptsHint) Hint() string
type StateNodeHint ¶
type StateNodeHint HashAndChainID
func (StateNodeHint) Hint ¶
func (l StateNodeHint) Hint() string
type StateOracle ¶
type StateOracle interface {
	// NodeByHash retrieves the merkle-patricia trie node pre-image for a given hash.
	// Trie nodes may be from the world state trie or any account storage trie.
	// Contract code is not stored as part of the trie and must be retrieved via CodeByHash
	NodeByHash(nodeHash common.Hash, chainID eth.ChainID) []byte
	// CodeByHash retrieves the contract code pre-image for a given hash.
	// codeHash should be retrieved from the world state account for a contract.
	CodeByHash(codeHash common.Hash, chainID eth.ChainID) []byte
	// Hinter provides an optional interface to provide proactive hints.
	Hinter() l2Types.OracleHinter
}
    StateOracle defines the high-level API used to retrieve L2 state data pre-images The returned data is always the preimage of the requested hash.
type TransactionsHint ¶
type TransactionsHint HashAndChainID
func (TransactionsHint) Hint ¶
func (l TransactionsHint) Hint() string