Avoid updating merkle paths of spent notes#4018
Conversation
3325b92 to
550e03a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4018 +/- ##
==========================================
- Coverage 73.92% 73.92% -0.01%
==========================================
Files 341 341
Lines 106510 106520 +10
==========================================
+ Hits 78740 78741 +1
- Misses 27770 27779 +9 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
|
After some reflection with @grarco, we've concluded that this code is probably doing the right thing. For the time being, I'll leave the PR as a draft though. |
murisi
left a comment
There was a problem hiding this comment.
This code looks okay to me if there is no special interaction between this optimization and the speculation code (which I've not looked into before). save_shielded_spends being called earlier should be okay since the new notes saved in save_decrypted_shielded_outputs can only be nullified by a Transaction coming after the one being processed in the current loop iteration.
(cherry picked from commit 550e03a)
Avoid updating merkle paths of spent notes (backport #4018)
Describe your changes
Avoid updating merkle paths of spent notes. This should optimize the synchronous path of the shielded sync on the ledger client.
Checklist before merging
breaking::labelsnamada-docsreponamada-indexerornamada-masp-indexer, a corresponding PR is opened in that repo