Improvement on Blockbuilding [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2021-05-29T15:04:57+00:00


Summary:

Mark and Clara have proposed an improvement to the current Bitcoin Core block building algorithm. Currently, Bitcoin Core uses a straightforward greedy algorithm which evaluates each transaction’s effective fee rate in the context of its unconfirmed ancestors. This overlooks situations in which multiple descendant transactions could be grouped with their shared ancestors to form a more attractive transaction set for block inclusion.Their suggested algorithm, called Candidate Set-based Block Building (CSB), would consider such scenarios, resulting in more efficient use of block space. Experimental data shows that their algorithm did better on more than 94% of blocks (99% for times of high congestion).However, Antoine raises some questions and concerns about the proposal. He wonders if CSB feerate performance will improve as transaction graphs with multiple disjunctive branches become more regular in the future, citing examples like OP_CTV's style congestion-tree, LN's splicing or chain of coinjoins. He also brings up the issue of malicious miners using hard-to-traverse CPFP constellations to prevent competitors from assembling block templates or slowing down their computation. It remains to be seen how much CSB makes that kind of DoS possible/efficient.From the point of view of global blockspace demand, if miners generally became DPFA-sensitive, it could encourage creation of additional transactions for the sole purpose of bumping stuck ancestors. As ASB's ancestor set and CSB's candidate set, a fee bidder would have to pay the feerate to cover the new transaction fields, high enough to catch up with the already-present feerate set. It might be more fee-rate efficient to RBF the first child, but there is a replacement feerate penalty to consider.A suggestion has been made to improve the current Bitcoin Core block building algorithm by a group of developers. They propose an alternative algorithm that considers grouping multiple descendant transactions with their shared ancestors to form a more attractive transaction set for block inclusion. The current straightforward greedy algorithm overlooks such situations and only evaluates each transaction's effective fee rate in the context of its unconfirmed ancestors.To illustrate, four transactions A, B, C, and D are used as an example along with their fee rates and weights. B is a descendant of A, C is a descendant of B, and D is a descendant of A. The current algorithm would consider {A,B,C} best with an effective fee rate of 10, while the suggested algorithm would also consider {A,B,C,D} which has an effective fee rate of 11.Experimental data shows that the proposed algorithm performs better than the current algorithm on more than 94% of blocks and 99% during times of high congestion.The full details of the proposal can be found in a document provided by the developers, and they welcome any comments, criticisms, or suggestions. The research code for the proposed algorithm is also available on Github. The developers note that LP solvers did slightly better than their proposed algorithm but at the cost of longer running times. However, Greg Maxwell's past research suggests that better running times are possible with LP solvers.


Updated on: 2023-08-02T03:55:01.268957+00:00