Documentation ¶
Overview ¶
Package initialsync includes all initial block download and processing logic for the beacon node, using a round robin strategy and a finite-state-machine to handle edge-cases in a beacon node's sync status.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { P2P p2p.P2P DB db.NoHeadAccessDatabase Chain blockchainService StateNotifier statefeed.Notifier BlockNotifier blockfeed.Notifier ClockWaiter startup.ClockWaiter InitialSyncComplete chan struct{} BlobStorage *filesystem.BlobStorage }
Config to set up the initial sync service.
type Option ¶
type Option func(*Service)
Option is a functional option for the initial-sync Service.
func WithSyncChecker ¶
func WithSyncChecker(checker *SyncChecker) Option
WithSyncChecker registers the initial sync service in the checker.
func WithVerifierWaiter ¶
func WithVerifierWaiter(viw *verification.InitializerWaiter) Option
WithVerifierWaiter sets the verification.InitializerWaiter for the initial-sync Service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service service.
func NewService ¶
NewService configures the initial sync service responsible for bringing the node up to the latest head of the blockchain.
func (*Service) Initialized ¶
Initialized returns true if initial sync has been started.
func (*Service) Resync ¶
Resync allows a node to start syncing again if it has fallen behind the current network head.
type SyncChecker ¶
type SyncChecker struct {
Svc *Service
}
SyncChecker allows other services to check the current status of initial-sync and use that internally in their service.
func (*SyncChecker) Synced ¶
func (s *SyncChecker) Synced() bool
Synced returns the status of the service.