Review report

core: PR #31260

1 minor finding · 4 suggestions

Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.

Findings

Link

[minor] · The -blockfilterindex help text omits its bare and =1 behavior

The help output no longer explains that a bare -blockfilterindex or -blockfilterindex=1 enables all filter types; option parsing is unchanged.

Location: src/init_settings.h:297 (head).

Details and suggested fix

The generated setting keeps only the first sentence of the original help text and drops the sentence explaining that omitting <type> or setting it to 1 enables all known filter types. As a result, bitcoind -help and bitcoin-qt help no longer document that behavior. AppInitParameterInteraction is unchanged. Because init_settings.h is generated, preserve the sentence in the prepare commit, for example by folding it into the format string as an adjacent literal. Diffing -help and -help-debug output between the base and head for each binary would also catch other dropped fragments.


Optional improvements

Link

[suggestion] · Six retrieved options are declared as never-retrieved common::Unset settings

These options are still read through string-keyed GetArg<T>, so their declarations carry the wrong type and do not provide the name and type checking the change is intended to add.

Location: src/init_settings.h:248 (head).

Details and suggested fix

common::Unset is documented for dummy settings that are never retrieved, but six options declared with it are still read: -prevoutfetchthreads, -rpcthreads, -rpcworkqueue, -rpcmaxconnections, -blockmaxweight and -blockreservedweight. Those reads use templated calls such as GetArg<int32_t>("-prevoutfetchthreads") and GetArg<uint64_t>("-blockmaxweight"). The script appears to miss this form and therefore chooses Unset. Runtime behavior is unchanged, but misspelled names or inconsistent types at these call sites still compile, and the declarations wrongly suggest the options are unused. Translate GetArg<T>("-name"[, default]) into a std::optional<T> setting or a T setting with a default; SettingTraits accepts integral types and preserves the existing conversion widths. Also, -maxconnections is declared as int64_t but is read once with GetArg<int>, so its declaration and read type remain inconsistent.


Link

[suggestion] · Common-library sources include the node-wide settings header for general options

This makes bitcoin_common compile against many node-subsystem headers, coupling layers and widening rebuilds without changing runtime behavior.

Location: src/common/args.cpp:12 (head).

Details and suggested fix

common/args.cpp, common/config.cpp and chainparams.cpp belong to bitcoin_common, which bitcoin-cli and bitcoin-wallet also link. They include init_settings.h to reach general options such as -settings, -help-debug, -test, -conf, -datadir and -fastprune. That header pulls in node subsystem headers including net.h, net_processing.h, httpserver.h, index headers, txgraph.h, torcontrol.h and zmq/zmqabstractnotifier.h; edits to those headers can therefore rebuild common-library sources. Similar coupling occurs where bitcoin.cpp includes the umbrella for -ipcbind and node/interfaces.cpp includes wallet/init_settings.h to read -signer, which in turn includes wallet/wallet.h. The generator groups declarations by the file that registers them, rather than by the code that reads them. Emit settings used by common code into lightweight headers such as common/args_settings.h and chainparamsbase_settings.h, which include only common/setting.h, and keep init_settings.h for node init code. This preserves the aliases and behavior while avoiding the unnecessary include coupling.


Link

[suggestion] · The documentation lint misses reads through ::Value, suffixed aliases and get_net

If registration for an option read through one of these forms were removed, the lint could still pass even though startup would reject the option.

Location: test/lint/check-doc.py:16 (head).

Details and suggested fix

The previous regex found literal option names passed to IsArgSet, GetArg*, GetPathArg and get_net, then checked that each had an AddArg call. The new regex only extracts aliases named exactly ...Setting and followed by ::Get. It misses reads through ::Value, such as CJdnsReachableSetting::Value, suffixed aliases such as SignetChallengeSettingStr::Get, and chain flags read with get_net("-signet") and similar calls. SET_DOC_OPTIONAL also retains option strings such as -h and -dbcrashratio, which no longer match alias names. Typed aliases keep names consistent, but do not ensure that Register is called, so this lint still has value. Match reads through (\w+Setting)\w*::(?:Get|Value) and registrations through (\w+Setting)\w*::Register, normalizing suffixed aliases to their base alias; then update the stale string entries and remaining get_net reads. No current option is unregistered; this finding concerns lost lint coverage.


Link

[suggestion] · The added libevent::core link entries cannot resolve

None of the six $<TARGET_NAME_IF_EXISTS:libevent::core> entries can resolve, so the stated reason for adding them no longer applies.

Location: src/CMakeLists.txt:157 (head).

Details and suggested fix

Commit 3d551de adds $<TARGET_NAME_IF_EXISTS:libevent::core> to bitcoin_common, bitcoin, bitcoind, bitcoin-node, the Qt target and test/util, citing init_settings.h including torcontrol.h, which includes <event2/util.h>. At this head, torcontrol.h has no libevent include, no tracked file includes event2/, and no CMake file finds or defines a libevent target. The expressions therefore expand to nothing. Remove the entries and limit the commit message to the univalue and Boost include requirements that remain.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.