Documentation
¶
Index ¶
- Variables
- func IsValidFarFutureEpoch(network core.Network, epoch types.Epoch) bool
- func IsValidFarFutureSlot(network core.Network, slot types.Slot) bool
- func TEMPORARYPhase0BlockConversion(b block.BeaconBlock) *ethpb.BeaconBlock
- type SimpleSigner
- func (signer *SimpleSigner) SignAggregateAndProof(agg *eth.AggregateAttestationAndProof, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignBeaconAttestation(attestation *eth.AttestationData, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignBeaconBlock(b block.BeaconBlock, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignEpoch(epoch types.Epoch, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignSlot(slot types.Slot, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignSyncCommittee(msgBlockRoot []byte, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignSyncCommitteeContributionAndProof(contribAndProof *eth.ContributionAndProof, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignSyncCommitteeSelectionData(data *eth.SyncAggregatorSelectionData, domain []byte, pubKey []byte) ([]byte, error)
- type ValidatorSigner
Constants ¶
This section is empty.
Variables ¶
var FarFutureMaxValidEpoch = int64(time.Minute.Seconds() * 20)
FarFutureMaxValidEpoch is the max epoch of far future signing
Functions ¶
func IsValidFarFutureEpoch ¶
IsValidFarFutureEpoch prevents far into the future signing request, verify a slot is within the current epoch https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/validator.md#protection-best-practices
func IsValidFarFutureSlot ¶
IsValidFarFutureSlot returns true if the given slot is valid
func TEMPORARYPhase0BlockConversion ¶ added in v1.1.1
func TEMPORARYPhase0BlockConversion(b block.BeaconBlock) *ethpb.BeaconBlock
TEMPORARYPhase0BlockConversion takes prysm's beacon block interface and converts it to phase0 block
Types ¶
type SimpleSigner ¶
type SimpleSigner struct {
// contains filtered or unexported fields
}
SimpleSigner implements ValidatorSigner interface
func NewSimpleSigner ¶
func NewSimpleSigner(wallet core.Wallet, slashingProtector core.SlashingProtector, network core.Network) *SimpleSigner
NewSimpleSigner is the constructor of SimpleSigner
func (*SimpleSigner) SignAggregateAndProof ¶
func (signer *SimpleSigner) SignAggregateAndProof(agg *eth.AggregateAttestationAndProof, domain []byte, pubKey []byte) ([]byte, error)
SignAggregateAndProof signs aggregate and proof
func (*SimpleSigner) SignBeaconAttestation ¶
func (signer *SimpleSigner) SignBeaconAttestation(attestation *eth.AttestationData, domain []byte, pubKey []byte) ([]byte, error)
SignBeaconAttestation signs beacon attestation data
func (*SimpleSigner) SignBeaconBlock ¶
func (signer *SimpleSigner) SignBeaconBlock(b block.BeaconBlock, domain []byte, pubKey []byte) ([]byte, error)
SignBeaconBlock signs the given beacon block
func (*SimpleSigner) SignEpoch ¶
func (signer *SimpleSigner) SignEpoch(epoch types.Epoch, domain []byte, pubKey []byte) ([]byte, error)
SignEpoch signs the given epoch
func (*SimpleSigner) SignSyncCommittee ¶ added in v1.1.1
func (signer *SimpleSigner) SignSyncCommittee(msgBlockRoot []byte, domain []byte, pubKey []byte) ([]byte, error)
SignSyncCommittee sign sync committee
func (*SimpleSigner) SignSyncCommitteeContributionAndProof ¶ added in v1.1.1
func (signer *SimpleSigner) SignSyncCommitteeContributionAndProof(contribAndProof *eth.ContributionAndProof, domain []byte, pubKey []byte) ([]byte, error)
SignSyncCommitteeContributionAndProof sign sync committee
func (*SimpleSigner) SignSyncCommitteeSelectionData ¶ added in v1.1.1
func (signer *SimpleSigner) SignSyncCommitteeSelectionData(data *eth.SyncAggregatorSelectionData, domain []byte, pubKey []byte) ([]byte, error)
SignSyncCommitteeSelectionData sign sync committee slection data
type ValidatorSigner ¶
type ValidatorSigner interface {
SignBeaconBlock(block block.BeaconBlock, domain []byte, pubKey []byte) ([]byte, error)
SignBeaconAttestation(attestation *eth.AttestationData, domain []byte, pubKey []byte) ([]byte, error)
SignAggregateAndProof(agg *eth.AggregateAttestationAndProof, domain []byte, pubKey []byte) ([]byte, error)
SignSlot(slot types.Slot, domain []byte, pubKey []byte) ([]byte, error)
SignEpoch(epoch types.Epoch, domain []byte, pubKey []byte) ([]byte, error)
SignSyncCommittee(msgBlockRoot []byte, domain []byte, pubKey []byte) ([]byte, error)
SignSyncCommitteeSelectionData(data *eth.SyncAggregatorSelectionData, domain []byte, pubKey []byte) ([]byte, error)
SignSyncCommitteeContributionAndProof(contribAndProof *eth.ContributionAndProof, domain []byte, pubKey []byte) ([]byte, error)
}
ValidatorSigner represents the behavior of the validator signer
