How to linearize your cluster

Posted by sipa

Feb 9, 2025/14:46 UTC

The process outlined in the email involves a sophisticated approach to finding an optimal linearization of transactions based on their fee rate, utilizing a graphical representation and iterative algorithmic method. The core concept revolves around a diagram, labeled D, which represents the feerate diagram of the optimal linearization. In this diagram, each black dot corresponds to a topologically-valid subset of transactions, with D forming a convex hull through these points. The aim is to identify the vertices of this convex hull, as these vertices correspond to specific sets of transactions that are of interest.

The methodology begins with the establishment of a line, $L_1$, defined by its slope $\lambda_1$, which corresponds to the feerate of the entire cluster of transactions under consideration. Utilizing the min-cut algorithm, the first iteration seeks to find a closure $C_1$ whose weight, denoted as $Q_1 = \operatorname{fee}{C_1} - \lambda_1 \operatorname{size}{C_1}$, is maximal. This step effectively identifies a subset of transactions that balances the trade-off between total fee and size under the current constraint defined by $\lambda_1$.

Following this, the algorithm adjusts its parameters by setting $\lambda_2$ equal to the feerate of the previously identified subset $C_1$. With this new parameter, the process repeats, searching for another closure $C_2$ with a maximal weight $Q_2 = \operatorname{fee}{C_2} - \lambda_2 \operatorname{size}{C_2}$. This iterative approach continues, with each iteration removing one or more chunks of transactions from consideration but ensuring that each solution corresponds to a prefix chunk of the optimal linearization.

An interesting aspect of this procedure is how it deals with the subsets of transactions identified in each iteration. After identifying a chunk, say $C_1$, and then moving on to find $C_2$, the set $C_1 \setminus C_2$ is already known, though not the subsequent sets, due to the nature of the iterations skipping over them initially. To address this, the algorithm employs a contraction strategy where the source $s$ is replaced with the union of $C_1$ and ${s}$, allowing the process to restart without completely resetting the algorithm's state. This technique suggests a level of efficiency and adaptability in handling complex transaction sets, aiming for an optimal arrangement that respects the underlying constraints and objectives of transaction sequencing.

Link to Raw Post

Thread Summary (73 replies)

Dec 20 - Apr 24, 2025

Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback