Measurement (signet + Cashu, same config, only storage differs)
| Storage |
OrangeWallet::new |
StorageConfig::Vss |
19,050 ms |
| local SQLite |
557 ms |
Traced with RUST_LOG=info,cdk=debug,reqwest=debug,hyper=debug,rustls=debug: ~8s in the VSS store build (build_with_sigs_auth) + Cashu::init (the Cashu DB is VSS-backed), then ~10s in ldk_node build_with_store reading LDK state — the KV reads appear serial, one network round-trip each. Feerate cache (288ms) and chain sync are minor. fetch_mint_info is a background task and not implicated (earlier misattribution, corrected).
OrangeWallet builds one VssStore and passes it as the single store to both CashuKvDatabase and LdkNodeStore (src/lib.rs), so every cold start rebuilds all state over the network.
Fix directions (in rough order of ambition)
- Batch/parallelize the VSS reads during node build — likely the low-risk win; today's serial per-key round-trips dominate.
- Local-primary with async VSS replication (read local when the on-disk store is warm; write-through to VSS; reconcile in background). ⚠️ This one needs design care: VSS-at-boot is what catches newer remote state after a restore-on-another-device, so a naive local-first read risks resurrecting stale channel state. A safe shape might be: local-first only when a VSS version/etag check (one round-trip) confirms local is current.
Happy to test candidate branches against our staging VSS (Caddy-fronted, https://…/vss) — the 34× gap makes wins easy to verify. Repro recipe and full logs in our downstream issue: emergent-money/graduated-wallet#247.
Measurement (signet + Cashu, same config, only storage differs)
OrangeWallet::newStorageConfig::VssTraced with
RUST_LOG=info,cdk=debug,reqwest=debug,hyper=debug,rustls=debug: ~8s in the VSS store build (build_with_sigs_auth) +Cashu::init(the Cashu DB is VSS-backed), then ~10s inldk_nodebuild_with_storereading LDK state — the KV reads appear serial, one network round-trip each. Feerate cache (288ms) and chain sync are minor.fetch_mint_infois a background task and not implicated (earlier misattribution, corrected).OrangeWalletbuilds oneVssStoreand passes it as the singlestoreto bothCashuKvDatabaseandLdkNodeStore(src/lib.rs), so every cold start rebuilds all state over the network.Fix directions (in rough order of ambition)
Happy to test candidate branches against our staging VSS (Caddy-fronted,
https://…/vss) — the 34× gap makes wins easy to verify. Repro recipe and full logs in our downstream issue: emergent-money/graduated-wallet#247.