Posted by szarka
May 21, 2025/22:21 UTC
The blockreconstructionextratxn
option in Bitcoin Core's configuration, specifically the vExtraTxnForCompact
feature, plays a crucial yet underappreciated role in enhancing compact block reconstruction, particularly for nodes enforcing stringent spam-filtering rules. This feature serves as a temporary holding area for transactions that are not immediately included in the mempool due to being replaced, orphaned, or rejected based on the node's policy settings. When a block is being reconstructed, these transactions can be utilized instead of requesting them from peers, which is especially beneficial for nodes with aggressive filtering policies.
An experiment comparing the performance of a filtering node against a non-filtering node revealed significant benefits of utilizing vExtraTxnForCompact
. Both nodes were configured identically except for their transaction filtering policies and were connected to a network mix including Bitcoin Core and Knots versions with varying datacarriersize
settings. The filtering node, which applied more restrictive transaction acceptance criteria, demonstrated a marked improvement in transaction recovery during block reconstruction thanks to the vExtraTxnForCompact
feature, retrieving approximately 25% of transactions from vExtra compared to only 6% by the non-filtering node.
The findings suggest that increasing the blockreconstructionextratxn
value beyond its default could substantially benefit nodes, particularly those that filter transactions aggressively. This adjustment could mitigate the need to request a large number of transactions from peers during block reconstruction, thus enhancing the node's efficiency and reducing its reliance on external sources for transaction data. However, this feature's potential vulnerability to attack and the fixed nature of its storage limit (based on the number of transactions rather than memory usage) highlight areas for further development and improvement.
In conclusion, while vExtraTxnForCompact
may not have been robustly implemented initially, its utility in improving block reconstruction efficiency is undeniable, making it a feature worthy of consideration by both developers and node operators within the Bitcoin network. Further research into optimizing this feature, including configuring what gets added to vExtra and exploring ways to make it less susceptible to attacks, could provide significant benefits. For detailed per-block data and supporting log excerpts related to this study, visit the project's Github page.
TLDR
We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project?
Give Feedback