-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: Merge bitcoin#29144, 28946, 28980, 28554, 28414 #7354
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
base: develop
Are you sure you want to change the base?
Changes from all commits
4f0dfc9
4cc2103
e652406
cfcbc8d
d2ce666
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,5 @@ | ||
| RPC Wallet | ||
| ---------- | ||
|
|
||
| - RPC `walletprocesspsbt` return object now includes field `hex` (if the transaction | ||
| is complete) containing the serialized transaction suitable for RPC `sendrawtransaction`. (#28414) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,10 @@ | |
| #include <fs.h> | ||
| #include <util/settings.h> | ||
|
|
||
| #if defined(HAVE_CONFIG_H) | ||
| #include <config/bitcoin-config.h> | ||
| #endif | ||
|
|
||
| #include <tinyformat.h> | ||
| #include <univalue.h> | ||
|
|
||
|
|
@@ -90,7 +94,9 @@ bool ReadSettings(const fs::path& path, std::map<std::string, SettingsValue>& va | |
|
|
||
| SettingsValue in; | ||
| if (!in.read(std::string{std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>()})) { | ||
| errors.emplace_back(strprintf("Unable to parse settings file %s", fs::PathToString(path))); | ||
| errors.emplace_back(strprintf("Settings file %s does not contain valid JSON. This is probably caused by disk corruption or a crash, " | ||
| "and can be fixed by removing the file, which will reset settings to default values.", | ||
| fs::PathToString(path))); | ||
| return false; | ||
| } | ||
|
|
||
|
|
@@ -123,6 +129,13 @@ bool WriteSettings(const fs::path& path, | |
| std::vector<std::string>& errors) | ||
| { | ||
| SettingsValue out(SettingsValue::VOBJ); | ||
| // Add auto-generated warning comment only if it does not exist | ||
| if (!values.contains("_warning_")) { | ||
| out.pushKV("_warning_", strprintf("This file is automatically generated and updated by %s. Please do not edit this file while the node " | ||
| "is running, as any changes might be ignored or overwritten.", | ||
| PACKAGE_NAME)); | ||
|
Comment on lines
+133
to
+136
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.
After the first settings write, the next startup reads Useful? React with 👍 / 👎. |
||
| } | ||
| // Push settings values | ||
| for (const auto& value : values) { | ||
| out.__pushKV(value.first, value.second); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -220,7 +220,11 @@ RPCHelpMan encryptwallet() | |
| "After this, any calls that interact with private keys such as sending or signing \n" | ||
| "will require the passphrase to be set prior the making these calls.\n" | ||
| "Use the walletpassphrase call for this, and then walletlock call.\n" | ||
| "If the wallet is already encrypted, use the walletpassphrasechange call.\n", | ||
| "If the wallet is already encrypted, use the walletpassphrasechange call.\n" | ||
| "** IMPORTANT **\n" | ||
| "For security reasons, the encryption process will generate a new HD seed, resulting\n" | ||
| "in the creation of a fresh set of active descriptors. Therefore, it is crucial to\n" | ||
| "securely back up the newly generated wallet file using the backupwallet RPC.\n", | ||
|
Comment on lines
+225
to
+227
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.
For every nonblank HD wallet, this help text claims encryption generates a new seed and descriptors, but Useful? React with 👍 / 👎.
Comment on lines
+223
to
+227
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. Keep the backup guidance consistent with the actual wallet state. The new help text says encryption always generates a fresh HD seed/descriptors, but the returned message still distinguishes HD-enabled wallets from non-HD wallets, and the provided GUI/docs snippets show those cases need different backup guidance. As written, users can get conflicting instructions about whether to preserve seed-based backups or make a new Based on the provided GUI/docs snippets, the RPC text should match the same HD/non-HD behavior. 🛠 Suggested wording adjustment- "For security reasons, the encryption process will generate a new HD seed, resulting\n"
- "in the creation of a fresh set of active descriptors. Therefore, it is crucial to\n"
- "securely back up the newly generated wallet file using the backupwallet RPC.\n",
+ "For security reasons, encrypting the wallet changes the backup procedure.\n"
+ "If the wallet is HD-enabled, preserve the existing seed-based backup guidance; otherwise,\n"
+ "create a new backup with the backupwallet RPC.\n",
...
- return "wallet encrypted; The keypool has been flushed. You need to make a new backup with the backupwallet RPC.";
+ return "wallet encrypted; The keypool has been flushed. Make sure you create a new backup with the backupwallet RPC.";Also applies to: 270-273 🤖 Prompt for AI Agents
Comment on lines
+224
to
+227
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: encryptwallet help text describes upstream-only HD-seed rotation that Dash does not perform The IMPORTANT block backported from bitcoin#28980 tells users that source: ['claude'] |
||
| { | ||
| {"passphrase", RPCArg::Type::STR, RPCArg::Optional::NO, "The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long."}, | ||
| }, | ||
|
|
@@ -266,7 +270,7 @@ RPCHelpMan encryptwallet() | |
| if (pwallet->IsHDEnabled()) { | ||
| return "wallet encrypted; If you forget the passphrase, you will lose access to your funds. Make sure that you have backup of your seed or mnemonic."; | ||
| } | ||
| return "wallet encrypted; The keypool has been flushed. You need to make a new backup."; | ||
| return "wallet encrypted; The keypool has been flushed. You need to make a new backup with the backupwallet RPC."; | ||
| }, | ||
| }; | ||
| } | ||
|
|
||
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: PR title references bitcoin#27302 but no corresponding cherry-pick is present
The PR title lists six PR numbers (29144, 28946, 28980, 28554, 27302, 28414) but the PR range only contains merge commits for five (29144, 28946, 28980, 28554, 28414). bitcoin#27302 does not appear to be cherry-picked in this branch. Either correct the title to remove 27302, or add the missing cherry-pick if it was intended to be part of this batch.
source: ['claude']
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.
Resolved in this update — PR title references bitcoin#27302 but no corresponding cherry-pick is present no longer present.
Auto-resolved by the review system based on the latest commit diff. If you believe this was closed in error, reopen the thread.