{
 "number": 36367,
 "input_hash": "4153c8e7b2f7f3b1",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-09-29T14:29:19+00:00",
 "result": {
  "summary": "Bound fee deltas in the `prioritisetransaction` RPC and mempool prioritisation tracking to the range between `-MAX_MONEY` and `MAX_MONEY`. CTxMemPool::PrioritiseTransaction clamps accumulated deltas to this range and adjusts modified fees by the difference. This prevents transaction fee sums across cluster mempool chunks from overflowing 64-bit integer limits.",
  "problem": "CTxMemPool::PrioritiseTransaction allowed accumulated transaction fee deltas to reach INT64_MAX. When cluster mempool aggregates modified fees across multiple transactions in FeeFrac, the calculation experiences signed integer overflow, resulting in negative chunk fees and causing getblocktemplate to omit affected transactions.",
  "card": "Clamps prioritisetransaction fee deltas and accumulated mempool deltas to the range [-MAX_MONEY, MAX_MONEY]. Unbounded int64 fee deltas previously allowed stacked transaction fees to cause signed integer overflow in cluster mempool FeeFrac arithmetic, producing negative chunk fees and causing getblocktemplate to exclude prioritised transactions from mined blocks. Restricting individual and accumulated deltas ensures cluster fee calculations stay within int64 limits, preventing undefined behaviour and broken block templates for miners.",
  "evidence": [
   "PR description documents reproducible UBSan failure: \"feefrac.h:108:13: runtime error: signed integer overflow, reached from linearization via getrawmempool\".",
   "PR description demonstrates that prioritising a parent by 2^62 and a child by INT64_MAX causes getmempoolcluster to report \"chunkfee: -46116860184.27356705\" and getblocktemplate to exclude both transactions."
  ],
  "scope_notes": "",
  "changed_since_previous": "No changes to the patch or approach; full diff is now provided.",
  "thread": {
   "last_event_at": null,
   "events": 0,
   "head_sha": "0d168345063e6ba56155bfd97f647bbad4687546",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [],
  "risk": {
   "level": "medium",
   "touches": [
    "mempool_policy",
    "rpc_api"
   ],
   "why": "A flaw in delta clamping or modified fee accounting could cause incorrect chunk fee calculations in the cluster mempool or corrupt block template construction for miners."
  },
  "discussion": {
   "author_status": "no discussion",
   "open_concerns": [],
   "resolved_concerns": []
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Crickets",
   "summary": "Crickets: no substantive comment either way",
   "reason": "Derived from the claims and support below; every entry links to the statement it came from.",
   "evidence": [],
   "objections": [],
   "support": [],
   "participants": [],
   "derivation": "no substantive comment either way",
   "model_state": null,
   "corrections": [],
   "notes": null
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "mempool",
    "member": true,
    "evidence": "Carries the Mempool label and edits src/txmempool.cpp to prevent FeeFrac integer overflows during cluster mempool linearization.",
    "band": "P2",
    "reason_tag": "bug fix",
    "score": 0.65,
    "factors": {
     "bug_severity": 2,
     "leverage": 1,
     "performance": 0,
     "security_stability": 1,
     "user_value": 0
    },
    "rationale": "Clamping transaction fee deltas resolves a signed integer overflow in FeeFrac during cluster mempool linearization. The PR description notes a reproducible UBSan failure (\"feefrac.h:108:13: runtime error: signed integer overflow\") and cluster calculation corruption, which is an important correctness fix for cluster mempool data structures."
   },
   {
    "name": "mining",
    "member": true,
    "evidence": "Modifies prioritisetransaction handling in src/rpc/mining.cpp and tests in test/functional/mining_prioritisetransaction.py to fix getblocktemplate transaction omission.",
    "band": "P3",
    "reason_tag": "bug fix",
    "score": 0.35,
    "factors": {
     "bug_severity": 2,
     "leverage": 1,
     "performance": 0,
     "security_stability": 1,
     "user_value": 0
    },
    "rationale": "Bounding prioritisetransaction deltas prevents template construction from omitting prioritized transactions due to corrupted chunk fees. The PR shows extreme fee deltas caused getblocktemplate to omit affected transactions, though triggering the issue requires unrealistic deltas exceeding MAX_MONEY."
   },
   {
    "name": "rpc",
    "member": false,
    "evidence": "Touches src/rpc/mining.cpp only to validate domain parameters for mempool prioritisation, not the RPC framework.",
    "band": "Unranked",
    "reason_tag": "cleanup",
    "score": 0.0,
    "factors": {
     "bug_severity": 2,
     "leverage": 1,
     "performance": 0,
     "security_stability": 1,
     "user_value": 0
    },
    "rationale": "The change alters domain-specific validation inside prioritisetransaction rather than the RPC infrastructure or dispatch layer."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-09-29T14:29:19+00:00",
  "code": "2026-09-29T14:36:18+00:00",
  "judgments": 3
 }
}