Documentation ¶
Overview ¶
Package validatormock provides mock validator client functionality.
Index ¶
- func ProposeBlindedBlock(ctx context.Context, eth2Cl eth2wrap.Client, signFunc SignFunc, ...) error
- func ProposeBlock(ctx context.Context, eth2Cl eth2wrap.Client, signFunc SignFunc, ...) error
- func Register(ctx context.Context, eth2Cl eth2wrap.Client, signFunc SignFunc, ...) error
- type SignFunc
- type SlotAttester
- type SyncCommMember
- func (s *SyncCommMember) Aggregate(ctx context.Context, slot eth2p0.Slot) (bool, error)
- func (s *SyncCommMember) Epoch() eth2p0.Epoch
- func (s *SyncCommMember) Message(ctx context.Context, slot eth2p0.Slot) error
- func (s *SyncCommMember) PrepareEpoch(ctx context.Context) error
- func (s *SyncCommMember) PrepareSlot(ctx context.Context, slot eth2p0.Slot) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProposeBlindedBlock ¶ added in v0.9.0
func ProposeBlindedBlock(ctx context.Context, eth2Cl eth2wrap.Client, signFunc SignFunc, slot eth2p0.Slot, pubkeys ...eth2p0.BLSPubKey, ) error
ProposeBlindedBlock proposes blinded block for the given slot.
Types ¶
type SlotAttester ¶ added in v0.10.1
type SlotAttester struct {
// contains filtered or unexported fields
}
SlotAttester is a stateful structure providing a slot attestation and aggregation API excluding scheduling.
func NewSlotAttester ¶ added in v0.10.1
func NewSlotAttester(eth2Cl eth2wrap.Client, slot eth2p0.Slot, signFunc SignFunc, pubkeys []eth2p0.BLSPubKey) *SlotAttester
NewSlotAttester returns a new SlotAttester.
func (*SlotAttester) Aggregate ¶ added in v0.10.1
func (a *SlotAttester) Aggregate(ctx context.Context) (bool, error)
Aggregate should be called at latest 2/3 into the slot, it does slot attestation aggregations.
func (*SlotAttester) Attest ¶ added in v0.10.1
func (a *SlotAttester) Attest(ctx context.Context) error
Attest should be called at latest 1/3 into the slot, it does slot attestations.
func (*SlotAttester) Prepare ¶ added in v0.10.1
func (a *SlotAttester) Prepare(ctx context.Context) error
Prepare should be called at the start of slot, it does the following: - Filters active validators for the slot (this could be cached at start of epoch) - Fetches attester attDuties for the slot (this could be cached at start of epoch). - Prepares aggregation attDuties for slot attesters. It panics if called more than once. TODO(xenowits): Figure out why is this called twice sometimes (https://github.com/ObolNetwork/charon/issues/1389)).
func (*SlotAttester) Slot ¶ added in v0.10.1
func (a *SlotAttester) Slot() eth2p0.Slot
Slot returns the attester slot.
type SyncCommMember ¶ added in v0.11.0
type SyncCommMember struct {
// contains filtered or unexported fields
}
SyncCommMember is a stateful structure providing sync committee message and contribution APIs.
func NewSyncCommMember ¶ added in v0.11.0
func (*SyncCommMember) Aggregate ¶ added in v0.11.0
Aggregate submits SignedContributionAndProof at 2/3rd into the slot. It does sync committee aggregations. It blocks until sync committee selections are ready for this slot.
func (*SyncCommMember) Epoch ¶ added in v0.11.0
func (s *SyncCommMember) Epoch() eth2p0.Epoch
func (*SyncCommMember) Message ¶ added in v0.11.0
Message submits sync committee messages at 1/3rd into the slot. It also sets the beacon block root for the slot.
func (*SyncCommMember) PrepareEpoch ¶ added in v0.11.0
func (s *SyncCommMember) PrepareEpoch(ctx context.Context) error
PrepareEpoch stores sync committee duties and submits sync committee subscriptions at the start of an epoch.
func (*SyncCommMember) PrepareSlot ¶ added in v0.11.0
PrepareSlot prepares selection proofs at the start of a slot.