[Runtime] Use Babe instead of Aura #240
Labels
p:high
High priority, prioritize the resolution of this issue
t:maintenance
The issue describes necessary maintenance
BABE provides a mechanism to select the authors of the next block. In that term it is almost identical to AURA, with the difference that multiple block authors can be selected for one slot. AURA uses a round-robin scheme, whereas BABE uses a Verifiable Random Function (VRF) to select the next set of block authors. In BABE, for every epoch, every validator is assigned a weight. For equal chances are weights are equal, in a PoS system the weight is inversely proportional with the stake amount. Every weight is split into n different slots. On every slot, every validator in the set of validators generates a pseudorandom number using the VRF. If the validators random number is less than the weight assigned, then the validator is allowed to produce a block. Along with the random number, a proof is submitted, such that every other participant can verify that this number was indeed pseudorandomly generated. At this point we can see, that it is possible that multiple validators generate numbers less than their weight and therefore multiple validators can have the right to produce a block at a given slot. Therefore temporary forks happen more frequently when using BABE, but this is no greater issue, since a finality mechanism like GRANDPA will ensure (relatively fast), what the finalized canonical chain is.
BABE has (at least) one major advantage. Since the set of validators provides verifiably pseudorandomly generated numbers, a new source of entropy comes into existence in the deterministic low-entropy chain. Every pseudo random number can be cleverly mixed to obtain a good source of entropy and therefore potentially a good random number generator.
Currently we use the Randomness Collective Coin Flip Pallet to generate randomness. This is a very insecure way to generate entropy and should only be used in tests.
The text was updated successfully, but these errors were encountered: