1 major finding · 4 minor findings · 4 suggestions
Earlier concerns neither republished nor resolved: 1 major finding. See the Run archive for their assessments.
Findings
[major] · Command-line -proxy aborts bitcoin-qt during options initialization
Passing -proxy or -noproxy on the GUI command line now triggers an uncaught flag-mismatch exception before startup completes.
Location: src/common/args.cpp:645 (head).
Details and suggested fix
The PR registers -proxy with ALLOW_LIST, and GetArg() now rejects that flag even for ALLOW_ANY options. OptionsModel::Init detects the command-line proxy and calls addOverriddenOption(), which still uses GetArg(option, ""). This happens before the getOption() exception handler, and createOptionsModel() also runs outside GuiMain's handler. Consequently, bitcoin-qt -proxy=127.0.0.1:9050 and bitcoin-qt -noproxy terminate instead of starting. A proxy specified only in bitcoin.conf does not enter this display path. Build the display value with GetSetting() plus SettingToString(), and add a GUI initialization test using a command-line proxy.
[minor] · Wrapper config parsing stops at valid repeated list options
Repeated list entries now make the bitcoin wrapper warn and stop parsing, potentially hiding later IPC settings and selecting a non-IPC binary.
Location: src/common/config.cpp:103 (head).
Details and suggested fix
UseMultiprocess() registers no options and uses SetDefaultFlags(ALLOW_ANY), so every config key lacks ALLOW_LIST. Two same-section rpcallowip, addnode, debug or includeconf entries therefore trigger the new duplicate check. ReadConfigFiles() returns before processing the remaining values or includes, but the wrapper only warns and selects an executable from the partial settings. If ipcbind appears after the duplicate or in an included file, bitcoin node or bitcoin gui selects bitcoind or bitcoin-qt and does not start the requested IPC listener. Explicit -m or a command-line IPC option avoids that selection failure. Exempt options accepted through fallback defaults from duplicate validation. Simply adding ALLOW_LIST to all defaults would instead make GetChainArg() fail at its scalar GetArg("-chain") call.
[minor] · Config values override command-line blockfilterindex controls
Lower-priority config entries can now undo -blockfilterindex=0 or =1, causing unwanted indexing or a startup failure with -peerblockfilters.
Location: src/init.cpp:1001 (head).
Details and suggested fix
Explicit =0 and =1 values remain strings because -blockfilterindex allows strings. GetSettingsList() retains lower-priority config values and places them after command-line values, so this loop applies them last. Config blockfilterindex=basic plus command-line -blockfilterindex=0 produces ["0", "basic"] and enables the basic index. Config blockfilterindex=0 plus -blockfilterindex=1 clears the set and fails startup if -peerblockfilters is enabled. Base selected the effective scalar control first and skipped the list for 0/1. -noblockfilterindex still suppresses config values through negation. Resolve the on/off control with source precedence, for example using GetSetting(), before collecting filter names, and test opposing command-line and config controls.
[minor] · Numeric blockfilterindex settings now fail startup
A hand-edited settings.json containing numeric blockfilterindex 0 or 1 now reaches a string-only getter and fails startup.
Location: src/init.cpp:1002 (head).
Details and suggested fix
ReadSettingsFile() loads JSON values without applying the registered type flags, and GetSettingsList() includes those values unchanged. For a numeric blockfilterindex value, isTrue() is false and the following get_str() throws because the value is not a string. Base converted numbers with getValStr(), so numeric 0 and 1 worked. No current in-tree writer producing this input was found, and production occurrence is unconfirmed. Convert the value with SettingToString() before comparing it, preserving support for these numeric controls.
[minor] · System fuzzing leaves indirect flag-mismatch exceptions unhandled
The system fuzz target can report expected API-precondition errors as crashes through GetChainTypeString() and GetHelpMessage().
Location: src/test/fuzz/system.cpp:40 (head).
Details and suggested fix
The random AddArg action permits -chain with ALLOW_ANY|ALLOW_LIST. GetChainTypeString() then calls scalar GetArg("-chain"), which throws std::logic_error, but its handler catches only std::runtime_error. The initial -help-debug registration is also insufficient: ClearArgs() removes it, allowing a later registration with incompatible flags to make GetHelpMessage() throw without a handler. Base getters did not enforce these flag preconditions. Handle the expected flag-mismatch logic_errors around both indirect calls, as the harness already does for direct getters.
Optional improvements
[suggestion] · Successful config-string tests log an empty error
ReadConfigString() now emits ERROR '' at info level after successful calls, adding misleading noise to unit-test logs.
Location: src/common/config.cpp:134 (head).
Details and suggested fix
The new LogInfo("ERROR '%s'", error) runs regardless of ReadConfigStream()'s result, so successful parses log an empty error. The helper's checked-in callers are confined to argsman_tests.cpp. It also returns only the boolean, so this log does not add the error text to TestArgsManager's BOOST_REQUIRE diagnostic. Remove the unconditional log; any desired failure diagnostic should be attached to the failing test assertion.
[suggestion] · Flag documentation recommends a getter that rejects non-list options
The repetition guidance omits both GetArgs()'s ALLOW_LIST requirement and the new rejection of repeated non-list config keys.
Location: src/common/args.h:162 (head).
Details and suggested fix
This paragraph tells callers to reject repeated assignments by calling GetArgs(), but that function now throws std::logic_error for registered options without ALLOW_LIST, including ALLOW_ANY options. It also does not distinguish valid command-line overrides from repeated non-list keys in one config section, which ReadConfigStream() rejects. Document those cases separately and state the list-getter precondition explicitly, rather than directing callers to use GetArgs() on an ordinary single-value option.
[suggestion] · Cross-file duplicate errors do not identify the config file
A non-list key repeated through includeconf now fails with a same-section error that names neither file, making the new restriction harder to diagnose.
Location: src/common/config.cpp:104 (head).
Details and suggested fix
ReadConfigFiles() reads the main file and included files into the same ro_config map. Consequently, assigning a non-list key in bitcoin.conf and again in the same section of an included file triggers this check, although base accepted both and selected the first value. The error ignores ReadConfigStream()'s filepath argument, and the release note does not explain that includes share the duplicate-checking scope. Include the current file name in the diagnostic and explicitly document that same-section duplicates across includeconf files are rejected.
[suggestion] · The no-behavior-change description misses scalar reads of list settings
Repeated list settings remain valid, and scalar consumers such as the proxy interaction now select the last config value rather than the first.
Location: src/common/settings.cpp:191 (head).
Details and suggested fix
Removing reverse precedence changes GetSetting() for ALLOW_LIST settings, which can still repeat within a config section. InitParameterInteraction() reads -proxy this way, so repeated proxy= entries containing an empty value or "0" can change whether listen, discover and natpmp are soft-disabled. For repeated global proxy entries, the new choice matches the existing last-value setup loop and is likely an improvement. GetSignetDataDir() also reads a scalar list value, though SelectParams() subsequently rejects multiple challenges. Updated unit assertions already pin last-value selection. Amend the commit's no-behavior-change claim to acknowledge these consumers rather than restoring reverse precedence.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [major]: Repeated documented
-onionsettings now fail config parsing