You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fisher-yates randomness relies on the sampling of a random number modulo a moduli. Distribution of the output permutation depends on the distribution of the integer sampling.
Cadence v1 offers a uniformly distributed random function revertibleRandom(modulo) that should be used instead of the modulo operator % to avoid the known modulo bias.
Problem
Fisher-yates randomness relies on the sampling of a random number modulo a moduli. Distribution of the output permutation depends on the distribution of the integer sampling.
Cadence v1 offers a uniformly distributed random function
revertibleRandom(modulo)
that should be used instead of the modulo operator%
to avoid the known modulo bias.Current implementation is
flow-core-contracts/contracts/epochs/FlowEpoch.cdc
Line 894 in bcf77ee
The text was updated successfully, but these errors were encountered: