Bitcoin

mempool – What criteria does Bitcoin Core use to generate block templates?

Starting with Bitcoin Core v26.1, the mempool tracks each transaction in the context of its ancestor set and prioritizes inclusion based on that transaction. statuary set fee. Let’s assume a cluster of five unconfirmed transactions.
Grandparents (GPs), Top 1 (P1), Top 2 (P2), Children (C)and Grandson (GC)

GP
  \
   P1   P2
     \ /
      C
     /
    GC
  • statuary set grandparents is  GP That set of ancestors is queued at the commission rate. GP.fee / GP.weight.
  • statuary set top 1 is  GP, P1 That set of ancestors is queued at the commission rate. (GP.fee + P1.fee) / (GP.weight + P1.weight).
  • statuary set top 2 is P2 That set of ancestors is queued at the commission rate. P2.fee / P2.weight.
  • statuary set children is  GP, P1, P2, C That set of ancestors is queued at the commission rate. (GP.fee + P1.fee + P2.fee + C.fee) / (GP.weight + P1.weight + P2.weight + C.weight).
  • statuary set grandson is  GP, P1, P2, C , GC That set of ancestors is queued at the commission rate.
    (GP.fee + P1.fee + P2.fee + C.fee + GC.fee) / (GP.weight + P1.weight + P2.weight + C.weight + GC.weight).

when getblocktemplate When called, the node greedily selects the ancestor set with the highest ancestor set fee as the block template, updates the ancestor set information of all transactions remaining in the affected cluster, and then selects the next remaining ancestor set with the highest ancestor set fee. Select. For example, if the ancestor set is children It has the highest ancestor set fee, and the block template assembly process can select 4 transactions.  GP, P1, P2, C  Put them together in a block template and then update the parent set. grandson just GC The new ancestor is set up as follows: GC.fee / GC.weight.

This process continues until the block is full or all transactions in the mempool have been selected. If an ancestor set is too large to fit in a block, it is skipped in favor of a smaller ancestor set with a lower ancestor set fee.

There is currently a project in progress. cluster memory pool We propose to improve the ancestor set-based approach by assigning an order to all transactions within a cluster. This allows us to keep track of the linearized segments in each cluster that should be selected together as a block template in a way that the rest of the cluster does not need to be updated each time an item in the cluster is selected as a block template. Sets of transactions with more complex topologies can be selected together as templates. You can find an overview of the Cluster Mempool proposal at Delving Bitcoin.

Related Articles

Back to top button