Skip to content

Merge bitcoin/bitcoin#25924: scripted-diff: rpc: fix rescan RPC name (s/rescanwallet/rescanblockchain/)#1209

Merged
PastaPastaPasta merged 0 commit into
backport/auto-20251204from
backport-0.24-batch-463-pr-25924
Dec 4, 2025
Merged

Merge bitcoin/bitcoin#25924: scripted-diff: rpc: fix rescan RPC name (s/rescanwallet/rescanblockchain/)#1209
PastaPastaPasta merged 0 commit into
backport/auto-20251204from
backport-0.24-batch-463-pr-25924

Conversation

@DashCoreAutoGuix

@DashCoreAutoGuix DashCoreAutoGuix commented Dec 1, 2025

Copy link
Copy Markdown
Owner

Backports bitcoin#25924

Original Bitcoin commit: bbbc26d

This is a simple scripted-diff that fixes an incorrect RPC name in documentation.
There is no RPC call named rescanwallet - the correct name is rescanblockchain.

Changes:

  • 4 occurrences of rescanwalletrescanblockchain in RPC help text

Scope validation:

  • Bitcoin: 8 lines (4+, 4-)
  • Dash: 8 lines (4+, 4-)
  • Ratio: 100% ✅

Summary by CodeRabbit

  • Documentation
    • Updated RPC help text for import-related commands to provide clearer guidance on rescanning procedures.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 1, 2025

Copy link
Copy Markdown

Walkthrough

RPC help texts across backup-related import operations are updated to reference rescanblockchain instead of rescanwallet when describing required rescanning steps following key, address, and script imports. No functional logic is modified.

Changes

Cohort / File(s) Summary
RPC help text documentation
src/wallet/rpc/backup.cpp
Updated multiple RPC command help texts (importprivkey, importaddress, importpubkey, importmulti) to replace references from rescanwallet to rescanblockchain

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file with purely documentation updates to RPC help strings
  • Consistent, repetitive pattern applied across multiple command descriptions
  • No logic or functional changes to verify
  • Changes are straightforward text replacements

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: correcting RPC documentation by replacing 'rescanwallet' with 'rescanblockchain' in help texts, which matches the actual changeset modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch backport-0.24-batch-463-pr-25924

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 35c7990 and 08674ee.

📒 Files selected for processing (1)
  • src/wallet/rpc/backup.cpp (4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.{cpp,h,cc,cxx,hpp}

📄 CodeRabbit inference engine (CLAUDE.md)

C++20 codebase should be placed under src/

Files:

  • src/wallet/rpc/backup.cpp
**

⚙️ CodeRabbit configuration file

**: # CodeRabbit AI Review Instructions for Dash Backports

Your Role

You are reviewing Bitcoin Core backports to Dash Core. Your ONLY job is to validate that the Dash commit faithfully represents the original Bitcoin commit with minimal, necessary adaptations.

Critical Validation Rules

1. File Operations Must Match (AUTO-REJECT if violated)

  • If Bitcoin modifies an existing file → Dash MUST modify (not create new)
  • If Bitcoin creates a new file → Dash creates
  • If Bitcoin deletes a file → Dash deletes
  • Common failure: Bitcoin modifies keys.txt, Dash creates new file with 58 keys

2. Size Ratio Check (80-150% of Bitcoin)

  • Count functional lines changed (exclude comments/whitespace)
  • Dash changes should be 80-150% of Bitcoin's size
  • Red flag: 2-line Bitcoin fix becoming 150+ lines in Dash

3. No Scope Creep

  • Reject if you see: "TODO:", "FIXME:", "while we're here", "also fix"
  • No unrelated refactoring or style changes
  • Only Bitcoin's intended changes + minimal Dash adaptations

4. Bitcoin-Specific Code Detection

  • Auto-reject witness/segwit code: msg_wtxidrelay, MSG_WTX, witness imports
  • Auto-reject RBF (replace-by-fee) functionality
  • Note: PSBT is supported in Dash (don't flag)

5. Mandatory Adaptations Only

  • bitcoindash in strings/paths
  • BitcoinDash in user-facing text
  • Port numbers: 8332→9998 (RPC), 8333→9999 (P2P)
  • Hardcoded test values specific to Dash
  • No other changes unless absolutely required

6. Completeness Check

  • All files changed in Bitcoin must be present
  • Extra files need clear justification (Dash-specific compatibility)
  • Missing files = incomplete backport

Review Process

  1. First: Check file operations match exactly
  2. Second: Calculate size ratio
  3. Third: Scan for scope creep patterns
  4. Fourth: Detect Bitcoin-specific code
  5. Fifth: Verify all changes are minimal adaptations

Output Format

VALIDATION: [PASS/FAIL]

File Operatio...

Files:

  • src/wallet/rpc/backup.cpp
🧠 Learnings (2)
📓 Common learnings
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-31T01:14:55.631Z
Learning: DashCoreAutoGuix successfully completed a complex Bitcoin Core backport (PR #29412) for block mutation detection by implementing the IsBlockMutated function, adding net processing integration, creating comprehensive unit tests, and properly adapting all Bitcoin-specific witness code for Dash compatibility. The backport maintains full security functionality while respecting Dash's non-witness transaction architecture.
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-28T22:03:12.364Z
Learning: During multiple verification attempts of Bitcoin Core commit 06d469c26b backport to Dash PR #566, DashCoreAutoGuix consistently identified scope creep in interface_usdt_utxocache.py where additional pruning test functionality was added beyond the original Bitcoin commit. The user provided comprehensive fixes including both scope creep removal and missing mempool test file additions, but couldn't push due to authentication restrictions. The scope creep fix was identified as the priority to resolve CI failures.
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-28T20:34:29.061Z
Learning: During Dash backport verification of Bitcoin Core commit 06d469c26b, scope creep was detected when additional pruning test functionality was added to interface_usdt_utxocache.py beyond what was in the original Bitcoin commit. The fix involved removing the extra test block while maintaining the core compiler flag fixes for USDT compilation errors.
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-29T21:29:32.827Z
Learning: DashCoreAutoGuix successfully fixed scope creep in Bitcoin Core commit fcdb39d3ee backport by removing the parse test case from src/test/uint256_tests.cpp that was not part of the original Bitcoin commit. The fix was implemented in commit 16748115ce and verified through range-diff analysis.
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-30T14:45:15.700Z
Learning: In Dash backports from Bitcoin Core test files, the `address_to_scriptpubkey` function should be imported from `test_framework.wallet` instead of `test_framework.address` as the import location differs between Bitcoin and Dash test frameworks.
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-29T17:13:35.087Z
Learning: In Dash backports from Bitcoin Core, when the DIFFICULTY_ADJUSTMENT_INTERVAL constant is missing, it should be defined as 24 for Dash (different from Bitcoin's value), as seen in the getnetworkhashps RPC backport fix.
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-28T19:54:21.426Z
Learning: In Dash backports from Bitcoin Core, including necessary compilation fixes (such as API compatibility changes like UniValue get_int() → getInt<int>()) alongside the core backport is standard and expected practice. These compatibility fixes ensure the backported code compiles in Dash's evolved codebase while preserving Bitcoin's original functionality and intent.
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-29T17:13:35.087Z
Learning: When backporting Bitcoin Core commits that use Python's textwrap.dedent() function in test files, the textwrap import statement needs to be explicitly added if it's missing in the Dash test file.
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-27T22:35:10.176Z
Learning: In Dash backports, src/dashbls files are vendored dependencies that should not be modified during Bitcoin Core backports unless there is specific justification. Unauthorized modifications to vendored dependencies should be removed to maintain code integrity.
📚 Learning: 2025-07-30T14:45:15.700Z
Learnt from: DashCoreAutoGuix
Repo: DashCoreAutoGuix/dash PR: 0
File: :0-0
Timestamp: 2025-07-30T14:45:15.700Z
Learning: In Dash backports from Bitcoin Core test files, the `address_to_scriptpubkey` function should be imported from `test_framework.wallet` instead of `test_framework.address` as the import location differs between Bitcoin and Dash test frameworks.

Applied to files:

  • src/wallet/rpc/backup.cpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: mac-build / Build source
  • GitHub Check: win64-build / Build source
  • GitHub Check: arm-linux-build / Build source
  • GitHub Check: linux64_nowallet-build / Build source
  • GitHub Check: linux64-build / Build source
  • GitHub Check: Lint / Run linters
🔇 Additional comments (4)
src/wallet/rpc/backup.cpp (4)

210-215: Correct RPC name in importaddress rescan guidance

Same doc-only correction here: using rescanblockchain aligns the help text with the actual RPC surface and avoids suggesting an invalid command.


409-413: Correct RPC name in importpubkey help

The updated sentence correctly directs users to rescanblockchain, matching the intended wallet rescan RPC without touching any functional logic.


1481-1486: Consistent rescan RPC reference in importmulti description

The importmulti help now consistently refers to rescanblockchain for manual rescans when rescan=false, matching the other import RPC docs and the actual RPC name.


90-96: Fixes incorrect RPC reference in importprivkey help text

Help text now points to the real RPC rescanblockchain instead of rescanwallet, which is the correct Dash RPC command. Internal function names (RescanWallet) remain unchanged. This Dash-specific adaptation ensures documentation is accurate for the API users will actually call. All four occurrences of the help text have been updated consistently, with no remaining stale references.


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.

@DashCoreAutoGuix

Copy link
Copy Markdown
Owner Author

✅ Verification Successful

Bitcoin Commit: bbbc26d (bitcoin#25924)

Verification Summary

This PR is a clean scripted-diff backport that fixes documentation references from the non-existent rescanwallet RPC to the correct rescanblockchain RPC.

Changes: 4 occurrences in src/wallet/rpc/backup.cpp help text:

  • importprivkey() documentation
  • importaddress() documentation
  • importpubkey() documentation
  • importmulti() documentation

Validation Results

Size ratio: 100% (8 changes in both Bitcoin and Dash)
File operations: 1 file modified (matches Bitcoin exactly)
Content fidelity: All documentation string changes match Bitcoin's intent
No scope creep: Only documentation changes as specified
No SegWit code: None detected
CI status: All 53 checks passed

Recommendation

APPROVED - This backport is faithful to the original Bitcoin commit and ready to merge.

@DashCoreAutoGuix DashCoreAutoGuix added the verified Backport verification passed - ready for merge label Dec 2, 2025

@knst knst left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

utACK 08674ee

@PastaPastaPasta PastaPastaPasta changed the base branch from backport-0.24-batch-463 to backport/auto-20251204 December 4, 2025 16:38
@PastaPastaPasta PastaPastaPasta merged this pull request into backport/auto-20251204 Dec 4, 2025
53 checks passed
@PastaPastaPasta PastaPastaPasta deleted the backport-0.24-batch-463-pr-25924 branch December 4, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

verified Backport verification passed - ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants