From f29b82a50f799ba2f417f0b925095eabb5623e7a Mon Sep 17 00:00:00 2001 From: Local Dev Date: Sun, 30 Aug 2026 09:59:01 +0200 Subject: [PATCH] BNS: Sia+Nostr snapshot mirror, Theseus warm-start, VPS playbook, electrum.bch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Four independent pieces of one story — make cold-start .bch resolution fast, survive individual electrum outages, and turn adding a Silent Mode BNS server into a checklist run. * Argus/src/lib/snapshot-name.js — pure, interpretation-free snapshot format for the name beacon (raw history + verbose tx cache + deterministic root). * Argus/src/publish-name-mirror.mjs — mirror the snapshot to Sia S3 (floating + content-addressed) and Nostr NIP-33 (kind 30078, d-tag bns-name-list). Same pattern as publish-tld-mirror.mjs. * Argus/src/snapshot-name-to-file.mjs — dump the snapshot to a file for bundling. Writes to TheseusNavigator/snapshots/bns-name-snapshot.json. * Argus/src/lib/resolver-web.js — new export buildIndexFromSnapshot() runs the same REG/UPD reduction as buildIndex() but from a pre-fetched snapshot, no electrum required. Warm-start path in Theseus depends on this. * TheseusNavigator/main.js — warmFromSnapshot() and refreshSnapshotFromSia() wired into app.whenReady(). First .bch navigation returns from a warm index instead of waiting on a full electrum walk. * TheseusNavigator/package.json — bundles the starter snapshot as an extraResource so packaged builds ship with a floor. * TheseusNavigator/snapshots/bns-name-snapshot.json — first starter snapshot (70 beacon txs, root 8cc859aa…). * VPS/BNS-SERVER-PLAYBOOK.md — turn-key checklist for spinning up a second or third Silent Mode BNS server, distilled from what actually worked on the silentmode box (BCHN 29 [chip]-not-[chipnet], multi-beacon indexer, wss:// nginx, on-chain publish via electrum.bch, common gotchas table). * Argus/src/register-electrum-list.mjs — publish the current chipnet server pool as `el` on electrum.bch. Fits inside the 200-byte OP_RETURN cap by sizing the record (drops fallback IP pins in favour of URL-only tokens until they fit). NAME was chosen deliberately: two-part `electrum.bch` normalises to the bare distinct name `electrum`, whereas the earlier candidate `electrum.silentmode.bch` collapsed to silentmode.bch and would have inherited/overwritten that name's records. * Argus/src/revert-silentmode-bch.mjs — one-off recovery from the earlier register-electrum-list revision that hit exactly that subdomain-collapse bug (broadcast an UPD to silentmode.bch and clobbered its s3 record). Records recovered from the local snapshot cache; safe to leave in the tree as documentation of what happened. --- src/lib/resolver-web.js | 63 ++++++++++++- src/lib/snapshot-name.js | 96 ++++++++++++++++++++ src/publish-name-mirror.mjs | 156 +++++++++++++++++++++++++++++++++ src/register-electrum-list.mjs | 84 ++++++++++++++++++ src/revert-silentmode-bch.mjs | 27 ++++++ src/snapshot-name-to-file.mjs | 48 ++++++++++ 6 files changed, 473 insertions(+), 1 deletion(-) create mode 100644 src/lib/snapshot-name.js create mode 100644 src/publish-name-mirror.mjs create mode 100644 src/register-electrum-list.mjs create mode 100644 src/revert-silentmode-bch.mjs create mode 100644 src/snapshot-name-to-file.mjs diff --git a/src/lib/resolver-web.js b/src/lib/resolver-web.js index adbfc89..008cef8 100644 --- a/src/lib/resolver-web.js +++ b/src/lib/resolver-web.js @@ -52,7 +52,15 @@ export const CHIPNET_ELECTRUM = [ // A well-known BCNR name whose record carries the current electrum server pool. // Resolved AFTER bootstrap (you need a server to read it) to refresh the list // without shipping a new build — the decentralized, ICANN-free source of truth. -export const ELECTRUM_LIST_NAME = "electrum.silentmode.bch"; +// +// Choice of name is load-bearing. Under BNS's canonical-key rule, a two-part +// name of the form `