1 minor finding · 4 suggestions
Earlier concerns neither republished nor resolved: 3 suggestions. See the Run archive for their assessments.
Findings
[minor] · Raw bucket conversion admits out-of-range integer casts
With sat_vb=true, abnormal persisted bucket boundaries can reach an undefined integer cast; no normal producer of these values was found, and production impact is unconfirmed.
Location: src/rpc/fees.cpp:252 (head).
Details and suggested fix
CBlockPolicyEstimator::Read can load a corrupted or locally edited fees/block_policy_estimates.dat without validating its bucket boundaries. With empty statistics, the last boundary still reaches fail.end, which estimaterawfee converts even on its error path. The double representation of CAmount::max() is exactly 2^63, so the strict > guard admits equality before casting to int64_t. Values below -2^63 and NaN also bypass it. Base returned rounded doubles without this narrowing. Normal boundaries, including the positive 1e99 sentinel, do not trigger the defect. Before casting the rounded value x, use the floating-point fallback when !std::isfinite(x) || x >= 0x1p63 || x < -0x1p63.
Optional improvements
[suggestion] · Functional tests do not check the sat/vB output scale
The new functional tests would still pass if each RPC parsed sat_vb but ignored it when selecting output units.
Location: test/functional/rpc_named_arguments.py:41 (head).
Details and suggested fix
Each sat_vb=True result is compared only with other true-mode argument forms. The default and error assertions test compatibility and parsing, while rpc_format_feerate_values tests the formatter directly rather than handler wiring. Add cross-unit assertions for all info-RPC fee fields, including getnetworkinfo.incrementalfee: true-mode values should equal default BTC/kvB values times 100000. Raw bucket boundaries instead need division by 1000, preserving -1; their fail-bucket output can be checked without successful estimates. To cover estimatesmartfee.feerate and raw horizon feerate, use a populated-estimator fixture such as feature_fee_estimation.py. The current rpc_estimatefee.py fixture has no transaction-estimation history, and its chain cache excludes the estimator files.
[suggestion] · estimaterawfee help leaves the bucket-unit conversion unspecified
Although bucket units were already undocumented, sat_vb now changes them from sat/kvB to sat/vB without explaining this in the help.
Location: src/rpc/fees.cpp:178 (head).
Details and suggested fix
The option text names BTC/kvB and sat/vB for horizon feerate, but startrange and endrange start in sat/kvB, not BTC/kvB. Their descriptions still say only “start/end of feerate range,” leaving callers unable to distinguish the two default scales from the field documentation. State “in sat/kvB, or sat/vB if sat_vb is true” beside both boundaries, with -1 identified as the preserved unavailable-boundary sentinel. Restore the corresponding “in BTC/kvB, or sat/vB if sat_vb is true” wording beside horizon feerate, whose local unit annotation this patch removes.
[suggestion] · OpenRPC labels sat/vB fee fields with an unconditional BTC unit
The five info-RPC fee fields retain BTC amount annotations with sat_vb=true; their descriptions are correct, and no downstream consumer was checked, so client impact remains hypothetical.
Location: src/rpc/mempool.cpp:1154 (head).
Details and suggested fix
STR_AMOUNT generates {"type":"number","x-bitcoin-unit":"amount"}, and getopenrpcinfo defines amount as BTC. The schema does not vary with RPC arguments. A consumer following that annotation rather than the description could interpret sat/vB output as BTC/kvB, a factor-of-100000 scaling error. Using NUM for mempoolminfee, minrelaytxfee, incrementalrelayfee, relayfee, and incrementalfee would retain their numeric schema and runtime values without the unconditional unit annotation. That also removes the existing annotation in default mode, so account for consumers relying on it; alternatively, explicitly document that the annotation does not apply when sat_vb is enabled.
[suggestion] · Release note omits the newly accepted estimatesmartfee named options
The note announces sat_vb but not the newly accepted top-level fee_rate_estimator and verbosity arguments for estimatesmartfee.
Location: doc/release-notes-33741.md:4 (head).
Details and suggested fix
Changing options to OBJ_NAMED_PARAMS lets callers supply its children directly as named arguments, whereas base rejected top-level fee_rate_estimator. The third-position options object remains supported. Add one sentence explaining that estimatesmartfee options (fee_rate_estimator, verbosity, and sat_vb) can now be passed as top-level named arguments, so users can discover the additional call form.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Cover enabled fee-rate units in functional tests
- [suggestion]: Document the units of raw-fee bucket boundaries
- [suggestion]: Keep the direct
core_io.hinclude