Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add check for old db encryption and provide warning (#3549)
Description --- The new CipherSeed encryption scheme changed the way in which a wallet’s encryption keys are derived from the passphrase. This is a breaking change for which a migration was non-trivial. However, if this version is run on an old database it breaks the database structure so reverting to an old version was not possible. This PR adds a check for the old DB encryption data and before the db migration is performed produces an error with a description of the issue. How Has This Been Tested? --- Manually
- Loading branch information
1 parent
9194501
commit 69bbbdf
Showing
4 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
base_layer/wallet/migrations/2021-10-27-103505_update_key_manager_state/down.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
ALTER TABLE key_manager_states | ||
RENAME COLUMN seed TO master_key; |
2 changes: 1 addition & 1 deletion
2
base_layer/wallet/migrations/2021-10-27-103505_update_key_manager_state/up.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
ALTER TABLE main.key_manager_states | ||
ALTER TABLE key_manager_states | ||
RENAME COLUMN master_key TO seed; |
This file contains 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
This file contains 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