BIP: OP_PRANDOM



Summary:

A suggestion was made to Matthew Roberts to take a look at OP_DETERMINISTICRANDOM from the Elements Project, as it aims to achieve a similar goal. The code for this can be found in the alpha branch. In response to this, Johnson Lau stated that using the hash of multiple blocks does not make it any safer and that the miner of the last block always determines the results. However, to protect the details of contracts that use OP_PRANDOM from the prying eyes of miners, Pay-to-script-hash can be used, and the inclusion of multiple block hashes as a source of randomness is a must. The risk approaches zero as N goes up. Matthew Roberts mentioned a possible solution where the hash of the proof of work hash could be used as part of the number, but he needs to sleep on it for now.


Updated on: 2023-06-11T05:31:15.718292+00:00