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
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 duties for the slot (this could be cached at start of epoch). - Prepares aggregation duties for slot attesters. It panics if called more than once.
func (*SlotAttester) Slot ¶ added in v0.10.1
func (a *SlotAttester) Slot() eth2p0.Slot
Slot returns the attester slot.