iterator

package
v0.0.202 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLocationUpToDate = errors.New("location up to date")

	SlotZero = phase0.Slot(0)
)

Functions

func GetDefaultSlotLocation

func GetDefaultSlotLocation(forkEpochs state.ForkEpochs, cannonType xatu.CannonType) phase0.Slot

func GetStartingEpochLocation added in v0.0.179

func GetStartingEpochLocation(forkEpochs state.ForkEpochs, cannonType xatu.CannonType) phase0.Epoch

func NewSlotDefaultsFromForkEpochs

func NewSlotDefaultsFromForkEpochs(forkEpochs state.ForkEpochs) map[xatu.CannonType]phase0.Slot

Types

type BackFillingCheckpointNextResponse added in v0.0.179

type BackFillingCheckpointNextResponse struct {
	Next       phase0.Epoch
	LookAheads []phase0.Epoch
	Direction  BackfillingCheckpointDirection
}

type BackfillingCheckpoint added in v0.0.136

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

func NewBackfillingCheckpoint added in v0.0.136

func NewBackfillingCheckpoint(
	log logrus.FieldLogger,
	networkName, networkID string,
	cannonType xatu.CannonType,
	coordinatorClient *coordinator.Client,
	wallclock *ethwallclock.EthereumBeaconChain,
	metrics *BackfillingCheckpointMetrics,
	beacon *ethereum.BeaconNode,
	checkpoint string,
	lookAheadDistance int,
) *BackfillingCheckpoint

func (*BackfillingCheckpoint) GetMarker added in v0.0.179

func (*BackfillingCheckpoint) Next added in v0.0.136

func (*BackfillingCheckpoint) Start added in v0.0.179

func (*BackfillingCheckpoint) UpdateLocation added in v0.0.136

func (c *BackfillingCheckpoint) UpdateLocation(ctx context.Context, epoch phase0.Epoch, direction BackfillingCheckpointDirection) error

type BackfillingCheckpointDirection added in v0.0.179

type BackfillingCheckpointDirection string
const (
	BackfillingCheckpointDirectionBackfill BackfillingCheckpointDirection = "backfill"
	BackfillingCheckpointDirectionHead     BackfillingCheckpointDirection = "head"
)

type BackfillingCheckpointMetrics added in v0.0.136

type BackfillingCheckpointMetrics struct {
	BackfillEpoch            *prometheus.GaugeVec
	FinalizedEpoch           *prometheus.GaugeVec
	FinalizedCheckpointEpoch *prometheus.GaugeVec
	Lag                      *prometheus.GaugeVec
}

func NewBackfillingCheckpointMetrics added in v0.0.136

func NewBackfillingCheckpointMetrics(namespace string) BackfillingCheckpointMetrics

func (*BackfillingCheckpointMetrics) SetBackfillEpoch added in v0.0.136

func (s *BackfillingCheckpointMetrics) SetBackfillEpoch(cannonType, network, checkpoint string, epoch float64)

func (*BackfillingCheckpointMetrics) SetFinalizedCheckpointEpoch added in v0.0.179

func (s *BackfillingCheckpointMetrics) SetFinalizedCheckpointEpoch(network string, epoch float64)

func (*BackfillingCheckpointMetrics) SetFinalizedEpoch added in v0.0.136

func (s *BackfillingCheckpointMetrics) SetFinalizedEpoch(cannonType, network, checkpoint string, epoch float64)

func (*BackfillingCheckpointMetrics) SetLag added in v0.0.179

func (s *BackfillingCheckpointMetrics) SetLag(cannonType, network string, direction BackfillingCheckpointDirection, lag float64)

type BlockprintIterator

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

func NewBlockprintIterator

func NewBlockprintIterator(log logrus.FieldLogger, networkName, networkID string, cannonType xatu.CannonType, coordinatorClient *coordinator.Client, metrics *BlockprintMetrics, client *blockprint.Client) *BlockprintIterator

func (*BlockprintIterator) Next

func (c *BlockprintIterator) Next(ctx context.Context) (next *xatu.CannonLocation, err error)

func (*BlockprintIterator) UpdateLocation

func (c *BlockprintIterator) UpdateLocation(ctx context.Context, location *xatu.CannonLocation) error

func (*BlockprintIterator) WithBlockprintClient

func (c *BlockprintIterator) WithBlockprintClient(client *blockprint.Client)

type BlockprintMetrics

type BlockprintMetrics struct {
	Targetslot  *prometheus.GaugeVec
	Currentslot *prometheus.GaugeVec
}

func NewBlockprintMetrics

func NewBlockprintMetrics(namespace string) BlockprintMetrics

func (*BlockprintMetrics) SetCurrentSlot

func (s *BlockprintMetrics) SetCurrentSlot(cannonType, network string, current float64)

func (*BlockprintMetrics) SetTargetSlot

func (s *BlockprintMetrics) SetTargetSlot(cannonType, network string, target float64)

type SlotMetrics

type SlotMetrics struct {
	TrailingSlots *prometheus.GaugeVec
	CurrentSlot   *prometheus.GaugeVec
}

func NewSlotMetrics

func NewSlotMetrics(namespace string) SlotMetrics

func (*SlotMetrics) SetCurrentSlot

func (s *SlotMetrics) SetCurrentSlot(cannonType, network string, currentSlot float64)

func (*SlotMetrics) SetTrailingSlots

func (s *SlotMetrics) SetTrailingSlots(cannonType, network string, trailingSlots float64)

Jump to

Keyboard shortcuts

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