Repository navigation
Conversation
e49c9e1 to
a7efad7
Compare
|
Concept ACK |
1 similar comment
|
Concept ACK |
Signed-off-by: Antoine Poinsot <[email protected]>
a7efad7 to
b1a8a41
Compare
There was a problem hiding this comment.
More of a meta-comment:
If GetDustThreshold attempts to calculate the cost at which it's economical to spend an output, why is nSize initialized to GetSerializedSize(txout)? When spending the dust output, the size of the txout isn't in the spending tx unless the spending tx also spends to the same output type. This heuristic/initialization doesn't make sense to me because if we take P2WSH as an example (w/ dust limit of 330), 330 - fees < 330 it is impossible to spend to the same output type unless other inputs are added. It seems to me that if witness version non-zero is being changed, this could be a place to fix or clarify this calculation for witness version non-zero.
|
Concept ACK
IIUC, you're aiming to return |
|
No, i'm aiming to do the opposite: not call IsDust for witness versions >1, effectively having IsDust == false for any witness version from the future. Since, as you mention it, we can't know the size in advance.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Le mardi 24 août 2021 à 11:21 PM, Antoine Riard ***@***.***> a écrit :
… Concept ACK
> Eventually i believe it would be good to prevent future overlooks by not applying the dust check to unknown witness versions and aborting if witness_version > current_version.
IIUC, you're aiming to return IsDust() == true for any transaction with witness outputs superior to current version, wouldn't this be a revert of [#15846](#15846) ? As we don't know what would be the minimal spent or we can pick-up an arbitrary amount e.g 1000 sats, and consider the effective dust threshold for future type will be lower. And as such minimize risks of policy tightening changes.
—
You are receiving this because you authored the thread.
Reply to this email directly, [view it on GitHub](#22779 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AFLK3F233XM5Z52Y2EHXUU3T6QEL7ANCNFSM5CUWHKOQ).
Triage notifications on the go with GitHub Mobile for [iOS](https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or [Android](https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email).
|
Hmmmm so you could propagate transactions SegWit v2+ with |
You are right, i shouldn't reply to Github comments at 11:21PM :p |
It was calculated as if it needed a compressed pubkey + a DER encoded ECDSA signature. Note that this commit intentionally keeps the existing behaviour of applying the latest witness program version computation to all newer versions. Signed-off-by: Antoine Poinsot <[email protected]>
b1a8a41 to
9155f6c
Compare
|
Code Review ACK 9155f6c
Yes honestly I think we should revamp our approach w.r.t to dust outputs, from a hard non-propagating threshold to a feerate penalty approach, that way adjustable by L2 nodes at broadcast time in function of mempool congestion. Though need to work-out a design first and discussion better left to the ML :) |
|
Concept NACK. I don't think it makes sense to be lowering the dust levels in bitcoin generally. The context for the dust levels was calculated many years ago, I don't think it applies anymore. |
benthecarman
left a comment
There was a problem hiding this comment.
Code Review ACK 9155f6c
| // sum the sizes of the parts of a transaction input | ||
| // with 75% segwit discount applied to the script size. | ||
| nSize += (32 + 4 + 1 + (107 / WITNESS_SCALE_FACTOR) + 4); | ||
| if (witnessversion == 0) { |
There was a problem hiding this comment.
nit:prefer a switch statement here
|
Concept NACK -- I think we should either remove the dust limit entirely or not muck around with it. Dust limits are not incentive compatible with miner preferences and if they are they can be configured by users individually. That said, it's CR-Ack for me for this code, which seems to be improving the dust nSize calculation (which should be independent of any actual fee policy, the code could be cleaned up to make it have a min somewhere later but we shouldn't confuse byte counting with thresholds). |
|
Maybe split off the added tests from the behaviour change, because they seem useful on their own? |
|
@MarcoFalke done in #22846 @TheBlueMatt i too am of the opinion that we should not decrease the dust thresholds, but i think that if we want to keep the same dust thresholds for Taproot outputs we should instead raise I don't think the rationale of "dust threshold was calculated many years ago, let's not fix it for a new output type unused on the network yet" holds. It was adapted for Segwit v0 and now Segwit v1 should be "penalized"? |
Indeed, I don't think we can in any practical sense increase the dust threshold for deployed things, for exactly the reason you specify. I also agree with you that, ideally, we'd increase I'm not really sure why "consistency" here matters, the numbers are too low, reducing them is not great, so lets not do that :). |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
97cea1a policy: unit test Segwit dust thresholds (Antoine Poinsot) Pull request description: This is the unit testing part of #22779, hence without the threshold modification. ACKs for top commit: MarcoFalke: cr ACK 97cea1a benthecarman: crACK 97cea1a Tree-SHA512: 96fb194709ae44364455eb920ed3ecff2e11e5327e0a72b9eeec9f9445894302099a0c4ffb1e0c8d4d523c0bfe06c57f1ebb0c03cf3389a73f518e3b174c45aa
|
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
…Taproot A "correction" of what seemed to be an overlook was initially proposed in PR bitcoin#22779. It was deemed unnecessary to further reduce the dust level, so document the intention. Signed-off-by: Antoine Poinsot <[email protected]>
|
I think Matt is right. Closing this one in favour of documenting the behaviour in #22863 . |
Then those L2s are broken. Policy is never a guarantee and should not be treated like one. IMO you should reopen this. |
d873db7 policy: document we intentionally don't lower the dust threshold for Taproot (Antoine Poinsot) Pull request description: Following discussions in #22779 . ACKs for top commit: benthecarman: ACK d873db7 ariard: Code Review ACK d873db7 theStack: ACK d873db7 Tree-SHA512: 1f5d20dce767f8a74d57ece47a7f6b881741f508896131b8433600cccf9e4262892603b46521d1bb69d5c83b450f24a16731341072a471c1f2c9adad682af895
It was calculated as if it needed a compressed pubkey + a DER encoded
ECDSA signature.
Eventually i believe it would be good to prevent future overlooks by not applying the dust check to unknown witness versions and aborting if
witness_version > current_version. Had a commit that starts doing that but removed it as it made this simple fix PR needlessly more complex.