From 77202f0554dcbbbb167d0ed3927cca0bf4609ce8 Mon Sep 17 00:00:00 2001 From: glozow Date: Thu, 10 Feb 2022 11:59:26 +0000 Subject: [PATCH] [doc] package deduplication --- doc/policy/packages.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/policy/packages.md b/doc/policy/packages.md index 07698f2af2b..7f7fbe18cdf 100644 --- a/doc/policy/packages.md +++ b/doc/policy/packages.md @@ -57,3 +57,18 @@ test accepts): - Warning: Batched fee-bumping may be unsafe for some use cases. Users and application developers should take caution if utilizing multi-parent packages. + +* Transactions in the package that have the same txid as another transaction already in the mempool + will be removed from the package prior to submission ("deduplication"). + + - *Rationale*: Node operators are free to set their mempool policies however they please, nodes + may receive transactions in different orders, and malicious counterparties may try to take + advantage of policy differences to pin or delay propagation of transactions. As such, it's + possible for some package transaction(s) to already be in the mempool, and there is no need to + repeat validation for those transactions or double-count them in fees. + + - *Rationale*: We want to prevent potential censorship vectors. We should not reject entire + packages because we already have one of the transactions. Also, if an attacker first broadcasts + a competing package or transaction with a mutated witness, even though the two + same-txid-different-witness transactions are conflicting and cannot replace each other, the + honest package should still be considered for acceptance.