Trait fvm::externs::Rand

source ·
pub trait Rand {
    // Required methods
    fn get_chain_randomness(&self, round: ChainEpoch) -> Result<[u8; 32]>;
    fn get_beacon_randomness(&self, round: ChainEpoch) -> Result<[u8; 32]>;
}
Expand description

Randomness provider trait

Required Methods§

source

fn get_chain_randomness(&self, round: ChainEpoch) -> Result<[u8; 32]>

Gets 32 bytes of randomness for ChainRand paramaterized by the DomainSeparationTag, ChainEpoch, Entropy from the ticket chain.

source

fn get_beacon_randomness(&self, round: ChainEpoch) -> Result<[u8; 32]>

Gets 32 bytes of randomness for ChainRand paramaterized by the DomainSeparationTag, ChainEpoch, Entropy from the latest beacon entry.

Implementors§