Store Cashu proofs in one blob#93
Conversation
|
Tested at head 0499e76 against our staging VSS (vss-server behind Caddy, Mutinynet signet, self-hosted Cashu mint) — same setups as the numbers in #90. Two environments: desktop Desktop (wallet-cli, fresh wallet, one 5k receive in store):
(Local-store control on the PR build: get-invoice 1.2 s, receive ~1 s.) A12 (existing wallet with channels; baseline re-measured the same afternoon, minutes before the upgrade):
Reading of the results: startup improves ~4–5× (proofs dominated the key count, and the N serialized reads collapse to one), the receive saga roughly halves (proof writes collapse to one blob write), and the two paths that never touch proofs are — as this PR would predict — unchanged: quote issuance still serializes the mint-quote/counter/saga-state writes, so the remaining gap to local-store (~1 s) is those per-key round-trips plus the bitreq connection churn (rust-bitcoin/corepc#658 / #659). One thing to flag before this ships: there's no migration from the legacy per-proof keys.
A one-time fallback — blob key missing → |
|
Do you actually need the migration? I excluded it because i assumed no one is using this on mainnet yet |
|
No — we don't need it. Our Cashu tier is signet-only staging and the affected wallets are disposable test wallets; we'll recreate them when we bump our pin to a rev that includes this. From our side this is good to go as-is — the numbers above stand. |
Persist the complete Cashu proof set with one versioned KV write so VSS-backed wallets avoid a round trip per proof. This should make startup much faster for VSS based cashu wallets.
0499e76 to
1c2eff8
Compare
Persist the complete Cashu proof set with one versioned KV write so VSS-backed wallets avoid a round trip per proof. This should make startup much faster for VSS based cashu wallets.