Puzzle of selection of Ethereum blocks
As he knows who knows the Ethereum network, choosing transactions that will be included in the next block is a crucial task for minors. This process is known as “block selection” and it is essential to enter the basic mechanisms to understand how it works.
A brief history of block selection
In Ethereum 1.X (ie before June 2016), the minors had to select all the transactions included in the previous block, whether or not they have the chance to be extracted or not. This approach is often called “complete” selection.
However, until July 2017, Ethereum implemented an option model called “Selective Full” (SFB). As part of this new system, minors are held only to select transactions that have a certain level of probability of being included in the next block. In practice, this means that minors can choose transactions to include in their blocks according to factors such as:
* Block difficulty : The number of computing power invested by minors and the time required to solve the block puzzle.
* Complexity of transactions : 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 transactions to include in their blocks, minors use a specific algorithm that considers these factors. Here is a simplified overall image:
- Block generation
: When a new block is exploited, it is broadcast on the network.
- Validation of transactions : The first 3,300 block transactions are validated by nodes and are considered to be “valid” for including in the next block.
- Block selection algorithm : Minors use their calculation power to analyze each transaction according to factors such as block difficulty, transaction complexity and network congestion. They also consider the hash of each transaction compared to previous block transactions.
- Creating the block : The selected transactions are then combined with all the remains invalidated of the previous block to form a new block.
How to choose minors transactions
To choose transactions to include, minors use a combination of algorithms and heuristic, in particular:
* Hash function: minors use various hash functions, such as Sha-256, to generate hashs for each transaction. They also analyze the distribution of these hasers to deduct information on the likelihood that certain transactions are included in future blocks.
* Sorting transactions
: Minors sort their selected transactions by hash value, then classify them according to their difficulty and other factors.
* Heuristic rules : minors use predefined rules, such as “if the transaction has a high difficulty and low network congestion, included in the next block” to guide the selection process.
Conclusion
In conclusion, the choice of transactions that will be included in a new Ethereum block is a complex process that consists in analyzing various factors, such as the difficulty of the block, the complexity of the transactions and the congestion of the network. Understanding these mechanisms, minors can optimize their operations and increase their chances of being chosen for future blocks.