As we commented at the beginning, the generation of blocks responds to the programming of each blockchain and the systems it uses. This means, There are projects that can have a very similar generation process, and other projects with radically different generation models.
However, the basic background process is the same. Nbsp; The generation of a block begins in the mempool. A storage pool is an area that stores transactions that have not yet been served by the network. It is a kind of waiting room where transactions are waiting to be visited by miners. As soon as we issue a transaction as a user, this is where our transaction goes.
Next one Miners receive a goal to be achieved from the network, adapted to the difficulty of the network that is currently active for mining. This is important because the difficulty and the goal are essential in the mining process. At least in systems that use proof of work, such as. B. Bitcoin. This mechanism does not exist in other systems such as proof of participation. But when the network reaches this point, the miners start their work.
The next step for the miners is to choose the transactions they want to participate in. Mostly, Miners choose the transactions that pay the most commissions to make more profit. Now you understand, because the confirmation of the transactions that we carry out with low commissions often takes so long. If the network and the mempool are overloaded, it means that only the one who pays high commissions receives higher priority to confirm your transactions.
Once the miners have selected the transactions to include in the block, the generation process itself begins. To do this, lThe miners create a Merkle root of all transactions contained in the blockYou create a timestamp, a nonce, and they inherit the version, difficulty, and hash of the previous block. All of this data is used to create a block hash whose decimal value is less than the target value specified by the network.
This is an extremely expensive process that will lead you to make maximum use of the available computing resources. It is the so-called cryptocurrency mining process through the proof of work. Other processes like PoS, DPoS, PoA or PoET do not do this hard work, but do a simpler job, but with the same goal: to create a hash or a block ID for the new block.
As soon as the new hash has been created, it is checked whether it is valid. Only then can it be said that a new block has been generated. In order to, The new block is included in the blockchain history. One day will be there as a constant witness to the process. In addition, upon completion of the process, miners will request commissions for all block transactions as well as block rewards for their mining work. Then the process repeats itself again and follows the specified protocol.
Related: nbsp; iquest; Qu é is the block reward?