Documentation ¶
Index ¶
- func BlobsIdentifiersFromBlindedBlocks(blocks []*cltypes.SignedBlindedBeaconBlock) (*solid.ListSSZ[*cltypes.BlobIdentifier], error)
- func BlobsIdentifiersFromBlocks(blocks []*cltypes.SignedBeaconBlock) (*solid.ListSSZ[*cltypes.BlobIdentifier], error)
- type BackwardBeaconDownloader
- func (b *BackwardBeaconDownloader) Finished() bool
- func (b *BackwardBeaconDownloader) Peers() (uint64, error)
- func (b *BackwardBeaconDownloader) Progress() uint64
- func (b *BackwardBeaconDownloader) RPC() *rpc.BeaconRpcP2P
- func (b *BackwardBeaconDownloader) RequestMore(ctx context.Context) error
- func (b *BackwardBeaconDownloader) SetExpectedRoot(root libcommon.Hash)
- func (b *BackwardBeaconDownloader) SetNeverSkip(neverSkip bool)
- func (b *BackwardBeaconDownloader) SetOnNewBlock(onNewBlock OnNewBlock)
- func (b *BackwardBeaconDownloader) SetSlotToDownload(slot uint64)
- func (b *BackwardBeaconDownloader) SetThrottle(throttle time.Duration)
- type ForwardBeaconDownloader
- func (f *ForwardBeaconDownloader) GetHighestProcessedSlot() uint64
- func (f *ForwardBeaconDownloader) Peers() (uint64, error)
- func (f *ForwardBeaconDownloader) RequestMore(ctx context.Context)
- func (f *ForwardBeaconDownloader) SetHighestProcessedSlot(highestSlotProcessed uint64)
- func (f *ForwardBeaconDownloader) SetProcessFunction(fn ProcessFn)
- type GossipManager
- type OnNewBlock
- type PeerAndSidecars
- type ProcessFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlobsIdentifiersFromBlindedBlocks ¶
func BlobsIdentifiersFromBlindedBlocks(blocks []*cltypes.SignedBlindedBeaconBlock) (*solid.ListSSZ[*cltypes.BlobIdentifier], error)
func BlobsIdentifiersFromBlocks ¶
func BlobsIdentifiersFromBlocks(blocks []*cltypes.SignedBeaconBlock) (*solid.ListSSZ[*cltypes.BlobIdentifier], error)
BlobsIdentifiersFromBlocks returns a list of blob identifiers from a list of blocks, which should then be forwarded to the network.
Types ¶
type BackwardBeaconDownloader ¶
type BackwardBeaconDownloader struct {
// contains filtered or unexported fields
}
func NewBackwardBeaconDownloader ¶
func NewBackwardBeaconDownloader(ctx context.Context, rpc *rpc.BeaconRpcP2P, sn *freezeblocks.CaplinSnapshots, engine execution_client.ExecutionEngine, db kv.RwDB) *BackwardBeaconDownloader
func (*BackwardBeaconDownloader) Finished ¶
func (b *BackwardBeaconDownloader) Finished() bool
HighestProcessedRoot returns the highest processed block root so far.
func (*BackwardBeaconDownloader) Peers ¶
func (b *BackwardBeaconDownloader) Peers() (uint64, error)
Peers returns the current number of peers connected to the BackwardBeaconDownloader.
func (*BackwardBeaconDownloader) Progress ¶
func (b *BackwardBeaconDownloader) Progress() uint64
Progress current progress.
func (*BackwardBeaconDownloader) RPC ¶
func (b *BackwardBeaconDownloader) RPC() *rpc.BeaconRpcP2P
func (*BackwardBeaconDownloader) RequestMore ¶
func (b *BackwardBeaconDownloader) RequestMore(ctx context.Context) error
RequestMore downloads a range of blocks in a backward manner. The function sends a request for a range of blocks starting from a given slot and ending count blocks before it. It then processes the response by iterating over the blocks in reverse order and calling a provided callback function onNewBlock on each block. If the callback returns an error or signals that the download should be finished, the function will exit. If the block's root hash does not match the expected root hash, it will be rejected and the function will continue to the next block.
func (*BackwardBeaconDownloader) SetExpectedRoot ¶
func (b *BackwardBeaconDownloader) SetExpectedRoot(root libcommon.Hash)
SetExpectedRoot sets the expected root we expect to download.
func (*BackwardBeaconDownloader) SetNeverSkip ¶
func (b *BackwardBeaconDownloader) SetNeverSkip(neverSkip bool)
SetExpectedRoot sets the expected root we expect to download.
func (*BackwardBeaconDownloader) SetOnNewBlock ¶
func (b *BackwardBeaconDownloader) SetOnNewBlock(onNewBlock OnNewBlock)
SetShouldStopAtFn sets the stop condition.
func (*BackwardBeaconDownloader) SetSlotToDownload ¶
func (b *BackwardBeaconDownloader) SetSlotToDownload(slot uint64)
SetSlotToDownload sets slot to download.
func (*BackwardBeaconDownloader) SetThrottle ¶
func (b *BackwardBeaconDownloader) SetThrottle(throttle time.Duration)
SetThrottle sets the throttle.
type ForwardBeaconDownloader ¶
type ForwardBeaconDownloader struct {
// contains filtered or unexported fields
}
func NewForwardBeaconDownloader ¶
func NewForwardBeaconDownloader(ctx context.Context, rpc *rpc.BeaconRpcP2P) *ForwardBeaconDownloader
func (*ForwardBeaconDownloader) GetHighestProcessedSlot ¶
func (f *ForwardBeaconDownloader) GetHighestProcessedSlot() uint64
GetHighestProcessedSlot retrieve the highest processed slot we accumulated.
func (*ForwardBeaconDownloader) Peers ¶
func (f *ForwardBeaconDownloader) Peers() (uint64, error)
func (*ForwardBeaconDownloader) RequestMore ¶
func (f *ForwardBeaconDownloader) RequestMore(ctx context.Context)
func (*ForwardBeaconDownloader) SetHighestProcessedSlot ¶
func (f *ForwardBeaconDownloader) SetHighestProcessedSlot(highestSlotProcessed uint64)
SetHighestProcessedSlot sets the highest processed slot so far.
func (*ForwardBeaconDownloader) SetProcessFunction ¶
func (f *ForwardBeaconDownloader) SetProcessFunction(fn ProcessFn)
SetProcessFunction sets the function used to process segments.
type GossipManager ¶
type GossipManager struct {
// contains filtered or unexported fields
}
Gossip manager is sending all messages to fork choice or others
func NewGossipReceiver ¶
func NewGossipReceiver( s sentinel.SentinelClient, forkChoice *forkchoice.ForkChoiceStore, beaconConfig *clparams.BeaconChainConfig, networkConfig *clparams.NetworkConfig, ethClock eth_clock.EthereumClock, emitters *beaconevents.EventEmitter, comitteeSub *committee_subscription.CommitteeSubscribeMgmt, blockService services.BlockService, blobService services.BlobSidecarsService, syncCommitteeMessagesService services.SyncCommitteeMessagesService, syncContributionService services.SyncContributionService, aggregateAndProofService services.AggregateAndProofService, attestationService services.AttestationService, voluntaryExitService services.VoluntaryExitService, blsToExecutionChangeService services.BLSToExecutionChangeService, proposerSlashingService services.ProposerSlashingService, ) *GossipManager
func (*GossipManager) Start ¶
func (g *GossipManager) Start(ctx context.Context)
type OnNewBlock ¶
type OnNewBlock func(blk *cltypes.SignedBeaconBlock) (finished bool, err error)
Whether the reverse downloader arrived at expected height or condition.
type PeerAndSidecars ¶
type PeerAndSidecars struct { Peer string Responses []*cltypes.BlobSidecar }
func RequestBlobsFrantically ¶
func RequestBlobsFrantically(ctx context.Context, r *rpc.BeaconRpcP2P, req *solid.ListSSZ[*cltypes.BlobIdentifier]) (*PeerAndSidecars, error)
RequestBlobsFrantically requests blobs from the network frantically.
type ProcessFn ¶
type ProcessFn func( highestSlotProcessed uint64, blocks []*cltypes.SignedBeaconBlock) ( newHighestSlotProcessed uint64, err error)
Input: the currently highest slot processed and the list of blocks we want to know process Output: the new last new highest slot processed and an error possibly?
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
mock_services
Package mock_services is a generated GoMock package.
|
Package mock_services is a generated GoMock package. |