Documentation
¶
Index ¶
- type L1Tracker
- type Metrics
- type StatusTracker
- func (st *StatusTracker) L1Head() eth.L1BlockRef
- func (st *StatusTracker) OnCrossSafeUpdate(ctx context.Context, crossSafe eth.L2BlockRef, localSafe eth.L2BlockRef)
- func (st *StatusTracker) OnCrossUnsafeUpdate(ctx context.Context, crossUnsafe eth.L2BlockRef, localUnsafe eth.L2BlockRef)
- func (st *StatusTracker) OnEvent(ctx context.Context, ev event.Event) bool
- func (st *StatusTracker) OnL1Finalized(x eth.L1BlockRef)
- func (st *StatusTracker) OnL1Safe(x eth.L1BlockRef)
- func (st *StatusTracker) OnL1Unsafe(x eth.L1BlockRef)
- func (st *StatusTracker) SyncStatus() *eth.SyncStatus
- func (st *StatusTracker) UpdateSyncStatus()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type L1Tracker ¶
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 (*L1Tracker) L1BlockRefByNumber ¶
func (*L1Tracker) OnL1Unsafe ¶
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) 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()
Click to show internal directories.
Click to hide internal directories.