Skip to content

BIP451: Dust UTXO Disposal Protocol#2150

Open
bubb1es71 wants to merge 6 commits intobitcoin:masterfrom
bubb1es71:ddust_protocol_bip
Open

BIP451: Dust UTXO Disposal Protocol#2150
bubb1es71 wants to merge 6 commits intobitcoin:masterfrom
bubb1es71:ddust_protocol_bip

Conversation

@bubb1es71
Copy link
Copy Markdown

@bubb1es71 bubb1es71 commented Apr 24, 2026

@jonatack jonatack changed the title Add draft BIP for a dust utxo disposal protocol BIP draft: Dust UTXO Disposal Protocol Apr 24, 2026
Copy link
Copy Markdown
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks complete and correct at first glance.

Comment thread bip-XXXX.md Outdated
@bubb1es71 bubb1es71 force-pushed the ddust_protocol_bip branch from 4089a81 to d65128a Compare April 27, 2026 02:42
Copy link
Copy Markdown
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good already! Thanks again for working on this so diligently before submitting it here.

Comment thread bip-XXXX.md Outdated
Comment thread bip-0451.md
Comment thread bip-XXXX.md Outdated
Comment thread bip-0451.md Outdated
Comment on lines +67 to +69
3. The OP_RETURN data MUST be either:
- Empty: `0x6a 0x00` (OP_RETURN OP_0), or
- The ASCII string "ash": `0x6a 0x03 0x61 0x73 0x68` (OP_RETURN OP_PUSHBYTES_3 "ash").
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the impression from our discussion on the mailing list that you were considering on always requiring the ash output in order for all transactions to always be aggregatable. Looking at it again, I realize that it was the answer from Steven Slater that made me think so. I assume you considered only standardizing a single output variant, but could you perhaps further explain in the Rationale why you decided to settle on two output variants rather than eating the slightly elevated size for legacy and wrapped segwit transactions in favor of a simpler protocol?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rationale here is that in most cases there won't be an opportunity to batch, so we should be as efficient as possible for spending the legacy dust who don't get the witness discount. And in practice as legacy usage dies off most dust disposal tx will have witness inputs and need the OP_RETURN "ash" output anyway. I'll add this to the rationale section.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on an update to reference code per bubb1es71/ddust#36 and then will update BIP here.

Comment thread bip-0451.md
Comment thread bip-XXXX.md Outdated
Comment thread bip-0451.md Outdated
Comment on lines +157 to +160
- **Minimal Size**: Empty data (2 bytes: OP_RETURN OP_0) minimizes the transaction size.
- **Standardization**: Consistent transaction construction eliminates wallet fingerprinting.
- **Padding Option**: The "ash" string (5 bytes: OP_RETURN OP_PUSHBYTES_3 "ash") provides a standardized way to meet the minimum transaction size; e.g., for a single P2TR dust input.
- **Semantic Meaning**: The word "ash" metaphorically represents the result of "burning" the dust.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My gut feeling is that it is still preferable to only standardize one output variant.
From the sender’s perspective, the transaction will for itself either way. Since the empty OR-output is only feasible for legacy and wrapped segwit inputs, it increases the transaction size by less than 1.8%, but it makes all transactions aggregatable.
It’s just saving 3 bytes, but aggregating a solitary dust input into another transaction saves 21 bytes. So if increased compatibility caused one in seven transactions to be aggregated rather than solitary, it would break even. It would also make it simpler to implement support for this proposal, in particular the aggregation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll think on this a bit more, it would simplify the spec and code.

As mentioned in my other comment our assumption is that batching won't happen too often and eventually be all segwit OR "ash" variety anyway. But OTOH if this spec becomes widely adopted there are plenty of dust UTXOs out there that can/should be disposed of and batching saves more than the extra "ash" bytes.

Comment thread bip-XXXX.md Outdated
Comment thread bip-XXXX.md Outdated
Comment thread bip-0451.md Outdated

### Batching dust disposal txs via RBF

1. Adding a Bech32m dust input to an unconfirmed disposal transaction with a legacy dust input keeps the original single empty OP_RETURN output.
Copy link
Copy Markdown
Member

@murchandamus murchandamus Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are going to retain the two output variants, perhaps it should be best practice that any non-native-segwit input that is added to a dust disposal transaction with an “ash” output is first broadcast as a solitary transaction with an empty OP_RETURN ouput, before the aggregated transaction. This would give the other dust disposer with the ASH output the opportunity to instead add their input to the transaction with the empty OR output.

Still, it seems simpler to only standardize one output variant.

@murchandamus
Copy link
Copy Markdown
Member

Let’s call this BIP 451. Please add the number to the preamble, set the Assigned header to today, rename the BIP file, and add an entry to the README table.

@murchandamus murchandamus changed the title BIP draft: Dust UTXO Disposal Protocol BIP451: Dust UTXO Disposal Protocol Apr 28, 2026
@murchandamus murchandamus added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Apr 28, 2026
@bubb1es71
Copy link
Copy Markdown
Author

bubb1es71 commented Apr 29, 2026

I pushed 54bccb1 with some small edits. I'll squash this and other commits once the review process is done.

* Change title, abstract, motivation to focus on dust attack UTXOs
* Simpify dust selection section
* Add batching to address consolidation rules
* Fix core version in privacy preservation
* Fix table units
@bubb1es71 bubb1es71 force-pushed the ddust_protocol_bip branch from 192d0ae to 54bccb1 Compare April 29, 2026 00:46
@murchandamus
Copy link
Copy Markdown
Member

murchandamus commented Apr 29, 2026

Yeah, thanks, adding separate commits without squashing them during the review phase is preferred.

@bubb1es71 bubb1es71 force-pushed the ddust_protocol_bip branch from f2d7074 to 26b76eb Compare April 29, 2026 01:14
@bubb1es71 bubb1es71 force-pushed the ddust_protocol_bip branch from 26b76eb to a9dcb9e Compare April 29, 2026 01:17
Copy link
Copy Markdown
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Preamble updates and table entry look good. Thanks for the quick turn-around.
Given that you said that you are still mulling over some of the review comments, I’ll leave the “PR Author action required” tag for the time being. Please let me know when you’re ready for another review.

Comment thread bip-0451.md Outdated
@bubb1es71
Copy link
Copy Markdown
Author

@murchandamus this one is ready for another look. In 686c1b0 I updated it to use only OP_RETURN "ash" and some other small edits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New BIP PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants