Documentation ¶
Index ¶
- func NewErroring(_ context.Context, errorRate float64, next consensusclient.Service) (consensusclient.Service, error)
- func NewSleepy(_ context.Context, minSleep time.Duration, maxSleep time.Duration, ...) (consensusclient.Service, error)
- type Erroring
- func (s *Erroring) Address() string
- func (s *Erroring) AggregateAttestation(ctx context.Context, slot phase0.Slot, attestationDataRoot phase0.Root) (*phase0.Attestation, error)
- func (s *Erroring) AttestationData(ctx context.Context, slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (*phase0.AttestationData, error)
- func (s *Erroring) AttestationPool(ctx context.Context, slot phase0.Slot) ([]*phase0.Attestation, error)
- func (s *Erroring) AttesterDuties(ctx context.Context, epoch phase0.Epoch, ...) ([]*apiv1.AttesterDuty, error)
- func (s *Erroring) BeaconBlockHeader(ctx context.Context, blockID string) (*apiv1.BeaconBlockHeader, error)
- func (s *Erroring) BeaconBlockProposal(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, ...) (*spec.VersionedBeaconBlock, error)
- func (s *Erroring) BeaconBlockRoot(ctx context.Context, blockID string) (*phase0.Root, error)
- func (s *Erroring) BeaconCommittees(ctx context.Context, stateID string) ([]*apiv1.BeaconCommittee, error)
- func (s *Erroring) BeaconCommitteesAtEpoch(ctx context.Context, stateID string, epoch phase0.Epoch) ([]*apiv1.BeaconCommittee, error)
- func (s *Erroring) BeaconState(ctx context.Context, stateID string) (*spec.VersionedBeaconState, error)
- func (s *Erroring) BeaconStateRoot(ctx context.Context, stateID string) (*phase0.Root, error)
- func (s *Erroring) DepositContract(ctx context.Context) (*apiv1.DepositContract, error)
- func (s *Erroring) Domain(ctx context.Context, domainType phase0.DomainType, epoch phase0.Epoch) (phase0.Domain, error)
- func (s *Erroring) EpochFromStateID(ctx context.Context, stateID string) (phase0.Epoch, error)
- func (s *Erroring) Events(ctx context.Context, topics []string, handler consensusclient.EventHandlerFunc) error
- func (s *Erroring) FarFutureEpoch(ctx context.Context) (phase0.Epoch, error)
- func (s *Erroring) Finality(ctx context.Context, stateID string) (*apiv1.Finality, error)
- func (s *Erroring) Fork(ctx context.Context, stateID string) (*phase0.Fork, error)
- func (s *Erroring) ForkSchedule(ctx context.Context) ([]*phase0.Fork, error)
- func (s *Erroring) Genesis(ctx context.Context) (*apiv1.Genesis, error)
- func (s *Erroring) GenesisDomain(ctx context.Context, domainType phase0.DomainType) (phase0.Domain, error)
- func (s *Erroring) GenesisTime(ctx context.Context) (time.Time, error)
- func (s *Erroring) GenesisValidatorsRoot(ctx context.Context) ([]byte, error)
- func (s *Erroring) Name() string
- func (s *Erroring) NodeSyncing(ctx context.Context) (*apiv1.SyncState, error)
- func (s *Erroring) NodeVersion(ctx context.Context) (string, error)
- func (s *Erroring) ProposerDuties(ctx context.Context, epoch phase0.Epoch, ...) ([]*apiv1.ProposerDuty, error)
- func (s *Erroring) SignedBeaconBlock(ctx context.Context, blockID string) (*spec.VersionedSignedBeaconBlock, error)
- func (s *Erroring) SlotDuration(ctx context.Context) (time.Duration, error)
- func (s *Erroring) SlotFromStateID(ctx context.Context, stateID string) (phase0.Slot, error)
- func (s *Erroring) SlotsPerEpoch(ctx context.Context) (uint64, error)
- func (s *Erroring) Spec(ctx context.Context) (map[string]interface{}, error)
- func (s *Erroring) SubmitAggregateAttestations(ctx context.Context, aggregateAndProofs []*phase0.SignedAggregateAndProof) error
- func (s *Erroring) SubmitAttestations(ctx context.Context, attestations []*phase0.Attestation) error
- func (s *Erroring) SubmitBeaconBlock(ctx context.Context, block *spec.VersionedSignedBeaconBlock) error
- func (s *Erroring) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription) error
- func (s *Erroring) SubmitBlindedBeaconBlock(ctx context.Context, block *api.VersionedSignedBlindedBeaconBlock) error
- func (s *Erroring) SubmitProposalPreparations(ctx context.Context, preparations []*apiv1.ProposalPreparation) error
- func (s *Erroring) SubmitSyncCommitteeContributions(ctx context.Context, ...) error
- func (s *Erroring) SubmitSyncCommitteeMessages(ctx context.Context, messages []*altair.SyncCommitteeMessage) error
- func (s *Erroring) SubmitSyncCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.SyncCommitteeSubscription) error
- func (s *Erroring) SubmitValidatorRegistrations(ctx context.Context, registrations []*api.VersionedSignedValidatorRegistration) error
- func (s *Erroring) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *phase0.SignedVoluntaryExit) error
- func (s *Erroring) SyncCommittee(ctx context.Context, stateID string) (*apiv1.SyncCommittee, error)
- func (s *Erroring) SyncCommitteeAtEpoch(ctx context.Context, stateID string, epoch phase0.Epoch) (*apiv1.SyncCommittee, error)
- func (s *Erroring) SyncCommitteeContribution(ctx context.Context, slot phase0.Slot, subcommitteeIndex uint64, ...) (*altair.SyncCommitteeContribution, error)
- func (s *Erroring) SyncCommitteeDuties(ctx context.Context, epoch phase0.Epoch, ...) ([]*apiv1.SyncCommitteeDuty, error)
- func (s *Erroring) TargetAggregatorsPerCommittee(ctx context.Context) (uint64, error)
- func (s *Erroring) ValidatorBalances(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]phase0.Gwei, error)
- func (s *Erroring) Validators(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
- func (s *Erroring) ValidatorsByPubKey(ctx context.Context, stateID string, validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
- type Sleepy
- func (s *Sleepy) Address() string
- func (s *Sleepy) AggregateAttestation(ctx context.Context, slot phase0.Slot, attestationDataRoot phase0.Root) (*phase0.Attestation, error)
- func (s *Sleepy) AttestationData(ctx context.Context, slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (*phase0.AttestationData, error)
- func (s *Sleepy) AttestationPool(ctx context.Context, slot phase0.Slot) ([]*phase0.Attestation, error)
- func (s *Sleepy) AttesterDuties(ctx context.Context, epoch phase0.Epoch, ...) ([]*apiv1.AttesterDuty, error)
- func (s *Sleepy) BeaconBlockHeader(ctx context.Context, blockID string) (*apiv1.BeaconBlockHeader, error)
- func (s *Sleepy) BeaconBlockProposal(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, ...) (*spec.VersionedBeaconBlock, error)
- func (s *Sleepy) BeaconState(ctx context.Context, stateID string) (*spec.VersionedBeaconState, error)
- func (s *Sleepy) Domain(ctx context.Context, domainType phase0.DomainType, epoch phase0.Epoch) (phase0.Domain, error)
- func (s *Sleepy) EpochFromStateID(ctx context.Context, stateID string) (phase0.Epoch, error)
- func (s *Sleepy) Events(ctx context.Context, topics []string, handler consensusclient.EventHandlerFunc) error
- func (s *Sleepy) FarFutureEpoch(ctx context.Context) (phase0.Epoch, error)
- func (s *Sleepy) Finality(ctx context.Context, stateID string) (*apiv1.Finality, error)
- func (s *Sleepy) Fork(ctx context.Context, stateID string) (*phase0.Fork, error)
- func (s *Sleepy) ForkSchedule(ctx context.Context) ([]*phase0.Fork, error)
- func (s *Sleepy) Genesis(ctx context.Context) (*apiv1.Genesis, error)
- func (s *Sleepy) GenesisDomain(ctx context.Context, domainType phase0.DomainType) (phase0.Domain, error)
- func (s *Sleepy) GenesisTime(ctx context.Context) (time.Time, error)
- func (s *Sleepy) GenesisValidatorsRoot(ctx context.Context) ([]byte, error)
- func (s *Sleepy) Name() string
- func (s *Sleepy) NodeSyncing(ctx context.Context) (*apiv1.SyncState, error)
- func (s *Sleepy) NodeVersion(ctx context.Context) (string, error)
- func (s *Sleepy) ProposerDuties(ctx context.Context, epoch phase0.Epoch, ...) ([]*apiv1.ProposerDuty, error)
- func (s *Sleepy) SlotDuration(ctx context.Context) (time.Duration, error)
- func (s *Sleepy) SlotFromStateID(ctx context.Context, stateID string) (phase0.Slot, error)
- func (s *Sleepy) SlotsPerEpoch(ctx context.Context) (uint64, error)
- func (s *Sleepy) Spec(ctx context.Context) (map[string]interface{}, error)
- func (s *Sleepy) SubmitAggregateAttestations(ctx context.Context, aggregateAndProofs []*phase0.SignedAggregateAndProof) error
- func (s *Sleepy) SubmitAttestations(ctx context.Context, attestations []*phase0.Attestation) error
- func (s *Sleepy) SubmitBeaconBlock(ctx context.Context, block *spec.VersionedSignedBeaconBlock) error
- func (s *Sleepy) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription) error
- func (s *Sleepy) SubmitBlindedBeaconBlock(ctx context.Context, block *api.VersionedSignedBlindedBeaconBlock) error
- func (s *Sleepy) SubmitProposalPreparations(ctx context.Context, preparations []*apiv1.ProposalPreparation) error
- func (s *Sleepy) SubmitValidatorRegistrations(ctx context.Context, registrations []*api.VersionedSignedValidatorRegistration) error
- func (s *Sleepy) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *phase0.SignedVoluntaryExit) error
- func (s *Sleepy) TargetAggregatorsPerCommittee(ctx context.Context) (uint64, error)
- func (s *Sleepy) ValidatorBalances(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]phase0.Gwei, error)
- func (s *Sleepy) Validators(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
- func (s *Sleepy) ValidatorsByPubKey(ctx context.Context, stateID string, validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErroring ¶
func NewErroring(_ context.Context, errorRate float64, next consensusclient.Service, ) (consensusclient.Service, error)
NewErroring creates a new Ethereum 2 client that errors at a given rate.
func NewSleepy ¶
func NewSleepy(_ context.Context, minSleep time.Duration, maxSleep time.Duration, next consensusclient.Service, ) (consensusclient.Service, error)
NewSleepy creates a new Ethereum 2 client that sleeps for random amount of time within a set of bounds between minSleep and maxSleep before continuing.
Types ¶
type Erroring ¶
type Erroring struct {
// contains filtered or unexported fields
}
Erroring is an Ethereum 2 client that errors at a given rate.
func (*Erroring) AggregateAttestation ¶
func (s *Erroring) AggregateAttestation(ctx context.Context, slot phase0.Slot, attestationDataRoot phase0.Root) (*phase0.Attestation, error)
AggregateAttestation fetches the aggregate attestation given an attestation.
func (*Erroring) AttestationData ¶
func (s *Erroring) AttestationData(ctx context.Context, slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (*phase0.AttestationData, error)
AttestationData fetches the attestation data for the given slot and committee index.
func (*Erroring) AttestationPool ¶
func (s *Erroring) AttestationPool(ctx context.Context, slot phase0.Slot) ([]*phase0.Attestation, error)
AttestationPool fetches the attestation pool for the given slot.
func (*Erroring) AttesterDuties ¶
func (s *Erroring) AttesterDuties(ctx context.Context, epoch phase0.Epoch, validatorIndices []phase0.ValidatorIndex) ([]*apiv1.AttesterDuty, error)
AttesterDuties obtains attester duties. If validatorIndicess is nil it will return all duties for the given epoch.
func (*Erroring) BeaconBlockHeader ¶
func (s *Erroring) BeaconBlockHeader(ctx context.Context, blockID string) (*apiv1.BeaconBlockHeader, error)
BeaconBlockHeader provides the block header of a given block ID.
func (*Erroring) BeaconBlockProposal ¶
func (s *Erroring) BeaconBlockProposal(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, graffiti []byte) (*spec.VersionedBeaconBlock, error)
BeaconBlockProposal fetches a proposed beacon block for signing.
func (*Erroring) BeaconBlockRoot ¶ added in v0.9.0
BeaconBlockRoot fetches a block's root given a block ID.
func (*Erroring) BeaconCommittees ¶ added in v0.9.0
func (s *Erroring) BeaconCommittees(ctx context.Context, stateID string) ([]*apiv1.BeaconCommittee, error)
BeaconCommittees fetches all beacon committees for the epoch at the given state.
func (*Erroring) BeaconCommitteesAtEpoch ¶ added in v0.9.0
func (s *Erroring) BeaconCommitteesAtEpoch(ctx context.Context, stateID string, epoch phase0.Epoch) ([]*apiv1.BeaconCommittee, error)
BeaconCommitteesAtEpoch fetches all beacon committees for the given epoch at the given state.
func (*Erroring) BeaconState ¶
func (s *Erroring) BeaconState(ctx context.Context, stateID string) (*spec.VersionedBeaconState, error)
BeaconState fetches a beacon state.
func (*Erroring) BeaconStateRoot ¶ added in v0.9.0
BeaconStateRoot fetches a beacon state root given a state ID.
func (*Erroring) DepositContract ¶ added in v0.9.0
DepositContract provides details of the Ethereum 1 deposit contract for the chain.
func (*Erroring) Domain ¶
func (s *Erroring) Domain(ctx context.Context, domainType phase0.DomainType, epoch phase0.Epoch) (phase0.Domain, error)
Domain provides a domain for a given domain type at a given epoch.
func (*Erroring) EpochFromStateID ¶
EpochFromStateID converts a state ID to its epoch.
func (*Erroring) Events ¶
func (s *Erroring) Events(ctx context.Context, topics []string, handler consensusclient.EventHandlerFunc) error
Events feeds requested events with the given topics to the supplied handler.
func (*Erroring) FarFutureEpoch ¶
FarFutureEpoch provides the far future epoch of the chain.
func (*Erroring) ForkSchedule ¶
ForkSchedule provides details of past and future changes in the chain's fork version.
func (*Erroring) GenesisDomain ¶ added in v0.15.5
func (s *Erroring) GenesisDomain(ctx context.Context, domainType phase0.DomainType) (phase0.Domain, error)
GenesisDomain provides a domain for a given domain type.
func (*Erroring) GenesisTime ¶
GenesisTime provides the genesis time of the chain.
func (*Erroring) GenesisValidatorsRoot ¶
GenesisValidatorsRoot provides the genesis validators root of the chain.
func (*Erroring) NodeSyncing ¶
NodeSyncing provides the state of the node's synchronization with the chain.
func (*Erroring) NodeVersion ¶
NodeVersion returns a free-text string with the node version.
func (*Erroring) ProposerDuties ¶
func (s *Erroring) ProposerDuties(ctx context.Context, epoch phase0.Epoch, validatorIndices []phase0.ValidatorIndex) ([]*apiv1.ProposerDuty, error)
ProposerDuties obtains proposer duties for the given epoch. If validatorIndices is empty all duties are returned, otherwise only matching duties are returned.
func (*Erroring) SignedBeaconBlock ¶ added in v0.9.0
func (s *Erroring) SignedBeaconBlock(ctx context.Context, blockID string) (*spec.VersionedSignedBeaconBlock, error)
SignedBeaconBlock fetches a signed beacon block given a block ID.
func (*Erroring) SlotDuration ¶
SlotDuration provides the duration of a slot of the chain.
func (*Erroring) SlotFromStateID ¶
SlotFromStateID converts a state ID to its slot.
func (*Erroring) SlotsPerEpoch ¶
SlotsPerEpoch provides the slots per epoch of the chain.
func (*Erroring) SubmitAggregateAttestations ¶
func (s *Erroring) SubmitAggregateAttestations(ctx context.Context, aggregateAndProofs []*phase0.SignedAggregateAndProof) error
SubmitAggregateAttestations submits aggregate attestations.
func (*Erroring) SubmitAttestations ¶
func (s *Erroring) SubmitAttestations(ctx context.Context, attestations []*phase0.Attestation) error
SubmitAttestations submits attestations.
func (*Erroring) SubmitBeaconBlock ¶
func (s *Erroring) SubmitBeaconBlock(ctx context.Context, block *spec.VersionedSignedBeaconBlock) error
SubmitBeaconBlock submits a beacon block.
func (*Erroring) SubmitBeaconCommitteeSubscriptions ¶
func (s *Erroring) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription) error
SubmitBeaconCommitteeSubscriptions subscribes to beacon committees.
func (*Erroring) SubmitBlindedBeaconBlock ¶ added in v0.11.6
func (s *Erroring) SubmitBlindedBeaconBlock(ctx context.Context, block *api.VersionedSignedBlindedBeaconBlock) error
SubmitBlindedBeaconBlock submits a blinded beacon block.
func (*Erroring) SubmitProposalPreparations ¶ added in v0.11.6
func (s *Erroring) SubmitProposalPreparations(ctx context.Context, preparations []*apiv1.ProposalPreparation) error
SubmitProposalPreparations submits proposal preparations.
func (*Erroring) SubmitSyncCommitteeContributions ¶ added in v0.9.2
func (s *Erroring) SubmitSyncCommitteeContributions(ctx context.Context, contributionAndProofs []*altair.SignedContributionAndProof) error
SubmitSyncCommitteeContributions submits sync committee contributions.
func (*Erroring) SubmitSyncCommitteeMessages ¶ added in v0.9.0
func (s *Erroring) SubmitSyncCommitteeMessages(ctx context.Context, messages []*altair.SyncCommitteeMessage) error
SubmitSyncCommitteeMessages submits sync committee messages.
func (*Erroring) SubmitSyncCommitteeSubscriptions ¶ added in v0.9.0
func (s *Erroring) SubmitSyncCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.SyncCommitteeSubscription) error
SubmitSyncCommitteeSubscriptions subscribes to sync committees.
func (*Erroring) SubmitValidatorRegistrations ¶ added in v0.12.0
func (s *Erroring) SubmitValidatorRegistrations(ctx context.Context, registrations []*api.VersionedSignedValidatorRegistration) error
SubmitValidatorRegistrations submits a validator registration.
func (*Erroring) SubmitVoluntaryExit ¶
func (s *Erroring) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *phase0.SignedVoluntaryExit) error
SubmitVoluntaryExit submits a voluntary exit.
func (*Erroring) SyncCommittee ¶ added in v0.9.2
SyncCommittee fetches the sync committee for the given state.
func (*Erroring) SyncCommitteeAtEpoch ¶ added in v0.9.2
func (s *Erroring) SyncCommitteeAtEpoch(ctx context.Context, stateID string, epoch phase0.Epoch) (*apiv1.SyncCommittee, error)
SyncCommitteeAtEpoch fetches the sync committee for the given epoch at the given state.
func (*Erroring) SyncCommitteeContribution ¶ added in v0.9.2
func (s *Erroring) SyncCommitteeContribution(ctx context.Context, slot phase0.Slot, subcommitteeIndex uint64, beaconBlockRoot phase0.Root) (*altair.SyncCommitteeContribution, error)
SyncCommitteeContribution provides a sync committee contribution.
func (*Erroring) SyncCommitteeDuties ¶ added in v0.9.0
func (s *Erroring) SyncCommitteeDuties(ctx context.Context, epoch phase0.Epoch, validatorIndices []phase0.ValidatorIndex) ([]*apiv1.SyncCommitteeDuty, error)
SyncCommitteeDuties obtains sync committee duties. If validatorIndicess is nil it will return all duties for the given epoch.
func (*Erroring) TargetAggregatorsPerCommittee ¶
TargetAggregatorsPerCommittee provides the target number of aggregators for each attestation committee.
func (*Erroring) ValidatorBalances ¶
func (s *Erroring) ValidatorBalances(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]phase0.Gwei, error)
ValidatorBalances provides the validator balances for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validatorIndices is a list of validator indices to restrict the returned values. If no validators are supplied no filter will be applied.
func (*Erroring) Validators ¶
func (s *Erroring) Validators(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
Validators provides the validators, with their balance and status, for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validatorIndices is a list of validator indices to restrict the returned values. If no validators IDs are supplied no filter will be applied.
func (*Erroring) ValidatorsByPubKey ¶
func (s *Erroring) ValidatorsByPubKey(ctx context.Context, stateID string, validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
ValidatorsByPubKey provides the validators, with their balance and status, for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validatorPubKeys is a list of validator public keys to restrict the returned values. If no validators public keys are supplied no filter will be applied.
type Sleepy ¶
type Sleepy struct {
// contains filtered or unexported fields
}
Sleepy is an Ethereum 2 client that sleeps for a random amount of time within a set of bounds before continuing.
func (*Sleepy) AggregateAttestation ¶
func (s *Sleepy) AggregateAttestation(ctx context.Context, slot phase0.Slot, attestationDataRoot phase0.Root) (*phase0.Attestation, error)
AggregateAttestation fetches the aggregate attestation given an attestation.
func (*Sleepy) AttestationData ¶
func (s *Sleepy) AttestationData(ctx context.Context, slot phase0.Slot, committeeIndex phase0.CommitteeIndex) (*phase0.AttestationData, error)
AttestationData fetches the attestation data for the given slot and committee index.
func (*Sleepy) AttestationPool ¶
func (s *Sleepy) AttestationPool(ctx context.Context, slot phase0.Slot) ([]*phase0.Attestation, error)
AttestationPool fetches the attestation pool for the given slot.
func (*Sleepy) AttesterDuties ¶
func (s *Sleepy) AttesterDuties(ctx context.Context, epoch phase0.Epoch, validatorIndices []phase0.ValidatorIndex) ([]*apiv1.AttesterDuty, error)
AttesterDuties obtains attester duties. If validatorIndicess is nil it will return all duties for the given epoch.
func (*Sleepy) BeaconBlockHeader ¶
func (s *Sleepy) BeaconBlockHeader(ctx context.Context, blockID string) (*apiv1.BeaconBlockHeader, error)
BeaconBlockHeader provides the block header of a given block ID.
func (*Sleepy) BeaconBlockProposal ¶
func (s *Sleepy) BeaconBlockProposal(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, graffiti []byte) (*spec.VersionedBeaconBlock, error)
BeaconBlockProposal fetches a proposed beacon block for signing.
func (*Sleepy) BeaconState ¶
func (s *Sleepy) BeaconState(ctx context.Context, stateID string) (*spec.VersionedBeaconState, error)
BeaconState fetches a beacon state.
func (*Sleepy) Domain ¶
func (s *Sleepy) Domain(ctx context.Context, domainType phase0.DomainType, epoch phase0.Epoch) (phase0.Domain, error)
Domain provides a domain for a given domain type at a given epoch.
func (*Sleepy) EpochFromStateID ¶
EpochFromStateID converts a state ID to its epoch.
func (*Sleepy) Events ¶
func (s *Sleepy) Events(ctx context.Context, topics []string, handler consensusclient.EventHandlerFunc) error
Events feeds requested events with the given topics to the supplied handler.
func (*Sleepy) FarFutureEpoch ¶
FarFutureEpoch provides the far future epoch of the chain.
func (*Sleepy) ForkSchedule ¶
ForkSchedule provides details of past and future changes in the chain's fork version.
func (*Sleepy) GenesisDomain ¶ added in v0.15.5
func (s *Sleepy) GenesisDomain(ctx context.Context, domainType phase0.DomainType) (phase0.Domain, error)
GenesisDomain provides a domain for a given domain type at genesis.
func (*Sleepy) GenesisTime ¶
GenesisTime provides the genesis time of the chain.
func (*Sleepy) GenesisValidatorsRoot ¶
GenesisValidatorsRoot provides the genesis validators root of the chain.
func (*Sleepy) NodeSyncing ¶
NodeSyncing provides the state of the node's synchronization with the chain.
func (*Sleepy) NodeVersion ¶
NodeVersion returns a free-text string with the node version.
func (*Sleepy) ProposerDuties ¶
func (s *Sleepy) ProposerDuties(ctx context.Context, epoch phase0.Epoch, validatorIndices []phase0.ValidatorIndex) ([]*apiv1.ProposerDuty, error)
ProposerDuties obtains proposer duties for the given epoch. If validatorIndices is empty all duties are returned, otherwise only matching duties are returned.
func (*Sleepy) SlotDuration ¶
SlotDuration provides the duration of a slot of the chain.
func (*Sleepy) SlotFromStateID ¶
SlotFromStateID converts a state ID to its slot.
func (*Sleepy) SlotsPerEpoch ¶
SlotsPerEpoch provides the slots per epoch of the chain.
func (*Sleepy) SubmitAggregateAttestations ¶
func (s *Sleepy) SubmitAggregateAttestations(ctx context.Context, aggregateAndProofs []*phase0.SignedAggregateAndProof) error
SubmitAggregateAttestations submits aggregate attestations.
func (*Sleepy) SubmitAttestations ¶
SubmitAttestations submits attestations.
func (*Sleepy) SubmitBeaconBlock ¶
func (s *Sleepy) SubmitBeaconBlock(ctx context.Context, block *spec.VersionedSignedBeaconBlock) error
SubmitBeaconBlock submits a beacon block.
func (*Sleepy) SubmitBeaconCommitteeSubscriptions ¶
func (s *Sleepy) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription) error
SubmitBeaconCommitteeSubscriptions subscribes to beacon committees.
func (*Sleepy) SubmitBlindedBeaconBlock ¶ added in v0.11.6
func (s *Sleepy) SubmitBlindedBeaconBlock(ctx context.Context, block *api.VersionedSignedBlindedBeaconBlock) error
SubmitBlindedBeaconBlock submits a beacon block.
func (*Sleepy) SubmitProposalPreparations ¶ added in v0.11.6
func (s *Sleepy) SubmitProposalPreparations(ctx context.Context, preparations []*apiv1.ProposalPreparation) error
SubmitProposalPreparations submits proposal preparations.
func (*Sleepy) SubmitValidatorRegistrations ¶ added in v0.12.0
func (s *Sleepy) SubmitValidatorRegistrations(ctx context.Context, registrations []*api.VersionedSignedValidatorRegistration) error
SubmitValidatorRegistrations submits a validator registration.
func (*Sleepy) SubmitVoluntaryExit ¶
func (s *Sleepy) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *phase0.SignedVoluntaryExit) error
SubmitVoluntaryExit submits a voluntary exit.
func (*Sleepy) TargetAggregatorsPerCommittee ¶
TargetAggregatorsPerCommittee provides the target number of aggregators for each attestation committee.
func (*Sleepy) ValidatorBalances ¶
func (s *Sleepy) ValidatorBalances(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]phase0.Gwei, error)
ValidatorBalances provides the validator balances for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validatorIndices is a list of validator indices to restrict the returned values. If no validators are supplied no filter will be applied.
func (*Sleepy) Validators ¶
func (s *Sleepy) Validators(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
Validators provides the validators, with their balance and status, for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validatorIndices is a list of validator indices to restrict the returned values. If no validators IDs are supplied no filter will be applied.
func (*Sleepy) ValidatorsByPubKey ¶
func (s *Sleepy) ValidatorsByPubKey(ctx context.Context, stateID string, validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
ValidatorsByPubKey provides the validators, with their balance and status, for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validatorPubKeys is a list of validator public keys to restrict the returned values. If no validators public keys are supplied no filter will be applied.