Repository navigation
Conversation
One per-network table (core/networks.ts) replaces the ternaries that sent
any unnamed network to teratest's endpoints.
Teratest fixes:
- storageMatchesNetwork compared teratest storage ('ttn') with 'test', so
the home screen always treated a teratest wallet as the previous
network's.
- Each network uses its own MessageBox server (messagebox-testnet, -ttn,
-tstn). MessageBox and PeerPay clients look recipients up in the open
network's overlay; PeerPayClient never passed networkPreset through.
- Identity lookups use the open network's overlay.
- Push registration only for profiles on a network whose MessageBox
sends push.
- No Bitails or TAAL key on teratest; ARC presets are per network.
Scaling teratestnet (scaletest) is wired but not available. The deployed
chain runs Teranode regtest parameters, so it maps to the toolbox chain
'regtest', which lands in @bsv/wallet-toolbox 2.15.0
(bsv-blockchain/ts-stack#819). Until the dependency is bumped,
toWalletChain and the header store bridge the type, and a canary test
fails once the toolbox supports regtest. With no WhatsOnChain, the address
rail, sweep, BEEF repair and explorer links are off there.
| * override" rather than crash. | ||
| */ | ||
| export function getMessageBoxUrlOverride(chain: AppChain): string | undefined { | ||
| const url = current?.services[chain]?.messageBoxUrl?.trim().replace(/\/+$/, '') ?? '' |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft. This shows where teratestnet and scaling teratestnet (
scaletest) support stands. Teratest works end to end. Scaletest is fully wired but hidden from the network picker until the wallet library ships theregtestchain (bsv-blockchain/ts-stack#819, in flight).Why
Every network now has its own go-messagebox server (bsva-infra-flux PR #395):
messagebox,messagebox-testnet,messagebox-ttnandmessagebox-tstn.bsvblockchain.tech. The wallet sent every network to mainnet's box and mainnet's overlay. Reviewing teratest support turned up several more gaps, and adding a fourth network meant replacing the per-network ternaries that sent any unnamed network to teratest's endpoints.What changed
One per-network table:
core/networks.tsholdsNETWORKS. Every former ternary reads it, andRecord<AppChain, …>makes a missing network a type error. Each network records its Arcade, MessageBox, WhatsOnChain/explorer, TAAL/GorillaPool/Bitails fallbacks, overlay preset, push support and availability.Teratest fixes (live now):
'ttn'), butstorageMatchesNetworkexpected'test', so a teratest wallet always looked like the previous network's.bindMessageBoxNetworkpoints every MessageBox/PeerPay client at the open network's overlay.PeerPayClient2.5.3 never passesnetworkPresetthrough, so every network was asking mainnet's overlay. On a network with no overlay, the client routes to its configured host.app/_layout.tsx). ARC presets in Settings are per network.Scaletest (wired, not available):
scaletest, label "Scaling Teratest", with its own database file (*-scaletestnet-*.db) and backup account. Arcade isarcade-tstn-us-1, MessageBox ismessagebox-tstn, and hosts can override either viaEXPO_PUBLIC_SCALETEST_*.'regtest', not'tstn'. The deployed scale cluster runs Teranode regtest parameters: regtest genesis0f9188f1…, bits0x207fffff, and its ChainTracks reportsregtest. The toolbox'ststnis go-chaincfg's real-proof-of-workTeraScalingTestNetParams, so the toolbox is right and the wallet maps toregtest. feat(wallet-toolbox): add regtest chain with its proof-of-work limit ts-stack#819 adds that chain, with regtest's proof-of-work limit applied only when the chain is namedregtest.NETWORKS.scaletest.available = falsekeeps it out of the picker.Bridging until ts-stack#819 is released
@bsv/wallet-toolbox-mobileis still 2.14.x, which has noregtestchain. Two typed casts, both documented to be removed when the dependency is bumped:toWalletChainreturns the toolbox'sChain, with one cast for'regtest'.headerStorepasses the chain tovalidateHeaderProofOfWork. 2.14.x ignores the extra argument, and 2.15.0 uses it to pick the proof-of-work limit.A canary test (
networks.test.ts: "cannot build its services on the installed toolbox yet") fails as soon as the dependency supportsregtest. That is the cue to:@bsv/wallet-toolbox-mobileto ≥ 2.15.0;NETWORKS.scaletest.available = true;Remaining before merge
pnpm auditfailure: newproxy-addrandsource-map-jsadvisories, unrelated to it).faucet-tstn, send and receive between two profiles overmessagebox-tstn, mine a block, and confirm the proof arrives through Arcade SSE.pay_address_unavailable_networkstring (11 locales were machine-written).Upgrade notes
packages/expo-wallet-toolbox/CHANGELOG.mdunder Unreleased:makePeerPayClient,useMessageBoxConfig,useOfflineNoticeActions,wocConfigFor,createWocBroadcastService,KNOWN_ARC_URLS, and theAppChain/WalletChainunions.Verification
npx tsc --noEmit: clean.npx jest: 6053 passed, 3 failed. All three are in__tests__/mandala/createRuntime.test.ts, which also fails onmaster.master.networks.test.ts,pay/messageBoxNetwork.test.ts(resolution, host override, binding pinned to MessageBoxClient's routing fields, the no-overlay fallback), the rewrittennet/chainMatch.test.ts, and per-network cases in the service-config, broadcast, address, database-registry, translation and MessageBox settings tests.