Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoEngineClient = errors.New("engine client not initialized") ErrNoRollupConfig = errors.New("rollup config not available") )
View Source
var ( ErrRewindNilTarget = errors.New("rewind requires a non-nil target payload") ErrRewindTargetMismatch = errors.New("rewind target payload inconsistent with rollup config") ErrRewindComputeTargetsFailed = errors.New("failed to compute rewind targets") ErrRewindInsertSyntheticFailed = errors.New("failed to insert synthetic payload") ErrRewindSyntheticPayloadRejected = errors.New("synthetic payload rejected by engine") ErrRewindReinsertCanonicalFailed = errors.New("failed to re-insert canonical payload") ErrRewindCanonicalPayloadRejected = errors.New("canonical payload rejected by engine on re-insert") ErrRewindFCUSyntheticFailed = errors.New("failed to FCU to synthetic block") ErrRewindFCUTargetFailed = errors.New("failed to FCU to target block") ErrRewindFCURejected = errors.New("forkchoice update rejected by engine") ErrRewindTimestampToBlockConversion = errors.New("failed to convert timestamp to block number") ErrRewindOverFinalizedHead = errors.New("cannot rewind over finalized head") ErrRewindFCUHeadMismatch = errors.New("FCU head did not converge to expected value") ErrRewindCurrentUnsafeFailed = errors.New("failed to get current unsafe block") )
Functions ¶
This section is empty.
Types ¶
type EngineController ¶
type EngineController interface {
// L2BlockRefByLabel returns the L2 block reference for the given block label.
L2BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L2BlockRef, error)
// L2BlockRefByNumber returns the L2 block reference for the given block number.
L2BlockRefByNumber(ctx context.Context, num uint64) (eth.L2BlockRef, error)
// OutputV0AtBlockNumber returns the output preimage for the given L2 block number.
OutputV0AtBlockNumber(ctx context.Context, num uint64) (*eth.OutputV0, error)
// OutputV0ByBlockHash returns the output preimage for the given L2 block
// hash. Returns ethereum.NotFound if the EL no longer has the block at
// that hash on its canonical chain.
OutputV0ByBlockHash(ctx context.Context, blockHash common.Hash) (*eth.OutputV0, error)
// PayloadByHash returns the execution payload envelope for the given block hash. Used by
// build paths to capture the canonical target payload before recording a rewind operation
// in the WAL.
PayloadByHash(ctx context.Context, hash common.Hash) (*eth.ExecutionPayloadEnvelope, error)
// PayloadByNumber returns the canonical execution payload envelope for the given block number.
PayloadByNumber(ctx context.Context, number uint64) (*eth.ExecutionPayloadEnvelope, error)
// Rewind rewinds the L2 execution layer to the supplied target block. The target payload
// must come from durable storage (the supernode WAL) — the engine controller does not
// consult the live EL to discover the target.
Rewind(ctx context.Context, target *eth.ExecutionPayloadEnvelope) error
// FetchReceipts fetches the receipts for a given block by hash.
FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)
// Close releases any underlying RPC resources.
Close() error
}
EngineController abstracts access to the L2 execution layer
func NewEngineControllerFromConfig ¶
func NewEngineControllerFromConfig(ctx context.Context, log gethlog.Logger, vncfg *opnodecfg.Config) (EngineController, error)
NewEngineControllerFromConfig builds an engine client from the op-node L2 endpoint config. This creates a separate connection (not passed as an override to op-node).
func NewEngineControllerWithL2 ¶
func NewEngineControllerWithL2(l2 l2Provider) EngineController
NewEngineControllerWithL2 wraps an existing L2 provider.
func NewEngineControllerWithL2AndRollup ¶
func NewEngineControllerWithL2AndRollup(l2 l2Provider, rollup *rollup.Config) EngineController
Click to show internal directories.
Click to hide internal directories.