Skip to content

Vss#17

Open
dcorral wants to merge 4 commits intoUTEXO-Protocol:devfrom
dcorral:vss
Open

Vss#17
dcorral wants to merge 4 commits intoUTEXO-Protocol:devfrom
dcorral:vss

Conversation

@dcorral
Copy link
Copy Markdown
Collaborator

@dcorral dcorral commented Apr 14, 2026

VSS Cloud Backup Integration

Adds optional cloud backup support using LDK's VSS (Versioned Storage Service). When enabled, the node replicates its state to a remote VSS server for disaster recovery on a new device.

What it does

  • LDK channel state backup: A SyncedKvStore wrapper writes every KVStoreSync operation to both local SQLite and a remote VSS server. Local is primary; VSS replication is best-effort. On a fresh start with an empty local DB, state is automatically restored from VSS.
  • RGB wallet backup: Configures rgb-lib's built-in VSS backup (configure_vss_backup()) for automatic backups after every state-changing wallet operation.
  • Both streams use the same VSS server with separate store IDs. Backups are encrypted by default (XChaCha20-Poly1305). Signing key derived at m/535'/1'.

New files

  • src/synced_kv_store.rs — KVStore wrapper: local + optional VSS replication
  • src/vss_kv_store.rs — KVStore implementation backed by a VSS server
  • src/test/vss.rs — Unit and integration tests
  • docker/vss-server/ — Dockerfile for the VSS server (sigs-auth)

API

  • POST /vssbackup — trigger manual RGB wallet backup
  • GET /vssbackupinfo — check backup status

Usage

cargo build --features vss
cargo run --features vss -- /tmp/rlndata --vss-url http://localhost:8081/vss

Entirely opt-in: --features vss at compile time + --vss-url at runtime. Without these, the node behaves exactly as before.

@dcorral dcorral force-pushed the vss branch 2 times, most recently from 0f92eef to f5c9b3e Compare April 14, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant