You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some migrations require a seed phrase. Currently we have two:
UFVK support: seed required to derive the Orchard FVK component for each (derived) account.
Account ID changes: seed required to derive the seed fingerprint to store with each derived account.
As discussed in #1283, there are cases where a caller wants to query a wallet DB without necessarily having any of the necessary seeds. We should therefore have an opt-in way to migrate a database without any of the relevant seeds, which "downgrades" all accounts to "read-only" (i.e. from Derived to Imported).
In a pairing with @nuttycom, we considered this transition in terms of allowing hd_seed_fingerprint to be null while hd_account_index was non-null. That would be sufficient if we were modifying the latest migration making the account ID changes (as part of Zashi 1.0), but in the general migration case we'd either need to have some other way to track this, or do something like delete the seed fingerprint from the database. For zcash_client_sqlite: Integrate "is relevant seed" logic into database migration #1283 (and therefore Zashi 1.0) we are avoiding this complexity.
We would also want to pair this with some new method like WalletWrite::link_seed(Self::AccountId, seed, zip32::AccountId) that enables "upgrading" a UFVK account from Imported to Derived (enabing spends from them again).
We cannot upgrade accounts imported from UIVKs, as we have not performed the necessary historic scanning, and can't do that scanning in-line within a WalletWrite call. The caller would need to delete the UIVK account and then separately add the derived account with its UFVK.
The text was updated successfully, but these errors were encountered:
nuttycom
changed the title
zcash_client_sqlite: Enable migrations to be performed without any seedzcash_client_sqlite: Enable "downgrade to view-only" when a migration is performed without a required seed
Feb 4, 2025
Some migrations require a seed phrase. Currently we have two:
As discussed in #1283, there are cases where a caller wants to query a wallet DB without necessarily having any of the necessary seeds. We should therefore have an opt-in way to migrate a database without any of the relevant seeds, which "downgrades" all accounts to "read-only" (i.e. from
Derived
toImported
).hd_seed_fingerprint
to be null whilehd_account_index
was non-null. That would be sufficient if we were modifying the latest migration making the account ID changes (as part of Zashi 1.0), but in the general migration case we'd either need to have some other way to track this, or do something like delete the seed fingerprint from the database. Forzcash_client_sqlite
: Integrate "is relevant seed" logic into database migration #1283 (and therefore Zashi 1.0) we are avoiding this complexity.We would also want to pair this with some new method like
WalletWrite::link_seed(Self::AccountId, seed, zip32::AccountId)
that enables "upgrading" a UFVK account fromImported
toDerived
(enabing spends from them again).WalletWrite
call. The caller would need to delete the UIVK account and then separately add the derived account with its UFVK.The text was updated successfully, but these errors were encountered: