Skip to content
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

Refactor shielded sync #3006

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0e12003
Made fetching and decrypting maps notes operate in parallel. Fetching…
batconjurer Apr 4, 2024
4d2fd5b
[fix]: Fixed some logging, improved shutdown logic
batconjurer Apr 8, 2024
b8be067
[fix]: Fixing check-crates to work
batconjurer Apr 10, 2024
ccc0ce9
Cleaned up shielded sync
batconjurer Apr 16, 2024
dbb8dbf
Added first unit test for shielded sync
batconjurer Apr 25, 2024
b024060
Rebasing
batconjurer Apr 25, 2024
c2c07be
Fixed unit test for retrying fetch and fixed the bugs it caught
batconjurer Apr 25, 2024
514f6f0
More unit tests
batconjurer Apr 26, 2024
358e689
Cleanup and docstrings
batconjurer Apr 30, 2024
ccb0f09
Fixing issues from rebasing
batconjurer Apr 30, 2024
dc1bd9e
Fix integration tests
batconjurer Apr 30, 2024
51ba26d
Fixed the check-crates
batconjurer Apr 30, 2024
af0d687
Removed some unwraps on mutexes
batconjurer May 2, 2024
6ff3646
reverting to unwrapping locks
batconjurer May 2, 2024
3f1f1d5
Testing something in ci
batconjurer May 2, 2024
1a2dc53
Testing something in ci
batconjurer May 2, 2024
115ef33
changelog
batconjurer May 2, 2024
829d514
[chore]: rebasing
batconjurer May 13, 2024
890c486
Fixing conflicts from rebasing
batconjurer May 27, 2024
babfe49
Update Cargo.lock
sug0 May 27, 2024
d7d3e1d
Fix pruning of unscanned txs
sug0 May 28, 2024
24351a3
Fix subtract underflow in stdout drawer
sug0 May 28, 2024
a32de55
Fix percent sign
sug0 May 28, 2024
baf9507
Refactor shielded utils
sug0 May 29, 2024
8183fbb
Cache scanned masp txs more effectively
sug0 May 29, 2024
1d5e740
[chore]: Added tests to ensure that trial decryption caching is actua…
batconjurer Jun 1, 2024
1539e09
Fixed a clone implementation on tempdir in benchmarks
batconjurer Jun 3, 2024
5bc4268
rebasing
batconjurer Jun 3, 2024
bdb61c3
added print statements to try and debug in ci
batconjurer Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This PR refactors shielded sync to make the following improvements
* Allow fetching new masp txs and trial-decrypting notes to happen asynchronously
* Parallelize the trial-decryptions
* Modularize the logic so that we can mock parts of the algorithm for tests and to enable migration over to using a specila masp indexer
* Added test coverage
* Decouple nullifying notes and updating spent notes from the trial-decryption process
* Refactor the masp.rs module in the sdk into several smaller files and submodules

[\#3006](https://github.com/anoma/namada/pull/3006)
35 changes: 34 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/apps_lib/src/cli/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::cli::cmds::*;
use crate::client::{rpc, tx, utils};

impl CliApi {
pub async fn handle_client_command<C, IO: Io>(
pub async fn handle_client_command<C, IO: Io + Send + Sync>(
client: Option<C>,
cmd: cli::NamadaClient,
io: IO,
Expand Down Expand Up @@ -323,7 +323,7 @@ impl CliApi {
.map(|sk| sk.into())
.collect::<Vec<_>>();
crate::client::masp::syncing(
chain_ctx.shielded,
&chain_ctx.shielded.utils,
&client,
&io,
args.batch_size,
Expand Down
2 changes: 1 addition & 1 deletion crates/apps_lib/src/cli/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use namada::core::address::{Address, DecodeError};
use namada::core::key::*;
use namada::core::masp::{ExtendedSpendingKey, MaspValue, PaymentAddress};
use namada::io::Io;
use namada_sdk::masp::find_valid_diversifier;
use namada_sdk::masp::utils::find_valid_diversifier;
use namada_sdk::wallet::{
DecryptionError, DerivationPath, DerivationPathError, FindKeyError, Wallet,
};
Expand Down
Loading
Loading