/
sipaPosted by sipa
Oct 13, 2025/14:52 UTC
The communication delves into a sophisticated method for estimating block fees within the TxGraph
component, which abstracts the complexities of cluster linearization from the mempool in blockchain systems. The proposed technique bypasses the need to explicitly maintain a set of transaction templates, opting instead for an implicit block template approach. This method leverages an index within TxGraph
that organizes all transaction chunks by descending feerate, facilitating not only block building and eviction processes but also serving additional purposes.
The core of this strategy involves maintaining a running total of fees and sizes for all transaction chunks included in the implicit block template, up to a specified chunk that does not fit within the block size limit. This is achieved by calculating the sum of fees ($F$) and sizes ($S$) for all qualifying chunks, stopping before adding a chunk ($c_\mathrm{nf}$) that would exceed the maximum block size (39920000 bytes). The system tracks $F$, $S$, and a pointer to the non-fitting chunk, updating these variables after any operation that alters the TxGraph
.
Updates to the TxGraph
are handled efficiently: adding or removing chunks that fit within the constraints adjusts $F$ and $S$ accordingly, while changes involving the non-fitting chunk prompt an adjustment of the pointer, ensuring the implicit template remains accurate. These operations are designed to be computationally efficient, requiring constant memory and linear time relative to the number of modified chunks.
An innovative aspect of this methodology is the calculation of two block fee estimates: a conservative lower bound represented by $F$, and a conservative upper bound calculated by adding to $F$ the prorated fee of the non-fitting chunk, based on the remaining space in the block. These estimates offer a range that can be used to approximate the optimal fee structure for a new block.
To facilitate real-time updates and decision-making, the proposal includes the integration of a callback function within TxGraph
. This function would be triggered whenever there is a significant change in the lower or upper fee bounds, enabling dynamic adjustments to the block templating process. This approach ensures that block templates are generated with an optimal balance of efficiency and accuracy, adapting to changes in the transaction pool without necessitating a complete rebuild of the template.
TLDR
We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project.
Give Feedback