# Packages
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.
# Functions
BlobRPCMinValidSlot returns the lowest slot that we should expect peers to respect as the start slot in a BlobSidecarsByRange request.
ContextByteVersionsForValRoot computes a mapping between all possible context bytes values and the runtime/version identifier for the corresponding fork.
NewService initializes new regular sync service.
ReadChunkedBlock handles each response chunk that is sent by the peer and converts it into a beacon block.
ReadStatusCode response from a RPC stream.
SendBeaconBlocksByRangeRequest sends BeaconBlocksByRange and returns fetched blocks, if any.
SendBeaconBlocksByRootRequest sends BeaconBlocksByRoot and returns fetched blocks, if any.
SetRPCStreamDeadlines sets read and write deadlines for libp2p-based connection streams.
SetStreamReadDeadline for reading from libp2p connection streams, deciding when to close a connection based on a particular duration.
SetStreamWriteDeadline for writing to libp2p connection streams, deciding when to close a connection based on a particular duration.
WithAvailableBlocker allows the sync package to access the current status of backfill.
WithBlobStorage gives the sync package direct access to BlobStorage.
WithStateNotifier to notify an event feed of state processing.
WithVerifierWaiter gives the sync package direct access to the verifier waiter.
WriteBlobSidecarChunk writes blob chunk object to stream.
WriteBlockChunk writes block chunk object to stream.
# Variables
ErrInvalidFetchedData is used to signal that an error occurred which should result in peer downscoring.
# Structs
Service is responsible for handling all run time p2p related operations as the main entry point for network messages.
# Interfaces
Checker defines a struct which can verify whether a node is currently synchronizing a chain with the rest of peers in the network.
# Type aliases
BeaconBlockProcessor defines a block processing function, which allows to start utilizing blocks even before all blocks are ready.
BlobResponseValidation represents a function that can validate aspects of a single unmarshaled blob that was received from a peer in response to an rpc request.
ContextByteVersions is a mapping between expected values for context bytes and the runtime/version identifier they correspond to.