{
 "number": 36712,
 "input_hash": "da54e3fb55a4ab04",
 "model": "ledger",
 "prompt_hash": null,
 "created": "2026-11-01T01:16:00+00:00",
 "result": {
  "summary": "Prevents a division-by-zero crash when calling CFeeRate::GetFeePerK() on a zero-sized fee rate. If the fee rate is empty, GetFeePerK() now returns zero instead of evaluating fees down to 1000 vbytes, matching the behavior of GetFee().",
  "problem": "Constructing a CFeeRate with zero size causes subsequent calls to GetFeePerK() or CFeeRate::operator+= to unconditionally call EvaluateFeeDown(1000), resulting in a division by zero that crashes the node.",
  "card": "Prevents an unhandled division-by-zero crash in CFeeRate when calling GetFeePerK() on a zero-sized rate. An empty fee rate now returns zero instead of dividing by zero in EvaluateFeeDown(1000), matching the behavior of GetFee(). This also fixes crashes when using operator+= on empty fee rates and adds unit test coverage. Reported by Jacob F Cudney.",
  "evidence": [
   "A CFeeRate with size 0 GetFeePerK() and CFeeRate+= evaluated EvaluateFeeDown(1000) unconditionally, dividing by that zero size and crashing (PR description)",
   "This was reported by Jacob F Cudney (aragondragon) (PR description)"
  ],
  "scope_notes": "",
  "changed_since_previous": "",
  "thread": {
   "last_event_at": "2026-10-30T21:48:35Z",
   "events": 6,
   "head_sha": "40647a20572a06b0643e28d92b471a2ab3954de6",
   "schema_floor": 2,
   "schema": 2
  },
  "waiting_on": [
   {
    "at": null,
    "id": "",
    "on": "nothing",
    "url": null,
    "what": ""
   }
  ],
  "risk": {
   "level": "medium",
   "touches": [
    "mempool_policy"
   ],
   "why": "Incorrect return values or logic errors in CFeeRate could corrupt fee calculations or comparisons across mempool policy and wallet operations."
  },
  "discussion": {
   "author_status": "last statement processed 2026-10-30",
   "open_concerns": [],
   "resolved_concerns": []
  },
  "reviewability": {
   "state": "Ready",
   "label": "Ready",
   "reason": "Nothing known that would invalidate a review now."
  },
  "agreement": {
   "state": "Positive",
   "summary": "Positive: support without stated reasons, no open objection (darosior, polespinasa, maflcko, pablomartin4btc)",
   "reason": "Initial record. maflcko approved with a test grouping and newline nit (rc:4426094942), which is a style preference rather than a blocking claim. pablomartin4btc, darosior, and polespinasa also supported. / Initial record. Multiple reviewers support the change with ACKs and a Concept ACK; maflcko posted an inline style nit on test grouping alongside approval.",
   "evidence": [
    "darosior: Concept ACK",
    "polespinasa: ACK",
    "maflcko: support \u2014 lgtm",
    "pablomartin4btc: ACK"
   ],
   "objections": [],
   "support": [
    {
     "reviewer": "darosior",
     "reason": "",
     "substantive": false,
     "verdict": "Concept ACK",
     "id": "c:6533159238",
     "url": "https://github.com/bitcoin/bitcoin/pull/36712#issuecomment-6533159238",
     "at": "2026-10-30",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "polespinasa",
     "reason": "",
     "substantive": false,
     "verdict": "ACK",
     "id": "c:6534195836",
     "url": "https://github.com/bitcoin/bitcoin/pull/36712#issuecomment-6534195836",
     "at": "2026-10-30",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "maflcko",
     "reason": "lgtm",
     "substantive": false,
     "verdict": "",
     "id": "r:5715563294",
     "url": "https://github.com/bitcoin/bitcoin/pull/36712#pullrequestreview-5715563294",
     "at": "2026-10-30",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    },
    {
     "reviewer": "pablomartin4btc",
     "reason": "",
     "substantive": false,
     "verdict": "ACK",
     "id": "r:5718132111",
     "url": "https://github.com/bitcoin/bitcoin/pull/36712#pullrequestreview-5718132111",
     "at": "2026-10-30",
     "association": "MEMBER",
     "evidence": "none",
     "areas": []
    }
   ],
   "participants": [
    {
     "login": "darosior",
     "stance": "support",
     "note": "Concept ACK",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-30",
     "last": "2026-10-30"
    },
    {
     "login": "maflcko",
     "stance": "support",
     "note": "approved with lgtm and a test formatting nit",
     "association": "MEMBER",
     "comments": 2,
     "first": "2026-10-30",
     "last": "2026-10-30"
    },
    {
     "login": "pablomartin4btc",
     "stance": "support",
     "note": "ACKed commit 40647a2",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-30",
     "last": "2026-10-30"
    },
    {
     "login": "polespinasa",
     "stance": "support",
     "note": "ACKed commit 40647a2",
     "association": "MEMBER",
     "comments": 1,
     "first": "2026-10-30",
     "last": "2026-10-30"
    }
   ],
   "derivation": "support without stated reasons, no open objection (darosior, polespinasa, maflcko, pablomartin4btc)",
   "model_state": null,
   "corrections": [],
   "notes": "Initial record. maflcko approved with a test grouping and newline nit (rc:4426094942), which is a style preference rather than a blocking claim. pablomartin4btc, darosior, and polespinasa also supported. / Initial record. Multiple reviewers support the change with ACKs and a Concept ACK; maflcko posted an inline style nit on test grouping alongside approval."
  },
  "dependencies": {
   "depends_on": [],
   "enables": []
  },
  "categories": [
   {
    "name": "mempool",
    "member": true,
    "evidence": "Matches the 'TX fees and policy' label and directly modifies policy fee rate calculation in src/policy/feerate.{cpp,h}.",
    "band": "P2",
    "reason_tag": "bug fix",
    "score": 0.65,
    "factors": {
     "bug_severity": 2,
     "leverage": 0,
     "performance": 0,
     "security_stability": 2,
     "user_value": 0
    },
    "rationale": "Prevents a node crash caused by division by zero when CFeeRate::GetFeePerK() or operator+= is invoked on a zero-sized fee rate. While it resolves an unhandled arithmetic fault, there is no evidence of an external remote denial-of-service vector elevating it to category-critical."
   }
  ],
  "confidence": "high",
  "uncertainties": [],
  "needs": []
 },
 "cost_usd": 0.0,
 "source": {
  "record": "2026-11-01T01:16:00+00:00",
  "code": "2026-11-01T01:20:23+00:00",
  "judgments": 1
 }
}