Ethereum: How can a miner choose which transaction to include in the next block?

Puzzle of selection of Ethereum blocks

As someone knows the Ethereum network, you choose what transactions to include in the next block is a crucial task for miners. This process is known as “block selection” and it is essential to understand the basic mechanics to understand how this works.

A short -selection history of the block

In Ethereum 1.X (ie before June 2016), the miners had to select all the transactions included in the previous block, whether it had any possibility to be extracted or not. This approach is often known as a “complete” selection.

However, until July 2017, Ethereum implemented a subscription model called “selective full” (SFB). According to this new system, the miners are obliged to select transactions that have a certain level of probability of being included in the next block. In practice, this means that miners can choose what transactions to include in their blocks, depending on factors such as:

* Block difficulty : The number of calculation energy invested by miners and the time required to solve the block puzzle.

* Transaction complexity

: The amount of data stored or transferred to each transaction.

* Network congestion : Network activity level, including number of users, gas prices and block size.

Algorithm

To select what transactions include in their blocks, miners use a specific algorithm that considers these factors. Here is a simplified overall image:

  • Block generation : When a new block is extracted, it is transmitted on the network.

  • Validation of transactions : The first 3,300 block transactions are validated by nodes and are considered “valid” for including in the next block.

  • Block selection algorithm : Miners use their calculation power to analyze each transaction based on factors such as the difficulty of the block, the complexity of the transactions and the congestion of the network. They also consider the hash of each transaction in relation to previous block transactions.

  • Creating the block : The selected transactions are combined with any remaining transaction that is not validated from the previous block to form a new block.

How do I choose the miners what transactions

To choose what transactions include, miners use a combination of algorithms and heuristic, which include:

* Hash function: Miners use multiple hash features, such as Sha-256, to generate hash for each transaction. It also analyzes the distribution of these hash to deduct information about the likelihood that certain transactions are included in future blocks.

* Classification of transactions : The miners order their selected transactions with the hash value and then classify them according to the difficulties and other factors.

* Heuristic rules

: Miners use predefined rules, such as “if the transaction has great difficulties and low network congestion, include in the next block”, to guide their selection process.

Conclusion

In conclusion, the choice of what includes transactions in a new Ethereum block is a complicated process that involves analyzing several factors, such as the difficulty of the block, the complexity of the transactions and the congestion of the network. Understanding these mechanics, miners can optimize their operations and increase their chances of being chosen for future blocks.

EVOLUTION BEHAVIORAL FINANCE