status

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type L1SafeEvent

type L1SafeEvent struct {
	L1Safe eth.L1BlockRef
}

func (L1SafeEvent) String

func (ev L1SafeEvent) String() string

type L1Tracker added in v1.9.0

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. This handles the L1UnsafeEvent in order to populate the cache with the latest L1 block references.

func NewL1Tracker added in v1.9.0

func NewL1Tracker(inner derive.L1Fetcher) *L1Tracker

func (*L1Tracker) L1BlockRefByNumber added in v1.9.0

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

func (*L1Tracker) OnEvent added in v1.9.0

func (st *L1Tracker) OnEvent(ev event.Event) bool

type L1UnsafeEvent

type L1UnsafeEvent struct {
	L1Unsafe eth.L1BlockRef
}

func (L1UnsafeEvent) String

func (ev L1UnsafeEvent) String() string

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) OnEvent

func (st *StatusTracker) OnEvent(ev event.Event) bool

func (*StatusTracker) SyncStatus

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

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

Jump to

Keyboard shortcuts

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