2021-07-19 19:06:49 +00:00
|
|
|
package synccommittee
|
|
|
|
|
|
|
|
import (
|
2022-08-16 12:20:13 +00:00
|
|
|
types "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
|
|
|
|
ethpb "github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1"
|
2021-07-19 19:06:49 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var _ = Pool(&Store{})
|
|
|
|
|
|
|
|
// 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.
|
|
|
|
type Pool interface {
|
|
|
|
// Methods for Sync Contributions.
|
2021-07-30 18:05:38 +00:00
|
|
|
SaveSyncCommitteeContribution(contr *ethpb.SyncCommitteeContribution) error
|
|
|
|
SyncCommitteeContributions(slot types.Slot) ([]*ethpb.SyncCommitteeContribution, error)
|
2021-07-19 19:06:49 +00:00
|
|
|
|
|
|
|
// Methods for Sync Committee Messages.
|
2021-07-30 18:05:38 +00:00
|
|
|
SaveSyncCommitteeMessage(sig *ethpb.SyncCommitteeMessage) error
|
|
|
|
SyncCommitteeMessages(slot types.Slot) ([]*ethpb.SyncCommitteeMessage, error)
|
2021-07-19 19:06:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewPool returns the sync committee store fulfilling the pool interface.
|
|
|
|
func NewPool() Pool {
|
|
|
|
return NewStore()
|
|
|
|
}
|