-
Notifications
You must be signed in to change notification settings - Fork 521
Add details for post-anchor dust_limit_satoshis
#1301
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
base: master
Are you sure you want to change the base?
Conversation
Since the introduction of `option_anchors`, pre-signed HTLC transactions don't include any fees, and thus don't contribute to trimming. This results in HTLC outputs in the commitment transactions that may be forever uneconomical to spend, and will pollute the utxo set. We should use a `dust_limit_satoshis` that is higher than Bitcoin Core's standard values to take into account the cost of these second-stage txs at a reasonable (TM) feerate.
ziggie1984
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, had some minor comments.
| - pay to script hash (p2sh): 540 satoshis | ||
| - pay to witness pubkey hash (p2wpkh): 294 satoshis | ||
| - pay to witness script hash (p2wsh): 330 satoshis | ||
| - pay to anchor (p2a): 240 satoshis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: should probably be part of: #1228
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather have it here since we "mirror" the dust limits set by Bitcoin Core, even for output types we don't use. For example, we don't use p2sh in lightning, but we do list it here for reference.
| second-stage HTLC transactions, to ensure that outputs added to the commitment | ||
| transaction can actually be claimed on-chain, otherwise they may pollute the | ||
| utxo set indefinitely. At a minimum, nodes should allow their peer to use a | ||
| `dust_limit_satoshis` that is higher than the values defined by Bitcoin Core. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you maybe also add a note describing that it can basically not be perfect, if the transaction fee of the base-layer stays for example very high for a long period of time HTLCs will be unspendable and on the other hand the dust limit cannot be too high because of the griefing attacks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 68c6544
As requested by @ziggie1984
Since the introduction of
option_anchors, pre-signed HTLC transactions don't include any fees, and thus don't contribute to trimming. This results in HTLC outputs in the commitment transactions that may be forever uneconomical to spend, and will pollute the utxo set.We should use a
dust_limit_satoshisthat is higher than Bitcoin Core's standard values to take into account the cost of these second-stage txs at a reasonable (TM) feerate. If we want for example to be able to claim HTLC outputs at20 sat/byte, we need adust_limit_satoshisof around4 000 sats.