# Ethereum 2.0: Randomness

## **Randomness in computers**

**The computer is unable to generate true random numbers.**You can understand this: A computer is a machine that always produces the same output given the same input. They are computational machines, just as a calculator can't add 2 and 2 to get 5 (unless it's a prank or the machine is badly damaged). In order to generate a reasonable random number, the computer will depend on the seed: the starting point of the calculation, the input used to get the output. The seed can be the movement of the mouse cursor on the screen, or it can be all the contents of the Wikipedia database. Above the seed, the computer performs mathematical operations and ends up with a number that humans cannot predict. Even now, if you visit the BitAddress (open source JavaScript Bitcoin Wallet Tool) website (https://www.bitaddress.org/), when you move the mouse, you will notice that the "seed" will change accordingly, this is The website is "collecting randomness" through the irregular movement of your mouse, see the picture below:

## **Randomness in blockchain**

**must be the**same as the random number of all other nodes in the blockchain, otherwise the chain will split: in the same blockchain, if the same The random number of the block is different, which will result in a fork. So how does the blockchain deal with randomness? Some blockchains rely on block hashes to handle randomness. Because the hash value is unknown, random, but the same on all nodes, the hash value can be used as a source of randomness for gambling that is basically plausible.

## **A brief overview of RANDAO**

## **RANDAO + VDF**

**must**first calculate the results of the first and second levels – we can't do this in parallel on multiple computers, because each new input depends on The previous output, and each output requires a predetermined calculation time.

If we now use the random number in RANDAO instead of the number X in the VDF example above, and if the exponent of the function is not six but thousands, and the function is not a square root (^2) but a more complex function, then we You will get a completely different function that will make the result of RANDAO completely different, and it will take a while to calculate this result, no matter how many computers you have.

A RANDAO is published for each time period (epoch), which means we can run a new VDF function every time period (epoch). This means that there will be 16 VDF functions per hour, and there will be 16 random numbers. This randomness will then become the seed for selecting the next set of verifiers, which ensures fairness.

## **Randomness in Nimbus**

**Conclusion**

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

### Was this article helpful?

93 out of 132 found this helpful

Related articles

- Introduction to Blockchain Technology | Atomic Exchange
- How to build a distributed exchange based on atomic interchange technology using Oraclize
- Bai Shuo: From the technical point of view, DeFi feasibility, 3 major challenges, 8 big mistakes, how to crack | 2019 Global Blockchain (Hangzhou) Summit Forum
- Technical Guide | Polkadot Wave Card Chain: Building Pre-POC-3 on Substrate
- Polkadot wave card chain: verify node security and usability aspects
- Popular Science | Read the Bitcoin Schnorr signature in one article
- Plasma: Ethereum chain scalability framework combat part 1