Documentation ¶
Index ¶
- Constants
- func ErrorReasonToGRPC(reason ErrorReason) codes.Code
- func ErrorReasonToHTTP(reason ErrorReason) int
- func RegisterSyncSubnetCurrentPeriod(s beaconState.BeaconState, epoch primitives.Epoch, pubKey []byte, ...) error
- func RegisterSyncSubnetCurrentPeriodProto(s beaconState.BeaconState, epoch primitives.Epoch, pubKey []byte, ...) error
- func RegisterSyncSubnetNextPeriod(s beaconState.BeaconState, epoch primitives.Epoch, pubKey []byte, ...) error
- func RegisterSyncSubnetNextPeriodProto(s beaconState.BeaconState, epoch primitives.Epoch, pubKey []byte, ...) error
- type AggregateBroadcastFailedError
- type ErrorReason
- type RpcError
- type Service
- func (s *Service) AggregatedSigAndAggregationBits(ctx context.Context, req *ethpb.AggregatedSigAndAggregationBitsRequest) ([]byte, []byte, error)
- func (s *Service) ChainHead(ctx context.Context) (*ethpb.ChainHead, *RpcError)
- func (s *Service) ComputeValidatorPerformance(ctx context.Context, req *ethpb.ValidatorPerformanceRequest) (*ethpb.ValidatorPerformanceResponse, *RpcError)
- func (s *Service) GetAttestationData(ctx context.Context, req *ethpb.AttestationDataRequest) (*ethpb.AttestationData, *RpcError)
- func (s *Service) IndividualVotes(ctx context.Context, req *ethpb.IndividualVotesRequest) (*ethpb.IndividualVotesRespond, *RpcError)
- func (s *Service) SubmitSignedAggregateSelectionProof(ctx context.Context, agg ethpb.SignedAggregateAttAndProof) *RpcError
- func (s *Service) SubmitSignedContributionAndProof(ctx context.Context, req *ethpb.SignedContributionAndProof) *RpcError
- func (s *Service) SubmitSyncMessage(ctx context.Context, msg *ethpb.SyncCommitteeMessage) *RpcError
- func (s *Service) ValidatorActiveSetChanges(ctx context.Context, requestedEpoch primitives.Epoch) (*ethpb.ActiveSetChanges, *RpcError)
- func (s *Service) ValidatorParticipation(ctx context.Context, requestedEpoch primitives.Epoch) (*ethpb.ValidatorParticipationResponse, *RpcError)
Constants ¶
const ( Internal = iota BadRequest NotFound )
Variables ¶
This section is empty.
Functions ¶
func ErrorReasonToGRPC ¶
func ErrorReasonToGRPC(reason ErrorReason) codes.Code
func ErrorReasonToHTTP ¶
func ErrorReasonToHTTP(reason ErrorReason) int
func RegisterSyncSubnetCurrentPeriod ¶
func RegisterSyncSubnetCurrentPeriod(s beaconState.BeaconState, epoch primitives.Epoch, pubKey []byte, status validator.Status) error
RegisterSyncSubnetCurrentPeriod registers a persistent subnet for the current sync committee period.
func RegisterSyncSubnetCurrentPeriodProto ¶
func RegisterSyncSubnetCurrentPeriodProto(s beaconState.BeaconState, epoch primitives.Epoch, pubKey []byte, status ethpb.ValidatorStatus) error
RegisterSyncSubnetCurrentPeriodProto registers a persistent subnet for the current sync committee period.
func RegisterSyncSubnetNextPeriod ¶
func RegisterSyncSubnetNextPeriod(s beaconState.BeaconState, epoch primitives.Epoch, pubKey []byte, status validator.Status) error
RegisterSyncSubnetNextPeriod registers a persistent subnet for the next sync committee period.
func RegisterSyncSubnetNextPeriodProto ¶
func RegisterSyncSubnetNextPeriodProto(s beaconState.BeaconState, epoch primitives.Epoch, pubKey []byte, status ethpb.ValidatorStatus) error
RegisterSyncSubnetNextPeriodProto registers a persistent subnet for the next sync committee period.
Types ¶
type AggregateBroadcastFailedError ¶
type AggregateBroadcastFailedError struct {
// contains filtered or unexported fields
}
AggregateBroadcastFailedError represents an error scenario where broadcasting an aggregate selection proof failed.
func NewAggregateBroadcastFailedError ¶
func NewAggregateBroadcastFailedError(err error) AggregateBroadcastFailedError
NewAggregateBroadcastFailedError creates a new error instance.
func (*AggregateBroadcastFailedError) Error ¶
func (e *AggregateBroadcastFailedError) Error() string
Error returns the underlying error message.
type ErrorReason ¶
type ErrorReason uint8
type RpcError ¶
type RpcError struct { Err error Reason ErrorReason }
type Service ¶
type Service struct { BeaconDB db.ReadOnlyDatabase ChainInfoFetcher blockchain.ChainInfoFetcher HeadFetcher blockchain.HeadFetcher FinalizedFetcher blockchain.FinalizationFetcher GenesisTimeFetcher blockchain.TimeFetcher SyncChecker sync.Checker Broadcaster p2p.Broadcaster SyncCommitteePool synccommittee.Pool OperationNotifier opfeed.Notifier AttestationCache *cache.AttestationCache StateGen stategen.StateManager P2P p2p.Broadcaster ReplayerBuilder stategen.ReplayerBuilder OptimisticModeFetcher blockchain.OptimisticModeFetcher }
func (*Service) AggregatedSigAndAggregationBits ¶
func (s *Service) AggregatedSigAndAggregationBits( ctx context.Context, req *ethpb.AggregatedSigAndAggregationBitsRequest) ([]byte, []byte, error)
AggregatedSigAndAggregationBits returns the aggregated signature and aggregation bits associated with a particular set of sync committee messages.
func (*Service) ChainHead ¶ added in v5.1.0
Retrieve chain head information from the DB and the current beacon state.
func (*Service) ComputeValidatorPerformance ¶
func (s *Service) ComputeValidatorPerformance( ctx context.Context, req *ethpb.ValidatorPerformanceRequest, ) (*ethpb.ValidatorPerformanceResponse, *RpcError)
ComputeValidatorPerformance reports the validator's latest balance along with other important metrics on rewards and penalties throughout its lifecycle in the beacon chain.
func (*Service) GetAttestationData ¶
func (s *Service) GetAttestationData( ctx context.Context, req *ethpb.AttestationDataRequest, ) (*ethpb.AttestationData, *RpcError)
GetAttestationData requests that the beacon node produces attestation data for the requested committee index and slot based on the nodes current head.
func (*Service) IndividualVotes ¶ added in v5.1.0
func (s *Service) IndividualVotes( ctx context.Context, req *ethpb.IndividualVotesRequest, ) (*ethpb.IndividualVotesRespond, *RpcError)
IndividualVotes retrieves individual voting status of validators.
func (*Service) SubmitSignedAggregateSelectionProof ¶
func (s *Service) SubmitSignedAggregateSelectionProof( ctx context.Context, agg ethpb.SignedAggregateAttAndProof, ) *RpcError
SubmitSignedAggregateSelectionProof verifies given aggregate and proofs and publishes them on appropriate gossipsub topic.
func (*Service) SubmitSignedContributionAndProof ¶
func (s *Service) SubmitSignedContributionAndProof( ctx context.Context, req *ethpb.SignedContributionAndProof, ) *RpcError
SubmitSignedContributionAndProof is called by a sync committee aggregator to submit signed contribution and proof object.
func (*Service) SubmitSyncMessage ¶
SubmitSyncMessage submits the sync committee message to the network. It also saves the sync committee message into the pending pool for block inclusion.
func (*Service) ValidatorActiveSetChanges ¶ added in v5.1.0
func (s *Service) ValidatorActiveSetChanges( ctx context.Context, requestedEpoch primitives.Epoch, ) ( *ethpb.ActiveSetChanges, *RpcError, )
ValidatorActiveSetChanges retrieves the active set changes for a given epoch.
This data includes any activations, voluntary exits, and involuntary ejections.
func (*Service) ValidatorParticipation ¶ added in v5.1.0
func (s *Service) ValidatorParticipation( ctx context.Context, requestedEpoch primitives.Epoch, ) ( *ethpb.ValidatorParticipationResponse, *RpcError, )
ValidatorParticipation retrieves the validator participation information for a given epoch, it returns the information about validator's participation rate in voting on the proof of stake rules based on their balance compared to the total active validator balance.