1 major finding · 8 suggestions
Earlier concerns neither republished nor resolved: 3 suggestions. See the Run archive for their assessments.
Findings
[major] · Wallet negation registration makes the new configuration test fail
Static tracing shows that wallet-enabled feature_config_args.py expects a parser error for -notxconfirmtarget but receives a range error instead; the recorded attempts did not reach test execution.
Location: src/wallet/init.cpp:73 (head).
Details and suggested fix
-txconfirmtarget still uses only ArgsManager::ALLOW_ANY, so InterpretValue accepts its negation as false, which integer conversion turns into zero. This fixture sets uses_wallet = None, so it does not add -disablewallet. WalletInit::ParameterInteraction therefore reports -txconfirmtarget must be between 1 and 4294967295 (got 0). The helper requires the exact parser-error text, so the mismatch stops the test before its accepted-zero cases. Add ArgsManager::DISALLOW_NEGATION to this registration to match the new assertion and the other numeric options.
Optional improvements
[suggestion] · Startup compatibility changes have no release note
Existing configurations can newly fail node startup or wallet loading after an upgrade, but the PR supplies no release-note fragment explaining the changed numeric ranges and negation rules.
Location: src/init.cpp:1175 (head).
Details and suggested fix
Nonpositive -timeout previously selected the default, while -bantime=0 and -limitclustersize=0 were accepted by argument loading. These now cause initialization errors. Numeric negations such as -nodatacarriersize also newly fail parsing. Add a doc/release-notes-*.md fragment listing the changed ranges, positive-only settings and negation restriction. Include the -txconfirmtarget representation bounds and its additional wallet-load ceiling when an estimator exists, noting that the estimator ceiling is skipped when no estimator is running.
[suggestion] · The commit message promises zero values that startup rejects
Commit 7a5c9d81a7343c63497deed527b0503807d503dc says -bantime=0 and -limitclustersize=0 remain valid, although both are rejected, and incorrectly describes -dbbatchsize=0 as disabled batching.
Location: src/init.cpp:1215 (head).
Details and suggested fix
The commit message and PR description list both positive-only settings under “Zero remains valid”, contrary to the new checks and their rejection tests. Neither zero represented a useful disabled mode: zero cluster size prevented ordinary admission, and zero default bantime produced immediately expiring bans. Also, a zero database batch threshold causes partial writes as soon as the accumulated batch exceeds zero; it does not disable batching. Rewrite the message and description to distinguish the newly positive-only settings from accepted zero values and describe the batch threshold accurately.
[suggestion] · Oversized wallet count limits still wrap to restrictive values
The new checks leave pre-existing wrapping in debug-only, deprecated wallet limits: 4294967296 becomes zero in getPackageLimits, restricting zero-confirmation coin selection instead of increasing the limit.
Location: src/node/mempool_args.cpp:64 (head).
Details and suggested fix
ancestor_count and descendant_count retain the full int64_t value, but getPackageLimits copies them into unsigned int outputs. With a 32-bit unsigned int, the example becomes zero, which AutomaticCoinSelection clamps to one; the derived /3, /2 and -1 limits then become zero. The unconditional CoinEligibilityFilter(0, 1, 2) and the unlimited fallback under -walletrejectlongchains=0 still apply, so this does not universally prevent spending. Bound both options by std::numeric_limits<unsigned int>::max() before storing them, and add boundary tests.
[suggestion] · Oversized crash ratios still change meaning during narrowing
The pre-existing crash-simulation narrowing remains unchecked: on 32-bit-int targets, 4294967296 disables simulation and 4294967297 changes it to a crash at every partial flush.
Location: src/node/coins_view_args.cpp:32 (head).
Details and suggested fix
Only negative source values are rejected before static_cast<int>(*value). A narrowed zero bypasses the simulation guard, while a narrowed one makes randrange(1) return zero after each partial batch. Reject values above std::numeric_limits<int>::max() before the cast, as the timeout validation already does, and test acceptance at INT_MAX and rejection at INT_MAX + 1. This preserves zero as disabled and all representable positive crash ratios.
[suggestion] · The negative-expiry comment describes the opposite behavior
The new comment describes the rejected negative setting backwards: a future expiration cutoff would remove ordinary entries prematurely rather than prevent expiry.
Location: src/node/mempool_args.cpp:90 (head).
Details and suggested fix
LimitMempoolSize passes now - expiry to Expire, which removes entries with timestamps below that cutoff. Subtracting a negative duration moves the cutoff forward and makes ordinary existing entries eligible for removal. Change the comment to say that negative expiry would expire transactions prematurely. The rejection itself is correct.
[suggestion] · The upper bytes-per-sigop check has no regression test
No configuration assertion depends on rejecting -bytespersigop above UINT_MAX; removing that comparison would admit a value that narrows to zero.
Location: test/functional/feature_config_args.py:234 (head).
Details and suggested fix
The rejection table only supplies -bytespersigop=-1, which still fails the sign check without the upper-bound comparison. Zero is explicitly accepted, and the sigop-policy test uses much smaller values. Add -bytespersigop=4294967296 with the expected range error to the rejection table. That case distinguishes the upper-bound check from the sign check and catches silent narrowing to zero, which disables sigop-adjusted sizing.
[suggestion] · The confirmation-target test misses the accepted boundary
Changing > to >= would wrongly reject -txconfirmtarget=1008 without being caught by the new 1009 rejection test.
Location: test/functional/wallet_fallbackfee.py:76 (head).
Details and suggested fix
This fixture has a normal estimator with a maximum target of 1008, but every successful restart leaves the confirmation target at its default. Before the failing start, start the node with -txconfirmtarget=1008, check that the existing wallet loaded, and stop it. Keep the 1009 rejection afterward so the test distinguishes an accepted maximum from an excessive target.
[suggestion] · Estimator-dependent wallet validation is bundled with node range checks
The single commit combines node numeric hardening with an unmentioned estimator-dependent wallet-load rule, making that acceptance change harder to review or revert separately.
Location: src/wallet/wallet.cpp:2942 at 7a5c9d81a734 (commit) (commit).
Details and suggested fix
Commit 7a5c9d81a7343c63497deed527b0503807d503dc contains both node sign/range checks and new wallet confirmation-target validation. The estimator-maximum restriction goes beyond conversion hardening: it can refuse wallet loads that previously succeeded, and it is skipped when maximumFeeEstimationTargetBlocks() returns zero. Move the src/wallet/init.cpp changes, including its include and help text, the src/wallet/wallet.cpp changes, all wallet-specific cases in feature_config_args.py, and the wallet_fallbackfee.py test into a following commit whose message explains the live ceiling and zero exception. The chain API already exists at base, so this needs no node-validator scaffolding and separates estimator-policy review and reversion from node checks. The split does not itself fix the negation-test mismatch.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Accepted mempool arguments are not checked for their applied values (earlier report)
- [suggestion]: Clearly excessive confirmation targets fail only at wallet load (earlier report)
- [suggestion]: The bytes-per-sigop ceiling ignores downstream int32 size fields (earlier report)
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
Bounded database write batches address flush-time peak memory without requiring more frequent UTXO-cache flushes. The original design deliberately gave up whole-flush atomicity in LevelDB and used the blockchain as an existing recovery log: a transition marker identifies an interrupted flush, and block replay restores a consistent database.
In pinned src/txdb.cpp, batch_write_bytes controls partial writes, while head-block markers bracket the transition. This is the historical purpose behind the threshold populated by -dbbatchsize: it controls temporary write-batch accumulation, not just the size of the UTXO cache. The same historical discussion introduced simulated crashes after partial flushes, explaining why -dbcrashratio exists as a recovery-testing control.
Cluster mempool organizes transactions by connected dependency groups and linearizes each group to favor high-feerate subsets. Mining selects high-feerate chunks, eviction removes low-feerate chunks, replacement compares feerate diagrams, and relay ordering also uses chunk feerates. Cluster limits replaced ancestor/descendant admission limits, while some older information remained available for compatibility.
The base and head mempool argument loaders already configure cluster count and virtual-size limits; this PR changes their accepted configuration ranges. The historical design explains why these controls apply to indirectly connected transactions rather than merely individual transactions. It also explains why the deprecated ancestor/descendant settings should not be interpreted as the current mempool admission boundary.
Mempool expiry was retained as eventual cleanup for transactions that mining policy might not select, including accidental network misbehavior—not as a sufficient defense against a deliberate mempool-filling attack. Extending retention from three days to two weeks was justified by reduced re-relay traffic, weekly demand cycles, and the prospect of useful fee estimates for users willing to wait longer.
The affected -mempoolexpiry argument configures a retention duration separately from mempool size and dependency limits. Its historical role is therefore not interchangeable with those other resource controls. The discussion also warns against interpreting local expiry as cancellation: other parties can relay old transactions again.
Source 1 · Source 2 · Source 3
The bytes-per-sigop option was introduced as an additional relay-and-mining restriction, with an explicitly stated motivation of providing mitigation against sigop spam. Participants separately questioned the choice of the default value, so the motivation for having the control should not be confused with a documented derivation of its numerical default.
The affected initialization code assigns -bytespersigop to the unsigned nBytesPerSigOp setting. This history explains why a transaction's byte footprint alone is not the only policy resource measure: signature-operation density is another concern. The inspected discussion does not establish that the particular default is a protocol requirement.
Source 1 · Source 2 · Source 3 · Source 4
Ralph's inferences
Cluster-size bounds serve both economic reasoning and computational containment: keeping dependency groups bounded limits the scope of the graph that must be reconsidered when ordering, replacing, mining, or evicting interconnected transactions. This is an inference from the documented cluster operations, not a retrieved explanation of why the exact ceiling is 64.
Pinned src/node/mempool_args.cpp validates cluster count before conversion and cluster virtual size before scaling. Those settings delimit the groups on which the documented chunk-based decisions operate; they are not merely alternative spellings of the total mempool memory budget.