Migrate voting recovery state from JSON files to SQLite DB#19
Merged
czarcas7ic merged 3 commits intoMar 17, 2026
Conversation
Replace RecoveryFileStore (per-round JSON files) with DB-backed recovery state stored in the voting SQLite database via Rust FFI. - Remove RoundRecoveryState, RecoveryFileStore - VotingCryptoClient methods now call VotingRustBackend DB operations - VotingStore callers use roundId directly instead of recoveryRoundKey - Recovery methods are now throwing (consistent with DB operations) - Update tests to mock individual DB getters instead of RoundRecoveryState
7830e65 to
ab1996a
Compare
… adam/recovery-state-to-db
greg0x
pushed a commit
that referenced
this pull request
Mar 20, 2026
Migrate voting recovery state from JSON files to SQLite DB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the Swift-side
RecoveryFileStore(per-round JSON files in Documents directory) with DB-backed recovery state stored in the voting SQLite database via Rust FFI.RoundRecoveryStatestruct andRecoveryFileStoreactorVotingCryptoClientrecovery methods now callVotingRustBackendDB operations instead of reading/writing JSON filesVotingStore.swiftcallers updated: useroundIddirectly instead ofrecoveryRoundKey("{roundId}_{walletId}")throws(consistent with DB operations); callers usetry?for defensive recoveryRoundRecoveryStateNet result: -86 lines (more deletions than additions), single source of truth in SQLite.