Here it's a very high level description with only formulas. I want to understand actually how it works.
I don't actually understand what a step is and what's it's use? Does a node always keep updating the step? And when time to create to create and broadcast a block comes it will take the current step value and check if he should broadcast or not.
What do you mean by "Blocks from more than 1 step into the future are rejected."? Does this mean that if block time is 5 seconds then the next block timestamp should be exactly 5 seconds higher.
And also what happens when the next primary doesn't broadcast? How does the network deal with it? All the next blocks should get invalidated right because they won't follow a timestamp difference of 5 seconds.
Polkadot (DOT) uses the nominated proof-of-stake (PoS) consensus algorithm. Polkadot uses parachains and a relay chain to facilitate a much more scalable blockchain ecosystem. The protocol's bridges allow different blockchain networks to interact with each other.
A consensus protocol prevents a single entity from controlling a blockchain or distorting the “truth” of what should be recorded. Double spending is an example of what could happen if one entity tried to take control of the entire network by creating its own version of the blockchain.
Polkadot uses NPoS (Nominated Proof-of-Stake) as its mechanism for selecting the validator set. It is designed with the roles of validators and nominators, to maximize chain security. Actors who are interested in maintaining the network can run a validator node.
AuRa is the name for Parity's Proof-of-Authority (PoA) consensus engine, the name originally comes from Authority Round (used to be AuRo). It's used in the Kovan network.
PoA networks are permissioned not public by design. Only strictly defined authority nodes are allowed to seal blocks. This is very useful for test networks or enterprise networks where the native tokens on the blockchain are not holding any value and therefore would be easy to attack in a Proof-of-Work (PoW) or Proof-of-Stake (PoS) environment.
A step is one part of the authority round. Each authority can seal one block in each round. Let's say we have five authorities: 0x0a .. 0x0e
. These would be the steps, as defined in the chain specification or in the dynamic validator contract:
0x0a
seals a block0x0b
seals a block0x0c
seals a block0x0d
seals a block0x0e
seals a blockAfter the round is finished, it starts over again.
What do you mean by "Blocks from more than 1 step into the future are rejected."?
Now if The node 0x0c
would try to seal a block right after 0x0a
, then this block would be more than 1 step into the future. The block sealing strickly relies on the block step order of all authorities.
And also what happens when the next primary doesn't broadcast?
That's no problem, there will be a gap between two blocks, i.e., doubled block time. So if 0x0c
notices that 0x0b
is not providing a block in the specified time window, it can override this step with its own block and the round goes on. There are certain tolerances on the block timestamps to make sure the network does not stall.
In this screenshot above, you can see that two authorities in the Kovan network are not sealing blocks. The result is an increased block time between these steps.
Disclosure: I work for Parity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With