Documentation
¶
Index ¶
- Variables
- func IsValidFarFutureEpoch(network core.Network, epoch uint64) bool
- func IsValidFarFutureSlot(network core.Network, slot uint64) bool
- 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(block *eth.BeaconBlock, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignEpoch(epoch uint64, domain []byte, pubKey []byte) ([]byte, error)
- func (signer *SimpleSigner) SignSlot(slot uint64, domain []byte, pubKey []byte) ([]byte, error)
- type ValidatorSigner
Constants ¶
This section is empty.
Variables ¶
View Source
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
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(block *eth.BeaconBlock, domain []byte, pubKey []byte) ([]byte, error)
SignBeaconBlock signs the given beacon block
type ValidatorSigner ¶
type ValidatorSigner interface {
SignBeaconBlock(block *eth.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 uint64, domain []byte, pubKey []byte) ([]byte, error)
SignEpoch(epoch uint64, domain []byte, pubKey []byte) ([]byte, error)
}
ValidatorSigner represents the behavior of the validator signer
Click to show internal directories.
Click to hide internal directories.
