2 minor findings · 3 suggestions
Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.
Findings
[minor] · Release notes describe literal-zero limits as disabled or unlimited
The new notes call -mempoolexpiry=0 disabled or unlimited, although its unchanged behavior expires older transactions on the next limiting pass.
Location: doc/release-notes-36861.md:30 (head).
Details and suggested fix
The zero-value heading groups options whose consumers apply literal zero limits. With -mempoolexpiry=0, LimitMempoolSize expires entries older than the current second, and ordinary persisted entries fail the reload age check. Likewise, -dbbatchsize=0 writes any nonempty batch after a cursor step, while -maxtipage=0 requires the tip timestamp to be at least as recent as now. An operator seeking indefinite retention could therefore select the opposite behavior. Describe zero as retaining its option-specific meaning and explain these important cases. The negation paragraph should also say that -nofoo selected a zero-valued limit, rather than saying it turned the limit off.
[minor] · The -maxtipage ceiling rejects a regression-tested supported value
-maxtipage=9223372036854775807, previously included in the functional regression test, now fails startup despite fitting the destination and its seconds-precision comparison.
Location: src/node/chainstatemanager_args.cpp:63 (head).
Details and suggested fix
The base reads an int64_t directly into std::chrono::seconds; this PR changes parsing to ToIntegral<uint32_t> and replaces the INT64_MAX functional case with UINT32_MAX. The comment's minimum-width guarantee for seconds does not make uint32_t the widest type the destination can hold. IsTipRecent subtracts the duration from Now<NodeSeconds>(), so subtracting INT64_MAX at the current nonnegative time does not underflow. Preserve the supported range with strict ToIntegral<int64_t> parsing, reject negatives, and check against std::chrono::seconds::max().count(). This retains the safety checks without requiring configurations using a large age sentinel to change, and preserves the original regression case.
Optional improvements
[suggestion] · -txconfirmtarget validity changes with relay mode
With a startup wallet, -txconfirmtarget=1009 is accepted under -blocksonly but prevents startup after transaction relay is enabled, even if the wallet always uses explicit fees.
Location: src/wallet/wallet.cpp:2943 (head).
Details and suggested fix
LoadWalletArgs interprets an estimator maximum of zero as no ceiling. Since -blocksonly leaves the estimator absent, removing that option changes the accepted target range from UINT_MAX to 1008; the new functional test asserts both outcomes. This leaves a configuration accepted in one relay mode invalid in the other. The hard load failure also applies when an explicit fee rate bypasses the wallet target or an RPC confirmation target overrides it. Enforce the chosen target-capacity ceiling independently of whether the estimator is running, while retaining the unsigned representation check. That reports an invalid configuration when it is first used instead of deferring the error until the relay mode changes.
[suggestion] · mempool_args_validation never checks the stored accepted values
The new parser test checks success or failure but discards the options, leaving the direct-seconds conversion for hour counts above INT32_MAX unprotected.
Location: src/test/mempool_tests.cpp:557 (head).
Details and suggested fix
get_opts returns only ApplyArgsManOptions's status, and its only accepted expiry is zero. Reverting the assignment to std::chrono::hours{*hours} would leave these assertions satisfied despite narrowing wide values on implementations with a narrower hours representation. The existing default and ten-hour functional cases cannot distinguish that regression. Follow the chainstatemanager_args helper pattern by returning the populated options on success, then assert that -mempoolexpiry=2147483648 stores 7730941132800 seconds. This protects the MSVC-motivated conversion without changing production code or removing the rejection checks.
[suggestion] · One commit couples arithmetic fixes to compatibility restrictions
Separating the arithmetic fixes from compatibility restrictions would let each group be validated and reverted without changing the other.
Location: src/wallet/wallet.cpp:2942 at a210aeebe7eb (commit) (commit).
Details and suggested fix
The sole commit, a210aeebe7ebb66d35c9f51d700e21b41add60de, combines buffer and integer-narrowing checks with independent decisions about the -maxtipage ceiling, nonpositive -timeout values, the estimator-derived -txconfirmtarget ceiling, and eight DISALLOW_NEGATION additions. These need different validation: proving arithmetic representability does not decide which previously accepted configurations should stop starting.
Split the commit into: (1) representation checks, keeping the ReadCoinsViewArgs util::Result<void>/[[nodiscard]] change and its error propagation together with matching tests; (2) compatibility restrictions with their tests and release-note text; and (3) help-text changes. The first commit would need a strict nonnegative -maxtipage parser that preserves the old positive range, and should retain the old nonpositive-timeout fallback until the compatibility commit. This adds some intermediate code but leaves the final tree unchanged and makes the safety checks independently reviewable and revertible.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Ancestor and descendant limits still narrow silently in the wallet interface (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
Negation permission was deliberately separated from numeric type validation to avoid accidental compatibility changes. The 2021 introduction of DISALLOW_NEGATION explained that the older ALLOW_INT/BOOL/STRING flags did not actually validate values, and implementing them as if they did would break existing configurations.
Adding DISALLOW_NEGATION to existing numeric options changes an independently established syntax permission; it is not merely enforcing a numeric type that was already promised. This history distinguishes the patch's range checks from its rejection of previously accepted -nofoo forms.
The argument-validation work treated false/0/empty-string interpretations of negation as type-dependent defaults while preserving enough internal information for individual callers to choose different semantics. Earlier follow-up work explicitly rejected meaningless negations such as -nodatadir while supporting meaningful disabling forms such as -noconf and -nopid.
The historical model is option-specific rather than a universal rule that negation means 'remove this limit.' The pinned parser returns false for ordinary negation and supports discouraged double negatives. Whether zero disables an adjustment, imposes a zero-sized budget, or has another effect must be established separately for each affected option.
The previously accepted large -maxtipage range was consciously preserved during a 2022 chrono-comparison repair. PR #26477 identified 9223372036854775807 as the maximum allowable value; James O'Beirne argued for restoring usages that had worked before the conversion regression and adding test coverage rather than first redesigning integer parsing.
The pinned base still parses the age as an integer duration and explicitly tests INT64_MAX. Consequently, changing the ceiling to UINT32_MAX crosses a historically recognized and regression-tested compatibility boundary, independently of the rationale for rejecting negative ages.
Fee estimation was disabled under -blocksonly to avoid serving misleading stale estimates, not simply to save resources. PR #18766 described estimates becoming outdated after transaction relay stopped, affecting both the internal wallet and fee-sensitive external applications, and preferred estimation failure to inaccurate values.
The pinned interface reports no estimate and a maximum target of zero when the estimator manager is absent. That zero reflects estimator unavailability. The historical safety concern applies to wallet users as well as RPC clients, but the proposal does not state that unavailable estimation should broaden the set of valid confirmation-target configurations.
Fallback fees are an explicit policy for unavailable estimates, with a documented financial-safety tradeoff: a static rate can overpay substantially or leave a transaction unconfirmed. The mainnet default was removed so transactions without estimates and without an explicitly configured fallback would be rejected. A later proposal argued that test chains have different usability needs, while another participant objected to further differences in defaults.
The pinned wallet fee path uses fallback when estimation yields no rate, and zero fallback means disabled. Thus needing fallback has historically been handled at fee selection or transaction creation, with explicit user configuration, rather than inherently making a wallet configuration unloadable. This context bears on the new load-time target ceiling without establishing that all formerly accepted targets were intentional.
Source 1 · Source 2 · Source 3 · Source 4
Ralph's inferences
Estimator availability and confirmation-target validity are separate questions in the inspected record. The history supports refusing to manufacture an estimate under -blocksonly, but does not establish a historical requirement either to accept otherwise out-of-range targets in that mode or to reject them.
The head explicitly skips its estimator-derived ceiling when maximumFeeEstimationTargetBlocks() returns zero. That mode-dependent acceptance rule is not a consequence demonstrated by the earlier stale-estimate safety decision; its historical justification remains unanswered.
The inspected code distinguishes representation safety from operational resource limits. Cluster count already had an upper-bound check at the base. The head additionally enforces positive cluster size/count and bounds the kilobyte-to-byte and hour-to-second conversions; its comments connect invalid values to oversized limits, blocked admission, or expiration cutoffs in the future.
These are concrete reasons to distinguish arithmetic bounds from configurable mempool policy. They do not establish why the historical cluster maximum is 64, nor prove that every accepted extreme value has a useful operational meaning.
Unresolved disagreements
Time-based expiry has competing policy rationales in the inspected discussion. Its removal was proposed because age can evict transactions that remain attractive to miners and cause rebroadcast bandwidth costs; an objection emphasized retaining users' and miners' ability to restore previous behavior if a policy change proved harmful.
This cautions against equating the expiry setting solely with an unquestioned safety limit. The current patch retains expiry while restricting its numeric domain and negation syntax. The sampled discussion does not resolve those exact compatibility boundaries or supply a historical rationale for the proposed numeric maximum.