Skip to content

Commit 4dbba3b

Browse files
committed
Merge bitcoin/bitcoin#22863: policy: document dust threshold for Taproot outputs
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
2 parents ce19f4f + d873db7 commit 4dbba3b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/policy/policy.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CAmount GetDustThreshold(const CTxOut& txout, const CFeeRate& dustRelayFeeIn)
2222
// so dust is a spendable txout less than
2323
// 182*dustRelayFee/1000 (in satoshis).
2424
// 546 satoshis at the default rate of 3000 sat/kvB.
25-
// A typical spendable segwit txout is 31 bytes big, and will
25+
// A typical spendable segwit P2WPKH txout is 31 bytes big, and will
2626
// need a CTxIn of at least 67 bytes to spend:
2727
// so dust is a spendable txout less than
2828
// 98*dustRelayFee/1000 (in satoshis).
@@ -34,6 +34,11 @@ CAmount GetDustThreshold(const CTxOut& txout, const CFeeRate& dustRelayFeeIn)
3434
int witnessversion = 0;
3535
std::vector<unsigned char> witnessprogram;
3636

37+
// Note this computation is for spending a Segwit v0 P2WPKH output (a 33 bytes
38+
// public key + an ECDSA signature). For Segwit v1 Taproot outputs the minimum
39+
// satisfaction is lower (a single BIP340 signature) but this computation was
40+
// kept to not further reduce the dust level.
41+
// See discussion in https://github.com/bitcoin/bitcoin/pull/22779 for details.
3742
if (txout.scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
3843
// sum the sizes of the parts of a transaction input
3944
// with 75% segwit discount applied to the script size.

0 commit comments

Comments
 (0)