Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidSignature = errors.New("invalid signature")
ErrInvalidSignature is returned when the signature is invalid.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor is the randao processor.
func NewProcessor ¶
NewProcessor creates a new randao processor.
func (*Processor) BuildReveal ¶
func (p *Processor) BuildReveal( st state.BeaconState, ) (primitives.BLSSignature, error)
BuildReveal creates a reveal for the proposer. def get_epoch_signature(state: BeaconState, block: BeaconBlock, privkey: int) -> BLSSignature:
domain = get_domain(state, DOMAIN_RANDAO, compute_epoch_at_slot(block.slot)) signing_root = compute_signing_root( compute_epoch_at_slot(block.slot), domain) return bls.Sign(privkey, signing_root)
func (*Processor) ProcessRandao ¶
func (p *Processor) ProcessRandao( st state.BeaconState, blk beacontypes.BeaconBlock, ) error
ProcessRandao processes the randao reveal. process_randao in the Ethereum 2.0 specification.
func (*Processor) ProcessRandaoMixesReset ¶
func (p *Processor) ProcessRandaoMixesReset(st state.BeaconState) error
ProcessRandaoMixesReset resets the randao mixes. process_randao_mixes_reset in the Ethereum 2.0 specification.
Click to show internal directories.
Click to hide internal directories.