finality

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT, MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AltDABackend

type AltDABackend interface {
	// Finalize notifies the L1 finalized head so AltDA finality is always behind L1.
	Finalize(ref eth.L1BlockRef)
	// OnFinalizedHeadSignal sets the engine finalization signal callback.
	OnFinalizedHeadSignal(f altda.HeadSignalFn)
}

type AltDAFinalizer

type AltDAFinalizer struct {
	*Finalizer
	// contains filtered or unexported fields
}

AltDAFinalizer is a special type of Finalizer, wrapping a regular Finalizer, but overriding the finality signal handling: it proxies L1 finality signals to the AltDA backend, and relies on the backend to then signal when finality is really applicable.

func NewAltDAFinalizer

func NewAltDAFinalizer(ctx context.Context, log log.Logger, cfg *rollup.Config,
	l1Fetcher FinalizerL1Interface,
	backend AltDABackend, ec EngineController) *AltDAFinalizer

func (*AltDAFinalizer) OnEvent

func (fi *AltDAFinalizer) OnEvent(ctx context.Context, ev event.Event) bool

func (*AltDAFinalizer) OnL1Finalized

func (fi *AltDAFinalizer) OnL1Finalized(l1Origin eth.L1BlockRef)

type EngineController

type EngineController interface {
	PromoteFinalized(context.Context, eth.L2BlockRef)
}

type FinalityData

type FinalityData struct {
	// The last L2 block that was fully derived and inserted into the L2 engine while processing this L1 block.
	L2Block eth.L2BlockRef
	// The L1 block this stage was at when inserting the L2 block.
	// When this L1 block is finalized, the L2 chain up to this block can be fully reproduced from finalized L1 data.
	L1Block eth.BlockID
}

type Finalizer

type Finalizer struct {
	// contains filtered or unexported fields
}

func NewFinalizer

func NewFinalizer(ctx context.Context, log log.Logger, cfg *rollup.Config, l1Fetcher FinalizerL1Interface, ec EngineController) *Finalizer

func (*Finalizer) AttachEmitter

func (fi *Finalizer) AttachEmitter(em event.Emitter)

func (*Finalizer) FinalizedL1

func (fi *Finalizer) FinalizedL1() (out eth.L1BlockRef)

FinalizedL1 identifies the L1 chain (incl.) that included and/or produced all the finalized L2 blocks. This may return a zeroed ID if no finalization signals have been seen yet.

func (*Finalizer) OnEvent

func (fi *Finalizer) OnEvent(ctx context.Context, ev event.Event) bool

func (*Finalizer) OnL1Finalized

func (fi *Finalizer) OnL1Finalized(l1Origin eth.L1BlockRef)

onL1Finalized applies a L1 finality signal

type FinalizerEngine

type FinalizerEngine interface {
	Finalized() eth.L2BlockRef
	SetFinalizedHead(eth.L2BlockRef)
}

type FinalizerL1Interface

type FinalizerL1Interface interface {
	L1BlockRefByNumber(context.Context, uint64) (eth.L1BlockRef, error)
}

type TryFinalizeEvent

type TryFinalizeEvent struct {
}

func (TryFinalizeEvent) String

func (ev TryFinalizeEvent) String() string

Jump to

Keyboard shortcuts

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