Skip to content

refactor(interfaces): expose typed provider transaction operations - #7600

Open
PastaPastaPasta wants to merge 13 commits into
dashpay:developfrom
PastaPastaPasta:refactor/typed-provider-transactions
Open

refactor(interfaces): expose typed provider transaction operations#7600
PastaPastaPasta wants to merge 13 commits into
dashpay:developfrom
PastaPastaPasta:refactor/typed-provider-transactions

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Aug 13, 2026

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

The Qt masternode registration and maintenance work needs to build, sign, and
broadcast normal/Evo provider transactions without treating the RPC server as a
GUI transport. Calling Node::executeRpc with method strings, UniValue
arguments, and wallet URI routing would make the GUI depend on RPC parsing and
error conventions and would duplicate no domain boundary at all.

This PR extracts the existing normal/Evo ProTx implementation into a typed
service shared by RPC and future GUI callers. It is the backend prerequisite for
the registration UI extracted from PastaPastaPasta/dash#68.

This PR is stacked on #7594. Until that PR merges, GitHub's aggregate diff also
contains its wallet-derived operator-key commits. The P-specific change is
commit 348958f6d080 and can be reviewed directly with the
stack-only comparison.

What was done?

  • Added typed provider request, result, capability, and structured-error types
    under interfaces.
  • Added synchronous normal/Evo register, external prepare/submit, Update
    Service, Update Registrar, and Revoke operations to interfaces::EVO.
  • Moved transaction construction, payload signing, preflight, complete input
    signing, and broadcast into one node-domain service used by both RPC and the
    typed interface.
  • Kept only generic fund/sign/atomic coin-lock primitives on
    interfaces::Wallet; provider operations remain on interfaces::EVO because
    they require node chainstate and deterministic-masternode state.
  • Extracted provider network-field validation so consensus checks, typed
    validation, transaction construction, and RPC adapters use the same rules.
  • Preserved ownership-aware collateral locking: failures release only a lock
    acquired by that call, while successful register/prepare operations retain
    the collateral lock for the registration lifecycle.
  • Kept RPC handlers as parsing/formatting adapters. No UniValue,
    JSONRPCRequest, RPC method string, wallet URI, or executeRpc dependency
    crosses the typed boundary.

Complete user-story manifest frozen before PR creation

The canonical manifest is published in
dash-ui-artifacts.

ID User story
P01 Fund and broadcast a regular registration through the typed service and unchanged RPC adapter.
P02 Fund and broadcast an Evo registration under pre-v24 and post-v24 rules.
P03 Register with an exact wallet-owned collateral outpoint.
P04 Prepare an external-collateral registration and submit a decoded compact signature.
P05 submit=false returns a fully signed transaction without broadcast.
P06 Update Service for regular/Evo nodes, including v24 endpoint lists.
P07 Update Registrar while preserving every omitted field.
P08 Revoke with reason values 0 through 3.
P09 Locked wallet, bad collateral/address/key, missing/wrong MN, funding failure, incomplete signing, consensus rejection, and broadcast failure return typed errors.
P10 RPC result shapes/error mappings remain compatible, except that incomplete input signing is intentionally rejected as a wallet error instead of returning or broadcasting a partial transaction.
P11 No-wallet builds compile and the API exposes no RPC/JSON transport types.
P12 Chain/validation and wallet locks are never held together; the synchronous API is safe to invoke from a GUI worker.

This PR has no Qt entry point or screen, so its screenshot set is intentionally
empty. UI screenshots belong to the stacked registration and maintenance PRs.

How Has This Been Tested?

  • Built src/dashd and src/test/test_dash with the macOS depends toolchain.
  • Built src/dashd in a fresh --disable-wallet --without-gui configuration.
  • Passed provider capability/typed-network validation interface tests.
  • Passed the full evo_netinfo_tests suite.
  • Passed atomic collateral-lock ownership wallet tests.
  • Passed wallet_dash_rpcs.py with legacy and descriptor wallets.
  • Passed rpc_netinfo.py serially.
  • Passed feature_protx_version.py.
  • Passed whitespace, include, circular-dependency, cppcheck, formatting, and
    git diff --check checks.
  • Independently reviewed the special-transaction diff for consensus parity,
    lock ordering, collateral ownership, external prepare/submit, payload
    signing, and RPC behavior. No consensus or security blocker was found.

Breaking Changes

No RPC method or successful result shape changes. Incompletely signed ProTx
inputs now return the existing wallet error category instead of yielding a
partial transaction or deferring failure to broadcast. This is intentional:
the typed success type guarantees a fully signed transaction.

Checklist

  • 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)

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@PastaPastaPasta, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6aa7c0a2-ee5e-4bdb-82bc-44bb1a43247c

📥 Commits

Reviewing files that changed from the base of the PR and between 981a25d and 9742a27.

📒 Files selected for processing (31)
  • doc/release-notes-7594.md
  • doc/release-notes-7600.md
  • src/Makefile.am
  • src/Makefile.test.include
  • src/bls/bls.cpp
  • src/evo/providertx.cpp
  • src/evo/providertx.h
  • src/evo/providertx_service.cpp
  • src/evo/providertx_service.h
  • src/evo/specialtxman.cpp
  • src/interfaces/masternode_operator.h
  • src/interfaces/node.h
  • src/interfaces/providertx.h
  • src/interfaces/wallet.h
  • src/node/interfaces.cpp
  • src/rpc/evo.cpp
  • src/rpc/evo_util.cpp
  • src/rpc/evo_util.h
  • src/test/evo_netinfo_tests.cpp
  • src/test/interfaces_tests.cpp
  • src/wallet/interfaces.cpp
  • src/wallet/masternode_operator.h
  • src/wallet/scriptpubkeyman.cpp
  • src/wallet/scriptpubkeyman.h
  • src/wallet/test/masternode_operator_tests.cpp
  • src/wallet/test/wallet_tests.cpp
  • src/wallet/wallet.cpp
  • src/wallet/wallet.h
  • src/wallet/walletdb.cpp
  • src/wallet/walletdb.h
  • test/functional/wallet_dash_rpcs.py

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

@thepastaclaw

thepastaclaw commented Aug 13, 2026

Copy link
Copy Markdown

🕓 Ready for review — 1 ahead in queue (commit 9742a27)
Queue position: 2/2
ETA: start ~06:40 UTC · complete ~06:55 UTC (median 15m across 30 recent reviews; 2 slots)
Queued 6m ago · Last checked: 2026-08-13 06:40 UTC

@github-actions

Copy link
Copy Markdown

Potential PR merge conflicts

This is advisory only. It does not block CI, but it marks PRs that will likely need a rebase depending on merge order.

If this PR merges first

These open PRs will likely need a rebase:

@PastaPastaPasta PastaPastaPasta changed the title refactor(evo): expose typed provider transaction operations refactor(interfaces): expose typed provider transaction operations Aug 13, 2026
@PastaPastaPasta
PastaPastaPasta force-pushed the refactor/typed-provider-transactions branch from 0d641d8 to 71a70d4 Compare August 13, 2026 05:53
@PastaPastaPasta
PastaPastaPasta force-pushed the refactor/typed-provider-transactions branch from 71a70d4 to 9742a27 Compare August 13, 2026 06:31
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