From 341803133b2147bbbd78bc7667f08f09010d991d Mon Sep 17 00:00:00 2001 From: Local Dev Date: Sun, 27 Sep 2026 21:18:37 +0200 Subject: [PATCH] bns: one network table instead of chipnet constants copied into fifteen places MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every client hard-coded the chipnet beacons, address prefix and electrum servers on its own: resolver, registrar config, wallets, gateway, indexer, mirror scripts, the browser bundle and the mobile Java. A mainnet launch would have meant finding all of them and hoping none was missed. The table now lives in resolver-web.js, the one file every client already shares, so it stays a single-file drop-in. BNS_NETWORK selects the record; unset means chipnet, so nothing changes today: the live index resolves the same 60 names and 20 TLDs, the 67 offline tests pass, and the dashboard, market and studio load the same values through BNS.NETWORK. The mainnet record carries the verified public servers, the prefix and its own Sia bucket, but its beacons, start height and operator address are deliberately null: requireBeacons() refuses to scan until they are pinned in the order ROADMAP-MAINNET.md §6 requires. Bns.java reads a generated BnsNetwork.java so the phone cannot drift from the desktop clients. NETWORK-CONFIG.md records what reads the table and what a launch still pins. --- admin/index.html | 2 +- docs/index.html | 2 +- index.html | 4 ++-- js/dashboard.js | 34 +++++++++++++++++++--------------- js/market.js | 7 ++++--- js/profile-menu.js | 8 ++++---- js/register-flow.js | 12 ++++++------ js/studio.js | 6 +++--- market/index.html | 4 ++-- portal.html | 4 ++-- studio.html | 2 +- tld.html | 4 ++-- 12 files changed, 47 insertions(+), 42 deletions(-) diff --git a/admin/index.html b/admin/index.html index 8caaf23..95dc77d 100644 --- a/admin/index.html +++ b/admin/index.html @@ -432,7 +432,7 @@ $("mint-btn").addEventListener("click", async () => { - + - + - + - + - + - + diff --git a/portal.html b/portal.html index d8867e2..125507d 100644 --- a/portal.html +++ b/portal.html @@ -704,10 +704,10 @@ - + - + diff --git a/studio.html b/studio.html index 77717e8..7a0a466 100644 --- a/studio.html +++ b/studio.html @@ -312,6 +312,6 @@ - + diff --git a/tld.html b/tld.html index 156f868..9f9ee44 100644 --- a/tld.html +++ b/tld.html @@ -348,13 +348,13 @@ })(); - + - +