bcast

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package bcast provides the core workflow's broadcaster component that broadcasts/submits aggregated signed duty data to the beacon node.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcaster

type Broadcaster struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, eth2Cl eth2wrap.Client) (Broadcaster, error)

New returns a new broadcaster instance.

func (Broadcaster) Broadcast

func (b Broadcaster) Broadcast(ctx context.Context, duty core.Duty, pubkey core.PubKey, aggData core.SignedData) (err error)

Broadcast broadcasts the aggregated signed duty data object to the beacon-node.

type Recaster added in v0.10.0

type Recaster struct {
	// contains filtered or unexported fields
}

Recaster rebroadcasts core.DutyBuilderRegistration aggregate signatures every epoch.

func NewRecaster added in v0.10.0

func NewRecaster() *Recaster

NewRecaster returns a new recaster.

func (*Recaster) SlotTicked added in v0.10.0

func (r *Recaster) SlotTicked(ctx context.Context, slot core.Slot) error

SlotTicked is called when new slots tick.

func (*Recaster) Store added in v0.10.0

func (r *Recaster) Store(_ context.Context, duty core.Duty,
	pubkey core.PubKey, aggData core.SignedData,
) error

Store stores aggregate signed duty registrations for rebroadcasting.

func (*Recaster) Subscribe added in v0.10.0

func (r *Recaster) Subscribe(sub func(context.Context, core.Duty, core.PubKey, core.SignedData) error)

Subscribe subscribes to rebroadcasted duties.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL