diff --git a/Cargo.lock b/Cargo.lock index f0b1785345..ae8fdfbf54 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4141,7 +4141,7 @@ dependencies = [ [[package]] name = "masp_note_encryption" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "borsh 1.2.1", "chacha20", @@ -4154,7 +4154,7 @@ dependencies = [ [[package]] name = "masp_primitives" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "aes", "bip0039", @@ -4186,7 +4186,7 @@ dependencies = [ [[package]] name = "masp_proofs" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "bellman", "blake2b_simd", @@ -5499,7 +5499,7 @@ dependencies = [ [[package]] name = "num-traits" version = "0.2.19" -source = "git+https://github.com/heliaxdev/num-traits?rev=db259754d33f193f02cbb65520d9ac00614be2c4#db259754d33f193f02cbb65520d9ac00614be2c4" +source = "git+https://github.com/heliaxdev/num-traits?rev=3f3657caa34b8e116fdf3f8a3519c4ac29f012fe#3f3657caa34b8e116fdf3f8a3519c4ac29f012fe" dependencies = [ "autocfg", ] diff --git a/Cargo.toml b/Cargo.toml index 088f455e41..01720bb41e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,9 +124,9 @@ ledger-transport-hid = "0.10.0" libc = "0.2.97" libloading = "0.7.2" linkme = "0.3.24" -# branch = "murisi/alternative-num-traits" -masp_primitives = { git = "https://github.com/anoma/masp", rev = "6fc4692841a2241633792c429cc66b42023e5bf3" } -masp_proofs = { git = "https://github.com/anoma/masp", rev = "6fc4692841a2241633792c429cc66b42023e5bf3", default-features = false, features = ["local-prover"] } +# branch = "main" +masp_primitives = { git = "https://github.com/anoma/masp", rev = "3aacc707c5948e7423589ac617305448bead9842" } +masp_proofs = { git = "https://github.com/anoma/masp", rev = "3aacc707c5948e7423589ac617305448bead9842", default-features = false, features = ["local-prover"] } num256 = "0.3.5" num_cpus = "1.13.0" num-derive = "0.3.3" diff --git a/crates/sdk/src/masp.rs b/crates/sdk/src/masp.rs index 37952cbb24..7247d3e2c5 100644 --- a/crates/sdk/src/masp.rs +++ b/crates/sdk/src/masp.rs @@ -12,9 +12,9 @@ use borsh_ext::BorshSerializeExt; use lazy_static::lazy_static; use masp_primitives::asset_type::AssetType; #[cfg(feature = "mainnet")] -use masp_primitives::consensus::MainNetwork; +use masp_primitives::consensus::MainNetwork as Network; #[cfg(not(feature = "mainnet"))] -use masp_primitives::consensus::TestNetwork; +use masp_primitives::consensus::TestNetwork as Network; use masp_primitives::convert::AllowedConversion; use masp_primitives::ff::PrimeField; use masp_primitives::group::GroupEncoding; @@ -90,10 +90,7 @@ pub const ENV_VAR_MASP_PARAMS_DIR: &str = "NAMADA_MASP_PARAMS_DIR"; pub const ENV_VAR_MASP_TEST_SEED: &str = "NAMADA_MASP_TEST_SEED"; /// The network to use for MASP -#[cfg(feature = "mainnet")] -const NETWORK: MainNetwork = MainNetwork; -#[cfg(not(feature = "mainnet"))] -const NETWORK: TestNetwork = TestNetwork; +const NETWORK: Network = Network; // TODO these could be exported from masp_proof crate /// Spend circuit name @@ -1655,7 +1652,7 @@ impl ShieldedContext { u32::MAX - 20 } }; - let mut builder = Builder::::new( + let mut builder = Builder::::new( NETWORK, // NOTE: this is going to add 20 more blocks to the actual // expiration but there's no other exposed function that we could @@ -2674,7 +2671,7 @@ pub mod testing { value: u64, )( address in arb_transparent_address(), - expiration_height in arb_height(BranchId::MASP, &TestNetwork), + expiration_height in arb_height(BranchId::MASP, &Network), mut rng in arb_rng().prop_map(TestCsprng), bparams_rng in arb_rng().prop_map(TestCsprng), prover_rng in arb_rng().prop_map(TestCsprng), @@ -2689,7 +2686,7 @@ pub mod testing { .to_payment_address(div) .expect("a PaymentAddress"); - let mut builder = Builder::::new( + let mut builder = Builder::::new( NETWORK, // NOTE: this is going to add 20 more blocks to the actual // expiration but there's no other exposed function that we could @@ -2835,7 +2832,7 @@ pub mod testing { asset_range, ), )( - expiration_height in arb_height(BranchId::MASP, &TestNetwork), + expiration_height in arb_height(BranchId::MASP, &Network), spend_descriptions in assets .iter() .map(|(asset, values)| arb_spend_descriptions(asset.clone(), values.clone())) @@ -2846,10 +2843,10 @@ pub mod testing { .collect::>(), assets in Just(assets), ) -> ( - Builder::, + Builder::, HashMap, ) { - let mut builder = Builder::::new( + let mut builder = Builder::::new( NETWORK, // NOTE: this is going to add 20 more blocks to the actual // expiration but there's no other exposed function that we could @@ -2902,7 +2899,7 @@ pub mod testing { asset_range, ), )( - expiration_height in arb_height(BranchId::MASP, &TestNetwork), + expiration_height in arb_height(BranchId::MASP, &Network), txins in assets .iter() .map(|(asset, values)| arb_txouts(asset.clone(), values.clone(), source)) @@ -2913,10 +2910,10 @@ pub mod testing { .collect::>(), assets in Just(assets), ) -> ( - Builder::, + Builder::, HashMap, ) { - let mut builder = Builder::::new( + let mut builder = Builder::::new( NETWORK, // NOTE: this is going to add 20 more blocks to the actual // expiration but there's no other exposed function that we could @@ -2945,7 +2942,7 @@ pub mod testing { asset_range, ), )( - expiration_height in arb_height(BranchId::MASP, &TestNetwork), + expiration_height in arb_height(BranchId::MASP, &Network), spend_descriptions in assets .iter() .map(|(asset, values)| arb_spend_descriptions(asset.clone(), values.clone())) @@ -2956,10 +2953,10 @@ pub mod testing { .collect::>(), assets in Just(assets), ) -> ( - Builder::, + Builder::, HashMap, ) { - let mut builder = Builder::::new( + let mut builder = Builder::::new( NETWORK, // NOTE: this is going to add 20 more blocks to the actual // expiration but there's no other exposed function that we could diff --git a/wasm/Cargo.lock b/wasm/Cargo.lock index ed08dd9f93..4d6dfd753f 100644 --- a/wasm/Cargo.lock +++ b/wasm/Cargo.lock @@ -3384,7 +3384,7 @@ dependencies = [ [[package]] name = "masp_note_encryption" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "borsh 1.4.0", "chacha20", @@ -3397,7 +3397,7 @@ dependencies = [ [[package]] name = "masp_primitives" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "aes", "bip0039", @@ -3429,7 +3429,7 @@ dependencies = [ [[package]] name = "masp_proofs" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "bellman", "blake2b_simd", @@ -4332,7 +4332,7 @@ dependencies = [ [[package]] name = "num-traits" version = "0.2.19" -source = "git+https://github.com/heliaxdev/num-traits?rev=db259754d33f193f02cbb65520d9ac00614be2c4#db259754d33f193f02cbb65520d9ac00614be2c4" +source = "git+https://github.com/heliaxdev/num-traits?rev=3f3657caa34b8e116fdf3f8a3519c4ac29f012fe#3f3657caa34b8e116fdf3f8a3519c4ac29f012fe" dependencies = [ "autocfg", ] diff --git a/wasm_for_tests/Cargo.lock b/wasm_for_tests/Cargo.lock index d5d7377393..66abd20871 100644 --- a/wasm_for_tests/Cargo.lock +++ b/wasm_for_tests/Cargo.lock @@ -3364,7 +3364,7 @@ dependencies = [ [[package]] name = "masp_note_encryption" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "borsh 1.2.1", "chacha20", @@ -3377,7 +3377,7 @@ dependencies = [ [[package]] name = "masp_primitives" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "aes", "bip0039", @@ -3409,7 +3409,7 @@ dependencies = [ [[package]] name = "masp_proofs" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=6fc4692841a2241633792c429cc66b42023e5bf3#6fc4692841a2241633792c429cc66b42023e5bf3" +source = "git+https://github.com/anoma/masp?rev=3aacc707c5948e7423589ac617305448bead9842#3aacc707c5948e7423589ac617305448bead9842" dependencies = [ "bellman", "blake2b_simd", @@ -4277,7 +4277,7 @@ dependencies = [ [[package]] name = "num-traits" version = "0.2.19" -source = "git+https://github.com/heliaxdev/num-traits?rev=db259754d33f193f02cbb65520d9ac00614be2c4#db259754d33f193f02cbb65520d9ac00614be2c4" +source = "git+https://github.com/heliaxdev/num-traits?rev=3f3657caa34b8e116fdf3f8a3519c4ac29f012fe#3f3657caa34b8e116fdf3f8a3519c4ac29f012fe" dependencies = [ "autocfg", ]