Skip to content

fix: deploy on Dash Core 24 as well as Core 23, with a Core version matrix in CI - #30

Merged
ktechmidas merged 5 commits into
mainfrom
fix/core-24-wallet-keys
Nov 14, 2026
Merged

ktechmidas merged 5 commits into
mainfrom
fix/core-24-wallet-keys

Conversation

@ktechmidas

@ktechmidas ktechmidas commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Why

Dash Core 24 broke a deployment (Palmatum) at the spork-key step: the wallet step exports a key with dumpprivkey, and Core 24 creates descriptor wallets by default, where that RPC is refused ("Only legacy wallets are supported by this command"). CI pinned a single Core image (dashpay/dashd:23), so nothing checked a new Core before it was deployed.

Running the code against real Core 23.1.10 and 24.0.1 nodes turned up a second break behind the first: Core 24 removed SPORK_3_INSTANTSEND_BLOCK_FILTERING and SPORK_9_SUPERBLOCKS_ENABLED (dashpay/dash#7278), and the activation step refuses a Core that does not list all six sporks it wants (unsupported-spork-profile).

Core 23 keeps working: every change here runs against both versions.

What changed

  1. test(core): a Core version matrix. New workflow .github/workflows/core-compat.yml, matrix over dashpay/dashd:23 and dashpay/dashd:24. Per image:
    • internal/node/testdata/test_core_compat.py (new): the real Worker against a lone regtest dashd, nothing scripted. Every RPC the workers name still exists; the error codes they branch on; wallet and spork identity; a Core restart with sporkaddr/sporkkey; funding; an EvoNode registration and its replay; spork activation signed with the recorded key; and two resume cases (a deployment holding a key exported from a legacy wallet, and one interrupted before the key was recorded, which is the state Core 24 left behind). When Core refuses a call, the failure prints Core's own message, which the worker's client drops.
    • the existing dashmate-rendered devnet contract (core_integration.py, join_contract.py), moved from ci.yml's core-contract job so it runs once per Core. main has no branch protection, so no required check name changes.
    • Manual dispatch against any tag: run the workflow with image=dashpay/dashd:<tag> to check a release candidate or patch release before deploying it.
  2. fix(node): the spork key no longer comes out of the wallet. The worker makes the key itself and asks Core for its address with the wallet-less descriptor RPCs (getdescriptorinfo "pkh(<key>)", then deriveaddresses). dumpprivkey is gone; the dashnet wallet stays whatever type Core creates.
  3. fix(node): activation on Core 24. Sporks 3 and 9 are activated where Core has them (23) and skipped where it does not (24). Any other missing spork is still refused.
  4. test(core): the devnet contract activates sporks after the registrations, as lifecycle/runner.go does (registrations, fast-forward, activate). The contract did it the other way round, which Core 24 does not allow on a lone node: with InstantSend on, Core keeps a transaction without an InstantSend lock out of blocks for ten minutes. Core 23 skipped that rule while masternode sync was incomplete (RejectConflictingBlocks, src/node/miner.cpp); Core 24 removed that exception together with SPORK_3. No step was dropped.

A search for every key export/import or legacy-wallet dependence (dumpprivkey, importprivkey, dumpwallet, createwallet, getnewaddress followed by an export) found only the one dumpprivkey in internal/node/worker.py. createwallet is called with the name only, which both versions accept. The managed, join, upgrade and seed-TLS workers use no wallet RPC. The infraclaw clone and its worktrees were checked read-only for unpushed work on this path: there is none.

Which approach, and why

Both suggested approaches were tried against real nodes first (probe run, jobs wallet-keys (dashpay/dashd:23) and (dashpay/dashd:24)):

Core 23.1.10 Core 24.0.1
default createwallet legacy (bdb) descriptor (sqlite)
dumpprivkey on the default wallet works refused, code -4
(a) explicit legacy wallet (descriptors=false) works works, only with load_on_startup=true; dumpprivkey works on it
(b) listdescriptors true + BIP32 derivation of the address's key refused on the default (legacy) wallet; works on a descriptor wallet works
chosen: getdescriptorinfo "pkh(<own key>)" + deriveaddresses works works
a node configured with that sporkaddr/sporkkey accepts sporkupdate yes yes
protx register_fund_evo from the default wallet works works (descriptor wallet)
  • (a) legacy wallet works today but depends on the wallet type Core is retiring (24 ships migratewallet and makes legacy creation opt-in). It also does nothing for a dashnet wallet that Core 24 already created as a descriptor wallet, which is exactly the interrupted deployment.
  • (b) private descriptor works, but only on descriptor wallets, so Core 23's default wallet would still need dumpprivkey: two code paths, each tested on one version. It also needs BIP32 and secp256k1 arithmetic in the worker and parsing of descriptor strings, whose format already differs between the two versions (44'/1'/0' vs 44h/1h/0h). And listdescriptors true returns the wallet's mnemonic, far more than the one key needed.
  • Chosen: keep the descriptor idea from (b), drop the wallet. The spork key never needed to be a wallet key: Core signs sporks with the key in its configuration. So the worker generates the key (secrets, wallet import format) and Core validates it and derives the address. One code path, identical on both versions and both wallet types, no dependence on legacy wallets, no elliptic-curve code here. Core refuses a damaged key or one for another chain (code -5), and did not start when given a sporkkey that does not match sporkaddr.

Effect on existing deployments:

  • Made before this change (Core 23, legacy wallet): secrets.json already holds the exported key. Its address is now derived from it rather than read from the wallet label, and is the same address (test_7 proves this on a real legacy wallet on both versions). No migration, and upgrading such a network's Core to 24 needs no key export.
  • Interrupted at the failed export (Core 24): resumes with a fresh key (test_8). Nothing had recorded the old dashnet:spork address: the controller records it only after this step returns. The unused labelled address stays in the wallet.

What was run and seen

  • The new test fails on main against Core 24 and passes on Core 23. Run against the worker exactly as on main: run 43497807750. dashpay/dashd:23: 8 of 8 ok. dashpay/dashd:24: test_3 and test_8 fail with rpc-dumpprivkey:-4 on dashpay/dashd:24: Core answered {"code": -4, "message": "Only legacy wallets are supported by this command"}. (That run used the test a few lines before its final form: premine 1000 instead of 600, the spork list before Core 24's was known, and a legacy-wallet setup call that Core 24 rejected, so test_7 was skipped there.) main's existing devnet contract fails the same way on Core 24: job main-core-contract in the probe run, worker.RPCFailure: rpc-dumpprivkey:-4 right after core-start passed.
  • With the fix, the matrix is green on both: run 43501673684 at 4332ac5. dashpay/dashd:23 (Core 23.1.10, legacy default wallet) and dashpay/dashd:24 (Core 24.0.1, descriptor default wallet) each: 8 of 8 regtest tests ok, then the devnet contract through wallet, core-finalize, fund, register (twice, with replay), miner start/pause, stop/resume and activate, then the join contract.
  • The run before it (43500105673, at 334d7ce) was green on Core 23 and on Core 24's regtest step, and red on Core 24's devnet step: register after activate ended in rpc-protx:-8. That is item 4 above; the cause was read from Core's source, not observed directly.
  • checks / check is red, and not because of this change. internal/seedtls/testdata/test_tls.py::test_real_served_tls_validates_both_identities fails with gateway-certificate-not-served. It fails 3 times out of 3 on main's own code on today's runner image (Ubuntu 26.04, Python 3.14.4, OpenSSL 3.5.5): probe run 43501625847. check last passed on main on 2026-10-30. Not fixed here. In that same job the Go tests, the DynamoDB proof and the node and managed worker tests (including the new fixture tests) passed before it; test_console_operation.py and the "Examples and command boundary" step come after the failing test and did not run. Every other checks job passed at 4332ac5 (run 43501673707): platform-contract, managed-contract, bootstrap-recipe and the four binaries.

Not covered

  • Quorums, ChainLocks, DKG, InstantSend, Platform on Core 24. A lone regtest node and a one-node devnet have none. getbestchainlock and masternode status are checked only as "exist and fail with a code the worker expects". No multi-node network was deployed.
  • Platform against Core 24. Core 24 moved the service field and getblockchaininfo.softforks behind -deprecatedrpc=service / -deprecatedrpc=softforks; Platform below 5.0.0 needs both, and dashmate 5.0.0+ adds the first itself. This tool renders Core's configuration with the release's own dashmate, so a release pairing Core 24 with Platform or dashmate below 5 would start Core without them. Nothing here adds or checks those flags. platform-contract still runs Core 23 with Platform 4.2.0-beta.3; it passes unmodified with dashd:24 too (probe job main-platform-contract), but only reaches "Drive waits for Core readiness", so it says nothing either way.
  • dashmate 5 rendering. The devnet step uses dashmate-helper:4.2.0-beta.3 for both Core versions, the only helper main pins. Core 24 boots from that render, but it is not the dashmate that ships with Core 24.
  • Registering after activation on Core 24. On a network whose InstantSend quorum is not signing yet, a registration sent after activate waits ten minutes for a block, and the worker reports that as rpc-protx:-8. A deployment registers before it activates, so this is not on its path; the worker was not changed for it.
  • Manual dispatch was not exercised. GitHub only dispatches a workflow that exists on the default branch, so the image input can first be tried after merge. A dispatched tag that needs another dashmate may fail the devnet step for dashmate reasons; the regtest step does not use dashmate and is reported separately.
  • No live network was touched. Palmatum was not resumed or changed, and nothing was deployed.
  • The worker's Python tests cannot run on Windows (fcntl); the fixture tests were run locally only through a shim, so the Linux CI run is the reference.

🤖 Generated with Claude Code

ktechmidas and others added 3 commits November 13, 2026 23:15
CI pinned one Core image (dashpay/dashd:23), so a Core release that changed
an RPC, a default or an error code was first met on a live deployment: Core 24
makes descriptor wallets the default and the spork-key step failed there.

Add a Core compatibility workflow with a matrix over dashpay/dashd:23 and
dashpay/dashd:24. Per image it runs:

- test_core_compat.py: the real worker against a lone regtest dashd. Every
  RPC the workers name still exists; the error codes they branch on; the
  wallet and spork identity; a Core restart with the spork key; funding; an
  EvoNode registration and its replay; spork activation signed with the
  recorded key; and two resume cases (a deployment holding a key exported
  from a legacy wallet, and one interrupted before the key was recorded).
- the existing dashmate-rendered devnet contract (core_integration.py and
  join_contract.py), moved here unchanged from ci.yml's core-contract job.

The workflow can be dispatched by hand with any other dashpay/dashd image, so
a release candidate is checked before it is deployed.

On this commit the Core 24 leg fails at the spork key (dumpprivkey is
refused on a descriptor wallet). The next commit fixes it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The wallet step created an address in the dashnet wallet and exported its
key with dumpprivkey to use as the spork key. Core 24 creates descriptor
wallets by default, and dumpprivkey is refused on them ("Only legacy wallets
are supported by this command"), so a deployment on Core 24 stopped there.

The spork key never needed to be the wallet's: Core signs sporks with the
key in its configuration. The worker now makes the key itself and asks Core
for its address through the wallet-less descriptor RPCs (getdescriptorinfo,
deriveaddresses), so Core still validates the key and derives the address.
The same code runs on Core 23 and Core 24, on legacy and descriptor wallets.

Deployments made before this keep the key they exported: its address is
derived the same way and is the address they always had. A deployment that
stopped at the failed export resumes with a new key; nothing had recorded
the old address.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Activation required six sporks to be listed by Core and refused the whole
profile otherwise. Core 24 removed SPORK_3_INSTANTSEND_BLOCK_FILTERING and
SPORK_9_SUPERBLOCKS_ENABLED (dashpay/dash#7278): what they gated is always
enabled there and they no longer appear in the spork RPC, so activation
failed with unsupported-spork-profile once the spork key step passed.

Those two are now activated where Core still has them (Core 23) and skipped
where it does not. Any other missing spork is still refused.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 17da2d1f-780c-4a5a-825b-69080c78de1d
Commits

Reviewing files that changed from the base of the PR and between 334d7ce and c31fa8e.

Files selected for processing: 7

  • .github/workflows/ci.yml
  • .github/workflows/core-compat.yml
  • README.md
  • internal/node/testdata/core_integration.py
  • internal/node/testdata/test_core_compat.py
  • internal/node/testdata/test_worker.py
  • internal/node/worker.py

No actionable comments were generated in the recent review.

Walkthrough

The worker now generates and validates spork keys and handles two sporks that may be absent in Core. New real-Core tests cover worker behavior, and a dedicated workflow runs compatibility checks against Core images.

Changes: Core compatibility

Layer / File(s) Summary
Spork key and activation behavior
internal/node/worker.py, internal/node/testdata/test_worker.py
The worker generates compressed test-chain private keys, validates them with Core descriptor RPCs, and derives spork addresses from them. Activation skips two absent sporks while checking the remaining required sporks. Unit tests cover key handling and Core 24 activation behavior.
Real-Core compatibility tests
internal/node/testdata/test_core_compat.py
The opt-in test module starts a Docker-hosted regtest node and checks RPC behavior, wallet identity, funding, EvoNode registration, spork activation, and deployment resumption.
Compatibility workflow and documentation
.github/workflows/core-compat.yml, .github/workflows/ci.yml, README.md
The new workflow tests Core 23 and 24 by default, or a manually selected image, and then runs Devnet integration and join-contract scripts. The prior CI job is removed. The README describes the checks and their stated limits.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant test_core_compat
  participant dashd
  participant Worker
  participant core_integration
  participant join_contract
  GitHubActions->>test_core_compat: Run with selected dashd image
  test_core_compat->>dashd: Start regtest node and make RPC calls
  test_core_compat->>Worker: Exercise worker flows
  Worker->>dashd: Call Core RPCs
  GitHubActions->>core_integration: Run with resolved Core, helper, and Tor image digests
  GitHubActions->>join_contract: Run with resolved Core, helper, and Tor image digests
Loading
Merge Risk: Minimal · previous review 334d7

The change removes the worker's dependence on dumpprivkey and handles the sporks that Core 24 no longer lists, and it adds Core 23 and 24 compatibility checks. No merge-blocking issue was found in the reviewed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title says the change adds deployment support for Dash Core 24 alongside Core 23 and adds a Core version matrix in CI. The changeset does this: it adds a core-compat.yml workflow with a 23/24 matr…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title says the change adds deployment support for Dash Core 24 alongside Core 23 and adds a Core version matrix in CI. The changeset does this: it adds a core-compat.yml workflow with a 23/24 matrix, removes the spork-key dependence on wallet type (no dumpprivkey), and skips the retired sporks 3 and 9 when Core does not list them. The title matches the main change and the scope described in the objectives.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 75fde39d-f751-4c45-9762-9056ea1cc8de
Commits

Reviewing files that changed from the base of the PR and between 369a517 and 334d7ce.

Files selected for processing: 6

  • .github/workflows/ci.yml
  • .github/workflows/core-compat.yml
  • README.md
  • internal/node/testdata/test_core_compat.py
  • internal/node/testdata/test_worker.py
  • internal/node/worker.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

ktechmidas and others added 2 commits November 13, 2026 23:26
…does

The devnet contract activated the sporks before funding and registering.
A deployment does the opposite (registrations, fast-forward, then activate),
and on Core 24 the test's order cannot work on a lone node.

With InstantSend on, Core keeps a transaction that has no InstantSend lock
out of blocks for ten minutes. Core 23 skipped that rule while the node's
masternode sync was incomplete (RejectConflictingBlocks, which also needed
SPORK_3); Core 24 removed that exception together with SPORK_3. A lone node
has no quorum to lock anything, so a registration sent after activation was
never mined and the readback failed with rpc-protx:-8.

Move both activation calls after the second registration. Every step still
runs, on both Core versions.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@ktechmidas
ktechmidas merged commit a289b8d into main Nov 14, 2026
12 checks passed
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.

1 participant