Dust Expiry: Clean the UTXO set from spam

Posted by RobinLinus

May 20, 2025/07:11 UTC

The discussion revolves around the safety and efficiency of a proposed method for handling unspent transaction outputs (UTXOs) in the context of blockchain reorganizations, commonly known as reorgs. The method under scrutiny utilizes a format to identify UTXOs by their location within the blockchain, denoted as block_height/TX_index/output_index. This approach facilitates the easy identification and deletion of UTXOs based on their block height, which becomes particularly useful during a blockchain reorganization. During such an event, all locations with a block_height greater than that of the reorganized block are deleted from the expired UTXO set. Additionally, locations spent in blocks that were removed during the reorg are reintroduced, ensuring the integrity and accuracy of the UTXO set post-reorganization.

A significant improvement to this method is suggested, involving the replacement of expired UTXOs with a 20-byte hash. This modification not only simplifies the overall scheme but also reduces the cost associated with spending expired UTXOs. Moreover, it effectively prunes approximately 75% of all spam from the system, enhancing its efficiency.

However, a potential issue is identified with the original proposal concerning how it handles UTXOs that expire on a previous fork but are spent on the reorganizing fork shortly before their expiration. In such cases, those UTXOs would have already been deleted from the set, posing challenges for verifying valid blocks. A solution is offered where the deleted UTXO can be restored using its location, assuming the block in which the UTXO was created is still accessible. If the block is no longer available locally, it can be requested from peers, thereby allowing for the restoration and verification process to proceed. This highlights a critical consideration for maintaining robustness and resilience in the management of UTXOs amidst blockchain reorganizations.

Link to Raw Post
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