Skip to content

Sea orm integration#9

Open
dcorral wants to merge 3 commits into
UTEXO-Protocol:masterfrom
dcorral:sea-orm
Open

Sea orm integration#9
dcorral wants to merge 3 commits into
UTEXO-Protocol:masterfrom
dcorral:sea-orm

Conversation

@dcorral
Copy link
Copy Markdown

@dcorral dcorral commented Feb 16, 2026

Replaces file-based persistence with SQLite database using sea-orm ORM.

Changes

New database tables:

  • mnemonic - encrypted mnemonic storage
  • kv_store - LDK persistence (channel manager, payments, swaps, network graph, scorer)
  • config - configuration key/value pairs (indexer_url, proxy_url, etc.)
  • revoked_token - revoked auth token IDs
  • channel_peer - channel peer pubkey/address mapping

Migrated to database:

  • Mnemonic (was encrypted file)
  • All LDK KVStore data (channel manager, inbound/outbound payments, swaps, scorer)
  • Config parameters (synced to files for rust-lightning compatibility)
  • Revoked tokens (was flat file)
  • Channel peer data (was flat file)
  • PSBTs (temporary storage during channel funding)
  • Output spender transactions

Architecture:

  • Single shared DatabaseConnection via Arc
  • SeaOrmKvStore implements rust-lightning's KVStoreSync trait
  • Migrations run automatically on startup
  • Config stored in DB as source of truth, synced to files for rust-lightning compatibility

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.

3 participants