currentSeed
getter.currentSeed
from the final block of a reveal phase or during a commit phase.currentSeed
getter. It is important to check the phase (commit
or reveal
) and determine when the value is created. Details are available on the Accessing a Random Seed with a Smart Contract page.N + 1
, only for some block between N + commitRoundLength
and N + 2*commitRoundLength
.currentSeed
value is used to seed a generator. However, as soon as the seed is known, the whole sequence is known! To add additional entropy, the seed may be salted with the block hash, however this method is still not considered secure.hash(currentseed+0)
, hash(currentseed+1)
, hash(currentseed+2)
, etc., or something similar (e.g. hash(currentseed+previousHash)
). Limitations of this method (regarding security and speed) are discussed here: https://stackoverflow.com/questions/14467805/can-a-cryptographic-hash-algorithm-be-used-as-a-prng