Skip to content

backport: #22764 #28597#7238

Open
d0wn3d wants to merge 2 commits intodashpay:developfrom
d0wn3d:backports
Open

backport: #22764 #28597#7238
d0wn3d wants to merge 2 commits intodashpay:developfrom
d0wn3d:backports

Conversation

@d0wn3d
Copy link

@d0wn3d d0wn3d commented Mar 20, 2026

Issue being fixed or feature implemented

Backports Bitcoin Merge

Merge bitcoin#22764: build: Include qt sources for parsing with extract_strings.py
Merge bitcoin#28597: wallet: No BDB creation, unless -deprecatedrpc=create_bdb

What was done?

bitcoin@b59b31a build: Drop redundant qt/bitcoin.cpp (Hennadii Stepanov)
bitcoin@d90ad5a build: Include qt sources for parsing with extract_strings.py (Hennadii Stepanov)
bitcoin@fa071ae wallet: No BDB creation, unless -deprecatedrpc=create_bdb (MarcoFalke)

How Has This Been Tested?

Not tested

Breaking Changes

-    if (request.params[5].isNull() || request.params[5].get_bool()) {
+    if (self.Arg<bool>(5)) {

Dash's RPCHelpMan doesn't have the Arg<T>() template method, so I reverted to request.params[5].isNull() || request.params[5].get_bool()

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

…tract_strings.py

b59b31a build: Drop redundant qt/bitcoin.cpp (Hennadii Stepanov)
d90ad5a build: Include qt sources for parsing with extract_strings.py (Hennadii Stepanov)
@github-actions
Copy link

github-actions bot commented Mar 20, 2026

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

@d0wn3d d0wn3d changed the title Backport #22764: build: Include qt sources for parsing with extract_strings.py backport #22764: build: Include qt sources for parsing with extract_strings.py Mar 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Walkthrough

Updated three areas: Makefile.qt.include changes how qt/dashstrings.cpp is generated by splitting the extract_strings_qt.py invocation across lines and appending additional Qt source/header variables to the inputs and translate prerequisites; RPC createwallet help text for descriptors was extended and parameter handling now treats an explicit false deterministically, checking context.chain->rpcEnableDeprecated("create_bdb") and returning RPC_WALLET_ERROR if legacy (BDB) wallet creation is not re-enabled; test framework write_config() now writes deprecatedrpc=create_bdb into generated dash.conf.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant RPC as createwallet RPC
    participant Chain as ChainContext
    participant Wallet as WalletCreator

    Client->>RPC: createwallet(..., descriptors)
    RPC->>RPC: parse params (explicit bool)
    alt descriptors == true
        RPC->>Wallet: set WALLET_FLAG_DESCRIPTORS / create descriptors wallet
        Wallet-->>RPC: success
        RPC-->>Client: wallet-created response
    else descriptors == false
        RPC->>Chain: rpcEnableDeprecated("create_bdb")?
        alt deprecated enabled
            Chain-->>RPC: enabled
            RPC->>Wallet: create legacy (BDB) wallet
            Wallet-->>RPC: success
            RPC-->>Client: wallet-created response
        else deprecated not enabled
            Chain-->>RPC: not-enabled
            RPC-->>Client: RPC_WALLET_ERROR (deprecated disabled)
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'backport: #22764 #28597' directly refers to the specific upstream Bitcoin PRs being backported and is clear about the intent of the changeset.
Description check ✅ Passed The PR description clearly explains that it backports two Bitcoin PRs with specific commit hashes, file changes, and a noted incompatibility adjustment.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/Makefile.qt.include`:
- Line 499: The translate target lists $(QT_FORMS_UI) twice in its prerequisites
(translate: $(srcdir)/qt/dashstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) ...);
remove the duplicate $(QT_FORMS_UI) so the prerequisites include it only once,
keeping the rest of the listed symbols (e.g., $(srcdir)/qt/dashstrings.cpp,
$(BITCOIN_QT_BASE_CPP), $(BITCOIN_QT_WINDOWS_CPP), $(BITCOIN_QT_WALLET_CPP),
$(BITCOIN_QT_H), $(BITCOIN_MM)) unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5cca096e-6b80-49cc-8235-0eacd805fb0a

📥 Commits

Reviewing files that changed from the base of the PR and between 1d212a1 and c352c19.

📒 Files selected for processing (1)
  • src/Makefile.qt.include

@d0wn3d d0wn3d changed the title backport #22764: build: Include qt sources for parsing with extract_strings.py backport: #22764 build: Include qt sources for parsing with extract_strings.py Mar 20, 2026
@d0wn3d d0wn3d changed the title backport: #22764 build: Include qt sources for parsing with extract_strings.py backport: #22764 #28597 Mar 20, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/wallet/rpc/wallet.cpp (1)

637-639: Tighten the descriptors help text phrasing.

Line 638 has awkward punctuation/capitalization ("; This" and "because,"), which hurts readability in RPC help output.

✍️ Proposed wording cleanup
-            {"descriptors", RPCArg::Type::BOOL, RPCArg::Default{true}, "Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation."
-                                                                       " Setting to \"false\" will create a legacy wallet; This is only possible with the -deprecatedrpc=create_bdb setting because, the legacy wallet type is being deprecated and"
-                                                                       " support for creating and opening legacy wallets will be removed in the future."},
+            {"descriptors", RPCArg::Type::BOOL, RPCArg::Default{true}, "Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation."
+                                                                       " Setting this to \"false\" creates a legacy wallet. This is only possible with -deprecatedrpc=create_bdb, because legacy wallet creation is deprecated and"
+                                                                       " support for creating and opening legacy wallets will be removed in a future release."},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/wallet/rpc/wallet.cpp` around lines 637 - 639, The help text for the
RPCArg named "descriptors" in wallet.cpp contains awkward
punctuation/capitalization ("; This" and "because,") — update the string passed
to the RPCArg constructor (the descriptor help message where RPCArg::Type::BOOL
and RPCArg::Default{true} are used) to use clearer phrasing and correct
punctuation/capitalization (e.g., replace the semicolon+capitalized "This" with
a period or comma and remove the stray comma after "because"), ensuring the
message reads smoothly and maintains the same information about creating native
descriptor vs legacy wallets and the -deprecatedrpc=create_bdb caveat.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/functional/test_framework/util.py`:
- Line 422: Remove the global "deprecatedrpc=create_bdb" write in
test/functional/test_framework/util.py so functional nodes don't enable the
legacy create_bdb RPC by default; instead add a per-node opt-in (e.g., extend
the node startup helper such as start_node/start_nodes or the node's
extra_args/bitcoin_conf construction to accept a deprecatedrpc flag) and update
tests that require the legacy behavior (like
test/functional/wallet_descriptor.py) to pass that flag or set
"deprecatedrpc=create_bdb" only for the specific node datadir they control
during setup.

---

Nitpick comments:
In `@src/wallet/rpc/wallet.cpp`:
- Around line 637-639: The help text for the RPCArg named "descriptors" in
wallet.cpp contains awkward punctuation/capitalization ("; This" and "because,")
— update the string passed to the RPCArg constructor (the descriptor help
message where RPCArg::Type::BOOL and RPCArg::Default{true} are used) to use
clearer phrasing and correct punctuation/capitalization (e.g., replace the
semicolon+capitalized "This" with a period or comma and remove the stray comma
after "because"), ensuring the message reads smoothly and maintains the same
information about creating native descriptor vs legacy wallets and the
-deprecatedrpc=create_bdb caveat.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: aac9c63f-ac2a-4867-9a07-ea72122793f3

📥 Commits

Reviewing files that changed from the base of the PR and between c352c19 and 09bd1f8.

📒 Files selected for processing (2)
  • src/wallet/rpc/wallet.cpp
  • test/functional/test_framework/util.py

f.write("upnp=0\n")
f.write("natpmp=0\n")
f.write("shrinkdebugfile=0\n")
f.write("deprecatedrpc=create_bdb\n") # Required to run the tests
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Avoid enabling create_bdb deprecated RPC globally in framework config.

Line 422 makes every functional node allow deprecated legacy wallet creation, which can hide failures in tests that should validate the default rejection path (e.g., test/functional/wallet_descriptor.py legacy createwallet flow).

🧪 Suggested fix (make deprecated RPC opt-in per test)
-def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=True):
+def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=True, enable_create_bdb_deprecatedrpc=False):
@@
-        f.write("deprecatedrpc=create_bdb\n")  # Required to run the tests
+        if enable_create_bdb_deprecatedrpc:
+            f.write("deprecatedrpc=create_bdb\n")

Then enable it only in tests that intentionally exercise legacy wallet creation.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
f.write("deprecatedrpc=create_bdb\n") # Required to run the tests
def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=True, enable_create_bdb_deprecatedrpc=False):
# ... other code ...
if enable_create_bdb_deprecatedrpc:
f.write("deprecatedrpc=create_bdb\n")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/functional/test_framework/util.py` at line 422, Remove the global
"deprecatedrpc=create_bdb" write in test/functional/test_framework/util.py so
functional nodes don't enable the legacy create_bdb RPC by default; instead add
a per-node opt-in (e.g., extend the node startup helper such as
start_node/start_nodes or the node's extra_args/bitcoin_conf construction to
accept a deprecatedrpc flag) and update tests that require the legacy behavior
(like test/functional/wallet_descriptor.py) to pass that flag or set
"deprecatedrpc=create_bdb" only for the specific node datadir they control
during setup.

@d0wn3d d0wn3d marked this pull request as draft March 20, 2026 17:11
@d0wn3d d0wn3d force-pushed the backports branch 2 times, most recently from f316a36 to b7f36d8 Compare March 20, 2026 17:43
@d0wn3d d0wn3d marked this pull request as ready for review March 20, 2026 18:37
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7f36d8a71

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@d0wn3d d0wn3d marked this pull request as draft March 20, 2026 18:44
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/wallet/rpc/wallet.cpp`:
- Around line 684-693: The code calls request.params[5].get_bool() unguarded
which breaks the documented default of descriptors=true when the argument is
omitted; change the logic around request.params[5] so a null param preserves the
default (treat null as true). Specifically, update the conditional that sets
WALLET_FLAG_DESCRIPTORS (and the else branch that checks
rpcEnableDeprecated("create_bdb")) to use: if (request.params[5].isNull() ||
request.params[5].get_bool()) { flags |= WALLET_FLAG_DESCRIPTORS; } else { /*
existing BDB deprecation check/throw */ } so the omitted case keeps descriptors
enabled.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 49934e17-fc1d-4b12-a41b-25b5bd67c41d

📥 Commits

Reviewing files that changed from the base of the PR and between 09bd1f8 and b7f36d8.

📒 Files selected for processing (2)
  • src/wallet/rpc/wallet.cpp
  • test/functional/test_framework/util.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/functional/test_framework/util.py

…reate_bdb

fa071ae wallet: No BDB creation, unless -deprecatedrpc=create_bdb (MarcoFalke)

Bitcoin Pull request description:

  With BDB being removed soon, it seems confusing and harmful to allow users to create fresh BDB wallets going forward, as it would load them with an additional burden of having to migrate them soon after.

  Also, it would be good to allow for one release for test (and external) scripts to adapt.

  Fix all issues by introducing the `-deprecatedrpc=create_bdb` setting.
@d0wn3d d0wn3d marked this pull request as ready for review March 20, 2026 19:27
Copy link

@thepastaclaw thepastaclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Clean backport of bitcoin#22764 and bitcoin#28597. The Makefile change correctly adds Qt sources for string extraction. The wallet change correctly gates BDB wallet creation behind -deprecatedrpc=create_bdb, using request.params[5] instead of upstream's self.Arg(5) since Dash's RPCHelpMan lacks the Arg() method — consistent with all surrounding param access in this function. The test framework change to enable create_bdb in test configs is necessary and correct.

Reviewed commit: 23ac20e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants