-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zcash_client_sqlite: Always check for seed relevance in init_wallet_db
#1286
Conversation
f9aa896
to
a15ebf7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1286 +/- ##
==========================================
- Coverage 63.54% 63.46% -0.09%
==========================================
Files 121 121
Lines 13820 13890 +70
==========================================
+ Hits 8782 8815 +33
- Misses 5038 5075 +37 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK with minor confusion about migration errors.
seed: &SecretVec<u8>, | ||
seed_fingerprint: &SeedFingerprint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it surprising that this takes both the seed and the seed fingerprint, but I guess that since it's a helper it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are from two different data sources:
seed
comes from the caller.seed_fingerprint
comes from the wallet.
The helper is explicitly checking their consistency.
The blanket `impl Account<A> for (A, Option<UnifiedFullViewingKey>)` is removed because we cannot know the UIVK for `(A, None)`. We instead provide a blanket impl for `(A, UnifiedIncomingViewingKey)`. We also move both of them behind `test-dependencies` because they are only intended for testing purposes.
The previous implementation was mixing the caller-provided seed with the wallet-provided ZIP 32 account index, and throwing an error if the USK derivation failed. We instead need to count that as a mismatch, because the wallet account's actual seed would derive a USK fine (because wallet accounts are required to have a known UIVK).
a15ebf7
to
4fa0547
Compare
Force-pushed to address review comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-utACK 4fa0547
Closes #1283.