Repository navigation
backport!: bitcoin#25574, #26291, #27157, #27302, #27632, #28113, #28162, #28354 #7710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6414716
09a25b5
89a4b1e
99a4f14
8ae85ef
8139eda
b1f31ec
dfdc3c3
6fac2e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Updated settings | ||
| ---------------- | ||
|
|
||
| If the `-checkblocks` or `-checklevel` options are explicitly provided by the | ||
| user, but the verification checks cannot be completed due to an insufficient | ||
| dbcache, Dash Core will now return an error at startup. (dash#7710) | ||
|
|
||
| RPC | ||
| --- | ||
| The `-verifychain` RPC will now return `false` if the checks didn't fail, | ||
| but couldn't be completed at the desired depth and level. This could be due | ||
| to missing data while pruning, due to an insufficient dbcache or due to | ||
| the node being shutdown before the call could finish. (dash#7710) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Configuration | ||
| --- | ||
|
|
||
| - `dashd` and `dash-qt` will now raise an error on startup if a datadir that is being used contains a dash.conf file that will be ignored, which can happen when a datadir= line is used in a dash.conf file. The error message is just a diagnostic intended to prevent accidental misconfiguration, and it can be disabled to restore the previous behavior of using the datadir while ignoring the dash.conf contained in it. (dash#7710) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Updated settings | ||
| ---------------- | ||
|
|
||
| - Passing an invalid `-debug`, `-debugexclude`, or `-loglevel` logging configuration | ||
| option now raises an error, rather than logging an easily missed warning. (dash#7710) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| RPC Wallet | ||
| ---------- | ||
|
|
||
| - The `signrawtransactionwithkey`, `signrawtransactionwithwallet`, | ||
| `walletprocesspsbt` and `descriptorprocesspsbt` calls now return the more | ||
| specific RPC_INVALID_PARAMETER error instead of RPC_MISC_ERROR if their | ||
| sighashtype argument is malformed. (dash#7710) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Tests | ||
| ----- | ||
|
|
||
| - Non-standard transactions are now disabled by default on testnet and devnets | ||
| for relay and mempool acceptance. The previous behaviour can be | ||
| re-enabled by setting `-acceptnonstdtxn=1`. (dash#7710) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |||||
| #include <tinyformat.h> | ||||||
| #include <util/fs.h> | ||||||
| #include <util/fs_helpers.h> | ||||||
| #include <util/result.h> | ||||||
| #include <util/string.h> | ||||||
| #include <util/system.h> | ||||||
| #include <util/time.h> | ||||||
|
|
@@ -55,27 +56,28 @@ void SetLoggingOptions(const ArgsManager& args) | |||||
| fLogIPs = args.GetBoolArg("-logips", DEFAULT_LOGIPS); | ||||||
| } | ||||||
|
|
||||||
| void SetLoggingLevel(const ArgsManager& args) | ||||||
| util::Result<void> SetLoggingLevel(const ArgsManager& args) | ||||||
| { | ||||||
| if (args.IsArgSet("-loglevel")) { | ||||||
| for (const std::string& level_str : args.GetArgs("-loglevel")) { | ||||||
| if (level_str.find_first_of(':', 3) == std::string::npos) { | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: -loglevel=qt:debug aborts startup because the ':' search starts at index 3 level_str.find_first_of(':', 3) treats any category shorter than 3 chars as a global level. 'qt' is a registered Dash category (BCLog::QT in src/logging.h, src/logging.cpp:172 {BCLog::QT, "qt"}), and 'qt:debug' has its only ':' at index 2, so it enters the global-level branch, SetLogLevel("qt:debug") fails, and the new util::Error return turns a valid per-category configuration into a hard startup failure. The misparse predates this PR but this backport escalates it from a missed warning to a fatal error, and the PR's stated goal is that invalid logging config raises an error — so misclassifying a valid documented config as invalid is in scope. All other Dash categories are longer than 2 chars and unaffected.
Suggested change
source: |
||||||
| // user passed a global log level, i.e. -loglevel=<level> | ||||||
| if (!LogInstance().SetLogLevel(level_str)) { | ||||||
| InitWarning(strprintf(_("Unsupported global logging level -loglevel=%s. Valid values: %s."), level_str, LogInstance().LogLevelsString())); | ||||||
| return util::Error{strprintf(_("Unsupported global logging level %s=%s. Valid values: %s."), "-loglevel", level_str, LogInstance().LogLevelsString())}; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Accept the
Detect Proposed fix- if (level_str.find_first_of(':', 3) == std::string::npos) {
+ if (level_str.find(':') == std::string::npos) {🤖 Prompt for AI Agents |
||||||
| } | ||||||
| } else { | ||||||
| // user passed a category-specific log level, i.e. -loglevel=<category>:<level> | ||||||
| const auto& toks = SplitString(level_str, ':'); | ||||||
| if (!(toks.size() == 2 && LogInstance().SetCategoryLogLevel(toks[0], toks[1]))) { | ||||||
| InitWarning(strprintf(_("Unsupported category-specific logging level -loglevel=%s. Expected -loglevel=<category>:<loglevel>. Valid categories: %s. Valid loglevels: %s."), level_str, LogInstance().LogCategoriesString(), LogInstance().LogLevelsString())); | ||||||
| return util::Error{strprintf(_("Unsupported category-specific logging level %1$s=%2$s. Expected %1$s=<category>:<loglevel>. Valid categories: %3$s. Valid loglevels: %4$s."), "-loglevel", level_str, LogInstance().LogCategoriesString(), LogInstance().LogLevelsString())}; | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| return {}; | ||||||
| } | ||||||
|
|
||||||
| void SetLoggingCategories(const ArgsManager& args) | ||||||
| util::Result<void> SetLoggingCategories(const ArgsManager& args) | ||||||
| { | ||||||
| if (args.IsArgSet("-debug")) { | ||||||
| // Special-case: if -debug=0/-nodebug is set, turn off debugging messages | ||||||
|
|
@@ -85,7 +87,7 @@ void SetLoggingCategories(const ArgsManager& args) | |||||
| [](std::string cat){return cat == "0" || cat == "none";})) { | ||||||
| for (const auto& cat : categories) { | ||||||
| if (!LogInstance().EnableCategory(cat)) { | ||||||
| InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debug", cat)); | ||||||
| return util::Error{strprintf(_("Unsupported logging category %s=%s."), "-debug", cat)}; | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
|
|
@@ -94,9 +96,10 @@ void SetLoggingCategories(const ArgsManager& args) | |||||
| // Now remove the logging categories which were explicitly excluded | ||||||
| for (const std::string& cat : args.GetArgs("-debugexclude")) { | ||||||
| if (!LogInstance().DisableCategory(cat)) { | ||||||
| InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)); | ||||||
| return util::Error{strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)}; | ||||||
| } | ||||||
| } | ||||||
| return {}; | ||||||
| } | ||||||
|
|
||||||
| bool StartLogging(const ArgsManager& args) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 Nitpick: Release note names descriptorprocesspsbt, an RPC that does not exist in Dash
The adapted release note states that 'descriptorprocesspsbt' now returns RPC_INVALID_PARAMETER for malformed sighashtype. Dash Core has no descriptorprocesspsbt RPC (no hits under src/; the affected sighashtype callsites are signrawtransactionwithkey, signrawtransactionwithwallet, walletprocesspsbt via the shared SignTransaction path). The behavior change itself is correctly backported; only the release-note sentence lists a command Dash never had, which will confuse release-note readers. Adapt the list to the RPCs that actually exhibit the change.
source:
glm-5.3-flash(phase1-reviewer: general, backport-reviewer, dash-core-commit-history)