This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
pallet-lottery: deal with randomness freshness #8311
Labels
I2-security
The client fails to follow expected, security-sensitive, behaviour.
#8180 changed the randomness API to also explicitly return how fresh some random material is. In order to safely use this entropy any commitments based on it must have been made before the randomness was known. In the context of the lottery pallet it means that people should only be able to sign up for the lottery to the point where we fetch the random data that will decide the winner, e.g. we accept new participants until block #50, on block #50 we get new (fresh) random material which is used later on to randomly select the winner.
The text was updated successfully, but these errors were encountered: