Documentation ¶
Overview ¶
Package operations defines the life-cycle of beacon block operations.
Index ¶
- type Config
- type Handler
- type OperationFeeds
- type Pool
- type Service
- func (s *Service) AttestationPool(ctx context.Context, requestedSlot uint64) ([]*ethpb.Attestation, error)
- func (s *Service) AttestationPoolNoVerify(ctx context.Context) ([]*ethpb.Attestation, error)
- func (s *Service) HandleAttestation(ctx context.Context, message proto.Message) error
- func (s *Service) HandleValidatorExits(ctx context.Context, message proto.Message) error
- func (s *Service) IncomingProcessedBlockFeed() *event.Feed
- func (s *Service) Start()
- func (s *Service) Status() error
- func (s *Service) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperationFeeds ¶
OperationFeeds inteface defines the informational feeds from the operations service.
type Pool ¶
type Pool interface { AttestationPool(ctx context.Context, requestedSlot uint64) ([]*ethpb.Attestation, error) AttestationPoolNoVerify(ctx context.Context) ([]*ethpb.Attestation, error) }
Pool defines an interface for fetching the list of attestations which have been observed by the beacon node but not yet included in a beacon block by a proposer.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a service that handles the internal logic of beacon block operations.
func NewService ¶
NewService instantiates a new operation service instance that will be registered into a running beacon node.
func (*Service) AttestationPool ¶
func (s *Service) AttestationPool(ctx context.Context, requestedSlot uint64) ([]*ethpb.Attestation, error)
AttestationPool returns the attestations that have not seen on the beacon chain, the attestations are returned in target epoch ascending order and up to MaxAttestations capacity. The attestations returned will be verified against the head state up to requested slot. When fails attestation, the attestation will be removed from the pool.
func (*Service) AttestationPoolNoVerify ¶
AttestationPoolNoVerify returns every attestation from the attestation pool.
func (*Service) HandleAttestation ¶
HandleAttestation processes a received attestation message.
func (*Service) HandleValidatorExits ¶
HandleValidatorExits processes a validator exit operation.
func (*Service) IncomingProcessedBlockFeed ¶
IncomingProcessedBlockFeed returns a feed that any service can send incoming p2p beacon blocks into. The beacon block operation pool service will subscribe to this feed in order to receive incoming beacon blocks.
func (*Service) Start ¶
func (s *Service) Start()
Start an beacon block operation pool service's main event loop.