Documentation
¶
Index ¶
- func BlockRandomness(header *types.Header, state vm.StateDB, blockNumber uint64) (common.Hash, error)
- func ComputeCommitment(header *types.Header, state vm.StateDB, randomness common.Hash) (common.Hash, error)
- func GetLastCommitment(validator common.Address, header *types.Header, state vm.StateDB) (common.Hash, error)
- func IsRunning() bool
- func Random(header *types.Header, state vm.StateDB) (common.Hash, error)
- func RevealAndCommit(randomness, newCommitment common.Hash, proposer common.Address, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockRandomness ¶
func ComputeCommitment ¶
func ComputeCommitment(header *types.Header, state vm.StateDB, randomness common.Hash) (common.Hash, error)
ComputeCommitment calulcates the commitment for a given randomness.
func GetLastCommitment ¶
func GetLastCommitment(validator common.Address, header *types.Header, state vm.StateDB) (common.Hash, error)
GetLastCommitment returns up the last commitment in the smart contract
func Random ¶
Random performs an internal call to the EVM to retrieve the current randomness from the official Random contract.
func RevealAndCommit ¶
func RevealAndCommit(randomness, newCommitment common.Hash, proposer common.Address, header *types.Header, state vm.StateDB) error
RevealAndCommit performs an internal call to the EVM that reveals a proposer's previously committed to randomness, and commits new randomness for a future block.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.