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§
sourcefn get_chain_randomness(&self, round: ChainEpoch) -> Result<[u8; 32]>
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.
sourcefn get_beacon_randomness(&self, round: ChainEpoch) -> Result<[u8; 32]>
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.