diff --git a/.changelog/unreleased/improvements/1842-masp-generic-amounts-rebased.md b/.changelog/unreleased/improvements/1842-masp-generic-amounts-rebased.md new file mode 100644 index 00000000000..f4c8f9f195f --- /dev/null +++ b/.changelog/unreleased/improvements/1842-masp-generic-amounts-rebased.md @@ -0,0 +1,2 @@ +- Upgraded the MASP crate commit used by Namada to the latest version. + ([\#1842](https://github.com/anoma/namada/pull/1842)) \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 8ef2826d9ce..8ff5ec29f83 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3813,7 +3813,7 @@ dependencies = [ [[package]] name = "masp_note_encryption" version = "0.2.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "borsh 0.9.4", "chacha20 0.9.1", @@ -3826,7 +3826,7 @@ dependencies = [ [[package]] name = "masp_primitives" version = "0.9.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "aes 0.7.5", "bip0039", @@ -3846,6 +3846,7 @@ dependencies = [ "masp_note_encryption", "memuse", "nonempty", + "num-traits 0.2.15", "rand 0.8.5", "rand_core 0.6.4", "sha2 0.9.9", @@ -3856,7 +3857,7 @@ dependencies = [ [[package]] name = "masp_proofs" version = "0.9.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "bellman", "blake2b_simd", @@ -3872,7 +3873,6 @@ dependencies = [ "rand_core 0.6.4", "redjubjub", "tracing 0.1.37", - "wagyu-zcash-parameters", ] [[package]] @@ -7550,56 +7550,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wagyu-zcash-parameters" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c904628658374e651288f000934c33ef738b2d8b3e65d4100b70b395dbe2bb" -dependencies = [ - "wagyu-zcash-parameters-1", - "wagyu-zcash-parameters-2", - "wagyu-zcash-parameters-3", - "wagyu-zcash-parameters-4", - "wagyu-zcash-parameters-5", - "wagyu-zcash-parameters-6", -] - -[[package]] -name = "wagyu-zcash-parameters-1" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bf2e21bb027d3f8428c60d6a720b54a08bf6ce4e6f834ef8e0d38bb5695da8" - -[[package]] -name = "wagyu-zcash-parameters-2" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a616ab2e51e74cc48995d476e94de810fb16fc73815f390bf2941b046cc9ba2c" - -[[package]] -name = "wagyu-zcash-parameters-3" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14da1e2e958ff93c0830ee68e91884069253bf3462a67831b02b367be75d6147" - -[[package]] -name = "wagyu-zcash-parameters-4" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f058aeef03a2070e8666ffb5d1057d8bb10313b204a254a6e6103eb958e9a6d6" - -[[package]] -name = "wagyu-zcash-parameters-5" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ffe916b30e608c032ae1b734f02574a3e12ec19ab5cc5562208d679efe4969d" - -[[package]] -name = "wagyu-zcash-parameters-6" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7b6d5a78adc3e8f198e9cd730f219a695431467f7ec29dcfc63ade885feebe1" - [[package]] name = "wait-timeout" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index ea7071f111e..db6d130dca6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,8 +86,8 @@ libc = "0.2.97" libloading = "0.7.2" libsecp256k1 = {git = "https://github.com/heliaxdev/libsecp256k1", rev = "bbb3bd44a49db361f21d9db80f9a087c194c0ae9", default-features = false, features = ["std", "static-context"]} # branch = "murisi/namada-integration" -masp_primitives = { git = "https://github.com/anoma/masp", rev = "252a6059565b125c1444e9e7d0b7c8da0fba8f8f" } -masp_proofs = { git = "https://github.com/anoma/masp", rev = "252a6059565b125c1444e9e7d0b7c8da0fba8f8f", default-features = false, features = ["local-prover"] } +masp_primitives = { git = "https://github.com/anoma/masp", rev = "50acc5028fbcd52a05970fe7991c7850ab04358e" } +masp_proofs = { git = "https://github.com/anoma/masp", rev = "50acc5028fbcd52a05970fe7991c7850ab04358e", default-features = false, features = ["local-prover"] } num256 = "0.3.5" num_cpus = "1.13.0" num-derive = "0.3.3" diff --git a/apps/src/lib/client/rpc.rs b/apps/src/lib/client/rpc.rs index d276bdf4e38..ef36a48d1cf 100644 --- a/apps/src/lib/client/rpc.rs +++ b/apps/src/lib/client/rpc.rs @@ -1843,13 +1843,13 @@ pub async fn query_conversions( // Track whether any non-sentinel conversions are found let mut conversions_found = false; for ((addr, _), epoch, conv, _) in conv_state.assets.values() { - let amt: masp_primitives::transaction::components::Amount = + let amt: masp_primitives::transaction::components::I32Sum = conv.clone().into(); // If the user has specified any targets, then meet them // If we have a sentinel conversion, then skip printing if matches!(&target_token, Some(target) if target != addr) || matches!(&args.epoch, Some(target) if target != epoch) - || amt == masp_primitives::transaction::components::Amount::zero() + || amt.is_zero() { continue; } @@ -1893,7 +1893,7 @@ pub async fn query_conversion( Address, MaspDenom, Epoch, - masp_primitives::transaction::components::Amount, + masp_primitives::transaction::components::I32Sum, MerklePath, )> { namada::ledger::rpc::query_conversion(client, asset_type).await diff --git a/apps/src/lib/client/tx.rs b/apps/src/lib/client/tx.rs index 7f7b885facb..361b2bb2678 100644 --- a/apps/src/lib/client/tx.rs +++ b/apps/src/lib/client/tx.rs @@ -1460,38 +1460,3 @@ pub async fn submit_tx( ) -> Result { tx::submit_tx(client, to_broadcast).await } - -#[cfg(test)] -mod test_tx { - use masp_primitives::transaction::components::Amount; - use namada::core::types::storage::Epoch; - use namada::ledger::masp::{make_asset_type, MaspAmount}; - use namada::types::address::testing::gen_established_address; - use namada::types::token::MaspDenom; - - #[test] - fn test_masp_add_amount() { - let address_1 = gen_established_address(); - let denom_1 = MaspDenom::One; - let denom_2 = MaspDenom::Three; - let epoch = Epoch::default(); - let _masp_amount = MaspAmount::default(); - - let asset_base = make_asset_type(Some(epoch), &address_1, denom_1); - let _asset_denom = make_asset_type(Some(epoch), &address_1, denom_2); - let _asset_prefix = make_asset_type(Some(epoch), &address_1, denom_1); - - let _amount_base = - Amount::from_pair(asset_base, 16).expect("Test failed"); - let _amount_denom = - Amount::from_pair(asset_base, 2).expect("Test failed"); - let _amount_prefix = - Amount::from_pair(asset_base, 4).expect("Test failed"); - - // masp_amount += amount_base; - // assert_eq!(masp_amount.get((epoch,)), Uint::zero()); - // Amount::from_pair(atype, amount) - // MaspDenom::One - // assert_eq!(zero.abs(), Uint::zero()); - } -} diff --git a/core/src/ledger/storage/masp_conversions.rs b/core/src/ledger/storage/masp_conversions.rs index bbb61ff50d2..624fe2aa1f4 100644 --- a/core/src/ledger/storage/masp_conversions.rs +++ b/core/src/ledger/storage/masp_conversions.rs @@ -38,7 +38,7 @@ where H: 'static + super::StorageHasher, { use masp_primitives::ff::PrimeField; - use masp_primitives::transaction::components::Amount as MaspAmount; + use masp_primitives::transaction::components::I32Sum as MaspAmount; use rayon::iter::{ IndexedParallelIterator, IntoParallelIterator, ParallelIterator, }; @@ -92,9 +92,11 @@ where ); current_convs.insert( (addr.clone(), denom), - (MaspAmount::from_pair(old_asset, -(reward.1 as i64)).unwrap() - + MaspAmount::from_pair(new_asset, reward.1).unwrap() - + MaspAmount::from_pair(reward_asset, reward.0).unwrap()) + (MaspAmount::from_pair(old_asset, -(reward.1 as i32)).unwrap() + + MaspAmount::from_pair(new_asset, reward.1 as i32) + .unwrap() + + MaspAmount::from_pair(reward_asset, reward.0 as i32) + .unwrap()) .into(), ); // Add a conversion from the previous asset type diff --git a/core/src/types/address.rs b/core/src/types/address.rs index d587d202804..43b2ca32a32 100644 --- a/core/src/types/address.rs +++ b/core/src/types/address.rs @@ -654,7 +654,7 @@ pub fn tokens() -> HashMap { /// Temporary helper for testing, a hash map of tokens addresses with their /// MASP XAN incentive schedules. If the reward is (a, b) then a rewarded tokens /// are dispensed for every b possessed tokens. -pub fn masp_rewards() -> HashMap { +pub fn masp_rewards() -> HashMap { vec![ (nam(), (0, 100)), (btc(), (1, 100)), diff --git a/core/src/types/token.rs b/core/src/types/token.rs index 6056495cd1c..85c80fbee17 100644 --- a/core/src/types/token.rs +++ b/core/src/types/token.rs @@ -599,6 +599,20 @@ impl Mul<(u64, u64)> for Amount { } } +/// A combination of Euclidean division and fractions: +/// x*(a,b) = (a*(x//b), x%b). +impl Mul<(u32, u32)> for Amount { + type Output = (Amount, Amount); + + fn mul(mut self, rhs: (u32, u32)) -> Self::Output { + let amt = Amount { + raw: (self.raw / rhs.1) * rhs.0, + }; + self.raw %= rhs.1; + (amt, self) + } +} + impl Div for Amount { type Output = Self; diff --git a/shared/src/ledger/masp.rs b/shared/src/ledger/masp.rs index 509954580d2..aa795942582 100644 --- a/shared/src/ledger/masp.rs +++ b/shared/src/ledger/masp.rs @@ -35,7 +35,8 @@ use masp_primitives::transaction::builder::{self, *}; use masp_primitives::transaction::components::sapling::builder::SaplingMetadata; use masp_primitives::transaction::components::transparent::builder::TransparentBuilder; use masp_primitives::transaction::components::{ - Amount, ConvertDescription, OutputDescription, SpendDescription, TxOut, + ConvertDescription, I128Sum, I32Sum, OutputDescription, SpendDescription, + TxOut, U64Sum, }; use masp_primitives::transaction::fees::fixed::FeeRule; use masp_primitives::transaction::sighash::{signature_hash, SignableInput}; @@ -307,7 +308,7 @@ pub fn verify_shielded_tx(transaction: &Transaction) -> bool { tracing::info!("passed spend/output verification"); - let assets_and_values: Amount = sapling_bundle.value_balance.clone(); + let assets_and_values: I128Sum = sapling_bundle.value_balance.clone(); tracing::info!( "accumulated {} assets/values", @@ -414,7 +415,7 @@ pub fn find_valid_diversifier( /// Determine if using the current note would actually bring us closer to our /// target -pub fn is_amount_required(src: Amount, dest: Amount, delta: Amount) -> bool { +pub fn is_amount_required(src: I128Sum, dest: I128Sum, delta: I128Sum) -> bool { let gap = dest - src; for (asset_type, value) in gap.components() { if *value >= 0 && delta[asset_type] >= 0 { @@ -520,13 +521,13 @@ impl std::ops::Mul for MaspAmount { } } -impl<'a> From<&'a MaspAmount> for Amount { - fn from(masp_amount: &'a MaspAmount) -> Amount { - let mut res = Amount::zero(); +impl<'a> From<&'a MaspAmount> for I128Sum { + fn from(masp_amount: &'a MaspAmount) -> I128Sum { + let mut res = I128Sum::zero(); for ((epoch, token), val) in masp_amount.iter() { for denom in MaspDenom::iter() { let asset = make_asset_type(Some(*epoch), token, denom); - res += Amount::from_pair(asset, denom.denominate_i128(val)) + res += I128Sum::from_pair(asset, denom.denominate_i128(val)) .unwrap(); } } @@ -534,7 +535,7 @@ impl<'a> From<&'a MaspAmount> for Amount { } } -impl From for Amount { +impl From for I128Sum { fn from(amt: MaspAmount) -> Self { Self::from(&amt) } @@ -829,9 +830,9 @@ impl ShieldedContext { *balance += self .decode_all_amounts( client, - Amount::from_nonnegative( + I128Sum::from_nonnegative( note.asset_type, - note.value, + note.value as i128, ) .expect( "found note with invalid value or asset type", @@ -862,10 +863,11 @@ impl ShieldedContext { *balance -= self .decode_all_amounts( client, - Amount::from_nonnegative(note.asset_type, note.value) - .expect( - "found note with invalid value or asset type", - ), + I128Sum::from_nonnegative( + note.asset_type, + note.value as i128, + ) + .expect("found note with invalid value or asset type"), ) .await; } @@ -911,7 +913,7 @@ impl ShieldedContext { if !self.pos_map.contains_key(vk) { return None; } - let mut val_acc = Amount::zero(); + let mut val_acc = I128Sum::zero(); // Retrieve the notes that can be spent by this key if let Some(avail_notes) = self.pos_map.get(vk) { for note_idx in avail_notes { @@ -922,9 +924,11 @@ impl ShieldedContext { // Get note associated with this ID let note = self.note_map.get(note_idx).unwrap(); // Finally add value to multi-asset accumulator - val_acc += - Amount::from_nonnegative(note.asset_type, note.value) - .expect("found note with invalid value or asset type"); + val_acc += I128Sum::from_nonnegative( + note.asset_type, + note.value as i128, + ) + .expect("found note with invalid value or asset type"); } } Some(self.decode_all_amounts(client, val_acc).await) @@ -946,7 +950,7 @@ impl ShieldedContext { Address, MaspDenom, _, - Amount, + I32Sum, MerklePath, ) = rpc::query_conversion(client, asset_type).await?; self.asset_types @@ -971,7 +975,7 @@ impl ShieldedContext { { self.asset_types.insert(asset_type, (addr, denom, ep)); // If the conversion is 0, then we just have a pure decoding - if conv != Amount::zero() { + if !conv.is_zero() { conv_entry.insert((conv.into(), path, 0)); } } @@ -1027,7 +1031,7 @@ impl ShieldedContext { return; } // If conversion if possible, accumulate the exchanged amount - let conv: Amount = conv.into(); + let conv: I128Sum = I128Sum::from_sum(conv.into()); // The amount required of current asset to qualify for conversion let masp_asset = make_asset_type(Some(asset_type.0), &asset_type.1, asset_type.2); @@ -1068,7 +1072,7 @@ impl ShieldedContext { mut input: MaspAmount, target_epoch: Epoch, mut conversions: Conversions, - ) -> (Amount, Conversions) { + ) -> (I128Sum, Conversions) { // Where we will store our exchanged value let mut output = MaspAmount::default(); // Repeatedly exchange assets until it is no longer possible @@ -1167,16 +1171,16 @@ impl ShieldedContext { &mut self, client: &C, vk: &ViewingKey, - target: Amount, + target: I128Sum, target_epoch: Epoch, ) -> ( - Amount, + I128Sum, Vec<(Diversifier, Note, MerklePath)>, Conversions, ) { // Establish connection with which to do exchange rate queries let mut conversions = BTreeMap::new(); - let mut val_acc = Amount::zero(); + let mut val_acc = I128Sum::zero(); let mut notes = Vec::new(); // Retrieve the notes that can be spent by this key if let Some(avail_notes) = self.pos_map.get(vk).cloned() { @@ -1194,8 +1198,11 @@ impl ShieldedContext { let note = *self.note_map.get(note_idx).unwrap(); // The amount contributed by this note before conversion - let pre_contr = Amount::from_pair(note.asset_type, note.value) - .expect("received note has invalid value or asset type"); + let pre_contr = + I128Sum::from_pair(note.asset_type, note.value as i128) + .expect( + "received note has invalid value or asset type", + ); let input = self.decode_all_amounts(client, pre_contr).await; let (contr, proposed_convs) = self .compute_exchanged_amount( @@ -1237,7 +1244,7 @@ impl ShieldedContext { client: &C, owner: PaymentAddress, viewing_key: &ViewingKey, - ) -> Result<(Amount, Epoch), PinnedBalanceError> { + ) -> Result<(I128Sum, Epoch), PinnedBalanceError> { // Check that the supplied viewing key corresponds to given payment // address let counter_owner = viewing_key.to_payment_address( @@ -1272,7 +1279,7 @@ impl ShieldedContext { .await .expect("Ill-formed epoch, transaction pair"); // Accumulate the combined output note value into this Amount - let mut val_acc = Amount::zero(); + let mut val_acc = I128Sum::zero(); for so in shielded .sapling_bundle() .map_or(&vec![], |x| &x.shielded_outputs) @@ -1287,11 +1294,11 @@ impl ShieldedContext { match decres { // So the given viewing key does decrypt this current note... Some((note, pa, _memo)) if pa == owner.into() => { - val_acc += - Amount::from_nonnegative(note.asset_type, note.value) - .expect( - "found note with invalid value or asset type", - ); + val_acc += I128Sum::from_nonnegative( + note.asset_type, + note.value as i128, + ) + .expect("found note with invalid value or asset type"); } _ => {} } @@ -1332,7 +1339,7 @@ impl ShieldedContext { pub async fn decode_amount( &mut self, client: &C, - amt: Amount, + amt: I128Sum, target_epoch: Epoch, ) -> HashMap { let mut res = HashMap::new(); @@ -1360,7 +1367,7 @@ impl ShieldedContext { pub async fn decode_all_amounts( &mut self, client: &C, - amt: Amount, + amt: I128Sum, ) -> MaspAmount { let mut res: HashMap<(Epoch, Address), Change> = HashMap::default(); for (asset_type, val) in amt.components() { @@ -1459,7 +1466,7 @@ impl ShieldedContext { .collect_unspent_notes( client, &to_viewing_key(&sk).vk, - amount, + I128Sum::from_sum(amount), epoch, ) .await; @@ -1500,7 +1507,7 @@ impl ShieldedContext { builder .add_transparent_input(TxOut { asset_type: *asset_type, - value: denom.denominate(&amt) as i128, + value: denom.denominate(&amt), address: script, }) .map_err(builder::Error::TransparentBuild)?; @@ -1543,7 +1550,7 @@ impl ShieldedContext { .add_transparent_output( &TransparentAddress(hash.into()), *asset_type, - vout as i128, + vout, ) .map_err(builder::Error::TransparentBuild)?; } @@ -1553,7 +1560,7 @@ impl ShieldedContext { // Now add outputs representing the change from this payment if let Some(sk) = spending_key { // Represents the amount of inputs we are short by - let mut additional = Amount::zero(); + let mut additional = I128Sum::zero(); for (asset_type, amt) in builder .value_balance() .expect("Unable to compute value balance") @@ -1573,12 +1580,12 @@ impl ShieldedContext { } else { // Record how much of the current asset type we are short by additional += - Amount::from_nonnegative(*asset_type, -*amt).unwrap(); + I128Sum::from_nonnegative(*asset_type, -*amt).unwrap(); } } // If we are short by a non-zero amount, then we have insufficient // funds - if additional != Amount::zero() { + if !additional.is_zero() { return Err(builder::Error::InsufficientFunds(additional)); } } @@ -1615,7 +1622,7 @@ impl ShieldedContext { || -> Result> { let (masp_tx, metadata) = builder.build( &self.utils.local_tx_prover(), - &FeeRule::non_standard(Amount::zero()), + &FeeRule::non_standard(U64Sum::zero()), )?; Ok(ShieldedTransfer { builder: builder_clone, @@ -1833,14 +1840,14 @@ fn convert_amount( epoch: Epoch, token: &Address, val: token::Amount, -) -> ([AssetType; 4], Amount) { - let mut amount = Amount::zero(); +) -> ([AssetType; 4], U64Sum) { + let mut amount = U64Sum::zero(); let asset_types: [AssetType; 4] = MaspDenom::iter() .map(|denom| { let asset_type = make_asset_type(Some(epoch), token, denom); // Combine the value and unit into one amount amount += - Amount::from_nonnegative(asset_type, denom.denominate(&val)) + U64Sum::from_nonnegative(asset_type, denom.denominate(&val)) .expect("invalid value for amount"); asset_type }) diff --git a/shared/src/ledger/queries/shell.rs b/shared/src/ledger/queries/shell.rs index f0d62f7ae41..cce696077e2 100644 --- a/shared/src/ledger/queries/shell.rs +++ b/shared/src/ledger/queries/shell.rs @@ -30,7 +30,7 @@ type Conversion = ( Address, MaspDenom, Epoch, - masp_primitives::transaction::components::Amount, + masp_primitives::transaction::components::I32Sum, MerklePath, ); @@ -254,7 +254,7 @@ where addr.clone(), *denom, *epoch, - Into::::into( + Into::::into( conv.clone(), ), ctx.wl_storage.storage.conversion_state.tree.path(*pos), diff --git a/shared/src/ledger/rpc.rs b/shared/src/ledger/rpc.rs index f0599a1ca23..fee56810bd1 100644 --- a/shared/src/ledger/rpc.rs +++ b/shared/src/ledger/rpc.rs @@ -248,7 +248,7 @@ pub async fn query_conversion( Address, MaspDenom, Epoch, - masp_primitives::transaction::components::Amount, + masp_primitives::transaction::components::I32Sum, MerklePath, )> { Some(unwrap_client_response::( diff --git a/shared/src/ledger/tx.rs b/shared/src/ledger/tx.rs index fca73386807..fc74c01c2d1 100644 --- a/shared/src/ledger/tx.rs +++ b/shared/src/ledger/tx.rs @@ -14,7 +14,7 @@ use masp_primitives::transaction::components::sapling::fees::{ use masp_primitives::transaction::components::transparent::fees::{ InputView as TransparentInputView, OutputView as TransparentOutputView, }; -use masp_primitives::transaction::components::Amount; +use masp_primitives::transaction::components::I32Sum; use namada_core::ledger::governance::cli::onchain::{ DefaultProposal, PgfFundingProposal, PgfStewardProposal, ProposalVote, }; @@ -1746,7 +1746,7 @@ async fn used_asset_types< // Collect all the asset types used in the Sapling converts for output in builder.sapling_converts() { for (asset_type, _) in - Amount::from(output.conversion().clone()).components() + I32Sum::from(output.conversion().clone()).components() { add_asset_type(&mut asset_types, shielded, client, *asset_type) .await; diff --git a/test_fixtures/masp_proofs/889C046FA76727BC97433503BB79BAC90BA1F01653EBCFDCF7CC8AAA1BBEE462.bin b/test_fixtures/masp_proofs/0B436B9FB574776E45EDA537DCF334701D250179C310C7076DAEE5367CB3D74A.bin similarity index 72% rename from test_fixtures/masp_proofs/889C046FA76727BC97433503BB79BAC90BA1F01653EBCFDCF7CC8AAA1BBEE462.bin rename to test_fixtures/masp_proofs/0B436B9FB574776E45EDA537DCF334701D250179C310C7076DAEE5367CB3D74A.bin index 525e1e63ee2..7e970976d15 100644 Binary files a/test_fixtures/masp_proofs/889C046FA76727BC97433503BB79BAC90BA1F01653EBCFDCF7CC8AAA1BBEE462.bin and b/test_fixtures/masp_proofs/0B436B9FB574776E45EDA537DCF334701D250179C310C7076DAEE5367CB3D74A.bin differ diff --git a/test_fixtures/masp_proofs/1362F1CF9B836CF8B05D8189EA9CB1712CCA85B0E96A3330A63BE7CD9E5ECD22.bin b/test_fixtures/masp_proofs/1362F1CF9B836CF8B05D8189EA9CB1712CCA85B0E96A3330A63BE7CD9E5ECD22.bin index db2cb751aab..b3688efdfb6 100644 Binary files a/test_fixtures/masp_proofs/1362F1CF9B836CF8B05D8189EA9CB1712CCA85B0E96A3330A63BE7CD9E5ECD22.bin and b/test_fixtures/masp_proofs/1362F1CF9B836CF8B05D8189EA9CB1712CCA85B0E96A3330A63BE7CD9E5ECD22.bin differ diff --git a/test_fixtures/masp_proofs/A9FA2730222946FA51E9D587544FDED28D5E7D3C6B52DCF38A5978CEA70D6FD3.bin b/test_fixtures/masp_proofs/434F17129C496E5DE034C4F2553E767C0E74D457A68F8606AFBF41E6F2F56D6E.bin similarity index 69% rename from test_fixtures/masp_proofs/A9FA2730222946FA51E9D587544FDED28D5E7D3C6B52DCF38A5978CEA70D6FD3.bin rename to test_fixtures/masp_proofs/434F17129C496E5DE034C4F2553E767C0E74D457A68F8606AFBF41E6F2F56D6E.bin index 634d326dcdc..0f908a4c41d 100644 Binary files a/test_fixtures/masp_proofs/A9FA2730222946FA51E9D587544FDED28D5E7D3C6B52DCF38A5978CEA70D6FD3.bin and b/test_fixtures/masp_proofs/434F17129C496E5DE034C4F2553E767C0E74D457A68F8606AFBF41E6F2F56D6E.bin differ diff --git a/test_fixtures/masp_proofs/12C933751C24BDC39C9108F5AF5D4C1BF345378A4FB6BB0B179BA8BDB0D2A3C0.bin b/test_fixtures/masp_proofs/574D00A0B71BE528A2923F6B68934EAA4FA91FFF4AFDF3B08047E7DC6BFCED36.bin similarity index 71% rename from test_fixtures/masp_proofs/12C933751C24BDC39C9108F5AF5D4C1BF345378A4FB6BB0B179BA8BDB0D2A3C0.bin rename to test_fixtures/masp_proofs/574D00A0B71BE528A2923F6B68934EAA4FA91FFF4AFDF3B08047E7DC6BFCED36.bin index e24feb560a8..0234c0c0005 100644 Binary files a/test_fixtures/masp_proofs/12C933751C24BDC39C9108F5AF5D4C1BF345378A4FB6BB0B179BA8BDB0D2A3C0.bin and b/test_fixtures/masp_proofs/574D00A0B71BE528A2923F6B68934EAA4FA91FFF4AFDF3B08047E7DC6BFCED36.bin differ diff --git a/test_fixtures/masp_proofs/AC308C08512AF5DAA364B845D146763B3CE0BACFB7799C6744E50B9E7F43E961.bin b/test_fixtures/masp_proofs/72CAB503E1E0568CC0CAFA892125DB879A97D990F8395D0D8C34BC7EDD203DA9.bin similarity index 72% rename from test_fixtures/masp_proofs/AC308C08512AF5DAA364B845D146763B3CE0BACFB7799C6744E50B9E7F43E961.bin rename to test_fixtures/masp_proofs/72CAB503E1E0568CC0CAFA892125DB879A97D990F8395D0D8C34BC7EDD203DA9.bin index b67b3c8cd08..5b46f14b4e8 100644 Binary files a/test_fixtures/masp_proofs/AC308C08512AF5DAA364B845D146763B3CE0BACFB7799C6744E50B9E7F43E961.bin and b/test_fixtures/masp_proofs/72CAB503E1E0568CC0CAFA892125DB879A97D990F8395D0D8C34BC7EDD203DA9.bin differ diff --git a/test_fixtures/masp_proofs/8B29BC2E1A96DF331C7C3A2B227C98D1E5AAAA9988F26B1A47090ACCE693572F.bin b/test_fixtures/masp_proofs/8B29BC2E1A96DF331C7C3A2B227C98D1E5AAAA9988F26B1A47090ACCE693572F.bin index 77f55684900..2548b8bdd4d 100644 Binary files a/test_fixtures/masp_proofs/8B29BC2E1A96DF331C7C3A2B227C98D1E5AAAA9988F26B1A47090ACCE693572F.bin and b/test_fixtures/masp_proofs/8B29BC2E1A96DF331C7C3A2B227C98D1E5AAAA9988F26B1A47090ACCE693572F.bin differ diff --git a/test_fixtures/masp_proofs/0DAF8BDF2318129AC828A7149AC83E76506147445D4DC22D57CBC9869BCDDA80.bin b/test_fixtures/masp_proofs/B94B8EDBFA5038FFB9D439D316EBD09A62AAF19015EF8149D6502B6C0FA871C4.bin similarity index 69% rename from test_fixtures/masp_proofs/0DAF8BDF2318129AC828A7149AC83E76506147445D4DC22D57CBC9869BCDDA80.bin rename to test_fixtures/masp_proofs/B94B8EDBFA5038FFB9D439D316EBD09A62AAF19015EF8149D6502B6C0FA871C4.bin index f20cf90f1a5..3ff46b61bc3 100644 Binary files a/test_fixtures/masp_proofs/0DAF8BDF2318129AC828A7149AC83E76506147445D4DC22D57CBC9869BCDDA80.bin and b/test_fixtures/masp_proofs/B94B8EDBFA5038FFB9D439D316EBD09A62AAF19015EF8149D6502B6C0FA871C4.bin differ diff --git a/test_fixtures/masp_proofs/E76E54B7526CD2B5423322FB711C0CA6AA6520A2AC8BC34A84358EA137F138D0.bin b/test_fixtures/masp_proofs/B9D0EC03A64BC8F9536A05F587B35316EE670A242606A81AF0139B3F21CDEDD8.bin similarity index 72% rename from test_fixtures/masp_proofs/E76E54B7526CD2B5423322FB711C0CA6AA6520A2AC8BC34A84358EA137F138D0.bin rename to test_fixtures/masp_proofs/B9D0EC03A64BC8F9536A05F587B35316EE670A242606A81AF0139B3F21CDEDD8.bin index 4df2e0be9f2..854c15c3eac 100644 Binary files a/test_fixtures/masp_proofs/E76E54B7526CD2B5423322FB711C0CA6AA6520A2AC8BC34A84358EA137F138D0.bin and b/test_fixtures/masp_proofs/B9D0EC03A64BC8F9536A05F587B35316EE670A242606A81AF0139B3F21CDEDD8.bin differ diff --git a/test_fixtures/masp_proofs/BE57BA4D8FB068F5A933E78DEF2989556FD771D368849D034E22923FD350EEEC.bin b/test_fixtures/masp_proofs/C82CD3AD0DACE8091365CB0D91AE73F7B5BC1D64F787FA8A7985D301776103DD.bin similarity index 66% rename from test_fixtures/masp_proofs/BE57BA4D8FB068F5A933E78DEF2989556FD771D368849D034E22923FD350EEEC.bin rename to test_fixtures/masp_proofs/C82CD3AD0DACE8091365CB0D91AE73F7B5BC1D64F787FA8A7985D301776103DD.bin index c05883cbab7..f314f5f7e40 100644 Binary files a/test_fixtures/masp_proofs/BE57BA4D8FB068F5A933E78DEF2989556FD771D368849D034E22923FD350EEEC.bin and b/test_fixtures/masp_proofs/C82CD3AD0DACE8091365CB0D91AE73F7B5BC1D64F787FA8A7985D301776103DD.bin differ diff --git a/test_fixtures/masp_proofs/5B99F3D7E0CE75AB1F4B737EC88B269A5436CD72AA758686960F409B04841707.bin b/test_fixtures/masp_proofs/DDD66A8E673E8E8A1401967F6FCDD5724C594E275B353F45FF749CB76D3CFF52.bin similarity index 72% rename from test_fixtures/masp_proofs/5B99F3D7E0CE75AB1F4B737EC88B269A5436CD72AA758686960F409B04841707.bin rename to test_fixtures/masp_proofs/DDD66A8E673E8E8A1401967F6FCDD5724C594E275B353F45FF749CB76D3CFF52.bin index 30b0e399a35..2f9de031ab0 100644 Binary files a/test_fixtures/masp_proofs/5B99F3D7E0CE75AB1F4B737EC88B269A5436CD72AA758686960F409B04841707.bin and b/test_fixtures/masp_proofs/DDD66A8E673E8E8A1401967F6FCDD5724C594E275B353F45FF749CB76D3CFF52.bin differ diff --git a/test_fixtures/masp_proofs/EE7C912B7E21F07494D58AA6668DC6BBB31619C7E93A1A5A2E64B694DBE1BD6E.bin b/test_fixtures/masp_proofs/EE7C912B7E21F07494D58AA6668DC6BBB31619C7E93A1A5A2E64B694DBE1BD6E.bin index 56b269667b8..2280ac3be9a 100644 Binary files a/test_fixtures/masp_proofs/EE7C912B7E21F07494D58AA6668DC6BBB31619C7E93A1A5A2E64B694DBE1BD6E.bin and b/test_fixtures/masp_proofs/EE7C912B7E21F07494D58AA6668DC6BBB31619C7E93A1A5A2E64B694DBE1BD6E.bin differ diff --git a/test_fixtures/masp_proofs/F068FDF05B8F25DD923E667215344FFFAA6CA273027CD480AEA68DDED57D88CA.bin b/test_fixtures/masp_proofs/F068FDF05B8F25DD923E667215344FFFAA6CA273027CD480AEA68DDED57D88CA.bin index 5388cd80a37..9daf8b861e8 100644 Binary files a/test_fixtures/masp_proofs/F068FDF05B8F25DD923E667215344FFFAA6CA273027CD480AEA68DDED57D88CA.bin and b/test_fixtures/masp_proofs/F068FDF05B8F25DD923E667215344FFFAA6CA273027CD480AEA68DDED57D88CA.bin differ diff --git a/wasm/Cargo.lock b/wasm/Cargo.lock index be65562b6d4..9889cf8b165 100644 --- a/wasm/Cargo.lock +++ b/wasm/Cargo.lock @@ -3123,7 +3123,7 @@ dependencies = [ [[package]] name = "masp_note_encryption" version = "0.2.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "borsh 0.9.4", "chacha20 0.9.1", @@ -3136,7 +3136,7 @@ dependencies = [ [[package]] name = "masp_primitives" version = "0.9.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "aes 0.7.5", "bip0039", @@ -3156,6 +3156,7 @@ dependencies = [ "masp_note_encryption", "memuse", "nonempty", + "num-traits", "rand 0.8.5", "rand_core 0.6.4", "sha2 0.9.9", @@ -3166,7 +3167,7 @@ dependencies = [ [[package]] name = "masp_proofs" version = "0.9.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "bellman", "blake2b_simd", diff --git a/wasm/checksums.json b/wasm/checksums.json index 7fc821dd036..32d73edb445 100644 --- a/wasm/checksums.json +++ b/wasm/checksums.json @@ -1,23 +1,23 @@ { - "tx_bond.wasm": "tx_bond.f587ab8c187b14e0b675689a881f9461667eae21e2f3a7f46715e1c4c658c294.wasm", - "tx_bridge_pool.wasm": "tx_bridge_pool.c4fb4d33121d069d774821613c787eb311260674004b4415039a37ffc0464db2.wasm", - "tx_change_validator_commission.wasm": "tx_change_validator_commission.a5484124ec4a2590655fd625f321e79bbfd3f3254ca4843c6b6ecfc61773cf58.wasm", - "tx_ibc.wasm": "tx_ibc.b28f5052c4468f20e41571b341d67c3316ffb5fd09d4febd9ab311d0dd17f8ec.wasm", - "tx_init_account.wasm": "tx_init_account.3ccd7acdf830f019e2d2e5ccb50396448ab059e45018a381754f002d88caecce.wasm", - "tx_init_proposal.wasm": "tx_init_proposal.7f520087b668d758a2005bc5f6f311b872d9c6be7dc619c0313ca719dd694aef.wasm", - "tx_init_validator.wasm": "tx_init_validator.6588dd49b997c108849de351ef01860130dcbe5627e94824b3553c723944e596.wasm", - "tx_resign_steward.wasm": "tx_resign_steward.db25aaf1065567a830bef84a91f3db2f270b7a6fe118ca6514ebfaaa9dd40f8d.wasm", - "tx_reveal_pk.wasm": "tx_reveal_pk.e95c608e676c2769ca51bd0faa5ae59c3c0581d157f6a59d8e3dfd699b7d9e3f.wasm", - "tx_transfer.wasm": "tx_transfer.88baa3cbd30a3ee44f2bb744fb3d0e9158b0603127f1ca8eb129991cb8e1dde2.wasm", - "tx_unbond.wasm": "tx_unbond.298d8359c151f73fe45945d4b6a1497b788f8c9fa0b976d60621ed7438a9e51a.wasm", - "tx_unjail_validator.wasm": "tx_unjail_validator.77eff7c1abd34b752e8e70d0755bb7e56c0b93fc465dace25b4f155453fcdc84.wasm", - "tx_update_account.wasm": "tx_update_account.478295a2fcc6c213ba692e53930097235ec8dd60daaed5efa2234967920c291e.wasm", - "tx_update_steward_commission.wasm": "tx_update_steward_commission.6c103a282d516534db4c06c80a15cca8fd27759db28543b6afcd01c7ffa0015a.wasm", - "tx_vote_proposal.wasm": "tx_vote_proposal.ae668d558adb6b604817b05e08e8b33d2972582cecf26a5a9ed3bb3310a75ad8.wasm", - "tx_withdraw.wasm": "tx_withdraw.a2568497572ae2024dd10a3d3131197c17dca3b58e7570046952b0258a895e3f.wasm", - "vp_implicit.wasm": "vp_implicit.4f7aba756aecc7765f8c21c845f54781c4062b1ffeed7e9d2082b98a32a143bc.wasm", - "vp_masp.wasm": "vp_masp.fed13b5021f6e03e470d6e7f9e5afb4144f32fb609b351723353e62ff55e9800.wasm", - "vp_testnet_faucet.wasm": "vp_testnet_faucet.0685dd848d04d1be534fd40ea30d20bec220cb55ff4b4759802b8d27573d1c49.wasm", - "vp_user.wasm": "vp_user.bb635eadf94d5a0cc8030c51fff1944d2a201d2a823195f8711e060effbe80dd.wasm", - "vp_validator.wasm": "vp_validator.2835d51950b6d597d7afdf566c367e5bb5fa8cef32600563f046586764db2456.wasm" + "tx_bond.wasm": "tx_bond.a17d97ad6dd83d6bf8e4fa3059fb5126f119c3c61c5f89f111f27abae407c9ce.wasm", + "tx_bridge_pool.wasm": "tx_bridge_pool.65b5b69fbe3d81af702a714e1d2c0aa6baa58913dd0faa548359624d4d6ec3ef.wasm", + "tx_change_validator_commission.wasm": "tx_change_validator_commission.98b926c05374b8f8252367c5cfcf5607743e816173d490f8de60f962ae8bcf14.wasm", + "tx_ibc.wasm": "tx_ibc.2070b0f66803596e53aaece9cf23e7f84bcbfc807cafae7617f57d94c482fe98.wasm", + "tx_init_account.wasm": "tx_init_account.7988a3d57452d7a6d85fbad105ea6b2b5e3727476edc7a1d85d583010e878f87.wasm", + "tx_init_proposal.wasm": "tx_init_proposal.bcc538c438b993afddc78bc4291badd5dfe0c5201abe77aba0f49718bb6dc3b4.wasm", + "tx_init_validator.wasm": "tx_init_validator.b96a1a9b90fe9536e6302dd7ddedcf89240dd8cce7126061463a069bfad311b9.wasm", + "tx_resign_steward.wasm": "tx_resign_steward.2ce34cf3e21c9122804c83f0076cd5e9f28881749eabbe294dd9833b3cfaf2c6.wasm", + "tx_reveal_pk.wasm": "tx_reveal_pk.ea655a203b05df3ceab470f51757faa122a60bdacb705dd823279e37fa4049c2.wasm", + "tx_transfer.wasm": "tx_transfer.45b4cb28f6dcda2fb0ffcb68f39001593b899054b9049ca27d81c138ce78f18d.wasm", + "tx_unbond.wasm": "tx_unbond.11eeb1789b679af0e41bd95d5c1aec9570016930969b3e49912f431d36c31ddf.wasm", + "tx_unjail_validator.wasm": "tx_unjail_validator.6a2f247e74da6c18d3f4956044565a79c61c5aaa472cf2b5f4fde25082bc8c5a.wasm", + "tx_update_account.wasm": "tx_update_account.e47cf35eb442fb4204d1d87a1a9d027158166edbbf268120e485565260c6a65e.wasm", + "tx_update_steward_commission.wasm": "tx_update_steward_commission.92434d8c3958f7b80dfb775f494bd11bece585b97e7708b2bcb72a58881d72b1.wasm", + "tx_vote_proposal.wasm": "tx_vote_proposal.0fafc4561b4c03615252fb85e67cf6718be5190da1b378adf4325084e8be311a.wasm", + "tx_withdraw.wasm": "tx_withdraw.e56f90e2b879fd4232452141c4bd2509c89ba2c697eb10f08ef8bd71f00d105c.wasm", + "vp_implicit.wasm": "vp_implicit.ee2f8dfae6889314ce9331104c944245f62ca4b5b0519201d90f999c455969d2.wasm", + "vp_masp.wasm": "vp_masp.a8a87c72720d296b520c3397718f1929657491849aa428b22b81e483916be2c0.wasm", + "vp_testnet_faucet.wasm": "vp_testnet_faucet.238132fbfb44f1d45ef4ab27f620ec5b485978b5990b44c170cd836c7d35e015.wasm", + "vp_user.wasm": "vp_user.e74634934d67d73d063309eb16ba9ceec9aaa0ed2e208b3f2350033e13034bdd.wasm", + "vp_validator.wasm": "vp_validator.dfe27e2e658926a104caea56a6ee3510bcc985c6b0c5d1b27255831aa1d890d8.wasm" } \ No newline at end of file diff --git a/wasm/wasm_source/Cargo.toml b/wasm/wasm_source/Cargo.toml index 43e4de0ceff..5ee77009245 100644 --- a/wasm/wasm_source/Cargo.toml +++ b/wasm/wasm_source/Cargo.toml @@ -44,7 +44,7 @@ once_cell = {version = "1.8.0", optional = true} wee_alloc = "0.4.5" getrandom = { version = "0.2", features = ["custom"] } # branch = "murisi/namada-integration" -masp_primitives = { git = "https://github.com/anoma/masp", rev = "252a6059565b125c1444e9e7d0b7c8da0fba8f8f", optional = true } +masp_primitives = { git = "https://github.com/anoma/masp", rev = "50acc5028fbcd52a05970fe7991c7850ab04358e", optional = true } ripemd = "0.1" [dev-dependencies] diff --git a/wasm/wasm_source/src/vp_masp.rs b/wasm/wasm_source/src/vp_masp.rs index 7795007a330..cb662111184 100644 --- a/wasm/wasm_source/src/vp_masp.rs +++ b/wasm/wasm_source/src/vp_masp.rs @@ -1,7 +1,7 @@ use std::cmp::Ordering; use masp_primitives::asset_type::AssetType; -use masp_primitives::transaction::components::Amount; +use masp_primitives::transaction::components::I128Sum; /// Multi-asset shielded pool VP. use namada_vp_prelude::address::masp; use namada_vp_prelude::storage::Epoch; @@ -64,11 +64,12 @@ fn convert_amount( token: &Address, val: token::Amount, denom: token::MaspDenom, -) -> (AssetType, Amount) { +) -> (AssetType, I128Sum) { let asset_type = asset_type_from_epoched_address(epoch, token, denom); // Combine the value and unit into one amount - let amount = Amount::from_nonnegative(asset_type, denom.denominate(&val)) - .expect("invalid value or asset type for amount"); + let amount = + I128Sum::from_nonnegative(asset_type, denom.denominate(&val) as i128) + .expect("invalid value or asset type for amount"); (asset_type, amount) } @@ -104,7 +105,7 @@ fn validate_tx( }) .transpose()?; if let Some(shielded_tx) = shielded { - let mut transparent_tx_pool = Amount::zero(); + let mut transparent_tx_pool = I128Sum::zero(); // The Sapling value balance adds to the transparent tx pool transparent_tx_pool += shielded_tx.sapling_value_balance(); @@ -190,7 +191,7 @@ fn validate_tx( continue; } if !valid_transfer_amount( - out.value as u64, + out.value, denom.denominate(&transfer.amount.amount), ) { return reject(); @@ -246,7 +247,7 @@ fn validate_tx( } } - match transparent_tx_pool.partial_cmp(&Amount::zero()) { + match transparent_tx_pool.partial_cmp(&I128Sum::zero()) { None | Some(Ordering::Less) => { debug_log!( "Transparent transaction value pool must be nonnegative. \ diff --git a/wasm_for_tests/wasm_source/Cargo.lock b/wasm_for_tests/wasm_source/Cargo.lock index 77b2082a4e1..20de6c9b7b7 100644 --- a/wasm_for_tests/wasm_source/Cargo.lock +++ b/wasm_for_tests/wasm_source/Cargo.lock @@ -3123,7 +3123,7 @@ dependencies = [ [[package]] name = "masp_note_encryption" version = "0.2.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "borsh 0.9.4", "chacha20 0.9.1", @@ -3136,7 +3136,7 @@ dependencies = [ [[package]] name = "masp_primitives" version = "0.9.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "aes 0.7.5", "bip0039", @@ -3156,6 +3156,7 @@ dependencies = [ "masp_note_encryption", "memuse", "nonempty", + "num-traits", "rand 0.8.5", "rand_core 0.6.4", "sha2 0.9.9", @@ -3166,7 +3167,7 @@ dependencies = [ [[package]] name = "masp_proofs" version = "0.9.0" -source = "git+https://github.com/anoma/masp?rev=252a6059565b125c1444e9e7d0b7c8da0fba8f8f#252a6059565b125c1444e9e7d0b7c8da0fba8f8f" +source = "git+https://github.com/anoma/masp?rev=50acc5028fbcd52a05970fe7991c7850ab04358e#50acc5028fbcd52a05970fe7991c7850ab04358e" dependencies = [ "bellman", "blake2b_simd",