I want to understand how to generate chainlink VRF 2

32 views Asked by At

I want to understand how random number is generating in node? How many nodes are generating? Can we debug node's RNG process? If so how? And I cant connect to other nodes to see how P2P is working. Please help me guys to understand how its working ))

1

There are 1 answers

0
Andrej On

Chainlink VRF is an implementation of Goldberg’s Verifiable Random Function as described in this paper: https://eprint.iacr.org/2017/099.pdf

With every new request for randomness, Chainlink VRF generates a random number and cryptographic proof of how that number was determined: https://github.com/smartcontractkit/chainlink/blob/develop/core/services/vrf/proof/proof_response.go#L105

The proof is published and verified on-chain before it can be used by any consuming applications, or in Layman's terms if you received a callback with random values, those values are indeed verified as truly random: https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/vrf/VRF.sol