Back to list

Development Update — July 18

Yesterday’s multicoin rework made the embedded wallet route every coin’s requests through the visor — but only the browser-tab wasm visor had ever actually been driven in a browser, so the native hypervisor-served wallet had a latent gap that surfaced today: skycoin-web’s Angular HttpClient issues its requests over XMLHttpRequest, and the native shim only intercepted fetch. Fixing that unblocked the create-wallet selectors, which needed a matching skycoin-web change to fill in. The day closed with an efficiency fix in the transport-discovery CXO node, where broadcasting a large root to hundreds of subscribers was re-encoding it once per subscriber. The matching skycoin-web change — the one that fills those newly-reachable create-wallet selectors — landed in the skycoin monorepo the same day.

Skywire: The Native Wallet Shim Learns to Hear XHR

3512 fix(wallet): native HV wallet node-API shim must intercept XHR, not just fetch closes the gap the multicoin rework left on the native path. On the native HV-served wallet, the create-wallet screen offered no coin selector and no wallet-type options, and the skycoin-web settings pages rendered as an empty thin strip. The cause: the HV injects a walletNodeShim into skycoin-web’s index to re-point its absolute /api/... node-API calls at the same-origin /wallet/ handler — coin registry, per-coin proxy, backend-selection headers — but the shim only overrode window.fetch, and skycoin-web’s Angular HttpClient issues every request (coin list, node health, blockchain, balances, settings data) over XMLHttpRequest. Those sailed straight past the shim to the origin root and 404’d — no coins meant no selectors, no node data meant an empty settings page. Because only the wasm-served wallet had ever been browser-tested, this native-path gap had stayed latent. The fix refactors the URL-rewrite into a shared rw(url) helper driven from both the fetch override and a new XMLHttpRequest.open/send override — the URL rewritten in open, the backend headers applied in send. Verified live over CDP: the XHR GET /api/v1/coins now returns 200 with the two-coin registry, and Settings → Blockchain renders fully — block height, supply, node-connected status bar — instead of a thin strip.

3513 chore(wallet): vendor skycoin create-wallet type-options fix + re-embed is the matching half. With #3512 making skycoin-web’s XHR calls actually reach the wallet handler, the now-loaded coin registry needed a create-form that could use it, so this vendors skycoin#2942 (bumping 5c9484d326b081dd) and re-embeds the dist: the HV-embedded create-wallet form now offers the coin selector and wallet type — deterministic or bip44, segwit for BTC — instead of a bare deterministic-only form. Verified live in the HV wallet.

Skywire: Encode Once, Send to Many

3514 fix(cxo): encode broadcast root once, share body across subscribers tackles a steady-state cost, not a leak: the transport-discovery CXO node had ballooned to multi-GB RSS — around 4.2 GB — and about 56% CPU under fleet load, with RSS stable rather than climbing. The cause was fan-out cost. nodeFeed.broadcastRoot fans the large all-transports root — around 2.3 MB — out to every subscriber by calling sendRoot per connection, and each sendRoot re-ran the root’s Encode() and buffered its own copy of the result; with roughly 440 subscribers that’s O(rootSize × subscribers) in both encode CPU and buffered memory on every feed change. The fix encodes the message body once per broadcast and shares the resulting immutable []byte across every subscriber, with each connection supplying only its own 8-byte per-message head — turning fan-out into O(rootSize + subscribers). It’s done without any protocol change: the transport’s outbound unit is split into a Frame{Head, Body} and the write loop emits [4-byte len][Head][Body], which is byte-identical on the wire to the previous single-buffer [len][head‖body] form, so the receiver’s read loop is untouched. The connection layer gains an encodeRootBody() that builds the body once and a sendSharedBody() that enqueues a Frame reusing that shared body with a per-conn head, preserving the bounded-enqueue dead-subscriber protection, and broadcastRoot encodes the body once before the fan-out loop. go test -race ./pkg/cxo/node/... is green, with the transport tests asserting the framed round-trip is byte-identical to before.

Skycoin: Wallet Types for Browser Wallets

2942 skycoin-web: create-wallet form offers wallet types for browser wallets is the matching half of Skywire’s XHR-shim fix: with the shim now letting skycoin-web’s calls actually reach the wallet handler, the loaded coin registry needed a create-form that could use it. The create screen had offered only a bare deterministic form — no coin selector, no wallet-type/segwit options — for browser-side wallets (serverWallets=false), the case when skycoin-web is embedded in the Skywire HV wallet. Two fixes: decouple showWalletType from coin.serverWallets, since wallet type (deterministic vs bip44, segwit for BTC bip44) is independent of server-vs-browser custody and gating it on serverWallets hid every type option client-side while the individual options are already coin-gated in the template; and build the form on the coinsLoaded ReplaySubject rather than synchronously in ngOnInit, because coins load asynchronously and reading them immediately saw an empty list, hiding both the coin selector (hasManyCoins) and the type selector. Rebuilt gui/dist, verified live in the Skywire HV wallet — the create form now shows Select coin plus Wallet type, with segwit appearing for BTC+bip44 — and Skywire’s #3513 vendors and re-embeds it.