Theseus Navigator — Silent Mode's Electron browser with the Ariadne resolver built in.
Reported as "opening Aegis makes Theseus get stuck / not responding", and it was Aegis's fault. The host's add-on store is ONE JSON file per add-on, and storage.get() does a readFileSync plus a JSON.parse of the whole thing on every call — synchronously, on the Electron main thread, the thread that drives the entire browser. storage.set() additionally stringifies and writes all of it. That store had grown to 7.4 MB, 99.9% of it one wallet's txCache: getTx() kept every transaction it ever fetched, with full vin/vout arrays, and a busy chipnet test wallet had thousands. Measured on the real file: parse 59 ms, stringify 39 ms. So one storage.get blocked the UI for ~60 ms, one set for ~99 ms, and fullState() — which reads the store seven times over selectedWalletId, walletRoles, walletEntries, snapshotForSelected and the server list — cost ~420 ms. emitState() runs on every adapter change, across nine wallets, so the main thread was never given back. Three changes: - txCache is capped at 400 entries, pruned newest-first by block time (unconfirmed entries sort as newest — they are the current ones). Worst case ~0.3 MB per wallet instead of unbounded. - TX_CACHE_VERSION 3, so existing oversized caches are discarded on first load rather than needing a manual clear. - loadHistory() only persists when something actually changed; an idle wallet was rewriting the whole file on every poll for nothing. - api.storage gains a write-through read cache, so repeated gets cost one parse per process instead of one per call. Writes still go to the host unchanged. Safe because this process is the only writer — Aegis's panel talks over addon messages and never touches addon storage; if that changes, the cache has to go. |
||
|---|---|---|
| bundled-addons | ||
| dev | ||
| docs | ||
| lib | ||
| nsis | ||
| scripts | ||
| snapshots | ||
| addon-inject-preload.js | ||
| addon-tab-preload.js | ||
| addon-update-pubkeys.js | ||
| addon-updater.js | ||
| addons-host.js | ||
| address-picker-preload.js | ||
| address-picker.html | ||
| approval-preload.js | ||
| approval.html | ||
| bcnr-origin.js | ||
| bcnr-preload.js | ||
| BROWSER-PROMPT.md | ||
| chrome.html | ||
| collision-preload.js | ||
| collision.html | ||
| DESIGN-integrated-wallet.md | ||
| DESIGN-password-manager.md | ||
| DESIGN-wallet-multi-account-amendment.md | ||
| downloads-preload.js | ||
| downloads.html | ||
| engine-picker-preload.js | ||
| engine-picker.html | ||
| error-preload.js | ||
| error.html | ||
| GOTCHAS.md | ||
| home-preload.js | ||
| home.html | ||
| link-status-preload.js | ||
| link-status.html | ||
| main.js | ||
| messages-preload.js | ||
| messages.html | ||
| package-lock.json | ||
| package.json | ||
| PACKAGING-PROMPT.md | ||
| PENDING.md | ||
| popover-preload.js | ||
| popover.html | ||
| preload.js | ||
| pw-fill-preload.js | ||
| pw-fill.html | ||
| README.md | ||
| RELEASE-HANDOFF.md | ||
| ROADMAP-identity-wallet.md | ||
| SESSION-PROMPT-identity-wallet.md | ||
| settings-preload.js | ||
| settings.html | ||
| sidebar-preload.js | ||
| test-installer.wsb | ||
Theseus Navigator
The browser — the consumer face of the stack. Native .bch support with the
resolver built in, so a user installs one app instead of modifying their
operating system. Named for the thread through the labyrinth: the chain is the
thread.
Scope
- Electron shell (Chromium engine, no forking): tabs, address bar, history.
- In-process
.bchresolution — no system daemon, no NRPT, no OS trust-store changes; reusesbns.jsfrom the BNS repo as a library. - Record handling:
hrender,ipconnect,p/s3via in-app gateway,uredirect. - TLS via cert-verify hook (Electron
setCertificateVerifyProc) against the BNS root / on-chaintlsfingerprints — no OS store touched. - Provenance indicator: shows whether a page came from the chain / Sia / a direct server, with NFT category and record type — the decentralized padlock.
Status: not started
Build it in its own session/repo. The ready-to-paste brief is
BROWSER-PROMPT.md (a reference copy in this folder; canonical source is
D:\Dev\NameCoin\BROWSER-PROMPT.md — if they diverge, NameCoin wins). It points
here and reuses the resolver core. theseus.bch is registered and should
eventually serve the browser's own homepage over the protocol it implements.
Roadmap
BUILD-ROADMAP.md Stage 5.