7

I was under the impression that in proof of stake, or as substrate uses it, nominated proof of stake, the block producers are chosen by stake, into a set known as validator set through phragmen election algorithm. Then this set further goes through slot based block production as assigned randomly by BABE. So I thought using Aura block production was only reserved for permissioned or private networks.

Now I don't know much about Edgeware, but in their runtime I can see a mix of staking, election_provider_multi_phase, sessions and finally aura. This came to me as a surprise because I didn't understand the point of pairing aura with the staking's pallet.

Why are they choosing staking with an aura block producer whereas most chains I've seen use babe? What difference does it make?

1 Answer 1

7

I was under the impression that in proof of stake, or as substrate uses it, nominated proof of stake, the block producers are chosen by stake, into a set known as validator set through phragmen election algorithm. Then this set further goes through slot based block production as assigned randomly by BABE. So I thought using Aura block production was only reserved for permissioned or private networks.

BABE and Aura work fundamentally in the same way. The time is split into slots and each slot has one or more validators assigned to build a block for this slot. You can use both, BABE and Aura, for permissioned networks or for POS networks.

The main difference between BABE and Aura is that you don't know the block authors of each slot in BABE before they produced the block. A VRF (verifiable random function) is used by the BABE block producers to find out if they are eligible to build a block for a given slot. This has the advantage that you can not DOS the block producers to prevent them from building the block. However, Substrate also has the secondary slot "extension" of BABE, which makes these secondary slot authors predictable like in Aura. As the primary slot authors (chosen by the VRF) could also be no one, the secondary slot authors were introduced to ensure that there is a constant block rate.

Now I don't know much about Edgeware, but in their runtime I can see a mix of staking, election_provider_multi_phase, sessions and finally aura. This came to me as a surprise because I didn't understand the point of pairing aura with the staking's pallet.

The Staking pallet doesn't care about the block authoring algorithm it is paired with. The only thing it does is that it elects the authorities and tells the Session pallet in advance the new authorities. Aura and BABE are then informed by the Session pallet about the new authorities.

Why are they choosing staking with an aura block producer whereas most chains I've seen use babe? What difference does it make?

These are just historical reasons, as they launched the chain the BABE implementation wasn't ready.

2
  • Quite a satisfactory answer thanks @bkchr. Feb 17, 2022 at 12:16
  • Is Aura compatible with the staking pallet? Like can they be used in the same runtime. I have only ever seen Aura alone (like in the node-template) and only seen with staking with BABE. I have had tons of problems making BABE and staking operational on the same node on the latest version, but I will try replacing BABE with Aura if that is an possibility
    – Max
    Mar 15, 2022 at 2:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.