Stub: follow the live on-chain evonode list for Platform reads #19

Closed
opened 2026-10-13 10:41:20 +00:00 by rhelwig · 1 comment
Owner

Problem

Around 2026-10-11 the mainnet seed hosts seed-1/2/3.mainnet.networks.dash.org stopped answering while Platform itself stayed up (hundreds of evonodes answering DAPI). The live Stub's Platform refresh was failing at the same time.

The Stub's address handling is static:

  • evo-sdk's built-in DAPI list is frozen at package build time.
  • Trusted mode discovers addresses from quorums.<network>.networks.dash.org/masternodes only once, at connect. The Stub connects once and runs for weeks, so it never picks up evonodes that were PoSe-banned or added later.
  • Nothing is persisted, so a restart during an outage starts again from the frozen list.
  • With DECENT_SITE_DASH_DAPI_ADDRESSES set, EvoSDK.withAddresses was called without trusted, so the trusted-context proof verification was silently dropped.

Fix (discovery order, DNS-free first)

  1. Direct DAPI (primary, no DNS). gRPC-web Core/subscribeToMasternodeList against https://<ip>:<port> evonodes. The first message is the full list (CBOR protx diff). Candidates, in order: the saved last-known list, then the SDK's built-in seed IPs (evonode-bootstrap.ts, generated from wasm-sdk), then DECENT_SITE_DASH_DISCOVERY_SEEDS. Up to 8 nodes are dialled, and a second node must agree (same block: identical evonode set; nearby block: ≥90% overlap). A lone answer is accepted only when no other node answered, and disagreeing answers are rejected. At least 3 usable evonodes are required.
  2. Last resort: https://quorums.<network>.networks.dash.org/masternodes (needs DNS), only if every direct attempt fails.
  3. Fallbacks: in-memory list, then the saved file next to the Stub cache, then SDK defaults. Never blocks the warm cache.
  • Only valid (non-PoSe-banned) evonodes with a Platform HTTPS port are kept. Refresh is about every 24 h, with a retry within 1 h on failure. The SDK reconnects when the list changes.
  • DECENT_SITE_DASH_DAPI_ADDRESSES pins the list (discovery off). DECENT_SITE_DASH_DISCOVERY=off / DECENT_SITE_DASH_DISCOVERY_DIRECT=off are the opt-outs.
  • Explicit and discovered addresses keep trusted-context proof verification (previously dropped for withAddresses).

Quorum keys (remaining DNS dependency)

Trusted mode still fetches Platform quorum public keys from quorums.<network>.networks.dash.org at connect. Findings:

  • The DAPI mnlistdiff already carries them (newQuorums[].quorumPublicKey, including llmqType 4, the Platform quorums).
  • evo-sdk 4.0.0 accepts a trusted context only via WasmTrustedContext.prefetch*WithUrl (an HTTP quorum service). WasmContext has no public constructor.
  • Taking keys from one evonode without verifying them (merkleRootQuorums in the coinbase plus a chainlock/header check) would let a single node forge proofs. Proofs-off is not acceptable.

Follow-ups

  • Obtain Platform quorum keys DNS-free: derive them from the DAPI mnlistdiff with verification (cross-node agreement plus merkleRootQuorums/chainlock checks), then feed the SDK, e.g. through a loopback quorum-service shim for prefetchMainnetWithUrl, or upstream support for a custom context provider in evo-sdk.
  • Optional: verify merkleRootMNList from the coinbase against the received list.
## Problem Around 2026-10-11 the mainnet seed hosts `seed-1/2/3.mainnet.networks.dash.org` stopped answering while Platform itself stayed up (hundreds of evonodes answering DAPI). The live Stub's Platform refresh was failing at the same time. The Stub's address handling is static: - evo-sdk's built-in DAPI list is frozen at package build time. - Trusted mode discovers addresses from `quorums.<network>.networks.dash.org/masternodes` only once, at connect. The Stub connects once and runs for weeks, so it never picks up evonodes that were PoSe-banned or added later. - Nothing is persisted, so a restart during an outage starts again from the frozen list. - With `DECENT_SITE_DASH_DAPI_ADDRESSES` set, `EvoSDK.withAddresses` was called without `trusted`, so the trusted-context proof verification was silently dropped. ## Fix (discovery order, DNS-free first) 1. **Direct DAPI (primary, no DNS).** gRPC-web `Core/subscribeToMasternodeList` against `https://<ip>:<port>` evonodes. The first message is the full list (CBOR `protx diff`). Candidates, in order: the saved last-known list, then the SDK's built-in seed IPs (`evonode-bootstrap.ts`, generated from wasm-sdk), then `DECENT_SITE_DASH_DISCOVERY_SEEDS`. Up to 8 nodes are dialled, and a second node must agree (same block: identical evonode set; nearby block: ≥90% overlap). A lone answer is accepted only when no other node answered, and disagreeing answers are rejected. At least 3 usable evonodes are required. 2. **Last resort:** `https://quorums.<network>.networks.dash.org/masternodes` (needs DNS), only if every direct attempt fails. 3. **Fallbacks:** in-memory list, then the saved file next to the Stub cache, then SDK defaults. Never blocks the warm cache. - Only valid (non-PoSe-banned) evonodes with a Platform HTTPS port are kept. Refresh is about every 24 h, with a retry within 1 h on failure. The SDK reconnects when the list changes. - `DECENT_SITE_DASH_DAPI_ADDRESSES` pins the list (discovery off). `DECENT_SITE_DASH_DISCOVERY=off` / `DECENT_SITE_DASH_DISCOVERY_DIRECT=off` are the opt-outs. - Explicit and discovered addresses keep trusted-context proof verification (previously dropped for `withAddresses`). ## Quorum keys (remaining DNS dependency) Trusted mode still fetches Platform quorum public keys from `quorums.<network>.networks.dash.org` at connect. Findings: - The DAPI mnlistdiff already carries them (`newQuorums[].quorumPublicKey`, including llmqType 4, the Platform quorums). - evo-sdk 4.0.0 accepts a trusted context only via `WasmTrustedContext.prefetch*WithUrl` (an HTTP quorum service). `WasmContext` has no public constructor. - Taking keys from one evonode without verifying them (merkleRootQuorums in the coinbase plus a chainlock/header check) would let a single node forge proofs. Proofs-off is not acceptable. ## Follow-ups - [ ] Obtain Platform quorum keys DNS-free: derive them from the DAPI mnlistdiff with verification (cross-node agreement plus merkleRootQuorums/chainlock checks), then feed the SDK, e.g. through a loopback quorum-service shim for `prefetchMainnetWithUrl`, or upstream support for a custom context provider in evo-sdk. - [ ] Optional: verify `merkleRootMNList` from the coinbase against the received list.
Author
Owner

Quorum-key research is in docs/QUORUM-KEY-HARDENING.md (PR #22). Recommendation: no DNS-free key fallback below SPV-level verification. Ask upstream for a JS-constructible / SPV-verified context provider.

Quorum-key research is in docs/QUORUM-KEY-HARDENING.md (PR #22). Recommendation: no DNS-free key fallback below SPV-level verification. Ask upstream for a JS-constructible / SPV-verified context provider.
Sign in to join this conversation.
No labels
feature request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rhelwig/DecentSite#19
No description provided.