Documentation ¶
Index ¶
- func IsAttAggregator(ctx context.Context, specProvider eth2client.SpecProvider, commLen uint64, ...) (bool, error)
- func IsSyncCommAggregator(ctx context.Context, specProvider eth2client.SpecProvider, ...) (bool, error)
- type BeaconCommitteeSelection
- type BeaconCommitteeSelectionAggregator
- type SyncCommitteeSelection
- type SyncCommitteeSelectionAggregator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAttAggregator ¶ added in v0.12.0
func IsAttAggregator(ctx context.Context, specProvider eth2client.SpecProvider, commLen uint64, slotSig eth2p0.BLSSignature) (bool, error)
IsAttAggregator returns true if the validator is the attestation aggregator for the given committee. Refer: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/validator.md#aggregation-selection
func IsSyncCommAggregator ¶ added in v0.12.0
func IsSyncCommAggregator(ctx context.Context, specProvider eth2client.SpecProvider, sig eth2p0.BLSSignature) (bool, error)
IsSyncCommAggregator returns true if the validator is the aggregator for the provided sync subcommittee. Refer: https://github.com/ethereum/consensus-specs/blob/dev/specs/altair/validator.md#aggregation-selection
Types ¶
type BeaconCommitteeSelection ¶ added in v0.11.0
type BeaconCommitteeSelection struct { // ValidatorIdex is the index of the validator making the aggregate request. ValidatorIndex eth2p0.ValidatorIndex // Slot is the slot for which the validator is possibly aggregating. Slot eth2p0.Slot // SelectionProof is the slot signature required to calculate whether the validator is an aggregator. SelectionProof eth2p0.BLSSignature }
BeaconCommitteeSelection is the data required for a beacon committee subscription.
func (*BeaconCommitteeSelection) MarshalJSON ¶ added in v0.11.0
func (b *BeaconCommitteeSelection) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*BeaconCommitteeSelection) String ¶ added in v0.11.0
func (b *BeaconCommitteeSelection) String() (string, error)
String returns a string version of the structure.
func (*BeaconCommitteeSelection) UnmarshalJSON ¶ added in v0.11.0
func (b *BeaconCommitteeSelection) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type BeaconCommitteeSelectionAggregator ¶ added in v0.11.0
type BeaconCommitteeSelectionAggregator interface { // AggregateBeaconCommitteeSelections returns DVT aggregated beacon committee selection proofs. // This would call a new BN API endpoint: POST /eth/v1/validator/beacon_committee_selections AggregateBeaconCommitteeSelections(ctx context.Context, partialSelections []*BeaconCommitteeSelection) ([]*BeaconCommitteeSelection, error) }
BeaconCommitteeSelectionAggregator is the interface for aggregating beacon committee selection proofs in a DVT cluster. TODO(dhruv): Should be removed once it is supported by go-eth2-client.
type SyncCommitteeSelection ¶ added in v0.11.0
type SyncCommitteeSelection struct { // ValidatorIndex is the index of the validator making the selection request. ValidatorIndex eth2p0.ValidatorIndex // Slot is the slot for which the selection request is made. Slot eth2p0.Slot // SubcommitteeIndex is the subcommittee to which the validator is assigned. SubcommitteeIndex eth2p0.CommitteeIndex // SelectionProof is a partial or an aggregated signature. SelectionProof eth2p0.BLSSignature }
SyncCommitteeSelection is the data required for a sync committee subscription.
func (*SyncCommitteeSelection) MarshalJSON ¶ added in v0.11.0
func (s *SyncCommitteeSelection) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SyncCommitteeSelection) String ¶ added in v0.11.0
func (s *SyncCommitteeSelection) String() (string, error)
String returns a string version of SyncCommitteeSelection.
func (*SyncCommitteeSelection) UnmarshalJSON ¶ added in v0.11.0
func (s *SyncCommitteeSelection) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type SyncCommitteeSelectionAggregator ¶ added in v0.11.0
type SyncCommitteeSelectionAggregator interface { // AggregateSyncCommitteeSelections returns the threshold aggregated sync committee selection proofs. // This would call a new BN API endpoint: POST /eth/v1/validator/sync_committee_selections AggregateSyncCommitteeSelections(ctx context.Context, partialSelections []*SyncCommitteeSelection) ([]*SyncCommitteeSelection, error) }
SyncCommitteeSelectionAggregator is the interface for aggregating sync committee selection proofs.