Skip to content

fix(sdk): centralize mainnet and testnet bootstrap builders#3530

Closed
Copilot wants to merge 3 commits intov3.1-devfrom
copilot/integrate-rust-dashcore-crate
Closed

fix(sdk): centralize mainnet and testnet bootstrap builders#3530
Copilot wants to merge 3 commits intov3.1-devfrom
copilot/integrate-rust-dashcore-crate

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

The SDK still left SdkBuilder::new_mainnet() / new_testnet() unimplemented, while WASM and FFI maintained separate hardcoded Platform gateway lists. This change makes dash-sdk the single bootstrap source for mainnet/testnet construction and routes dependent layers through it.

  • Shared SDK bootstrap

    • Implement SdkBuilder::new_mainnet() and SdkBuilder::new_testnet() in packages/rs-sdk/src/sdk.rs
    • Move the default mainnet/testnet DAPI address lists into dash-sdk
    • Normalize default address parsing in one place via parse_address_list() / default_address_list_for_network()
    • Improve panic diagnostics for invalid baked-in addresses
  • Consumer cleanup

    • Update packages/wasm-sdk/src/sdk.rs to call SdkBuilder::new_mainnet() / SdkBuilder::new_testnet() instead of carrying its own gateway lists
    • Update trusted fallback creation in packages/rs-sdk-ffi/src/sdk.rs to use the shared SDK constructors instead of rebuilding address lists locally
  • Coverage

    • Add focused unit tests in packages/rs-sdk/src/sdk.rs asserting that:
      • new_mainnet() sets Network::Mainnet and the expected bootstrap set
      • new_testnet() sets Network::Testnet and the expected bootstrap set
let mainnet = SdkBuilder::new_mainnet();
let testnet = SdkBuilder::new_testnet();

// dependent layers now delegate instead of duplicating address lists
let wasm_builder = SdkBuilder::new_testnet().with_context_provider(WasmContext {});

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https s-a90a27f5881aed-m64 s-a90a27f5881aed/tmp/rustctk7pgV/symbols.o "ffi-testing", "jni", "once_cell")) s-a9�� s-a90a27f5881aed-Wl,--as-needed s-a90a27f5881aed-Wl,-Bstatic n/rustc s-a90a27f5881aedgit s-a90a27f5881aedpush s-a90a27f5881aed-v n/rustc s-a9�� s-a90a27f5881aed/home/REDACTED/.rustup/toolchains/1.92-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_64cargo-fmt s-a90a27f5881aed/home/REDACTED/.rustup/toolchains/1.92-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_64fmt f/ureq-3.3.0/src/lib.rs /index.crates.iodebian-sa1 /index.crates.io1 /index.crates.io1 -1949cf8c6b5b557/home/REDACTED/.rustup/toolchains/1.92-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_64-REDACTED-linux-gnu/lib/libadler2-1e0b0d62df36c85c.rlib (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits April 24, 2026 08:17
Copilot AI changed the title [WIP] Integrate rust-dashcore masternode list into dash-sdk fix(sdk): centralize mainnet and testnet bootstrap builders Apr 24, 2026
Copilot AI requested a review from lklimek April 24, 2026 08:20
@Claudius-Maginificent
Copy link
Copy Markdown
Collaborator

Superseded by #3533 — same structure (centralize into SdkBuilder::new_mainnet() / new_testnet(), delegate from wasm-sdk and rs-sdk-ffi), but built on top of #3532 and with the baked-in IPs replaced by a dynamic query against dash_network_seeds::evo_seeds(network) — the weekly-refreshed single source of truth that rust-dashcore v0.42-dev ships. Thanks for the draft, Copilot — your two commits are cherry-picked verbatim with authorship preserved. Closing this one.

🤖 Co-authored by Claudius the Magnificent AI Agent

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.

Integrate rust-dashcore masternode list crate into dash-sdk

3 participants