Documentation ¶
Overview ¶
Package attestations defines an attestation pool service implementation which is used to manage the lifecycle of aggregated, unaggregated, and fork-choice attestations.
Index ¶
- func NewPool() *kv.AttCaches
- type Config
- type Pool
- type PoolMock
- func (*PoolMock) AggregateUnaggregatedAttestations(_ context.Context) error
- func (*PoolMock) AggregateUnaggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) error
- func (*PoolMock) AggregatedAttestationCount() int
- func (m *PoolMock) AggregatedAttestations() []*ethpb.Attestation
- func (*PoolMock) AggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) []*ethpb.Attestation
- func (*PoolMock) BlockAttestations() []*ethpb.Attestation
- func (*PoolMock) DeleteAggregatedAttestation(_ *ethpb.Attestation) error
- func (*PoolMock) DeleteBlockAttestation(_ *ethpb.Attestation) error
- func (*PoolMock) DeleteForkchoiceAttestation(_ *ethpb.Attestation) error
- func (*PoolMock) DeleteSeenUnaggregatedAttestations() (int, error)
- func (*PoolMock) DeleteUnaggregatedAttestation(_ *ethpb.Attestation) error
- func (*PoolMock) ForkchoiceAttestationCount() int
- func (*PoolMock) ForkchoiceAttestations() []*ethpb.Attestation
- func (*PoolMock) HasAggregatedAttestation(_ *ethpb.Attestation) (bool, error)
- func (*PoolMock) SaveAggregatedAttestation(_ *ethpb.Attestation) error
- func (m *PoolMock) SaveAggregatedAttestations(atts []*ethpb.Attestation) error
- func (*PoolMock) SaveBlockAttestation(_ *ethpb.Attestation) error
- func (*PoolMock) SaveBlockAttestations(_ []*ethpb.Attestation) error
- func (*PoolMock) SaveForkchoiceAttestation(_ *ethpb.Attestation) error
- func (*PoolMock) SaveForkchoiceAttestations(_ []*ethpb.Attestation) error
- func (*PoolMock) SaveUnaggregatedAttestation(_ *ethpb.Attestation) error
- func (*PoolMock) SaveUnaggregatedAttestations(_ []*ethpb.Attestation) error
- func (*PoolMock) UnaggregatedAttestationCount() int
- func (*PoolMock) UnaggregatedAttestations() ([]*ethpb.Attestation, error)
- func (*PoolMock) UnaggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) []*ethpb.Attestation
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Pool Pool // contains filtered or unexported fields }
Config options for the service.
type Pool ¶
type Pool interface { // For Aggregated attestations AggregateUnaggregatedAttestations(ctx context.Context) error AggregateUnaggregatedAttestationsBySlotIndex(ctx context.Context, slot types.Slot, committeeIndex types.CommitteeIndex) error SaveAggregatedAttestation(att *ethpb.Attestation) error SaveAggregatedAttestations(atts []*ethpb.Attestation) error AggregatedAttestations() []*ethpb.Attestation AggregatedAttestationsBySlotIndex(ctx context.Context, slot types.Slot, committeeIndex types.CommitteeIndex) []*ethpb.Attestation DeleteAggregatedAttestation(att *ethpb.Attestation) error HasAggregatedAttestation(att *ethpb.Attestation) (bool, error) AggregatedAttestationCount() int // For unaggregated attestations. SaveUnaggregatedAttestation(att *ethpb.Attestation) error SaveUnaggregatedAttestations(atts []*ethpb.Attestation) error UnaggregatedAttestations() ([]*ethpb.Attestation, error) UnaggregatedAttestationsBySlotIndex(ctx context.Context, slot types.Slot, committeeIndex types.CommitteeIndex) []*ethpb.Attestation DeleteUnaggregatedAttestation(att *ethpb.Attestation) error DeleteSeenUnaggregatedAttestations() (int, error) UnaggregatedAttestationCount() int // For attestations that were included in the block. SaveBlockAttestation(att *ethpb.Attestation) error SaveBlockAttestations(atts []*ethpb.Attestation) error BlockAttestations() []*ethpb.Attestation DeleteBlockAttestation(att *ethpb.Attestation) error // For attestations to be passed to fork choice. SaveForkchoiceAttestation(att *ethpb.Attestation) error SaveForkchoiceAttestations(atts []*ethpb.Attestation) error ForkchoiceAttestations() []*ethpb.Attestation DeleteForkchoiceAttestation(att *ethpb.Attestation) error ForkchoiceAttestationCount() int }
Pool defines the necessary methods for Prysm attestations pool to serve fork choice and validators. In the current design, aggregated attestations are used by proposer actor. Unaggregated attestations are used by aggregator actor.
type PoolMock ¶ added in v1.3.3
type PoolMock struct {
AggregatedAtts []*ethpb.Attestation
}
PoolMock --
func (*PoolMock) AggregateUnaggregatedAttestations ¶ added in v1.3.3
AggregateUnaggregatedAttestations --
func (*PoolMock) AggregateUnaggregatedAttestationsBySlotIndex ¶ added in v1.3.3
func (*PoolMock) AggregateUnaggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) error
AggregateUnaggregatedAttestationsBySlotIndex --
func (*PoolMock) AggregatedAttestationCount ¶ added in v1.3.3
AggregatedAttestationCount --
func (*PoolMock) AggregatedAttestations ¶ added in v1.3.3
func (m *PoolMock) AggregatedAttestations() []*ethpb.Attestation
AggregatedAttestations --
func (*PoolMock) AggregatedAttestationsBySlotIndex ¶ added in v1.3.3
func (*PoolMock) AggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) []*ethpb.Attestation
AggregatedAttestationsBySlotIndex --
func (*PoolMock) BlockAttestations ¶ added in v1.3.3
func (*PoolMock) BlockAttestations() []*ethpb.Attestation
BlockAttestations --
func (*PoolMock) DeleteAggregatedAttestation ¶ added in v1.3.3
func (*PoolMock) DeleteAggregatedAttestation(_ *ethpb.Attestation) error
DeleteAggregatedAttestation --
func (*PoolMock) DeleteBlockAttestation ¶ added in v1.3.3
func (*PoolMock) DeleteBlockAttestation(_ *ethpb.Attestation) error
DeleteBlockAttestation --
func (*PoolMock) DeleteForkchoiceAttestation ¶ added in v1.3.3
func (*PoolMock) DeleteForkchoiceAttestation(_ *ethpb.Attestation) error
DeleteForkchoiceAttestation --
func (*PoolMock) DeleteSeenUnaggregatedAttestations ¶ added in v1.3.3
DeleteSeenUnaggregatedAttestations --
func (*PoolMock) DeleteUnaggregatedAttestation ¶ added in v1.3.3
func (*PoolMock) DeleteUnaggregatedAttestation(_ *ethpb.Attestation) error
DeleteUnaggregatedAttestation --
func (*PoolMock) ForkchoiceAttestationCount ¶ added in v1.3.3
ForkchoiceAttestationCount --
func (*PoolMock) ForkchoiceAttestations ¶ added in v1.3.3
func (*PoolMock) ForkchoiceAttestations() []*ethpb.Attestation
ForkchoiceAttestations --
func (*PoolMock) HasAggregatedAttestation ¶ added in v1.3.3
func (*PoolMock) HasAggregatedAttestation(_ *ethpb.Attestation) (bool, error)
HasAggregatedAttestation --
func (*PoolMock) SaveAggregatedAttestation ¶ added in v1.3.3
func (*PoolMock) SaveAggregatedAttestation(_ *ethpb.Attestation) error
SaveAggregatedAttestation --
func (*PoolMock) SaveAggregatedAttestations ¶ added in v1.3.3
func (m *PoolMock) SaveAggregatedAttestations(atts []*ethpb.Attestation) error
SaveAggregatedAttestations --
func (*PoolMock) SaveBlockAttestation ¶ added in v1.3.3
func (*PoolMock) SaveBlockAttestation(_ *ethpb.Attestation) error
SaveBlockAttestation --
func (*PoolMock) SaveBlockAttestations ¶ added in v1.3.3
func (*PoolMock) SaveBlockAttestations(_ []*ethpb.Attestation) error
SaveBlockAttestations --
func (*PoolMock) SaveForkchoiceAttestation ¶ added in v1.3.3
func (*PoolMock) SaveForkchoiceAttestation(_ *ethpb.Attestation) error
SaveForkchoiceAttestation --
func (*PoolMock) SaveForkchoiceAttestations ¶ added in v1.3.3
func (*PoolMock) SaveForkchoiceAttestations(_ []*ethpb.Attestation) error
SaveForkchoiceAttestations --
func (*PoolMock) SaveUnaggregatedAttestation ¶ added in v1.3.3
func (*PoolMock) SaveUnaggregatedAttestation(_ *ethpb.Attestation) error
SaveUnaggregatedAttestation --
func (*PoolMock) SaveUnaggregatedAttestations ¶ added in v1.3.3
func (*PoolMock) SaveUnaggregatedAttestations(_ []*ethpb.Attestation) error
SaveUnaggregatedAttestations --
func (*PoolMock) UnaggregatedAttestationCount ¶ added in v1.3.3
UnaggregatedAttestationCount --
func (*PoolMock) UnaggregatedAttestations ¶ added in v1.3.3
func (*PoolMock) UnaggregatedAttestations() ([]*ethpb.Attestation, error)
UnaggregatedAttestations --
func (*PoolMock) UnaggregatedAttestationsBySlotIndex ¶ added in v1.3.3
func (*PoolMock) UnaggregatedAttestationsBySlotIndex(_ context.Context, _ types.Slot, _ types.CommitteeIndex) []*ethpb.Attestation
UnaggregatedAttestationsBySlotIndex --
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service of attestation pool operations.
func NewService ¶
NewService instantiates a new attestation pool service instance that will be registered into a running beacon node.
func (*Service) SetGenesisTime ¶ added in v0.3.5
SetGenesisTime sets genesis time for operation service to use.
func (*Service) Start ¶
func (s *Service) Start()
Start an attestation pool service's main event loop.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package kv includes a key-value store implementation of an attestation cache used to satisfy important use-cases such as aggregation in a beacon node runtime.
|
Package kv includes a key-value store implementation of an attestation cache used to satisfy important use-cases such as aggregation in a beacon node runtime. |