-
Notifications
You must be signed in to change notification settings - Fork 955
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
Add birthdays to MASP keys #3653
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3653 +/- ##
==========================================
+ Coverage 61.28% 61.31% +0.03%
==========================================
Files 312 312
Lines 101337 101548 +211
==========================================
+ Hits 62103 62267 +164
- Misses 39234 39281 +47 ☔ 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.
These changes look good against main
. When we integrate them with the phase 3 shielded sync code, we should optimize this function accordingly:
namada/crates/sdk/src/masp/shielded_sync/dispatcher.rs
Lines 774 to 791 in b689533
fn spawn_trial_decryptions(&self, itx: IndexedTx, txs: &[Transaction]) { | |
for tx in txs { | |
for vk in self.ctx.vk_heights.keys() { | |
let vk = *vk; | |
if self.cache.trial_decrypted.get(&itx, &vk).is_none() { | |
let tx = tx.clone(); | |
self.spawn_sync(move |interrupt| { | |
Message::TrialDecrypt( | |
itx, | |
vk, | |
trial_decrypt(tx, vk, || interrupt.get()), | |
) | |
}) | |
} | |
} | |
} | |
} |
Right now, it's always attemtpting to scan txs without checking the heights of viewing keys.
ah benches are broken |
Describe your changes
Partially addresses Issue #2900. Viewing and spending keys can no be given birthdays in the form of block heights which are loaded into shielded sync. Shielded sync will not try to decrypt a block before a keys birthday with said key.
Checklist before merging
breaking::
labels