Skip to content

Conversation

@batconjurer
Copy link
Collaborator

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

  • If this PR has some consensus breaking changes, I added the corresponding breaking:: labels
    • This will require 2 reviewers to approve the changes

@batconjurer batconjurer requested review from sug0 and tzemanovic and removed request for sug0 August 15, 2024 12:21
@codecov
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 71.25984% with 73 lines in your changes missing coverage. Please review.

Project coverage is 61.31%. Comparing base (f08d3f2) to head (00df744).
Report is 64 commits behind head on main.

Files Patch % Lines
crates/sdk/src/wallet/mod.rs 0.00% 32 Missing ⚠️
crates/sdk/src/wallet/store.rs 0.00% 18 Missing ⚠️
crates/sdk/src/wallet/keys.rs 71.15% 15 Missing ⚠️
crates/node/src/bench_utils.rs 0.00% 4 Missing ⚠️
crates/core/src/masp.rs 0.00% 3 Missing ⚠️
crates/sdk/src/masp.rs 99.31% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@sug0 sug0 left a 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:

https://github.com/anoma/namada/blob/b6895337d90649abbd509f3416210d60bc9dbae4/crates/sdk/src/masp/shielded_sync/dispatcher.rs#L774-L791

Right now, it's always attemtpting to scan txs without checking the heights of viewing keys.

@sug0
Copy link
Collaborator

sug0 commented Aug 16, 2024

ah benches are broken

@tzemanovic tzemanovic added the merge Ready to merge - mergifyio bot will add the PR to merge queue when all checks pass label Aug 16, 2024
mergify bot added a commit that referenced this pull request Aug 16, 2024
@mergify mergify bot merged commit 45400e3 into main Aug 16, 2024
@mergify mergify bot deleted the bat/feat/key-birthdays branch August 16, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge Ready to merge - mergifyio bot will add the PR to merge queue when all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants