diff options
| author | Adam Soltys <[email protected]> | 2026-09-09 22:44:24 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-09 22:44:24 -0700 |
| commit | 9f2ce90f494a5b415bec0898e3185437126fc7d9 (patch) | |
| tree | e5154b4ce9867496488e12e0a6056bd3eba28f62 /src/features/sync.js | |
| parent | 6ea73cf4f8bad7384f8ead16a1aa6988ae46e545 (diff) | |
| download | coinosv3-9f2ce90f494a5b415bec0898e3185437126fc7d9.tar.gz coinosv3-9f2ce90f494a5b415bec0898e3185437126fc7d9.zip | |
Boot: price the Ark exit advisory by size only — no more 5s of secp256k1 on load.
The exit-depth advisory rebuilt every spendable coin's exit chain to learn
its fee, and each hop's input taproot key ran a musig key aggregation
(several secp256k1 multiplies on uncached points). With 27 coins of depth
up to 86 (1685 hops) that was ~5.3s of solid main-thread work on every
boot, laptop and phone alike — requestIdleCallback only delayed it, and
the Android wrapper hits a full boot whenever the OS evicts the app, so
"reopening the app" froze for seconds.
A fee only needs vsizes, and a taproot output script is 34 bytes whatever
key it holds: vtxoTransactions/transitionInputTxout gain a sizeOnly mode
with stand-in keys, exit.js exposes exitTxVsizes (same chain checks, no
EC, nothing broadcastable), and the advisory + coins page use it. Verified
against the real signed chain on the live coin set: identical vsizes on
all 27 coins, 9s → 26ms.
Also: the sync-slot replay at boot merged the ark snapshot and rewrote
~1MB of state (plus re-adopting it into the manager) twice per boot even
when the union brought nothing. Compare the serialized union to what's
stored and skip the write/adopt when unchanged.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Nw1Dijik1tLVKRM1WkU7xE
Diffstat (limited to 'src/features/sync.js')
0 files changed, 0 insertions, 0 deletions
