From ef1a901314cb667bc8a7c7ff5f080550edef2815 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 6 Jul 2026 10:44:35 -0700 Subject: Slim ark state for sync so it fits the relay's 64KB event cap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-device ark sync silently failed: the full snapshot (deep-genesis vtxo bytes + done-action signing hex) was ~153KB and relay.coinos.io rejects events over 64KB, so no publish ever landed and other devices never saw the balance. The synced ark state is now slimmed — spent vtxos drop their signed bytes (kept only for spendable/pending, which a device might spend/exit), done board/offboard/exit actions keep just the fields history labels need (hex stripped), in-flight actions and movements beyond the last 300 are dropped. Local storage keeps the full state; only the published copy is slim. ~150KB -> well under 64KB. Co-Authored-By: Claude Fable 5 --- src/features/sync.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/features/sync.js') diff --git a/src/features/sync.js b/src/features/sync.js index 9d361aa..1f3414d 100644 --- a/src/features/sync.js +++ b/src/features/sync.js @@ -111,9 +111,8 @@ export function installSyncWallet(wallet) { // bind the per-device d-tag now: the debounced publish must keep this // snapshot's network even if the wallet switches networks before it fires const dtag = deviceDtag(wallet.netName); - console.log('[syncdbg] cacheSaved scheduling publish', dtag, 'hasArk?', !!snap.arkState, 'sk?', !!wallet.nostr.sk); clearTimeout(wallet._nostrPubTimer); - wallet._nostrPubTimer = setTimeout(() => { console.log('[syncdbg] publishing now', dtag); wallet.nostr.publish(snap, dtag); }, 2500); + wallet._nostrPubTimer = setTimeout(() => wallet.nostr.publish(snap, dtag), 2500); }); wallet.registerRealtimeHook({ stop: () => clearTimeout(wallet._nostrPubTimer) }); } -- cgit v1.2.3