Trait fvm::kernel::RandomnessOps
source · [−]pub trait RandomnessOps {
fn get_randomness_from_tickets(
&mut self,
personalization: DomainSeparationTag,
rand_epoch: ChainEpoch,
entropy: &[u8]
) -> Result<[u8; 32]>;
fn get_randomness_from_beacon(
&mut self,
personalization: DomainSeparationTag,
rand_epoch: ChainEpoch,
entropy: &[u8]
) -> Result<[u8; 32]>;
}Expand description
Randomness queries.
Required Methods
fn get_randomness_from_tickets(
&mut self,
personalization: DomainSeparationTag,
rand_epoch: ChainEpoch,
entropy: &[u8]
) -> Result<[u8; 32]>
fn get_randomness_from_tickets(
&mut self,
personalization: DomainSeparationTag,
rand_epoch: ChainEpoch,
entropy: &[u8]
) -> Result<[u8; 32]>
Randomness returns a (pseudo)random byte array drawing from the latest ticket chain from a given epoch and incorporating requisite entropy. This randomness is fork dependant but also biasable because of this.
fn get_randomness_from_beacon(
&mut self,
personalization: DomainSeparationTag,
rand_epoch: ChainEpoch,
entropy: &[u8]
) -> Result<[u8; 32]>
fn get_randomness_from_beacon(
&mut self,
personalization: DomainSeparationTag,
rand_epoch: ChainEpoch,
entropy: &[u8]
) -> Result<[u8; 32]>
Randomness returns a (pseudo)random byte array drawing from the latest beacon from a given epoch and incorporating requisite entropy. This randomness is not tied to any fork of the chain, and is unbiasable.