state

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 4 Imported by: 26

Documentation

Overview

Package state contains types for state operation-specific events fired during the runtime of a beacon node such state initialization, state updates, and chain start.

Index

Constants

View Source
const (
	// BlockProcessed is sent after a block has been processed and updated the state database.
	BlockProcessed = iota + 1
	// ChainStarted is sent when enough validators are active to start proposing blocks.
	ChainStarted

	// Reorg is an event sent when the new head is not a descendant of the previous head.
	Reorg
	// FinalizedCheckpoint event.
	FinalizedCheckpoint
	// NewHead of the chain event.
	NewHead
	// MissedSlot is sent when we need to notify users that a slot was missed.
	MissedSlot
	// LightClientFinalityUpdate event
	LightClientFinalityUpdate
	// LightClientOptimisticUpdate event
	LightClientOptimisticUpdate
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockProcessedData

type BlockProcessedData struct {
	// Slot is the slot of the processed block.
	Slot primitives.Slot
	// BlockRoot of the processed block.
	BlockRoot [32]byte
	// SignedBlock is the physical processed block.
	SignedBlock interfaces.ReadOnlySignedBeaconBlock
	// Verified is true if the block's BLS contents have been verified.
	Verified bool
	// Optimistic is true if the block is optimistic.
	Optimistic bool
}

BlockProcessedData is the data sent with BlockProcessed events.

type ChainStartedData

type ChainStartedData struct {
	// StartTime is the time at which the chain started.
	StartTime time.Time
}

ChainStartedData is the data sent with ChainStarted events.

type InitializedData

type InitializedData struct {
	// StartTime is the time at which the chain started.
	StartTime time.Time
	// GenesisValidatorsRoot represents state.validators.HashTreeRoot().
	GenesisValidatorsRoot []byte
}

InitializedData is the data sent with Initialized events.

type Notifier

type Notifier interface {
	StateFeed() *event.Feed
}

Notifier interface defines the methods of the service that provides state updates to consumers.

type SyncedData

type SyncedData struct {
	// StartTime is the time at which the chain started.
	StartTime time.Time
}

SyncedData is the data sent with Synced events.

Jump to

Keyboard shortcuts

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