Trait forest_filecoin::shim::fvm_latest::externs::Rand

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

Randomness provider trait

Required Methods§

source

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

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

source

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

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

Implementors§

source§

impl<DB> Rand for ForestExterns<DB>

source§

impl<T: Rand> Rand for RandWrapper<T>