mempool: lower the per-transaction sigop cost limit to 16000 #2642
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 238 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.328
Real PR Conversation Timeline
1 comments
"Review active on #2642"
general
weight: 0.35
allocz
Change Description
btcd sets
MaxSigOpCostPerTxtoMaxBlockSigOpsCost / 4(20000), whileBitcoin Core's
MAX_STANDARD_TX_SIGOPS_COSTisMAX_BLOCK_SIGOPS_COST / 5(16000). Transactions with a sigop cost between 16001 and 20000 are relayed
and mined by btcd but rejected by Core with
bad-txns-too-many-sigops.This adds
mempool.DefaultMaxSigOpCostPerTxwith Core's value and uses it inthe server and in the mempool test harness.
I found this while comparing btcd's standardness rules against Bitcoin Core
31.1
testmempoolaccepton regtest: a transaction with 201 bare 1-of-1multisig outputs (sigop cost 16080) was accepted by btcd and rejected by Core.
Steps to Test
TestSigOpCostLimitbuilds a transaction with 200 bare 1-of-1 multisigoutputs (cost 16000, accepted) and one with 201 (cost 16080, rejected with
"sigop cost is too high"). With the old
/ 4value the second case isaccepted and the test fails.
Pull Request Checklist
Testing
Code Style and Documentation