Skip to content

Conversation

@Roasbeef
Copy link
Member

In this commit we fix a hidden bug in the transaction creating logic
that was only manifested recently due to higher fees on Bitcoin's
mainnet. Before this commit, we would use the target fee rate to
determine if an output was dust or not. However, this is incorrect, as
instead the relay fee should be used as this matches the policy checks
widely deployed in Bitcoin full node today.

To fix this issue we now properly use the relay fee when computing dust.
This fixes the issue for the EstimateFee call, but the SendOutputs
call also has a similar issue. However, this must be fixed within
btcwallet itself, so it has been left out of this commit

Fixes #3217.

Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

Roasbeef added 3 commits June 18, 2019 19:55
In this commit we fix a hidden bug in the transaction creating logic
that was only manifested recently due to higher fees on Bitcoin's
mainnet. Before this commit, we would use the target fee rate to
determine if an output was dust or not. However, this is incorrect, as
instead the relay fee should be used as this matches the policy checks
widely deployed in Bitcoin full node today.

To fix this issue we now properly use the relay fee when computing dust.
This fixes the issue for the `EstimateFee` call, but the `SendOutputs`
call also has a similar issue. However, this must be fixed within
`btcwallet` itself, so it has been left out of this commit

Fixes lightningnetwork#3217.
In this commit, we fix a logic flaw in the testCreateSimpleTx test case
which emerged once we the bug fix for dust outputs landed. Before this
commit, we would erroneously fail during valid test execution.
@Roasbeef Roasbeef force-pushed the fee-estimate-fee-dust branch from 51a0fba to 4203542 Compare June 19, 2019 02:55
@Roasbeef Roasbeef merged commit 507ebea into lightningnetwork:master Jun 19, 2019
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.

Estimate Fee says output is dust too often

2 participants