Documentation ¶
Index ¶
- func NewErroring(ctx context.Context, errorRate float64, next eth2client.Service) (eth2client.Service, error)
- func NewSleepy(ctx context.Context, minSleep time.Duration, maxSleep time.Duration, ...) (eth2client.Service, error)
- type Erroring
- func (s *Erroring) Address() string
- func (s *Erroring) AggregateAndProofDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Erroring) AggregateAttestation(ctx context.Context, slot spec.Slot, attestationDataRoot spec.Root) (*spec.Attestation, error)
- func (s *Erroring) AttestationData(ctx context.Context, slot spec.Slot, committeeIndex spec.CommitteeIndex) (*spec.AttestationData, error)
- func (s *Erroring) AttestationPool(ctx context.Context, slot spec.Slot) ([]*spec.Attestation, error)
- func (s *Erroring) AttesterDuties(ctx context.Context, epoch spec.Epoch, validatorIndices []spec.ValidatorIndex) ([]*api.AttesterDuty, error)
- func (s *Erroring) BeaconAttesterDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Erroring) BeaconBlockHeader(ctx context.Context, blockID string) (*api.BeaconBlockHeader, error)
- func (s *Erroring) BeaconBlockProposal(ctx context.Context, slot spec.Slot, randaoReveal spec.BLSSignature, ...) (*spec.BeaconBlock, error)
- func (s *Erroring) BeaconProposerDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Erroring) BeaconState(ctx context.Context, stateID string) (*spec.BeaconState, error)
- func (s *Erroring) DepositDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Erroring) Domain(ctx context.Context, domainType spec.DomainType, epoch spec.Epoch) (spec.Domain, error)
- func (s *Erroring) EpochFromStateID(ctx context.Context, stateID string) (spec.Epoch, error)
- func (s *Erroring) Events(ctx context.Context, topics []string, handler eth2client.EventHandlerFunc) error
- func (s *Erroring) FarFutureEpoch(ctx context.Context) (spec.Epoch, error)
- func (s *Erroring) Finality(ctx context.Context, stateID string) (*api.Finality, error)
- func (s *Erroring) Fork(ctx context.Context, stateID string) (*spec.Fork, error)
- func (s *Erroring) ForkSchedule(ctx context.Context) ([]*spec.Fork, error)
- func (s *Erroring) Genesis(ctx context.Context) (*api.Genesis, 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) (*api.SyncState, error)
- func (s *Erroring) NodeVersion(ctx context.Context) (string, error)
- func (s *Erroring) ProposerDuties(ctx context.Context, epoch spec.Epoch, validatorIndices []spec.ValidatorIndex) ([]*api.ProposerDuty, error)
- func (s *Erroring) PrysmAttesterDuties(ctx context.Context, epoch spec.Epoch, validatorPubKeys []spec.BLSPubKey) ([]*api.AttesterDuty, error)
- func (s *Erroring) PrysmProposerDuties(ctx context.Context, epoch spec.Epoch, validatorPubKeys []spec.BLSPubKey) ([]*api.ProposerDuty, error)
- func (s *Erroring) PrysmValidatorBalances(ctx context.Context, stateID string, validatorPubKeys []spec.BLSPubKey) (map[spec.ValidatorIndex]spec.Gwei, error)
- func (s *Erroring) RANDAODomain(ctx context.Context) (spec.DomainType, error)
- func (s *Erroring) SelectionProofDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Erroring) SlotDuration(ctx context.Context) (time.Duration, error)
- func (s *Erroring) SlotFromStateID(ctx context.Context, stateID string) (spec.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 []*spec.SignedAggregateAndProof) error
- func (s *Erroring) SubmitAttestations(ctx context.Context, attestations []*spec.Attestation) error
- func (s *Erroring) SubmitBeaconBlock(ctx context.Context, block *spec.SignedBeaconBlock) error
- func (s *Erroring) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*api.BeaconCommitteeSubscription) error
- func (s *Erroring) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *spec.SignedVoluntaryExit) error
- func (s *Erroring) TargetAggregatorsPerCommittee(ctx context.Context) (uint64, error)
- func (s *Erroring) ValidatorBalances(ctx context.Context, stateID string, validatorIndices []spec.ValidatorIndex) (map[spec.ValidatorIndex]spec.Gwei, error)
- func (s *Erroring) Validators(ctx context.Context, stateID string, validatorIndices []spec.ValidatorIndex) (map[spec.ValidatorIndex]*api.Validator, error)
- func (s *Erroring) ValidatorsByPubKey(ctx context.Context, stateID string, validatorPubKeys []spec.BLSPubKey) (map[spec.ValidatorIndex]*api.Validator, error)
- func (s *Erroring) VoluntaryExitDomain(ctx context.Context) (spec.DomainType, error)
- type Sleepy
- func (s *Sleepy) Address() string
- func (s *Sleepy) AggregateAndProofDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Sleepy) AggregateAttestation(ctx context.Context, slot spec.Slot, attestationDataRoot spec.Root) (*spec.Attestation, error)
- func (s *Sleepy) AttestationData(ctx context.Context, slot spec.Slot, committeeIndex spec.CommitteeIndex) (*spec.AttestationData, error)
- func (s *Sleepy) AttestationPool(ctx context.Context, slot spec.Slot) ([]*spec.Attestation, error)
- func (s *Sleepy) AttesterDuties(ctx context.Context, epoch spec.Epoch, validatorIndices []spec.ValidatorIndex) ([]*api.AttesterDuty, error)
- func (s *Sleepy) BeaconAttesterDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Sleepy) BeaconBlockHeader(ctx context.Context, blockID string) (*api.BeaconBlockHeader, error)
- func (s *Sleepy) BeaconBlockProposal(ctx context.Context, slot spec.Slot, randaoReveal spec.BLSSignature, ...) (*spec.BeaconBlock, error)
- func (s *Sleepy) BeaconProposerDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Sleepy) BeaconState(ctx context.Context, stateID string) (*spec.BeaconState, error)
- func (s *Sleepy) DepositDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Sleepy) Domain(ctx context.Context, domainType spec.DomainType, epoch spec.Epoch) (spec.Domain, error)
- func (s *Sleepy) EpochFromStateID(ctx context.Context, stateID string) (spec.Epoch, error)
- func (s *Sleepy) Events(ctx context.Context, topics []string, handler eth2client.EventHandlerFunc) error
- func (s *Sleepy) FarFutureEpoch(ctx context.Context) (spec.Epoch, error)
- func (s *Sleepy) Finality(ctx context.Context, stateID string) (*api.Finality, error)
- func (s *Sleepy) Fork(ctx context.Context, stateID string) (*spec.Fork, error)
- func (s *Sleepy) ForkSchedule(ctx context.Context) ([]*spec.Fork, error)
- func (s *Sleepy) Genesis(ctx context.Context) (*api.Genesis, 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) (*api.SyncState, error)
- func (s *Sleepy) NodeVersion(ctx context.Context) (string, error)
- func (s *Sleepy) ProposerDuties(ctx context.Context, epoch spec.Epoch, validatorIndices []spec.ValidatorIndex) ([]*api.ProposerDuty, error)
- func (s *Sleepy) PrysmAttesterDuties(ctx context.Context, epoch spec.Epoch, validatorPubKeys []spec.BLSPubKey) ([]*api.AttesterDuty, error)
- func (s *Sleepy) PrysmProposerDuties(ctx context.Context, epoch spec.Epoch, validatorPubKeys []spec.BLSPubKey) ([]*api.ProposerDuty, error)
- func (s *Sleepy) PrysmValidatorBalances(ctx context.Context, stateID string, validatorPubKeys []spec.BLSPubKey) (map[spec.ValidatorIndex]spec.Gwei, error)
- func (s *Sleepy) RANDAODomain(ctx context.Context) (spec.DomainType, error)
- func (s *Sleepy) SelectionProofDomain(ctx context.Context) (spec.DomainType, error)
- func (s *Sleepy) SlotDuration(ctx context.Context) (time.Duration, error)
- func (s *Sleepy) SlotFromStateID(ctx context.Context, stateID string) (spec.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 []*spec.SignedAggregateAndProof) error
- func (s *Sleepy) SubmitAttestations(ctx context.Context, attestations []*spec.Attestation) error
- func (s *Sleepy) SubmitBeaconBlock(ctx context.Context, block *spec.SignedBeaconBlock) error
- func (s *Sleepy) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*api.BeaconCommitteeSubscription) error
- func (s *Sleepy) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *spec.SignedVoluntaryExit) error
- func (s *Sleepy) TargetAggregatorsPerCommittee(ctx context.Context) (uint64, error)
- func (s *Sleepy) ValidatorBalances(ctx context.Context, stateID string, validatorIndices []spec.ValidatorIndex) (map[spec.ValidatorIndex]spec.Gwei, error)
- func (s *Sleepy) Validators(ctx context.Context, stateID string, validatorIndices []spec.ValidatorIndex) (map[spec.ValidatorIndex]*api.Validator, error)
- func (s *Sleepy) ValidatorsByPubKey(ctx context.Context, stateID string, validatorPubKeys []spec.BLSPubKey) (map[spec.ValidatorIndex]*api.Validator, error)
- func (s *Sleepy) VoluntaryExitDomain(ctx context.Context) (spec.DomainType, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErroring ¶
func NewErroring(ctx context.Context, errorRate float64, next eth2client.Service, ) (eth2client.Service, error)
NewErroring creates a new Ethereum 2 client that errors at a given rate.
func NewSleepy ¶
func NewSleepy(ctx context.Context, minSleep time.Duration, maxSleep time.Duration, next eth2client.Service, ) (eth2client.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) AggregateAndProofDomain ¶
AggregateAndProofDomain provides the aggregate and proof domain.
func (*Erroring) AggregateAttestation ¶
func (s *Erroring) AggregateAttestation(ctx context.Context, slot spec.Slot, attestationDataRoot spec.Root) (*spec.Attestation, error)
AggregateAttestation fetches the aggregate attestation given an attestation.
func (*Erroring) AttestationData ¶
func (s *Erroring) AttestationData(ctx context.Context, slot spec.Slot, committeeIndex spec.CommitteeIndex) (*spec.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 spec.Slot) ([]*spec.Attestation, error)
AttestationPool fetches the attestation pool for the given slot.
func (*Erroring) AttesterDuties ¶
func (s *Erroring) AttesterDuties(ctx context.Context, epoch spec.Epoch, validatorIndices []spec.ValidatorIndex) ([]*api.AttesterDuty, error)
AttesterDuties obtains attester duties. If validatorIndicess is nil it will return all duties for the given epoch.
func (*Erroring) BeaconAttesterDomain ¶
BeaconAttesterDomain provides the beacon attester domain.
func (*Erroring) BeaconBlockHeader ¶
func (s *Erroring) BeaconBlockHeader(ctx context.Context, blockID string) (*api.BeaconBlockHeader, error)
BeaconBlockHeader provides the block header of a given block ID.
func (*Erroring) BeaconBlockProposal ¶
func (s *Erroring) BeaconBlockProposal(ctx context.Context, slot spec.Slot, randaoReveal spec.BLSSignature, graffiti []byte) (*spec.BeaconBlock, error)
BeaconBlockProposal fetches a proposed beacon block for signing.
func (*Erroring) BeaconProposerDomain ¶
BeaconProposerDomain provides the beacon proposer domain.
func (*Erroring) BeaconState ¶
BeaconState fetches a beacon state.
func (*Erroring) DepositDomain ¶
DepositDomain provides the deposit domain.
func (*Erroring) Domain ¶
func (s *Erroring) Domain(ctx context.Context, domainType spec.DomainType, epoch spec.Epoch) (spec.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 eth2client.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) 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 spec.Epoch, validatorIndices []spec.ValidatorIndex) ([]*api.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) PrysmAttesterDuties ¶
func (s *Erroring) PrysmAttesterDuties(ctx context.Context, epoch spec.Epoch, validatorPubKeys []spec.BLSPubKey) ([]*api.AttesterDuty, error)
PrysmAttesterDuties obtains attester duties with prysm-specific parameters.
func (*Erroring) PrysmProposerDuties ¶
func (s *Erroring) PrysmProposerDuties(ctx context.Context, epoch spec.Epoch, validatorPubKeys []spec.BLSPubKey) ([]*api.ProposerDuty, error)
PrysmProposerDuties obtains proposer duties with prysm-specific parameters.
func (*Erroring) PrysmValidatorBalances ¶
func (s *Erroring) PrysmValidatorBalances(ctx context.Context, stateID string, validatorPubKeys []spec.BLSPubKey) (map[spec.ValidatorIndex]spec.Gwei, error)
PrysmValidatorBalances 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". validatorIDs is a list of validator indices to restrict the returned values. If no validators are supplied no filter will be applied.
func (*Erroring) RANDAODomain ¶
RANDAODomain provides the RANDAO domain.
func (*Erroring) SelectionProofDomain ¶
SelectionProofDomain provides the selection proof domain.
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 []*spec.SignedAggregateAndProof) error
SubmitAggregateAttestations submits aggregate attestations.
func (*Erroring) SubmitAttestations ¶
SubmitAttestations submits attestations.
func (*Erroring) SubmitBeaconBlock ¶
SubmitBeaconBlock submits a beacon block.
func (*Erroring) SubmitBeaconCommitteeSubscriptions ¶
func (s *Erroring) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*api.BeaconCommitteeSubscription) error
SubmitBeaconCommitteeSubscriptions subscribes to beacon committees.
func (*Erroring) SubmitVoluntaryExit ¶
func (s *Erroring) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *spec.SignedVoluntaryExit) error
SubmitVoluntaryExit submits a voluntary exit.
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 []spec.ValidatorIndex) (map[spec.ValidatorIndex]spec.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 []spec.ValidatorIndex) (map[spec.ValidatorIndex]*api.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 []spec.BLSPubKey) (map[spec.ValidatorIndex]*api.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.
func (*Erroring) VoluntaryExitDomain ¶
VoluntaryExitDomain provides the voluntary exit domain.
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) AggregateAndProofDomain ¶
AggregateAndProofDomain provides the aggregate and proof domain.
func (*Sleepy) AggregateAttestation ¶
func (s *Sleepy) AggregateAttestation(ctx context.Context, slot spec.Slot, attestationDataRoot spec.Root) (*spec.Attestation, error)
AggregateAttestation fetches the aggregate attestation given an attestation.
func (*Sleepy) AttestationData ¶
func (s *Sleepy) AttestationData(ctx context.Context, slot spec.Slot, committeeIndex spec.CommitteeIndex) (*spec.AttestationData, error)
AttestationData fetches the attestation data for the given slot and committee index.
func (*Sleepy) AttestationPool ¶
AttestationPool fetches the attestation pool for the given slot.
func (*Sleepy) AttesterDuties ¶
func (s *Sleepy) AttesterDuties(ctx context.Context, epoch spec.Epoch, validatorIndices []spec.ValidatorIndex) ([]*api.AttesterDuty, error)
AttesterDuties obtains attester duties. If validatorIndicess is nil it will return all duties for the given epoch.
func (*Sleepy) BeaconAttesterDomain ¶
BeaconAttesterDomain provides the beacon attester domain.
func (*Sleepy) BeaconBlockHeader ¶
func (s *Sleepy) BeaconBlockHeader(ctx context.Context, blockID string) (*api.BeaconBlockHeader, error)
BeaconBlockHeader provides the block header of a given block ID.
func (*Sleepy) BeaconBlockProposal ¶
func (s *Sleepy) BeaconBlockProposal(ctx context.Context, slot spec.Slot, randaoReveal spec.BLSSignature, graffiti []byte) (*spec.BeaconBlock, error)
BeaconBlockProposal fetches a proposed beacon block for signing.
func (*Sleepy) BeaconProposerDomain ¶
BeaconProposerDomain provides the beacon proposer domain.
func (*Sleepy) BeaconState ¶
BeaconState fetches a beacon state.
func (*Sleepy) DepositDomain ¶
DepositDomain provides the deposit domain.
func (*Sleepy) Domain ¶
func (s *Sleepy) Domain(ctx context.Context, domainType spec.DomainType, epoch spec.Epoch) (spec.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 eth2client.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) 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 spec.Epoch, validatorIndices []spec.ValidatorIndex) ([]*api.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) PrysmAttesterDuties ¶
func (s *Sleepy) PrysmAttesterDuties(ctx context.Context, epoch spec.Epoch, validatorPubKeys []spec.BLSPubKey) ([]*api.AttesterDuty, error)
PrysmAttesterDuties obtains attester duties with prysm-specific parameters.
func (*Sleepy) PrysmProposerDuties ¶
func (s *Sleepy) PrysmProposerDuties(ctx context.Context, epoch spec.Epoch, validatorPubKeys []spec.BLSPubKey) ([]*api.ProposerDuty, error)
PrysmProposerDuties obtains proposer duties with prysm-specific parameters.
func (*Sleepy) PrysmValidatorBalances ¶
func (s *Sleepy) PrysmValidatorBalances(ctx context.Context, stateID string, validatorPubKeys []spec.BLSPubKey) (map[spec.ValidatorIndex]spec.Gwei, error)
PrysmValidatorBalances 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". validatorIDs is a list of validator indices to restrict the returned values. If no validators are supplied no filter will be applied.
func (*Sleepy) RANDAODomain ¶
RANDAODomain provides the RANDAO domain.
func (*Sleepy) SelectionProofDomain ¶
SelectionProofDomain provides the selection proof domain.
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 []*spec.SignedAggregateAndProof) error
SubmitAggregateAttestations submits aggregate attestations.
func (*Sleepy) SubmitAttestations ¶
SubmitAttestations submits attestations.
func (*Sleepy) SubmitBeaconBlock ¶
SubmitBeaconBlock submits a beacon block.
func (*Sleepy) SubmitBeaconCommitteeSubscriptions ¶
func (s *Sleepy) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*api.BeaconCommitteeSubscription) error
SubmitBeaconCommitteeSubscriptions subscribes to beacon committees.
func (*Sleepy) SubmitVoluntaryExit ¶
func (s *Sleepy) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *spec.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 []spec.ValidatorIndex) (map[spec.ValidatorIndex]spec.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 []spec.ValidatorIndex) (map[spec.ValidatorIndex]*api.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 []spec.BLSPubKey) (map[spec.ValidatorIndex]*api.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.
func (*Sleepy) VoluntaryExitDomain ¶
VoluntaryExitDomain provides the voluntary exit domain.