status

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT, MIT Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type L1Tracker

type L1Tracker struct {
	derive.L1Fetcher
	// contains filtered or unexported fields
}

L1Tracker implements the L1Fetcher interface while proactively maintaining a reorg-aware cache of L1 block references by number. Populate the cache with the latest L1 block references.

func NewL1Tracker

func NewL1Tracker(inner derive.L1Fetcher) *L1Tracker

func (*L1Tracker) L1BlockRefByNumber

func (l *L1Tracker) L1BlockRefByNumber(ctx context.Context, num uint64) (eth.L1BlockRef, error)

func (*L1Tracker) OnL1Unsafe

func (st *L1Tracker) OnL1Unsafe(l1Unsafe eth.BlockRef)

type Metrics

type Metrics interface {
	RecordL1ReorgDepth(d uint64)
	RecordL1Ref(name string, ref eth.L1BlockRef)
}

type StatusTracker

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

func NewStatusTracker

func NewStatusTracker(log log.Logger, metrics Metrics) *StatusTracker

func (*StatusTracker) L1Head

func (st *StatusTracker) L1Head() eth.L1BlockRef

L1Head is a helper function; the L1 head is closely monitored for confirmation-distance logic.

func (*StatusTracker) OnCrossSafeUpdate

func (st *StatusTracker) OnCrossSafeUpdate(ctx context.Context, crossSafe eth.L2BlockRef, localSafe eth.L2BlockRef)

func (*StatusTracker) OnCrossUnsafeUpdate

func (st *StatusTracker) OnCrossUnsafeUpdate(ctx context.Context, crossUnsafe eth.L2BlockRef, localUnsafe eth.L2BlockRef)

func (*StatusTracker) OnEvent

func (st *StatusTracker) OnEvent(ctx context.Context, ev event.Event) bool

func (*StatusTracker) OnL1Finalized

func (st *StatusTracker) OnL1Finalized(x eth.L1BlockRef)

func (*StatusTracker) OnL1Safe

func (st *StatusTracker) OnL1Safe(x eth.L1BlockRef)

func (*StatusTracker) OnL1Unsafe

func (st *StatusTracker) OnL1Unsafe(x eth.L1BlockRef)

func (*StatusTracker) SyncStatus

func (st *StatusTracker) SyncStatus() *eth.SyncStatus

SyncStatus is thread safe, and reads the latest view of L1 and L2 block labels

func (*StatusTracker) UpdateSyncStatus

func (st *StatusTracker) UpdateSyncStatus()

Jump to

Keyboard shortcuts

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