synccommittee

package
v4.0.0-...-ae7b6de Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool interface {
	// Methods for Sync Contributions.
	SaveSyncCommitteeContribution(contr *ethpb.SyncCommitteeContribution) error
	SyncCommitteeContributions(slot primitives.Slot) ([]*ethpb.SyncCommitteeContribution, error)

	// Methods for Sync Committee Messages.
	SaveSyncCommitteeMessage(sig *ethpb.SyncCommitteeMessage) error
	SyncCommitteeMessages(slot primitives.Slot) ([]*ethpb.SyncCommitteeMessage, error)
}

Pool defines the necessary methods for Prysm sync pool to serve validators. In the current design, aggregated attestations are used by proposers and sync committee messages are used by sync aggregators.

func NewPool

func NewPool() Pool

NewPool returns the sync committee store fulfilling the pool interface.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store defines the caches for various sync committee objects such as message(un-aggregated) and contribution(aggregated).

func NewStore

func NewStore() *Store

NewStore initializes a new sync committee store.

func (*Store) SaveSyncCommitteeContribution

func (s *Store) SaveSyncCommitteeContribution(cont *ethpb.SyncCommitteeContribution) error

SaveSyncCommitteeContribution saves a sync committee contribution in to a priority queue. The priority queue is capped at syncCommitteeMaxQueueSize contributions.

func (*Store) SaveSyncCommitteeMessage

func (s *Store) SaveSyncCommitteeMessage(msg *ethpb.SyncCommitteeMessage) error

SaveSyncCommitteeMessage saves a sync committee message in to a priority queue. The priority queue capped at syncCommitteeMaxQueueSize contributions.

func (*Store) SyncCommitteeContributions

func (s *Store) SyncCommitteeContributions(slot primitives.Slot) ([]*ethpb.SyncCommitteeContribution, error)

SyncCommitteeContributions returns sync committee contributions by slot from the priority queue. Upon retrieval, the contribution is removed from the queue.

func (*Store) SyncCommitteeMessages

func (s *Store) SyncCommitteeMessages(slot primitives.Slot) ([]*ethpb.SyncCommitteeMessage, error)

SyncCommitteeMessages returns sync committee messages by slot from the priority queue. When calling this method a copy is avoided as the caller is assumed to be only reading the messages from the store rather than modifying it.

Jump to

Keyboard shortcuts

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