Documentation
¶
Index ¶
- Constants
- Variables
- type AtomicState
- func (as *AtomicState) Duties() structs.DutiesState
- func (as *AtomicState) Fork() structs.ForkState
- func (as *AtomicState) ForkVersion(slot structs.Slot) structs.ForkVersion
- func (as *AtomicState) Genesis() structs.GenesisInfo
- func (as *AtomicState) HeadSlot() structs.Slot
- func (as *AtomicState) KnownValidators() structs.ValidatorsState
- func (as *AtomicState) KnownValidatorsUpdateTime() time.Time
- func (as *AtomicState) Randao() string
- func (as *AtomicState) SetDuties(duties structs.DutiesState)
- func (as *AtomicState) SetFork(fork structs.ForkState)
- func (as *AtomicState) SetGenesis(genesis structs.GenesisInfo)
- func (as *AtomicState) SetHeadSlot(headSlot structs.Slot)
- func (as *AtomicState) SetKnownValidators(validators structs.ValidatorsState)
- func (as *AtomicState) SetRandao(randao string)
- func (as *AtomicState) SetWithdrawals(withdrawals structs.WithdrawalsState)
- func (as *AtomicState) Withdrawals() structs.WithdrawalsState
- type BeaconClient
- type Config
- type Datastore
- type Manager
- type State
- type ValidatorCache
Constants ¶
View Source
const (
Version = "0.3.6"
)
Variables ¶
View Source
var ( DurationPerSlot = time.Second * 12 DurationPerEpoch = DurationPerSlot * time.Duration(structs.SlotsPerEpoch) ErrUnkownFork = errors.New("beacon node fork is unknown") )
Functions ¶
This section is empty.
Types ¶
type AtomicState ¶
type AtomicState struct {
// contains filtered or unexported fields
}
func (*AtomicState) Duties ¶
func (as *AtomicState) Duties() structs.DutiesState
func (*AtomicState) Fork ¶
func (as *AtomicState) Fork() structs.ForkState
func (*AtomicState) ForkVersion ¶
func (as *AtomicState) ForkVersion(slot structs.Slot) structs.ForkVersion
func (*AtomicState) Genesis ¶
func (as *AtomicState) Genesis() structs.GenesisInfo
func (*AtomicState) HeadSlot ¶
func (as *AtomicState) HeadSlot() structs.Slot
func (*AtomicState) KnownValidators ¶
func (as *AtomicState) KnownValidators() structs.ValidatorsState
func (*AtomicState) KnownValidatorsUpdateTime ¶
func (as *AtomicState) KnownValidatorsUpdateTime() time.Time
func (*AtomicState) Randao ¶
func (as *AtomicState) Randao() string
func (*AtomicState) SetDuties ¶
func (as *AtomicState) SetDuties(duties structs.DutiesState)
func (*AtomicState) SetFork ¶
func (as *AtomicState) SetFork(fork structs.ForkState)
func (*AtomicState) SetGenesis ¶
func (as *AtomicState) SetGenesis(genesis structs.GenesisInfo)
func (*AtomicState) SetHeadSlot ¶
func (as *AtomicState) SetHeadSlot(headSlot structs.Slot)
func (*AtomicState) SetKnownValidators ¶
func (as *AtomicState) SetKnownValidators(validators structs.ValidatorsState)
func (*AtomicState) SetRandao ¶
func (as *AtomicState) SetRandao(randao string)
func (*AtomicState) SetWithdrawals ¶
func (as *AtomicState) SetWithdrawals(withdrawals structs.WithdrawalsState)
func (*AtomicState) Withdrawals ¶
func (as *AtomicState) Withdrawals() structs.WithdrawalsState
type BeaconClient ¶
type BeaconClient interface {
SubscribeToHeadEvents(ctx context.Context, slotC chan bcli.HeadEvent)
GetProposerDuties(structs.Epoch) (*bcli.RegisteredProposersResponse, error)
SyncStatus() (*bcli.SyncStatusPayloadData, error)
KnownValidators(structs.Slot) (bcli.AllValidatorsResponse, error)
Genesis() (structs.GenesisInfo, error)
GetWithdrawals(structs.Slot) (*bcli.GetWithdrawalsResponse, error)
Randao(structs.Slot) (string, error)
GetForkSchedule() (*bcli.GetForkScheduleResponse, error)
}
type Manager ¶
func (*Manager) Init ¶
func (s *Manager) Init(ctx context.Context, state State, client BeaconClient, d Datastore, vCache ValidatorCache) error
func (*Manager) Run ¶
func (s *Manager) Run(ctx context.Context, state State, client BeaconClient, d Datastore, vCache ValidatorCache) error
type State ¶
type State interface {
SetGenesis(structs.GenesisInfo)
Duties() structs.DutiesState
SetDuties(structs.DutiesState)
KnownValidators() structs.ValidatorsState
KnownValidatorsUpdateTime() time.Time
SetKnownValidators(structs.ValidatorsState)
HeadSlot() structs.Slot
SetHeadSlot(structs.Slot)
Withdrawals() structs.WithdrawalsState
SetWithdrawals(structs.WithdrawalsState)
SetRandao(string)
Randao() string
Fork() structs.ForkState
SetFork(structs.ForkState)
}
type ValidatorCache ¶
type ValidatorCache interface {
Get(types.PublicKey) (structs.ValidatorCacheEntry, bool)
}
Click to show internal directories.
Click to hide internal directories.