Pluggable storage, so services on PostgreSQL or with several instances can embed satsettle #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Engineowns one local data directory (redb, plus SQLite for CDK), and a secondopenfails. Services that keep their state in PostgreSQL, or that run several instances, cannot adopt satsettle without a second source of truth. For a username purchase, the application's reservation and satsettle's capture decision then live in two databases, and the application has to reconcile them on startup, as theusernamesexample does with its own redb file.Suggestion
Arc<cdk::Wallet>, or a CDKWalletDatabase, instead of always creating SQLite wallets, so CDK state can live incdk-postgrestoo.operations, per-mint wallet locks) with storage-level leases where they guard shared state. Document which recovery steps are safe to run concurrently, given that CDK recovery can touch another instance's in-flight receive.Without this, npub.cash (PostgreSQL, NixOS module, multiple instances supported) keeps its own implementation.
Overlaps #1 (payment storage interface) and #2 (caller-managed wallets). This issue adds the multi-instance and PostgreSQL requirements: shared transactions with the application's reservation, and leases instead of in-process locks. Feel free to fold it into #1.