10000 Increase dust threshold multiplier by 1uVU · Pull Request #2368 · btcsuite/btcd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Increase dust threshold multiplier #2368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

1uVU
Copy link
@1uVU 1uVU commented May 10, 2025

Change Description

The purpose of this PR is to filter out more dust / nonmonetary transactions. The dust would be defined for outputs for which the cost to the network to spend coins is more than 1/9 of the minimum transaction relay fee.

P.S. I inadvertently deleted the checklist. Apologies for that. It would be great if someone could restore it.

@Roasbeef
Copy link
Member

Modifying the existing value isn't reasonable as many higher level protocols such as LN rely on the ability to propagate transactions at the current dust level. If you were running an LN node against your node, and ran this patch, you'd find that you weren't able to force close at all. If you can't force close, then that means your funds my be lost in a breach event.

I think the only thing that would make sense here is adding a config option to tweak this value. The public functions should be modified though, as callers expect stability from the return value of those functions (it only due to the witness scaling factor).

As you as a user can end up with dust in your wallet even if you're only doing "monetary" transactions. If you have a small amount of change left over after a send, then that can be considered dust.

@whileunless
Copy link

Modifying the existing value isn't reasonable as many higher level protocols such as LN rely on the ability to propagate transactions at the current dust level. If you were running an LN node against your node, and ran this patch, you'd find that you weren't able to force close at all. If you can't force close, then that means your funds my be lost in a breach event.

I think the only thing that would make sense here is adding a config option to tweak this value. The public functions should be modified though, as callers expect stability from the return value of those functions (it only due to the witness scaling factor).

I have a nonrouting node on top of Bitcoin Knots. Bitcoin Core and Knots they have dustrelayfee config option. I am thinking about running a second lightning node with LND on top of BTCD, and such config option to tweak this value would be most welcome.

@Roasbeef
Copy link
Member

I am thinking about running a second lightning node with LND on top of BTCD, and such config option to tweak this value would be most welcome.

Sure, want to update this PR to add a config option like that? As mentioned, all the other public functions in the sub-packages should remain unchanged.

Also it's important that you understand this interaction:

Modifying the existing value isn't reasonable as many higher level protocols such as LN rely on the ability to propagate transactions at the current dust level. If you were running an LN node against your node, and ran this patch, you'd find that you weren't able to force close at all. If you can't force close, then that means your funds my be lost in a breach event.

If you set this value (once you add it to the code) to basically anything other than the current default, then you will willingly expose yourself to events that may cause irrevocable loss of funds on LN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0