finality

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AltDABackend added in v1.9.1

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 added in v1.9.1

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 added in v1.9.1

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

func (*AltDAFinalizer) OnEvent added in v1.9.1

func (fi *AltDAFinalizer) OnEvent(ev event.Event) bool

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 FinalizeL1Event added in v1.8.0

type FinalizeL1Event struct {
	FinalizedL1 eth.L1BlockRef
}

func (FinalizeL1Event) String added in v1.8.0

func (ev FinalizeL1Event) String() string

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) *Finalizer

func (*Finalizer) AttachEmitter added in v1.8.0

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 added in v1.8.0

func (fi *Finalizer) OnEvent(ev event.Event) bool

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 added in v1.8.0

type TryFinalizeEvent struct{}

func (TryFinalizeEvent) String added in v1.8.0

func (ev TryFinalizeEvent) String() string

Jump to

Keyboard shortcuts

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