package
5.2.0
Repository: https://github.com/prysmaticlabs/prysm.git
Documentation: pkg.go.dev

# Packages

Package testing includes useful mocks for writing unit tests which depend on logic from the blockchain package.

# Functions

InvalidAncestorRoots returns a list of invalid roots up to last valid root.
InvalidBlockLVH returns the invalid block last valid hash root.
InvalidBlockRoot returns the invalid block root.
IsInvalidBlock returns true if the error has `invalidBlock`.
NewService instantiates a new block service instance that will be registered into a running beacon node.
NewWeakSubjectivityVerifier validates a checkpoint, and if valid, uses it to initialize a weak subjectivity verifier.
WithAttestationPool for attestation lifecycle after chain inclusion.
WithAttestationService for dealing with attestation lifecycles.
WithBlobStorage sets the blob storage backend for the blockchain service.
WithBLSToExecPool to keep track of BLS to Execution address changes.
WithChainStartFetcher to retrieve information about genesis.
WithClockSynchronizer sets the ClockSetter/ClockWaiter values to be used by services that need to block until the genesis timestamp is known (ClockWaiter) or which determine the genesis timestamp (ClockSetter).
WithDatabase for head access.
WithDepositCache for deposit lifecycle after chain inclusion.
WithExecutionEngineCaller to call execution engine.
WithExitPool for exits lifecycle after chain inclusion.
WithFinalizedStateAtStartUp to store finalized state at start up.
WithForkChoiceStore to update an optimized fork-choice representation.
WithMaxGoroutines to control resource use of the blockchain service.
WithP2PBroadcaster to broadcast messages after appropriate processing.
WithPayloadIDCache for payload ID cache.
WithSlasherAttestationsFeed to forward attestations into slasher if enabled.
WithSlashingPool for slashings lifecycle after chain inclusion.
WithStateGen for managing state regeneration and replay.
WithStateNotifier to notify an event feed of state processing.
WithSyncComplete sets a channel that is used to notify blockchain service that the node has synced to head.
WithTrackedValidatorsCache for tracked validators cache.
WithWeakSubjectivityCheckpoint for checkpoint sync.

# Variables

ErrInvalidBlockHashPayloadStatus is returned when the payload has invalid block hash.
ErrInvalidPayload is returned when the payload is invalid.
ErrNilHead is returned when no head is present in the blockchain service.
ErrNotCheckpoint is returned when a given checkpoint is not a checkpoint in any chain known to forkchoice.
ErrNotDescendantOfFinalized is returned when a block is not a descendant of the finalized checkpoint.
ErrUndefinedExecutionEngineError is returned when the execution engine returns an error that is not defined.

# Structs

Service represents a service that handles the internal logic of managing the full PoS beacon chain.

# Interfaces

AttestationReceiver interface defines the methods of chain service receive and processing new attestations.
AttestationStateFetcher allows for retrieving a beacon state corresponding to the block root of an attestation's target checkpoint.
BlobReceiver interface defines the methods of chain service for receiving new blobs.
BlockReceiver interface defines the methods of chain service for receiving and processing new blocks.
CanonicalFetcher retrieves the current chain's canonical information.
ChainInfoFetcher defines a common interface for methods in blockchain service which directly retrieve chain info related data.
Checker is an interface used to determine if a node is in initial sync or regular sync.
FinalizationFetcher defines a common interface for methods in blockchain service which directly retrieve finalization and justification related data.
ForkchoiceFetcher defines a common interface for methods that access directly forkchoice information.
ForkFetcher retrieves the current fork information of the Ethereum beacon chain.
GenesisFetcher retrieves the Ethereum consensus data related to its genesis.
HeadDomainFetcher is the interface that wraps the head sync domain related functions.
HeadFetcher defines a common interface for methods in blockchain service which directly retrieve head related data.
HeadSyncCommitteeFetcher is the interface that wraps the head sync committee related functions.
OptimisticModeFetcher retrieves information about optimistic status of the node.
SlashingReceiver interface defines the methods of chain service for receiving validated slashing over the wire.
TemporalOracle is like ForkFetcher minus CurrentFork().
TimeFetcher retrieves the Ethereum consensus data that's related to time.

# Type aliases