Files
bitcoin/src
Suhas Daftuar 3a646ec462 Rework RBF and TRUC validation
Calculating mempool ancestors for a new transaction should not be done until
after cluster size limits have been enforced, to limit CPU DoS potential.

Achieve this by reworking TRUC and RBF validation logic:

- TRUC policy enforcement is now done using only mempool parents of
  new transactions, not all mempool ancestors (note that it's fine to calculate
  ancestors of in-mempool transactions, if the number of such calls is
  reasonably bounded).
- RBF replacement checks are performed earlier (which allows for checking
  cluster size limits earlier, because cluster size checks cannot happen until
  after all conflicts are staged for removal).
- Verifying that a new transaction doesn't conflict with an ancestor now
  happens later, in AcceptSingleTransaction() rather than in PreChecks(). This
  means that the test is not performed at all in AcceptMultipleTransactions(),
  but in package acceptance we already disallow RBF in situations where a
  package transaction has in-mempool parents.

Also to ensure that all RBF validation logic is applied in both the single
transaction and multiple transaction cases, remove the optimization that skips
the PackageMempoolChecks() in the case of a single transaction being validated
in AcceptMultipleTransactions().
2025-11-18 10:48:22 -05:00
..
2025-09-08 18:39:55 +01:00
2025-09-07 17:28:31 +02:00
2025-11-18 10:48:22 -05:00
2025-11-18 10:48:22 -05:00
2025-10-14 14:03:42 -04:00
2025-05-19 16:40:33 +01:00
2025-09-03 11:23:30 +01:00
2025-05-20 09:30:41 +01:00
2024-11-26 20:47:08 -05:00
2025-05-19 16:40:33 +01:00
2025-08-12 11:28:36 -04:00
2025-08-12 11:28:36 -04:00
2024-05-20 16:48:19 +00:00
2024-07-08 11:12:01 +02:00
2025-06-03 08:09:21 +01:00
2025-05-21 10:44:26 -07:00
2025-05-21 10:44:26 -07:00
2025-05-08 16:49:58 +01:00
2025-11-18 10:48:22 -05:00
2025-11-18 10:48:22 -05:00
2025-04-09 15:59:59 +01:00
2025-04-09 15:59:59 +01:00
2025-11-18 10:48:22 -05:00