Use cluster size limit instead of ancestor/descendant size limits when sanity checking TRUC policy limits
What changed, and why it matters
This is a tiny code-comment and compile-time sanity-check update in Bitcoin Core's TRUC transaction policy. It changes which default mempool limit is referenced in a static_assert, switching from ancestor/descendant size limits to the newer cluster size limit. There is no runtime behavior change, no bug fix for active code, and no disclosed security relevance.
No action required. Treat as routine policy maintenance.
Security signals we found
No security-relevant runtime code changed
Compile-time static_assert only
No memory safety, cryptography, or network changes
No disclosed vulnerability or incident
Evidence from the diff
The commit modifies src/policy/truc_policy.h, replacing two static_assert checks that verify TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE fits within DEFAULT_ANCESTOR_SIZE_LIMIT_KVB and DEFAULT_DESCENDANT_SIZE_LIMIT_KVB with a single check against DEFAULT_CLUSTER_SIZE_LIMIT_KVB. This is a policy-layer compile-time invariant update reflecting the cluster mempool model; it does not alter transaction acceptance logic or introduce a vulnerability.
Changed components
src/policy/truc_policy.hInspect captured patch +2 / −3
diff --git a/src/policy/truc_policy.h b/src/policy/truc_policy.h
index 0ffd0751..8b2ec097 100644
--- a/src/policy/truc_policy.h
+++ b/src/policy/truc_policy.h
@@ -32,9 +32,8 @@ static constexpr int64_t TRUC_MAX_WEIGHT{TRUC_MAX_VSIZE * WITNESS_SCALE_FACTOR};
/** Maximum sigop-adjusted virtual size of a tx which spends from an unconfirmed TRUC transaction. */
static constexpr int64_t TRUC_CHILD_MAX_VSIZE{1000};
static constexpr int64_t TRUC_CHILD_MAX_WEIGHT{TRUC_CHILD_MAX_VSIZE * WITNESS_SCALE_FACTOR};
-// These limits are within the default ancestor/descendant limits.
-static_assert(TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE <= DEFAULT_ANCESTOR_SIZE_LIMIT_KVB * 1000);
-static_assert(TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE <= DEFAULT_DESCENDANT_SIZE_LIMIT_KVB * 1000);
+// These limits are within the default cluster limits.
+static_assert(TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE <= DEFAULT_CLUSTER_SIZE_LIMIT_KVB * 1000);
/** Must be called for every transaction, even if not TRUC. Not strictly necessary for transactions
* accepted through AcceptMultipleTransactions.
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.