Provider refusals
write_verifier: Provider declined the request because of a cybersecurity restriction. Experiments remain incomplete; static verification can continue.
1 major finding · 5 minor findings · 2 suggestions
Earlier concerns neither republished nor resolved: 3 suggestions. See the Run archive for their assessments.
Findings
[major] · Unknown categories in a categories object dereference an empty optional
A positional or explicit categories object with an unknown key can trigger undefined behavior instead of an invalid-parameter error; only an authenticated RPC client can make this call.
Location: src/rpc/node.cpp:273 (head).
Details and suggested fix
The comment assumes OBJ_NAMED_PARAMS has validated category names, but that validation applies only to flattened named arguments. For a positional object or an explicit categories= argument, RPCArg::MatchesType checks only that the value is an object. For example, bitcoin-cli loglevel debug '{"bogus":"debug"}' reaches this code with a valid level value, and GetLogCategory("bogus") returns std::nullopt before the code dereferences it. Builds with standard-library assertions can abort the node; other builds pass an indeterminate flag to AddCategoryLogLevel and EnableCategory or DisableCategory, so the exact outcome depends on the build. Check the optional and throw RPC_INVALID_PARAMETER, as the logging RPC does. Add a functional test using a positional object with an unknown key.
[minor] · A config-file global loglevel overrides per-category command-line levels
Because config-file values are applied after command-line values, a global level in the config can silently erase a command-line -loglevel=<category>:<level> override.
Location: src/init/common.cpp:85 (head).
Details and suggested fix
GetArgs("-loglevel") returns command-line values first, followed by the config file's network section and then its default section. Each global token clears per-category overrides and then enables or disables BCLog::ALL. With loglevel=debug in bitcoin.conf and -loglevel=net:trace on the command line, the net override is applied and then erased, so net logs at debug. With loglevel=info in the config, net is disabled. Before this change, a global token changed only the global threshold, so the command-line override survived. The release notes describe loglevel=debug as a synonym for debug=1, but debug=1 in the config does not have this effect because -debug is processed before -loglevel. Apply global tokens before per-category tokens so specific entries win, and document that rule in the option help.
[minor] · An info category level prevents the default debug-log shrink
-loglevel=<category>:info leaves the category enabled even though it blocks debug and trace output, unlike the -debugexclude equivalent described in the release notes.
Location: src/init/common.cpp:98 (head).
Details and suggested fix
The per-category path enables the category for every token, including info. With only -loglevel=net:info, net's threshold is Info, so debug and trace messages are filtered, but the category mask still contains NET. DefaultShrinkDebugFile() returns true only when that mask is NONE, and StartLogging uses the result as the default for -shrinkdebugfile. Therefore, an oversized debug.log is not trimmed at startup. The GUI also checks this mask when deciding whether to show extra transaction debug details. The release notes describe this setting as equivalent to -debugexclude=<category>, which clears the bit; the RPC also disables the category for Info. Enable the category only for debug or trace, and disable it for info, matching the RPC behavior. An explicit -shrinkdebugfile setting still overrides the default.
[minor] · The libevent examples for the loglevel RPC are rejected
Two documented commands return an "Unknown named parameter" error because libevent is not a valid named category.
Location: doc/release-notes-35387.md:25 (head).
Details and suggested fix
bitcoin rpc adds -named, so libevent=info is sent as a named parameter. The loglevel RPC declares named category arguments from LogCategoriesList(), which has no libevent entry, and transformNamedArguments rejects the call. The combined example on line 26 fails for the same reason and never applies its global trace level. Even if accepted, libevent is a deprecated no-op that maps to BCLog::NONE. Replace it with a current category such as http.
[minor] · The test fixture's -loglevel=trace re-enables logging in no-log and benchmark setups
In fuzz and benchmark setups, the built-in -loglevel=trace now re-enables categories after -nodebug or -debug=0, changing what those contexts measure.
Location: src/init/common.cpp:89 (head).
Details and suggested fix
BasicTestingSetup always passes -loglevel=trace -debug -debugexclude=leveldb. MakeNoLogFileContext adds -nodebug, while the LogWithoutDebug benchmark adds -debug=0. Both previously left the category mask empty because -loglevel only set a threshold. Now SetLoggingLevel runs after -debug, and the global trace token enables every category. In fuzz targets and benchmarks based on MakeNoLogFileContext, LogDebug and LogTrace arguments are formatted on every call despite there being no output sink. LogWithoutDebug uses a full TestingSetup with a debug.log file, so it now formats and writes every NET debug message, invalidating its documented expectation of being about three orders of magnitude faster. Add -nologlevel to MakeNoLogFileContext and to the benchmark arguments, as the PR already does in feature_logging.py.
[minor] · The all:<level> forms apply the default threshold instead of the requested level
Accepted forms such as all:info, 1:info, and :info enable all categories at the default Debug threshold, so they can turn on debug logging instead of applying the requested level.
Location: src/init/common.cpp:97 (head).
Details and suggested fix
In the per-category path, GetLogCategory maps all, 1, and the empty string to BCLog::ALL. SetCategoryLogLevel stores the requested level under that composite key, and the code enables every category bit. WillLogCategoryLevel looks up each message's individual category, does not find the ALL entry, and falls back to the global threshold, which defaults to Debug. Thus all:info results in debug logging for every category; all:trace also uses Debug rather than Trace. This conflicts with the stated equivalence to -debugexclude=all. Before this change, all:<level> was ineffective but did not enable categories, while 1:<level> and :<level> were rejected. Treat a token whose category is ALL as a global level, as the RPC's all argument does, or reject it. No checked-in configuration using these forms was identified, so practical impact is unconfirmed.
Optional improvements
[suggestion] · A global -loglevel broadens an existing -debug=<category> allowlist
-debug=net -loglevel=trace now traces every category instead of only net, but the release notes do not describe this change.
Location: src/init/common.cpp:86 (head).
Details and suggested fix
Before this change, -loglevel set severity thresholds for categories enabled with -debug. Thus -debug=net -loglevel=trace traced only net, and the developer notes describe -debug and -loglevel as independent controls. Now the global branch enables all categories, or disables them for Info, after -debug has been processed. The same configuration therefore traces every category; -loglevel=trace -nodebug enables all categories, and -loglevel=info -debug=net disables net. Debug and trace output bypass rate limiting, so existing setups can produce substantially more log volume and detail. The new -debug help says -loglevel takes precedence, but the PR description calls the change backwards compatible. If this broadening is intended, document it in the release notes and developer notes. Otherwise, preserve an explicit -debug allowlist when applying a global level.
[suggestion] · Runtime trace changes do not update existing SQLite and IPC trace sources
After loglevel trace, the RPC reports trace, but SQL traces remain off for already-open wallets and IPC traces remain off for the running event loop.
Location: src/rpc/node.cpp:204 (head).
Details and suggested fix
The production LogTrace sources are SQLite statement tracing and libmultiprocess IPC messages, and both read the level once. SQLiteDatabase::Open installs TraceSqlCallback only if walletdb tracing is enabled when the database opens. The IPC event loop receives GetRequestedIPCLogLevel() at creation, and libmultiprocess filters messages against that fixed value. UpdateLogCategories changes only Logger state. Consequently, loglevel walletdb=trace or loglevel trace produces no SQL traces until the wallet is reloaded and no IPC traces until restart, even though the RPC reports trace. The logging RPC had the same limitation, but this change's stated goal is to enable runtime trace without a restart. At minimum, state in the RPC help that walletdb SQL tracing requires a wallet reload and IPC tracing requires a restart. For SQLite, register the callback unconditionally and return early when ShouldTraceLog(WALLETDB) is false.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Remove the unused category flag binding
- [suggestion]: Document the comma-list ordering restriction
- [suggestion]: Mark category as a placeholder in the equivalence