Documentation ¶
Index ¶
- func AggregatorValueCheckF(signer types.BeaconSigner, network types.BeaconNetwork, ...) qbft.ProposedValueCheckF
- func AttesterValueCheckF(signer types.BeaconSigner, network types.BeaconNetwork, ...) qbft.ProposedValueCheckF
- func ProposerValueCheckF(signer types.BeaconSigner, network types.BeaconNetwork, ...) qbft.ProposedValueCheckF
- func SyncCommitteeContributionValueCheckF(signer types.BeaconSigner, network types.BeaconNetwork, ...) qbft.ProposedValueCheckF
- func SyncCommitteeValueCheckF(signer types.BeaconSigner, network types.BeaconNetwork, ...) qbft.ProposedValueCheckF
- type AggregatorCalls
- type AggregatorRunner
- func (r *AggregatorRunner) Decode(data []byte) error
- func (r *AggregatorRunner) Encode() ([]byte, error)
- func (r *AggregatorRunner) GetBaseRunner() *BaseRunner
- func (r *AggregatorRunner) GetBeaconNode() BeaconNode
- func (r *AggregatorRunner) GetNetwork() Network
- func (r *AggregatorRunner) GetRoot() ([32]byte, error)
- func (r *AggregatorRunner) GetShare() *types.Share
- func (r *AggregatorRunner) GetSigner() types.KeyManager
- func (r *AggregatorRunner) GetState() *State
- func (r *AggregatorRunner) GetValCheckF() qbft.ProposedValueCheckF
- func (r *AggregatorRunner) HasRunningDuty() bool
- func (r *AggregatorRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
- func (r *AggregatorRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *AggregatorRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *AggregatorRunner) StartNewDuty(duty *types.Duty) error
- type AttesterCalls
- type AttesterRunner
- func (r *AttesterRunner) Decode(data []byte) error
- func (r *AttesterRunner) Encode() ([]byte, error)
- func (r *AttesterRunner) GetBaseRunner() *BaseRunner
- func (r *AttesterRunner) GetBeaconNode() BeaconNode
- func (r *AttesterRunner) GetNetwork() Network
- func (r *AttesterRunner) GetRoot() ([32]byte, error)
- func (r *AttesterRunner) GetShare() *types.Share
- func (r *AttesterRunner) GetSigner() types.KeyManager
- func (r *AttesterRunner) GetState() *State
- func (r *AttesterRunner) GetValCheckF() qbft.ProposedValueCheckF
- func (r *AttesterRunner) HasRunningDuty() bool
- func (r *AttesterRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
- func (r *AttesterRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *AttesterRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *AttesterRunner) StartNewDuty(duty *types.Duty) error
- type BaseRunner
- type BeaconNode
- type DomainCalls
- type DutyRunners
- type Getters
- type Network
- type PartialSigContainer
- type ProposerCalls
- type ProposerRunner
- func (r *ProposerRunner) Decode(data []byte) error
- func (r *ProposerRunner) Encode() ([]byte, error)
- func (r *ProposerRunner) GetBaseRunner() *BaseRunner
- func (r *ProposerRunner) GetBeaconNode() BeaconNode
- func (r *ProposerRunner) GetNetwork() Network
- func (r *ProposerRunner) GetRoot() ([32]byte, error)
- func (r *ProposerRunner) GetShare() *types.Share
- func (r *ProposerRunner) GetSigner() types.KeyManager
- func (r *ProposerRunner) GetState() *State
- func (r *ProposerRunner) GetValCheckF() qbft.ProposedValueCheckF
- func (r *ProposerRunner) HasRunningDuty() bool
- func (r *ProposerRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
- func (r *ProposerRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *ProposerRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *ProposerRunner) StartNewDuty(duty *types.Duty) error
- type Runner
- func NewAggregatorRunner(beaconNetwork types.BeaconNetwork, share *types.Share, ...) Runner
- func NewAttesterRunnner(beaconNetwork types.BeaconNetwork, share *types.Share, ...) Runner
- func NewProposerRunner(beaconNetwork types.BeaconNetwork, share *types.Share, ...) Runner
- func NewSyncCommitteeAggregatorRunner(beaconNetwork types.BeaconNetwork, share *types.Share, ...) Runner
- func NewSyncCommitteeRunner(beaconNetwork types.BeaconNetwork, share *types.Share, ...) Runner
- func NewValidatorRegistrationRunner(beaconNetwork types.BeaconNetwork, share *types.Share, beacon BeaconNode, ...) Runner
- type State
- type SyncCommitteeAggregatorRunner
- func (r *SyncCommitteeAggregatorRunner) Decode(data []byte) error
- func (r *SyncCommitteeAggregatorRunner) Encode() ([]byte, error)
- func (r *SyncCommitteeAggregatorRunner) GetBaseRunner() *BaseRunner
- func (r *SyncCommitteeAggregatorRunner) GetBeaconNode() BeaconNode
- func (r *SyncCommitteeAggregatorRunner) GetNetwork() Network
- func (r *SyncCommitteeAggregatorRunner) GetRoot() ([32]byte, error)
- func (r *SyncCommitteeAggregatorRunner) GetShare() *types.Share
- func (r *SyncCommitteeAggregatorRunner) GetSigner() types.KeyManager
- func (r *SyncCommitteeAggregatorRunner) GetState() *State
- func (r *SyncCommitteeAggregatorRunner) GetValCheckF() qbft.ProposedValueCheckF
- func (r *SyncCommitteeAggregatorRunner) HasRunningDuty() bool
- func (r *SyncCommitteeAggregatorRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
- func (r *SyncCommitteeAggregatorRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *SyncCommitteeAggregatorRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *SyncCommitteeAggregatorRunner) StartNewDuty(duty *types.Duty) error
- type SyncCommitteeCalls
- type SyncCommitteeContributionCalls
- type SyncCommitteeRunner
- func (r *SyncCommitteeRunner) Decode(data []byte) error
- func (r *SyncCommitteeRunner) Encode() ([]byte, error)
- func (r *SyncCommitteeRunner) GetBaseRunner() *BaseRunner
- func (r *SyncCommitteeRunner) GetBeaconNode() BeaconNode
- func (r *SyncCommitteeRunner) GetNetwork() Network
- func (r *SyncCommitteeRunner) GetRoot() ([32]byte, error)
- func (r *SyncCommitteeRunner) GetShare() *types.Share
- func (r *SyncCommitteeRunner) GetSigner() types.KeyManager
- func (r *SyncCommitteeRunner) GetState() *State
- func (r *SyncCommitteeRunner) GetValCheckF() qbft.ProposedValueCheckF
- func (r *SyncCommitteeRunner) HasRunningDuty() bool
- func (r *SyncCommitteeRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
- func (r *SyncCommitteeRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *SyncCommitteeRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *SyncCommitteeRunner) StartNewDuty(duty *types.Duty) error
- type Validator
- type ValidatorRegistrationRunner
- func (r *ValidatorRegistrationRunner) Decode(data []byte) error
- func (r *ValidatorRegistrationRunner) Encode() ([]byte, error)
- func (r *ValidatorRegistrationRunner) GetBaseRunner() *BaseRunner
- func (r *ValidatorRegistrationRunner) GetBeaconNode() BeaconNode
- func (r *ValidatorRegistrationRunner) GetNetwork() Network
- func (r *ValidatorRegistrationRunner) GetRoot() ([32]byte, error)
- func (r *ValidatorRegistrationRunner) GetShare() *types.Share
- func (r *ValidatorRegistrationRunner) GetSigner() types.KeyManager
- func (r *ValidatorRegistrationRunner) GetState() *State
- func (r *ValidatorRegistrationRunner) GetValCheckF() qbft.ProposedValueCheckF
- func (r *ValidatorRegistrationRunner) HasRunningDuty() bool
- func (r *ValidatorRegistrationRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
- func (r *ValidatorRegistrationRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *ValidatorRegistrationRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
- func (r *ValidatorRegistrationRunner) StartNewDuty(duty *types.Duty) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregatorValueCheckF ¶ added in v0.2.7
func AggregatorValueCheckF( signer types.BeaconSigner, network types.BeaconNetwork, validatorPK types.ValidatorPK, validatorIndex phase0.ValidatorIndex, ) qbft.ProposedValueCheckF
func AttesterValueCheckF ¶ added in v0.2.7
func AttesterValueCheckF( signer types.BeaconSigner, network types.BeaconNetwork, validatorPK types.ValidatorPK, validatorIndex phase0.ValidatorIndex, sharePublicKey []byte, ) qbft.ProposedValueCheckF
func ProposerValueCheckF ¶ added in v0.2.7
func ProposerValueCheckF( signer types.BeaconSigner, network types.BeaconNetwork, validatorPK types.ValidatorPK, validatorIndex phase0.ValidatorIndex, sharePublicKey []byte, ) qbft.ProposedValueCheckF
func SyncCommitteeContributionValueCheckF ¶ added in v0.2.7
func SyncCommitteeContributionValueCheckF( signer types.BeaconSigner, network types.BeaconNetwork, validatorPK types.ValidatorPK, validatorIndex phase0.ValidatorIndex, ) qbft.ProposedValueCheckF
func SyncCommitteeValueCheckF ¶ added in v0.2.7
func SyncCommitteeValueCheckF( signer types.BeaconSigner, network types.BeaconNetwork, validatorPK types.ValidatorPK, validatorIndex phase0.ValidatorIndex, ) qbft.ProposedValueCheckF
Types ¶
type AggregatorCalls ¶
type AggregatorCalls interface { // SubmitAggregateSelectionProof returns an AggregateAndProof object SubmitAggregateSelectionProof(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, committeeLength uint64, index phase0.ValidatorIndex, slotSig []byte) (ssz.Marshaler, spec.DataVersion, error) // SubmitSignedAggregateSelectionProof broadcasts a signed aggregator msg SubmitSignedAggregateSelectionProof(msg *phase0.SignedAggregateAndProof) error }
AggregatorCalls interface has all attestation aggregator duty specific calls
type AggregatorRunner ¶ added in v0.2.7
type AggregatorRunner struct { BaseRunner *BaseRunner // contains filtered or unexported fields }
func (*AggregatorRunner) Decode ¶ added in v0.2.7
func (r *AggregatorRunner) Decode(data []byte) error
Decode returns error if decoding failed
func (*AggregatorRunner) Encode ¶ added in v0.2.7
func (r *AggregatorRunner) Encode() ([]byte, error)
Encode returns the encoded struct in bytes or error
func (*AggregatorRunner) GetBaseRunner ¶ added in v0.2.7
func (r *AggregatorRunner) GetBaseRunner() *BaseRunner
func (*AggregatorRunner) GetBeaconNode ¶ added in v0.2.7
func (r *AggregatorRunner) GetBeaconNode() BeaconNode
func (*AggregatorRunner) GetNetwork ¶ added in v0.2.7
func (r *AggregatorRunner) GetNetwork() Network
func (*AggregatorRunner) GetRoot ¶ added in v0.2.7
func (r *AggregatorRunner) GetRoot() ([32]byte, error)
GetRoot returns the root used for signing and verification
func (*AggregatorRunner) GetShare ¶ added in v0.2.7
func (r *AggregatorRunner) GetShare() *types.Share
func (*AggregatorRunner) GetSigner ¶ added in v0.2.7
func (r *AggregatorRunner) GetSigner() types.KeyManager
func (*AggregatorRunner) GetState ¶ added in v0.2.7
func (r *AggregatorRunner) GetState() *State
func (*AggregatorRunner) GetValCheckF ¶ added in v0.2.7
func (r *AggregatorRunner) GetValCheckF() qbft.ProposedValueCheckF
func (*AggregatorRunner) HasRunningDuty ¶ added in v0.2.7
func (r *AggregatorRunner) HasRunningDuty() bool
HasRunningDuty returns true if a duty is already running (StartNewDuty called and returned nil)
func (*AggregatorRunner) ProcessConsensus ¶ added in v0.2.7
func (r *AggregatorRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
func (*AggregatorRunner) ProcessPostConsensus ¶ added in v0.2.7
func (r *AggregatorRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*AggregatorRunner) ProcessPreConsensus ¶ added in v0.2.7
func (r *AggregatorRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*AggregatorRunner) StartNewDuty ¶ added in v0.2.7
func (r *AggregatorRunner) StartNewDuty(duty *types.Duty) error
type AttesterCalls ¶
type AttesterCalls interface { // GetAttestationData returns attestation data by the given slot and committee index GetAttestationData(slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (ssz.Marshaler, spec.DataVersion, error) // SubmitAttestation submit the attestation to the node SubmitAttestation(attestation *phase0.Attestation) error }
AttesterCalls interface has all attester duty specific calls
type AttesterRunner ¶ added in v0.2.7
type AttesterRunner struct { BaseRunner *BaseRunner // contains filtered or unexported fields }
func (*AttesterRunner) Decode ¶ added in v0.2.7
func (r *AttesterRunner) Decode(data []byte) error
Decode returns error if decoding failed
func (*AttesterRunner) Encode ¶ added in v0.2.7
func (r *AttesterRunner) Encode() ([]byte, error)
Encode returns the encoded struct in bytes or error
func (*AttesterRunner) GetBaseRunner ¶ added in v0.2.7
func (r *AttesterRunner) GetBaseRunner() *BaseRunner
func (*AttesterRunner) GetBeaconNode ¶ added in v0.2.7
func (r *AttesterRunner) GetBeaconNode() BeaconNode
func (*AttesterRunner) GetNetwork ¶ added in v0.2.7
func (r *AttesterRunner) GetNetwork() Network
func (*AttesterRunner) GetRoot ¶ added in v0.2.7
func (r *AttesterRunner) GetRoot() ([32]byte, error)
GetRoot returns the root used for signing and verification
func (*AttesterRunner) GetShare ¶ added in v0.2.7
func (r *AttesterRunner) GetShare() *types.Share
func (*AttesterRunner) GetSigner ¶ added in v0.2.7
func (r *AttesterRunner) GetSigner() types.KeyManager
func (*AttesterRunner) GetState ¶ added in v0.2.7
func (r *AttesterRunner) GetState() *State
func (*AttesterRunner) GetValCheckF ¶ added in v0.2.7
func (r *AttesterRunner) GetValCheckF() qbft.ProposedValueCheckF
func (*AttesterRunner) HasRunningDuty ¶ added in v0.2.7
func (r *AttesterRunner) HasRunningDuty() bool
HasRunningDuty returns true if a duty is already running (StartNewDuty called and returned nil)
func (*AttesterRunner) ProcessConsensus ¶ added in v0.2.7
func (r *AttesterRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
func (*AttesterRunner) ProcessPostConsensus ¶ added in v0.2.7
func (r *AttesterRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*AttesterRunner) ProcessPreConsensus ¶ added in v0.2.7
func (r *AttesterRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*AttesterRunner) StartNewDuty ¶ added in v0.2.7
func (r *AttesterRunner) StartNewDuty(duty *types.Duty) error
type BaseRunner ¶ added in v0.2.7
type BaseRunner struct { State *State QBFTController *qbft.Controller BeaconNetwork types.BeaconNetwork BeaconRoleType types.BeaconRole }
func (*BaseRunner) ValidatePostConsensusMsg ¶ added in v0.3.0
func (b *BaseRunner) ValidatePostConsensusMsg(runner Runner, signedMsg *types.SignedPartialSignatureMessage) error
func (*BaseRunner) ValidatePreConsensusMsg ¶ added in v0.3.0
func (b *BaseRunner) ValidatePreConsensusMsg(runner Runner, signedMsg *types.SignedPartialSignatureMessage) error
type BeaconNode ¶
type BeaconNode interface { // GetBeaconNetwork returns the beacon network the node is on GetBeaconNetwork() types.BeaconNetwork AttesterCalls ProposerCalls AggregatorCalls SyncCommitteeCalls SyncCommitteeContributionCalls DomainCalls }
type DomainCalls ¶ added in v0.2.7
type DutyRunners ¶
type DutyRunners map[types.BeaconRole]Runner
DutyRunners is a map of duty runners mapped by msg id hex.
func (DutyRunners) DutyRunnerForMsgID ¶
func (ci DutyRunners) DutyRunnerForMsgID(msgID types.MessageID) Runner
DutyRunnerForMsgID returns a Runner from the provided msg ID, or nil if not found
type Getters ¶ added in v0.2.7
type Getters interface { GetBaseRunner() *BaseRunner GetBeaconNode() BeaconNode GetValCheckF() qbft.ProposedValueCheckF GetSigner() types.KeyManager GetNetwork() Network }
type PartialSigContainer ¶
type PartialSigContainer struct { Signatures map[string]map[types.OperatorID][]byte // Quorum is the number of min signatures needed for quorum Quorum uint64 }
func NewPartialSigContainer ¶
func NewPartialSigContainer(quorum uint64) *PartialSigContainer
func (*PartialSigContainer) AddSignature ¶
func (ps *PartialSigContainer) AddSignature(sigMsg *types.PartialSignatureMessage)
func (*PartialSigContainer) HasQuorum ¶
func (ps *PartialSigContainer) HasQuorum(root [32]byte) bool
func (*PartialSigContainer) ReconstructSignature ¶
func (ps *PartialSigContainer) ReconstructSignature(root [32]byte, validatorPubKey []byte) ([]byte, error)
type ProposerCalls ¶
type ProposerCalls interface { // GetBeaconBlock returns beacon block by the given slot and committee index GetBeaconBlock(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, graffiti, randao []byte) (ssz.Marshaler, spec.DataVersion, error) // GetBlindedBeaconBlock returns blinded beacon block by the given slot and committee index GetBlindedBeaconBlock(slot phase0.Slot, committeeIndex phase0.CommitteeIndex, graffiti, randao []byte) (ssz.Marshaler, spec.DataVersion, error) // SubmitBeaconBlock submit the block to the node SubmitBeaconBlock(block *bellatrix.SignedBeaconBlock) error // SubmitBlindedBeaconBlock submit the blinded block to the node SubmitBlindedBeaconBlock(block *bellatrix2.SignedBlindedBeaconBlock) error }
ProposerCalls interface has all block proposer duty specific calls
type ProposerRunner ¶ added in v0.2.7
type ProposerRunner struct { BaseRunner *BaseRunner // ProducesBlindedBlocks is true when the runner will only produce blinded blocks ProducesBlindedBlocks bool // contains filtered or unexported fields }
func (*ProposerRunner) Decode ¶ added in v0.2.7
func (r *ProposerRunner) Decode(data []byte) error
Decode returns error if decoding failed
func (*ProposerRunner) Encode ¶ added in v0.2.7
func (r *ProposerRunner) Encode() ([]byte, error)
Encode returns the encoded struct in bytes or error
func (*ProposerRunner) GetBaseRunner ¶ added in v0.2.7
func (r *ProposerRunner) GetBaseRunner() *BaseRunner
func (*ProposerRunner) GetBeaconNode ¶ added in v0.2.7
func (r *ProposerRunner) GetBeaconNode() BeaconNode
func (*ProposerRunner) GetNetwork ¶ added in v0.2.7
func (r *ProposerRunner) GetNetwork() Network
func (*ProposerRunner) GetRoot ¶ added in v0.2.7
func (r *ProposerRunner) GetRoot() ([32]byte, error)
GetRoot returns the root used for signing and verification
func (*ProposerRunner) GetShare ¶ added in v0.2.7
func (r *ProposerRunner) GetShare() *types.Share
func (*ProposerRunner) GetSigner ¶ added in v0.2.7
func (r *ProposerRunner) GetSigner() types.KeyManager
func (*ProposerRunner) GetState ¶ added in v0.2.7
func (r *ProposerRunner) GetState() *State
func (*ProposerRunner) GetValCheckF ¶ added in v0.2.7
func (r *ProposerRunner) GetValCheckF() qbft.ProposedValueCheckF
func (*ProposerRunner) HasRunningDuty ¶ added in v0.2.7
func (r *ProposerRunner) HasRunningDuty() bool
HasRunningDuty returns true if a duty is already running (StartNewDuty called and returned nil)
func (*ProposerRunner) ProcessConsensus ¶ added in v0.2.7
func (r *ProposerRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
func (*ProposerRunner) ProcessPostConsensus ¶ added in v0.2.7
func (r *ProposerRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*ProposerRunner) ProcessPreConsensus ¶ added in v0.2.7
func (r *ProposerRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*ProposerRunner) StartNewDuty ¶ added in v0.2.7
func (r *ProposerRunner) StartNewDuty(duty *types.Duty) error
type Runner ¶
type Runner interface { types.Encoder types.Root Getters // StartNewDuty starts a new duty for the runner, returns error if can't StartNewDuty(duty *types.Duty) error // HasRunningDuty returns true if it has a running duty HasRunningDuty() bool // ProcessPreConsensus processes all pre-consensus msgs, returns error if can't process ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error // ProcessConsensus processes all consensus msgs, returns error if can't process ProcessConsensus(msg *qbft.SignedMessage) error // ProcessPostConsensus processes all post-consensus msgs, returns error if can't process ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error // contains filtered or unexported methods }
func NewAggregatorRunner ¶ added in v0.2.7
func NewAggregatorRunner( beaconNetwork types.BeaconNetwork, share *types.Share, qbftController *qbft.Controller, beacon BeaconNode, network Network, signer types.KeyManager, valCheck qbft.ProposedValueCheckF, ) Runner
func NewAttesterRunnner ¶ added in v0.2.7
func NewAttesterRunnner( beaconNetwork types.BeaconNetwork, share *types.Share, qbftController *qbft.Controller, beacon BeaconNode, network Network, signer types.KeyManager, valCheck qbft.ProposedValueCheckF, ) Runner
func NewProposerRunner ¶ added in v0.2.7
func NewProposerRunner( beaconNetwork types.BeaconNetwork, share *types.Share, qbftController *qbft.Controller, beacon BeaconNode, network Network, signer types.KeyManager, valCheck qbft.ProposedValueCheckF, ) Runner
func NewSyncCommitteeAggregatorRunner ¶ added in v0.2.7
func NewSyncCommitteeAggregatorRunner( beaconNetwork types.BeaconNetwork, share *types.Share, qbftController *qbft.Controller, beacon BeaconNode, network Network, signer types.KeyManager, valCheck qbft.ProposedValueCheckF, ) Runner
func NewSyncCommitteeRunner ¶ added in v0.2.7
func NewSyncCommitteeRunner( beaconNetwork types.BeaconNetwork, share *types.Share, qbftController *qbft.Controller, beacon BeaconNode, network Network, signer types.KeyManager, valCheck qbft.ProposedValueCheckF, ) Runner
func NewValidatorRegistrationRunner ¶ added in v0.3.0
func NewValidatorRegistrationRunner( beaconNetwork types.BeaconNetwork, share *types.Share, beacon BeaconNode, network Network, signer types.KeyManager, ) Runner
type State ¶
type State struct { PreConsensusContainer *PartialSigContainer PostConsensusContainer *PartialSigContainer RunningInstance *qbft.Instance DecidedValue *types.ConsensusData // CurrentDuty is the duty the node pulled locally from the beacon node, might be different from decided duty StartingDuty *types.Duty // flags Finished bool // Finished marked true when there is a full successful cycle (pre, consensus and post) with quorum }
State holds all the relevant progress the duty execution progress
func (*State) ReconstructBeaconSig ¶ added in v0.2.7
func (pcs *State) ReconstructBeaconSig(container *PartialSigContainer, root [32]byte, validatorPubKey []byte) ([]byte, error)
ReconstructBeaconSig aggregates collected partial beacon sigs
type SyncCommitteeAggregatorRunner ¶ added in v0.2.7
type SyncCommitteeAggregatorRunner struct { BaseRunner *BaseRunner // contains filtered or unexported fields }
func (*SyncCommitteeAggregatorRunner) Decode ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) Decode(data []byte) error
Decode returns error if decoding failed
func (*SyncCommitteeAggregatorRunner) Encode ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) Encode() ([]byte, error)
Encode returns the encoded struct in bytes or error
func (*SyncCommitteeAggregatorRunner) GetBaseRunner ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) GetBaseRunner() *BaseRunner
func (*SyncCommitteeAggregatorRunner) GetBeaconNode ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) GetBeaconNode() BeaconNode
func (*SyncCommitteeAggregatorRunner) GetNetwork ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) GetNetwork() Network
func (*SyncCommitteeAggregatorRunner) GetRoot ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) GetRoot() ([32]byte, error)
GetRoot returns the root used for signing and verification
func (*SyncCommitteeAggregatorRunner) GetShare ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) GetShare() *types.Share
func (*SyncCommitteeAggregatorRunner) GetSigner ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) GetSigner() types.KeyManager
func (*SyncCommitteeAggregatorRunner) GetState ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) GetState() *State
func (*SyncCommitteeAggregatorRunner) GetValCheckF ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) GetValCheckF() qbft.ProposedValueCheckF
func (*SyncCommitteeAggregatorRunner) HasRunningDuty ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) HasRunningDuty() bool
HasRunningDuty returns true if a duty is already running (StartNewDuty called and returned nil)
func (*SyncCommitteeAggregatorRunner) ProcessConsensus ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
func (*SyncCommitteeAggregatorRunner) ProcessPostConsensus ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*SyncCommitteeAggregatorRunner) ProcessPreConsensus ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*SyncCommitteeAggregatorRunner) StartNewDuty ¶ added in v0.2.7
func (r *SyncCommitteeAggregatorRunner) StartNewDuty(duty *types.Duty) error
type SyncCommitteeCalls ¶
type SyncCommitteeCalls interface { // GetSyncMessageBlockRoot returns beacon block root for sync committee GetSyncMessageBlockRoot(slot phase0.Slot) (phase0.Root, spec.DataVersion, error) // SubmitSyncMessage submits a signed sync committee msg SubmitSyncMessage(msg *altair.SyncCommitteeMessage) error }
SyncCommitteeCalls interface has all sync committee duty specific calls
type SyncCommitteeContributionCalls ¶
type SyncCommitteeContributionCalls interface { // IsSyncCommitteeAggregator returns true if aggregator IsSyncCommitteeAggregator(proof []byte) (bool, error) // SyncCommitteeSubnetID returns sync committee subnet ID from subcommittee index SyncCommitteeSubnetID(index phase0.CommitteeIndex) (uint64, error) // GetSyncCommitteeContribution returns a types.Contributions object GetSyncCommitteeContribution(slot phase0.Slot, selectionProofs []phase0.BLSSignature, subnetIDs []uint64) (ssz.Marshaler, spec.DataVersion, error) // SubmitSignedContributionAndProof broadcasts to the network SubmitSignedContributionAndProof(contribution *altair.SignedContributionAndProof) error }
SyncCommitteeContributionCalls interface has all sync committee contribution duty specific calls
type SyncCommitteeRunner ¶ added in v0.2.7
type SyncCommitteeRunner struct { BaseRunner *BaseRunner // contains filtered or unexported fields }
func (*SyncCommitteeRunner) Decode ¶ added in v0.2.7
func (r *SyncCommitteeRunner) Decode(data []byte) error
Decode returns error if decoding failed
func (*SyncCommitteeRunner) Encode ¶ added in v0.2.7
func (r *SyncCommitteeRunner) Encode() ([]byte, error)
Encode returns the encoded struct in bytes or error
func (*SyncCommitteeRunner) GetBaseRunner ¶ added in v0.2.7
func (r *SyncCommitteeRunner) GetBaseRunner() *BaseRunner
func (*SyncCommitteeRunner) GetBeaconNode ¶ added in v0.2.7
func (r *SyncCommitteeRunner) GetBeaconNode() BeaconNode
func (*SyncCommitteeRunner) GetNetwork ¶ added in v0.2.7
func (r *SyncCommitteeRunner) GetNetwork() Network
func (*SyncCommitteeRunner) GetRoot ¶ added in v0.2.7
func (r *SyncCommitteeRunner) GetRoot() ([32]byte, error)
GetRoot returns the root used for signing and verification
func (*SyncCommitteeRunner) GetShare ¶ added in v0.2.7
func (r *SyncCommitteeRunner) GetShare() *types.Share
func (*SyncCommitteeRunner) GetSigner ¶ added in v0.2.7
func (r *SyncCommitteeRunner) GetSigner() types.KeyManager
func (*SyncCommitteeRunner) GetState ¶ added in v0.2.7
func (r *SyncCommitteeRunner) GetState() *State
func (*SyncCommitteeRunner) GetValCheckF ¶ added in v0.2.7
func (r *SyncCommitteeRunner) GetValCheckF() qbft.ProposedValueCheckF
func (*SyncCommitteeRunner) HasRunningDuty ¶ added in v0.2.7
func (r *SyncCommitteeRunner) HasRunningDuty() bool
HasRunningDuty returns true if a duty is already running (StartNewDuty called and returned nil)
func (*SyncCommitteeRunner) ProcessConsensus ¶ added in v0.2.7
func (r *SyncCommitteeRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
func (*SyncCommitteeRunner) ProcessPostConsensus ¶ added in v0.2.7
func (r *SyncCommitteeRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*SyncCommitteeRunner) ProcessPreConsensus ¶ added in v0.2.7
func (r *SyncCommitteeRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*SyncCommitteeRunner) StartNewDuty ¶ added in v0.2.7
func (r *SyncCommitteeRunner) StartNewDuty(duty *types.Duty) error
type Validator ¶
type Validator struct { DutyRunners DutyRunners Network Network Beacon BeaconNode Signer types.KeyManager }
Validator represents an SSV ETH consensus validator Share assigned, coordinates duty execution and more. Every validator has a validatorID which is validator's public key. Each validator has multiple DutyRunners, for each duty type.
func NewValidator ¶
func NewValidator( network Network, beacon BeaconNode, share *types.Share, signer types.KeyManager, runners map[types.BeaconRole]Runner, ) *Validator
func (*Validator) ProcessMessage ¶
func (v *Validator) ProcessMessage(msg *types.SSVMessage) error
ProcessMessage processes Network Message of all types
type ValidatorRegistrationRunner ¶ added in v0.3.0
type ValidatorRegistrationRunner struct { BaseRunner *BaseRunner // contains filtered or unexported fields }
func (*ValidatorRegistrationRunner) Decode ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) Decode(data []byte) error
Decode returns error if decoding failed
func (*ValidatorRegistrationRunner) Encode ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) Encode() ([]byte, error)
Encode returns the encoded struct in bytes or error
func (*ValidatorRegistrationRunner) GetBaseRunner ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) GetBaseRunner() *BaseRunner
func (*ValidatorRegistrationRunner) GetBeaconNode ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) GetBeaconNode() BeaconNode
func (*ValidatorRegistrationRunner) GetNetwork ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) GetNetwork() Network
func (*ValidatorRegistrationRunner) GetRoot ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) GetRoot() ([32]byte, error)
GetRoot returns the root used for signing and verification
func (*ValidatorRegistrationRunner) GetShare ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) GetShare() *types.Share
func (*ValidatorRegistrationRunner) GetSigner ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) GetSigner() types.KeyManager
func (*ValidatorRegistrationRunner) GetState ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) GetState() *State
func (*ValidatorRegistrationRunner) GetValCheckF ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) GetValCheckF() qbft.ProposedValueCheckF
func (*ValidatorRegistrationRunner) HasRunningDuty ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) HasRunningDuty() bool
HasRunningDuty returns true if a duty is already running (StartNewDuty called and returned nil)
func (*ValidatorRegistrationRunner) ProcessConsensus ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) ProcessConsensus(signedMsg *qbft.SignedMessage) error
func (*ValidatorRegistrationRunner) ProcessPostConsensus ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) ProcessPostConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*ValidatorRegistrationRunner) ProcessPreConsensus ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) ProcessPreConsensus(signedMsg *types.SignedPartialSignatureMessage) error
func (*ValidatorRegistrationRunner) StartNewDuty ¶ added in v0.3.0
func (r *ValidatorRegistrationRunner) StartNewDuty(duty *types.Duty) error