Repository navigation
fix(sdk): update dashcore-lib to 0.26.1 and refresh the testnet whitelist for Core V24 - #5687
Conversation
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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit 8c9079e) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
normalbygpt-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); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-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; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-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.
| 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' }, | ||
| ); |
There was a problem hiding this comment.
🟡 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)
|
Bots are done — your move: post |
|
Concept ACK 👍 |
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>
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:@dashevo/dashcore-lib0.22.0 cannot parse testnet masternode list diffs, because their coinbase is a CbTx version 4.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-devthrough the forward merge.What was done?
dashcore-lib 0.26.1.
@dashevo/dashcore-libgoes from~0.22.0to~0.26.1in 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-liband@dashevo/wasm-dpp.yarn.lock,.pnp.cjsand.yarn/cacheare updated. The only new transitive package is@noble/hashes1.8.0.What 0.26.1 brings over 0.22.0 (v0.26.1 release notes):
merkleRootAssetUnlocks(fix: support Core V24 coinbase payloads dashcore-lib#318).ExtNetInfo. LLMQ_60_75 goes back to 32 active quorums: 0.25.0 had dropped it to 24, which would also have rejected mainnet.id/hashis the stable txid, andinstanceHashis the full-serialization hash.llmqParamsOverrideargument on the SML classes (0.25.0, fix(dashmate): cannot read properties of undefined (reading 'masternodeRewardSh… #310).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 diffJSON, 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.dapiAddressesWhiteListwith 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
SimplifiedMasternodeListProviderandSimplifiedMasternodeListDAPIAddressProvider. The diff has a CbTx v4 coinbase and 12 ExtAddr entries among 399. The test checks two things:The existing provider spec is skipped, so nothing covered this path with real data. The fixture sits under
test/, outside the publishedlib/.How Has This Been Tested?
Live testnet, default options:
new DAPIClient({ network: 'testnet' })andcore.getBestBlockHeight(). Run against this branch and againstv5.0-devat eb6d843: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 timeoutNoAvailableAddressesError: No available addressesgetBestBlockHeight()= 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, andmerkleRootMNListmatches CoreRegression test: on
v5.0-dev(0.22.0) both cases fail with the testnet error,Failed to parse payload: raw payload is bigger than expectedfromCoinbasePayload.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 constraintsandyarn install --immutablepass. Pass and pending counts matchv5.0-dev, apart from the 2 new tests:@dashevo/dapi-clienttest:coverage(unit + integration)@dashevo/dapi-client@dashevo/wallet-libtest:types,test:unit,test:integration@dashevo/wallet-libdashbuild:ts,test:types,test:unitdash@dashevo/dapitest:unit@dashevo/dash-spvtest@dashevo/wasm-dpptest:node,test:typesdashmatetest:unit@dashevo/platform-test-suitetest:unitNot run locally, left to CI:
@dashevo/dapiintegration and functional suites, anddashmateintegration tests: they need Docker.@dashevo/wasm-dppbrowser tests (nightly only in CI).@dashevo/platform-test-suiteand@dashevo/bench-suitelint: they only fail locally on an unresolved@dashevo/evo-sdkimport, which needs awasm-sdkbuild.Follow-ups, not in this PR
SimplifiedMasternodeListDAPIAddressProviderstill builds the address fromgetIp()(thecore_p2phost) andplatformHTTPPort(theplatform_httpsport). 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 addsgetPlatformHTTPSEndpoint()for this. Switching to it also needs IPv6-safe URLs in the transport and a whitelist built fromplatform_https.Breaking Changes
None in Platform's own APIs. The
dashSDK re-exports dashcore-lib asDash.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/toBufferand hex input use Core's P2P bytes. The JSON path is unchanged.validate()on ProTx payloads applies Core's chain-independent checks.Transaction.id/hashis its stable txid.service,payoutAddressandscriptPayout, because v3 payloads lack them.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
8c9079e/self-reviewedWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.