Skip to content

fix(sdk): update dashcore-lib to 0.26.1 and refresh the testnet whitelist for Core V24 - #5687

Merged
shumkov merged 4 commits into
v5.0-devfrom
shumkov/v50-dashcore-lib-0261
Oct 31, 2026
Merged

shumkov merged 4 commits into
v5.0-devfrom
shumkov/v50-dashcore-lib-0261

Conversation

@shumkov

@shumkov shumkov commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Since Dash Core V24 activated on testnet (block 1,578,000, 2026-10-23), new DAPIClient({ network: 'testnet' }) cannot discover nodes. #5609 traced three failures, each hidden behind the one before:

  1. @dashevo/dashcore-lib 0.22.0 cannot parse testnet masternode list diffs, because their coinbase is a CbTx version 4.
  2. Once a diff parses, 0.22.0 hashes V24's version 3 (ExtAddr) entries wrongly, so the merkle root check rejects the list.
  3. The testnet DAPI whitelist is stale: none of its addresses is an enabled evonode any more, so discovery ends with NoAvailableAddressesError.

dashcore-lib 0.26.1, now npm latest, fixes the first two. #5609's whitelist refresh fixes the third. Mainnet hits the parser failures at its own V24 fork.

This ships in Platform 5.0.2 and reaches v5.1-dev through the forward merge.

What was done?

  • dashcore-lib 0.26.1. @dashevo/dashcore-lib goes from ~0.22.0 to ~0.26.1 in all nine workspace packages that use it: @dashevo/bench-suite, @dashevo/dapi, @dashevo/dash-spv, dashmate, @dashevo/dapi-client, dash (js-dash-sdk), @dashevo/platform-test-suite, @dashevo/wallet-lib and @dashevo/wasm-dpp. yarn.lock, .pnp.cjs and .yarn/cache are updated. The only new transitive package is @noble/hashes 1.8.0.

    What 0.26.1 brings over 0.22.0 (v0.26.1 release notes):

  • No code adaptations were needed. Platform's JS reads masternode lists through the JSON path, which DAPI (JS and rs-dapi) streams as CBOR of Core's protx diff JSON, so the binary format change doesn't reach it. Every @dashevo/dashcore-lib/lib/... subpath Platform imports still exists, and the typings changes only add or loosen types. Platform builds asset locks as version 1 with standard P2PKH credit outputs, builds asset unlocks as version 1 (txids unchanged), and builds no ProTx payloads.

  • Testnet whitelist refresh, by @PastaPastaPasta. The two commits from fix(sdk): restore JS DAPI client node discovery after Core V24 #5609 are cherry-picked with their authorship kept. They regenerate networkConfigs.testnet.dapiAddressesWhiteList with the command in its comment: 41 enabled evonodes that pass the version check, on port 1443. They also describe the list as a snapshot. On 2026-10-30, the list matches what that command returns. With these here, fix(sdk): restore JS DAPI client node discovery after Core V24 #5609 can be closed or reduced to whatever is left.

  • Regression test for the path default discovery uses. It feeds a real full diff, streamed by a testnet DAPI node at block 1,582,244, through SimplifiedMasternodeListProvider and SimplifiedMasternodeListDAPIAddressProvider. The diff has a CbTx v4 coinbase and 12 ExtAddr entries among 399. The test checks two things:

    • the rebuilt list reproduces the merkle roots in the coinbase;
    • discovery offers every valid evonode at the Platform HTTPS address Core reports for it.

    The existing provider spec is skipped, so nothing covered this path with real data. The fixture sits under test/, outside the published lib/.

How Has This Been Tested?

Live testnet, default options: new DAPIClient({ network: 'testnet' }) and core.getBestBlockHeight(). Run against this branch and against v5.0-dev at eb6d843:

build result
v5.0-dev (dashcore-lib 0.22.0, old whitelist) Failed to parse payload: raw payload is bigger than expected. (CbTx v4) on every diff; retries until the 30 s timeout
this branch, bump only, old whitelist NoAvailableAddressesError: No available addresses
this branch (0.26.1, refreshed whitelist) getBestBlockHeight() = 1582274 in 1.3 s. The masternode list has 399 entries, 12 of them v3, 32 LLMQ_60_75 quorums and a CbTx v4 coinbase, and merkleRootMNList matches Core

Regression test: on v5.0-dev (0.22.0) both cases fail with the testnet error, Failed to parse payload: raw payload is bigger than expected from CoinbasePayload.fromBuffer. On this branch both pass, under Node and in karma (headless Chrome and Firefox). A separate review checked that the test also fails if v3 entry hashing breaks or LLMQ_60_75 is capped at 24.

Package suites: yarn constraints and yarn install --immutable pass. Pass and pending counts match v5.0-dev, apart from the 2 new tests:

package checks result
@dashevo/dapi-client lint, test:coverage (unit + integration) 352 passing, 4 pending
@dashevo/dapi-client karma in ChromeHeadless and FirefoxHeadless 352 tests completed in each
@dashevo/wallet-lib lint, test:types, test:unit, test:integration 403 passing (2 pending), 25 passing
@dashevo/wallet-lib karma in ChromeHeadless and FirefoxHeadless 426 tests completed in each
dash lint, build:ts, test:types, test:unit 68 passing
dash karma in ChromeHeadless and FirefoxHeadless 68 tests completed in each
@dashevo/dapi lint, test:unit 144 passing
@dashevo/dash-spv lint, test 63 passing, 2 pending
@dashevo/wasm-dpp lint, test:node, test:types 235 passing, 533 pending
dashmate lint, test:unit 876 passing
@dashevo/platform-test-suite test:unit 5 passing

Not run locally, left to CI:

  • @dashevo/dapi integration and functional suites, and dashmate integration tests: they need Docker.
  • @dashevo/wasm-dpp browser tests (nightly only in CI).
  • @dashevo/platform-test-suite and @dashevo/bench-suite lint: they only fail locally on an unresolved @dashevo/evo-sdk import, which needs a wasm-sdk build.
  • E2E suites.

Follow-ups, not in this PR

  • For a version 3 evonode, SimplifiedMasternodeListDAPIAddressProvider still builds the address from getIp() (the core_p2p host) and platformHTTPPort (the platform_https port). An evonode that serves Platform on another host, a domain or IPv6 would be dialled at the wrong address. No testnet evonode does that today. dashcore-lib 0.26.1 adds getPlatformHTTPSEndpoint() for this. Switching to it also needs IPv6-safe URLs in the transport and a whitelist built from platform_https.
  • The whitelist is a snapshot and will go stale again.

Breaking Changes

None in Platform's own APIs. The dash SDK re-exports dashcore-lib as Dash.Core, so dashcore-lib's own 0.26 changes reach SDK users. Upstream did not mark them breaking; each affects only data the old version couldn't handle or Core rejects:

  • SimplifiedMNListDiff.fromBuffer/toBuffer and hex input use Core's P2P bytes. The JSON path is unchanged.
  • validate() on ProTx payloads applies Core's chain-independent checks.
  • A version 2 asset unlock's Transaction.id/hash is its stable txid.
  • Version 1 asset locks with a non-minimal P2PKH credit script are rejected, as Core already does.
  • Some typings are optional now, e.g. service, payoutAddress and scriptPayout, because v3 payloads lack them.

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 added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · 8c9079e

  • Bots — thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Build green
  • Approvals — you own every area touched; none needed

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

shumkov and others added 4 commits October 30, 2026 19:46
Moves every workspace package from @dashevo/dashcore-lib ~0.22.0 to
~0.26.1, the first npm release with Dash Core V24 support: CbTx v4,
V24 masternode list diffs (ExtNetInfo entries, LLMQ_60_75 at 32 active
quorums, Core's P2P diff format), version 3 ProTx, shared masternode
transactions (types 10-12) and version 2 asset locks and unlocks.

Without it, @dashevo/dapi-client cannot parse testnet masternode list
diffs since V24 activated, so default node discovery fails.

0.26.1 adds one dependency, @noble/hashes 1.8.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Feeds the full masternode list diff a testnet DAPI node streamed for
block 1,582,244 (CbTx v4, 12 ExtAddr entries among 399) through
SimplifiedMasternodeListProvider and SimplifiedMasternodeListDAPIAddressProvider,
the path default node discovery uses. The rebuilt list must reproduce
the merkle roots in the coinbase, and discovery must offer every valid
evonode at the Platform HTTPS address Core reports for it.

The existing provider spec is skipped, so nothing covered this path
with real data. The fixture lives under test/, outside the published
lib/ directory.

Test would have caught this in CI: with dashcore-lib 0.22.0 both cases
fail with "Failed to parse payload: raw payload is bigger than
expected" from CoinbasePayload.fromBuffer, the error testnet discovery
hits; with 0.26.1 both pass under Node and in headless Chrome and
Firefox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
None of the 22 whitelisted testnet addresses is an enabled evonode any
more, so SimplifiedMasternodeListDAPIAddressProvider filtered out the
whole masternode list and DAPIClient({ network: 'testnet' }) failed with
NoAvailableAddressesError. Regenerate the list with the command in the
comment: the 41 evonodes that are currently enabled and pass the
version check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The whitelist has been a snapshot of all enabled testnet evonodes rather
than a hand-picked set of DCG nodes since #2816; say so, and say what
happens when it goes stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shumkov shumkov added this to the v5.0.0 milestone Oct 30, 2026
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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

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

@github-actions

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 30, 2026
@thepastaclaw

thepastaclaw commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 8c9079e) · triage: normal

@thepastaclaw thepastaclaw 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.

Final validation — Phase 1 + Phase 2

The Core V24 parser upgrade and refreshed testnet whitelist are consistent, and the relevant completed CI checks pass. The added regression test has a coverage gap: it bypasses the production whitelist and cannot detect a V3 evonode whose Platform HTTPS host differs from its Core P2P host; the remaining checks are still running.

🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a cross-cutting dependency and network-discovery update with substantial regression coverage, but the diff does not itself alter consensus, cryptography, funds handling, or peer-facing deserialization implementation.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/js-dapi-client/test/integration/SMLProvider/SimplifiedMasternodeListProviderCoreV24.spec.js`:
- [SUGGESTION] packages/js-dapi-client/test/integration/SMLProvider/SimplifiedMasternodeListProviderCoreV24.spec.js:82-89: Make the V24 discovery test cover the whitelist and distinct Platform HTTPS endpoints
  This test does not exercise the default discovery path it claims to cover. `SimplifiedMasternodeListDAPIAddressProvider` accepts only three constructor arguments, so the fourth `{ network: 'testnet' }` argument is ignored, and the explicitly supplied empty whitelist disables filtering entirely. The fixture also gives valid V3 entries the same host for `core_p2p` and `platform_https`; the provider currently uses `smlEntry.getIp()` with `platformHTTPPort`, so the assertion can pass even if endpoint selection ignores a distinct `platform_https` host. Test through the factory or explicitly pass the refreshed whitelist, and add a fixture case with different Core P2P and Platform HTTPS hosts. If endpoint selection remains deferred, track that follow-up separately rather than relying on this test as coverage for it.

Comment on lines +82 to +89
it('should offer every valid evonode at the Platform HTTPS address Core reports', async () => {
const listDAPIAddressProvider = new ListDAPIAddressProvider([], { network: 'testnet' });
const dapiAddressProvider = new SimplifiedMasternodeListDAPIAddressProvider(
smlProvider,
listDAPIAddressProvider,
[],
{ network: 'testnet' },
);

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.

🟡 Suggestion: Make the V24 discovery test cover the whitelist and distinct Platform HTTPS endpoints

This test does not exercise the default discovery path it claims to cover. SimplifiedMasternodeListDAPIAddressProvider accepts only three constructor arguments, so the fourth { network: 'testnet' } argument is ignored, and the explicitly supplied empty whitelist disables filtering entirely. The fixture also gives valid V3 entries the same host for core_p2p and platform_https; the provider currently uses smlEntry.getIp() with platformHTTPPort, so the assertion can pass even if endpoint selection ignores a distinct platform_https host. Test through the factory or explicitly pass the refreshed whitelist, and add a fixture case with different Core P2P and Platform HTTPS hosts. If endpoint selection remains deferred, track that follow-up separately rather than relying on this test as coverage for it.

source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.1-sol (phase2-reviewer: general, architecture-layering)

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Oct 30, 2026
@PastaPastaPasta

Copy link
Copy Markdown
Member

Concept ACK 👍

@shumkov
shumkov merged commit c6c570e into v5.0-dev Oct 31, 2026
43 of 44 checks passed
@shumkov
shumkov deleted the shumkov/v50-dashcore-lib-0261 branch October 31, 2026 14:12
@shumkov shumkov mentioned this pull request Nov 3, 2026
13 of 22 tasks
thepastaclaw pushed a commit to thepastaclaw/platform that referenced this pull request Nov 10, 2026
Brings v5.1-dev up to v5.0-dev: dashpay#5615, dashpay#5629, dashpay#5630, dashpay#5628, dashpay#5687, the
5.0.2 release (dashpay#5705), dashpay#5719, dashpay#5730, dashpay#5716 and the backport batch dashpay#5731.

Conflicts resolved by hand:
- CHANGELOG.md: [Unreleased] first, then the v5.0-dev release entries.
- verify_chain_lock_locally/v0: v5.0-dev's NonZeroU32 window arithmetic;
  the test module stays v5.1-dev's. v5.0-dev's overflow test there signs
  with blsful, which v5.1-dev no longer ships, so it moves to the
  dispatcher's tests on the dpp::bls chain lock helpers, keeping its
  control, and runs at protocol versions 13, 14 and latest (v0 and v1).
- rs-drive-proof-verifier proof.rs: dashpay#5628's Vote decoding, reading
  v5.1-dev's ResourceVoteWithCount.
- rs-platform-wallet-ffi asset_lock/sync.rs: v5.1-dev's doc wording
  (dashpay#5460, which the backport does not carry).
- rs-platform-wallet-ffi persistence.rs: the test imports dashpay#5716 and dashpay#5719
  add, without the secp256k1 import v5.1-dev dropped.
- rs-sdk protocol_gate_tests.rs: both sides' imports.

Semantic conflicts:
- dashpay#5630 on v5.1-only code: verify_chain_lock_locally v1 gets v0's
  NonZeroU32 window arithmetic; the chain lock test helpers, v1's tests,
  for_saving_v0 and storage_tests build or compare NonZero values;
  storage_tests gets the restore test of dashpay#5630's v5.1-dev version; the
  saved-format tests use the shared PLATFORM_BINCODE_CONFIG.
- masternode_vote_proof.rs (dashpay#5628): VotePoll::unique_id takes the
  platform version on v5.1-dev.
- rs-platform-wallet Cargo.toml: drop the backported tempfile
  dev-dependency, which v5.1-dev already declares.
- Cargo.lock and decision-proposals-contract's package.json: the v5.1-only
  crates and package take the merged version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants