Ouroboros at work

There are several approaches to replacing the incredibly energy-intensive proof-of-work mechanism with something more intelligent and resource-friendly. Proof-of-Stake is one such approach, and Cardano’s Ouroboros is seen as a very promising, elegant and scientifically researched protocol.

The mechanisms of the peer-reviewed papers are currently being implemented in test networks. For example project Jormungandr, Cardano’s RUST implementation.

In one of these test networks, some independent stake pool operators have decided to combine the key performance indicators and telemetry values of their nodes.

For this report, the individual views of the nodes were superimposed in order to provide a comprehensive picture of the processes in test operation.

The following graphic shows 4 epochs and almost perfect block synchronicity of the 12 nodes.

The genesis configuration of this test network specifies epochs of 30 minutes duration with a slot duration of 5 seconds, which corresponds to 360 slots per epoch.
About 75% of the pools of this test network report their telemetry data for this analysis. They are distributed over the entire globe (Australia, Africa, Europe, America) and maintained by completely independent operators.

Slot leader election

Ouroboros has some special features to meet the safety requirements. These include that not every slot has to be filled with a block, and there can be several selected leaders (producers) for the same block. (watch this explanatory video)

The steady but not always constant block progress – as intended by the protocol design – can already be seen in the diagram above.

Let’s first look at the characteristic slot-leader schedule of a single pool (green line in the next graphic):
At the beginning of each epoch (0), some slots are assigned to the stake pool according to its stake weight. Nobody else knows these schedules.
For this common measurement, the pool announces its next planned block (1) and waits until the time comes.
As soon as it has reached the time and created the block, the line jumps to the next (2) and then the next (3) assigned slot.

Many pools acting as a team

The next graphic superimposes the assigned leader slots of all the participating stake pools. The random principle and the stake weight determine how many blocks are assigned per epoch to each pool.

After the node has created its last block in that epoch, its curve goes back to zero, until the beginning of the next epoch, where the Ouroboros protocol again ensures the allocation of the slot leaders.

Multiple slot leaders

If we look at the lines in detail, we can see one of the special features of the Ouroboros protocol: It is quite possible that multiple block generators are intended for the same slot and generate a block.

For example, you can see it on the two red circles when two lines hit a slot at the same height and then jump to different next slots.

When multiple blocks are created for the same slot, whichever one is first received by the next slot leader (publicly unknown) – wins.

Watching it live

The following graphic normally shows the processes described above in real time, just as they really happen in a Jormungandr test network.

If the above iframe does not load the content in your browser, try to open the graph in a new tab.

Since it is a test net and changes and updates are made over and over again, it can sometimes display no or unusual values.

Credits and honest thanks to all who contributed their skills, time and node metrics: Priyank, Psychomb, OldCryptoGeek, Papa Carp, Alfie, Dmitry, Mark, Redoracle, RC, Mask, Consuman and all I forgot to mention.