Member-only story
The cryptography behind Cardano blocks
Cryptocurrencies could be invented due to the many major achievements in cryptography. It is not a surprise that cryptography is used not only for signing transactions but it is also used for the creation of new blocks. In the article, we will have a look at how a new block is created in the Cardano network from the point of view of cryptography.
Blocks are created by pools
In the Cardano network, the nodes of staking pool operators are responsible for the production of new blocks. Every pool operator needs to generate a few pairs of keys and register herself as a block producer in order to become a slot leader. Time is divided into epochs and every epoch is divided into slots. A slot lasts one second. There are 432,000 slots in every epoch so the epoch lasts 5 days. It is possible to configure how often a new block is to be created by the parameter d. Currently, it is set to a value that lets the network create a new block approximately every 20 seconds. It means that approximately every 20 seconds some node becomes the slot leader and can mint a new block. In every epoch, approximately 21,600 blocks are created. Due to the randomness that is implemented in the protocol, can be actually created more or fewer blocks.
In the Cardano network, every registered pool verifies every second whether it is the slot leader in the given slot. If yes then it can mint a new block and provide a certain proof that is validated by other nodes in the network. The higher stake a pool has the more often it can become a slot leader. The selection of a slot leader is based on randomness. In the ideal case, only one slot leader is selected in a given slot. Obviously, it must not be possible that many new valid blocks are created in a slot.
In PoW networks, computation power must be consumed to produce a new block. All pools compete among each other to resolve the complex puzzle and it is very probable that only one pool succeeds in a given cycle. It can happen in PoW networks that two valid blocks can be produced in a cycle. Let’s call them to block A and block B. In the next cycle, pools need to decide to which block they will wish to append a new block. In most cases, a pool starts working on a new block once a valid block is produced. It can happen that a few pools wish to build on…