Stub: follow live on-chain evonode list for Platform reads #20
No reviewers
Labels
No labels
feature request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rhelwig/DecentSite!20
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/live-evonode-list"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #19.
Fix (discovery order, DNS-free first)
Core/subscribeToMasternodeListagainsthttps://<ip>:<port>evonodes. The first message is the full list (CBORprotx diff). Candidates, in order: the saved last-known list, then the SDK's built-in seed IPs (evonode-bootstrap.ts, generated from wasm-sdk), thenDECENT_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.https://quorums.<network>.networks.dash.org/masternodes(needs DNS), only if every direct attempt fails.DECENT_SITE_DASH_DAPI_ADDRESSESpins the list (discovery off).DECENT_SITE_DASH_DISCOVERY=off/DECENT_SITE_DASH_DISCOVERY_DIRECT=offare the opt-outs.withAddresses).Quorum keys (remaining DNS dependency)
Trusted mode still fetches Platform quorum public keys from
quorums.<network>.networks.dash.orgat connect. Findings:newQuorums[].quorumPublicKey, including llmqType 4, the Platform quorums).WasmTrustedContext.prefetch*WithUrl(an HTTP quorum service).WasmContexthas no public constructor.Follow-ups (tracked on #19)
prefetchMainnetWithUrl, or upstream support for a custom context provider in evo-sdk.merkleRootMNListfrom the coinbase against the received list.Tests (tsx, Node 20)
tests/dapi-masternode-list.test.tsandtests/evonode-discovery.test.ts: 21 pass. They use a real captured mainnet gRPC-web frame, trimmed to 8 KB (5 valid evonodes, 2 PoSe-banned, 3 regular), and cover CBOR/gRPC-web decoding, filtering, cross-check rules, candidate order, fallback, persistence and config.tsc --noEmitis clean for dash and stub.Manual mainnet check
With
dns.lookupstubbed to throw and the HTTPS fallback disabled, direct discovery got 355 evonodes from 185.209.230.13, confirmed by 144.91.99.105, in about 2.7 s with zero DNS lookups. The SDK then resolvedrhelwig7.dashwith proofs over those addresses.Do not merge until reviewed.