clvm icon indicating copy to clipboard operation
clvm copied to clipboard

Generating safe random numbers (VDF related)

Open exander77 opened this issue 4 years ago • 7 comments

Is there a way to generate safe random number securely in Chialisp? Can this functionality be implemented based on VDF?

exander77 avatar May 05 '21 02:05 exander77

Hello, can I get some info about this. I would like to build a project which needs safe random number generation and I was waiting for the Chia as a possible platform because it has VDF.

exander77 avatar May 09 '21 22:05 exander77

I am looking through codes and I am not sure if I can access VDF results inside the contract code.

exander77 avatar May 19 '21 15:05 exander77

It depends on how you defined random. Clearly you can only write deterministic programs, so at best you'll have pseudo random numbers. The question then is what you seed them with.

arvidn avatar May 19 '21 16:05 arvidn

@arvidn I was reading through VDF and if I understand it correctly, VDF basically generates a random number that can anybody can verify, but nobody can arrive at it sooner. It is still deterministic, but because the result of the function is delayed nobody can know it beforehand. I would like to use it inside the smart contract to evaluate an event.

exander77 avatar May 19 '21 17:05 exander77

Any progress on this?

tommy4111 avatar Aug 08 '21 06:08 tommy4111

I don't imagine there will be any progress on this until someone makes a concrete proposal. It would be challenging, because the consensus is already set in stone, and blocks/spend bundles can be validated "in a vacuum", i.e. the clvm program can be executed and validated without knowing which block it might end up in.

arvidn avatar Aug 08 '21 16:08 arvidn

Yep, I am also interested in a solution or in a solution proposal. It would be awesome to have some similar functionality in chia like: https://chain.link/chainlink-vrf

fkornel avatar Jan 20 '22 08:01 fkornel