Skip to content

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Jun 16, 2025

Breaking Changes

  • The RPCs protx register_legacy, protx register_fund_legacy, protx register_prepare_legacy and
    protx update_registrar_legacy have been deprecated in Dash Core v23 and may be removed in a future version
    They can be re-enabled with the runtime argument -deprecatedrpc=legacy_mn.

  • The argument legacy in bls generate has been deprecated in Dash Core v23 and may be ignored in a future version.
    It can be re-enabled with the runtime argument deprecatedrpc=legacy_mn.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (note: N/A)
  • 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)

@kwvg kwvg added this to the 23 milestone Jun 16, 2025
@kwvg kwvg added the RPC Some notable changes to RPC params/behaviour/descriptions label Jun 16, 2025
@kwvg kwvg force-pushed the protx_vc branch 2 times, most recently from da8893c to bf89a94 Compare June 16, 2025 14:39
@kwvg kwvg force-pushed the protx_vc branch 3 times, most recently from 32362b5 to a466add Compare June 16, 2025 14:57
@kwvg kwvg changed the title rpc: deprecate protx register{,_fund,_prepare}_legacy and protx update_registrar_legacy, specifying scheme in bls generate, add restrictions on ProTx version changes chore: deprecate protx register{,_fund,_prepare}_legacy and protx update_registrar_legacy, specifying scheme in bls generate Jun 16, 2025
@kwvg kwvg marked this pull request as ready for review June 16, 2025 18:23
@kwvg kwvg requested review from knst, UdjinM6 and PastaPastaPasta June 16, 2025 18:24
Copy link

coderabbitai bot commented Jun 16, 2025

Walkthrough

The changes introduce deprecation notices and enforcement for several legacy masternode-related RPC commands in Dash Core. Documentation is updated to note the deprecation of the legacy variants of protx register, protx register_fund, protx register_prepare, and protx update_registrar, as well as the legacy argument in the bls generate RPC. These commands and arguments now require the -deprecatedrpc=legacy_mn runtime flag to be enabled; otherwise, their usage results in a runtime error. The legacy RPCs are moved to a hidden category, and their help text is updated to indicate deprecation. Test infrastructure and functional tests are updated to include the necessary runtime flag for legacy RPC usage. No changes are made to core logic or public API signatures.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 0

🔭 Outside diff range comments (1)
src/rpc/evo.cpp (1)

370-386: Clang-format violations block CI.

clang-diff reports style errors in this range.
Run clang-format -i src/rpc/evo.cpp (project style) and re-commit to unblock the pipeline.

🧹 Nitpick comments (4)
src/test/rpc_tests.cpp (1)

44-46: Minor: favour constexpr std::array over braced-list to avoid small heap.

Micro-nit – the { "-deprecatedrpc=legacy_mn" } literal is copied into a std::vector inside TestingSetup.
Replacing it with a static constexpr std::array<const char*,1> would avoid a tiny allocation at start-up.
Purely optional.

doc/release-notes-6723.md (1)

4-9: Fix typo & punctuation in release notes.

  1. Missing leading dash in the runtime flag on L9.
  2. Sentence on L5–6 is missing a full stop before “They”.
    Apply:
-  They can be re-enabled with the runtime argument `-deprecatedrpc=legacy_mn`.
+  They can be re-enabled with the runtime argument `-deprecatedrpc=legacy_mn`.
@@
-  It can be re-enabled with the runtime argument `deprecatedrpc=legacy_mn`.
+  It can be re-enabled with the runtime argument `-deprecatedrpc=legacy_mn`.
src/rpc/evo.cpp (2)

404-410: Duplicated deprecation check string – consider central helper.

The literal
"DEPRECATED: Pass config option -deprecatedrpc=legacy_mn to enable this RPC"
is hard-coded in every wrapper. Extracting into a small static constexpr char kLegacyDeprecationMsg[] would avoid future drift.


1716-1733: Error message references internal var name.

ParseBoolV(request.params[0], "bls_legacy_scheme");
If users supply an invalid value they’ll see “Error parsing parameter bls_legacy_scheme …” even though the public arg is named legacy.
Pass "legacy" instead to keep UX consistent.

-                bls_legacy_scheme = ParseBoolV(request.params[0], "bls_legacy_scheme");
+                bls_legacy_scheme = ParseBoolV(request.params[0], "legacy");
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee34525 and bb64e2f.

📒 Files selected for processing (4)
  • doc/release-notes-6723.md (1 hunks)
  • src/rpc/evo.cpp (13 hunks)
  • src/test/rpc_tests.cpp (1 hunks)
  • test/functional/feature_dip3_v19.py (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Clang Diff Format Check
src/rpc/evo.cpp

[error] 373-480: Clang format differences found. The file does not conform to the required code style. Please run clang-format to fix formatting issues.

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: linux64_multiprocess-test / Test source
  • GitHub Check: linux64_tsan-test / Test source
🔇 Additional comments (2)
test/functional/feature_dip3_v19.py (1)

49-52: Flag consistently enables legacy RPCs in CI – looks good.

The added -deprecatedrpc=legacy_mn switch mirrors the new gating logic and keeps the functional test alive. No further action needed.

src/test/rpc_tests.cpp (1)

44-46: Constructor overload may shadow existing one – double-check ODR & init-order.

If another non-default RPCTestingSetup ctor already exists, this new no-arg ctor is fine.
But if a different no-arg ctor is also present in another translation unit, you’ll get an ODR violation at link time.
Please run a quick search to make sure this is now the single default ctor.

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK bb64e2f

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK bb64e2f with one nit

Comment on lines +6 to +9
They can be re-enabled with the runtime argument `-deprecatedrpc=legacy_mn`.

* The argument `legacy` in `bls generate` has been deprecated in Dash Core v23 and may be ignored in a future version.
It can be re-enabled with the runtime argument `deprecatedrpc=legacy_mn`.
Copy link

Choose a reason for hiding this comment

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

nit: could maybe split into 2 more explicit/self-explanatory ones

Suggested change
They can be re-enabled with the runtime argument `-deprecatedrpc=legacy_mn`.
* The argument `legacy` in `bls generate` has been deprecated in Dash Core v23 and may be ignored in a future version.
It can be re-enabled with the runtime argument `deprecatedrpc=legacy_mn`.
They can be re-enabled with the runtime argument `-deprecatedrpc=protx_legacy`.
* The argument `legacy` in `bls generate` has been deprecated in Dash Core v23 and may be ignored in a future version.
It can be re-enabled with the runtime argument `deprecatedrpc=bls_generate_legacy`.

@PastaPastaPasta PastaPastaPasta merged commit e8f0b62 into dashpay:develop Jun 17, 2025
57 of 59 checks passed
PastaPastaPasta added a commit that referenced this pull request Jul 10, 2025
…roTx version changes with `DEPLOYMENT_V23`

af10784 doc: add release notes for version restrictions (Kittywhiskers Van Gogh)
991f14d evo: prohibit new legacy scheme masternode registrations (Kittywhiskers Van Gogh)
abf96b5 evo: prohibit extended address versioning on unsupported transactions (Kittywhiskers Van Gogh)
de7f928 evo: prohibit upgrading from LegacyBLS to ExtAddr support directly (Kittywhiskers Van Gogh)
e430e6e evo: prohibit any ProTx with legacy BLS version after basic BLS upgrade (Kittywhiskers Van Gogh)
dc687a9 rpc: constrain ProTx version for ProUpRevTx based on legacy status (Kittywhiskers Van Gogh)
23c5152 trivial: use consistent variable name, use brackets (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Depends on #6665

  * Depends on #6723

  * Please refer to comments from [dash#6665](#6665) for prior discussion on the contents of the pull request ([comment](#6665 (comment)), [comment](#6665 (comment)), [comment](#6665 (comment)))

  * Complementing the deprecation in [dash#6723](#6723), after `DEPLOYMENT_V23` is activated
    * Registration of **new** masternodes  (i.e. `ProRegTx`) with the legacy scheme (`LegacyBLS`) will no longer be allowed. Existing masternodes are not affected and can continue to operate and participate.

    * Masternodes that are already using the basic scheme (`BasicBLS`) or higher may no longer **downgrade** to the legacy scheme.

  * Additional guardrails have been introduced to complement [dash#6665](#6665), which reserves a new version for extended addresses (`ExtAddr`), affecting `ProRegTx` and `ProUpServTx`, applicable after `DEPLOYMENT_V23` is activated
    * Masternodes **must** migrate to the basic scheme (`BasicBLS`) _before_ attempting to utilize extended addresses (`ExtAddr`), legacy scheme nodes may not attempt a direct upgrade.

    * Special transactions other than `ProRegTx` or `ProUpServTx` may not bear the version reserved for extended addresses (`ExtAddr`). Note that `IsVersionChangeValid()` does not extend to `ProRegTx` as it _creates_ a new entry and therefore doesn't have a masternode state version to compare against (i.e. there's no version to _change_), so the restriction in `IsVersionChangeValid()` only _de facto_ applies to `ProUpServTx`.

  * Future version updates must be conscious of updates to the masternode state ([source](https://github.com/dashpay/dash/blob/d9f52acecb94d57be91b5e17d478d5c909df3633/src/evo/deterministicmns.cpp#L887-L888)), example code for what changes may be required are available [here](#6665 (comment)).

  ## Breaking Changes

  * `protx revoke` will no longer default to using the highest possible version of `ProUpRevTx` and will now _clamp_ the version to `LegacyBLS` if the masternode uses the legacy scheme.

  ## Checklist

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

ACKs for top commit:
  PastaPastaPasta:
    utACK af10784
  UdjinM6:
    utACK af10784

Tree-SHA512: fe788c33397f9e351377777946d5c0498569f68f22d308cce03f903fb3e149bd594ce2caafc50fd62611029563e2841bc42151579b21ba42fdf87cbf7762f716
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants