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

Murisi+grarco/multi tx masp vp rebased2 #3264

Merged
merged 25 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a007a32
Reworks masp vp to accept multiple transfers in a single tx
grarco Feb 20, 2024
b43be29
Refactors transparent bundle check to just compare maps
grarco Feb 20, 2024
5887ee7
Fixes unrecognized assets
grarco Feb 20, 2024
daf9788
Refactors balances split
grarco Feb 20, 2024
ad97698
`valid_spend_descriptions_anchor` does not expect the presence of the…
grarco Feb 21, 2024
c43bf92
Refactors transparent bundle validation into a separate function. Rem…
grarco Feb 21, 2024
14e8238
Changelog #2690
grarco Feb 21, 2024
66af13a
Fixes balance owner when token is minted
grarco Feb 22, 2024
beb8e72
Fixes balances check in masp vp to allow non-masp transfers
grarco Feb 22, 2024
2687f30
Fix transparent bundle validation bug
grarco Feb 22, 2024
94b5efa
Unifies `DeltaBalance` and `SignedAmount`
grarco Feb 22, 2024
dcf6fd4
Now decode AssetTypes separately.
murisi Feb 28, 2024
6533037
Now check that the diff between pre and post is the value balance.
murisi Feb 29, 2024
56f7665
Split validate_transparent_bundle into 3 functions.
murisi Feb 29, 2024
01509e8
Ensure that all implied transfers have been authorized by the relevan…
murisi Feb 29, 2024
67ec3be
Make MASP VP accept IBC transactions.
murisi Apr 19, 2024
0380f7c
Use a MASP crate that guarantees ValueSums.
murisi May 7, 2024
7531eed
Extend SignedAmount to hold MASP value balance.
murisi May 8, 2024
75b71b5
Merge tag 'v0.35.1' into murisi+grarco/multi-tx-masp-vp-rebased2
murisi May 17, 2024
fc68008
Updated the WASM binaries.
murisi May 17, 2024
0367d18
Factored the accumulation code out of verify_sapling_balancing_value.
murisi May 20, 2024
57dfe29
Created a structure for representing conversion leafs.
murisi May 20, 2024
852d366
Use try_fold to build the ChangedBalances object.
murisi May 20, 2024
632ec06
Moved SignedAmount into core and removed use of unchecked arithmetic.
murisi May 20, 2024
96218d8
Enable governance to change MASP token map.
murisi May 10, 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
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/2690-multi-tx-masp-vp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Updated the masp vp to accept multiple transfers in a single transaction.
([\#2690](https://github.com/anoma/namada/pull/2690))
104 changes: 52 additions & 52 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ libc = "0.2.97"
libloading = "0.7.2"
linkme = "0.3.24"
# branch = "murisi/namada-integration"
masp_primitives = { git = "https://github.com/anoma/masp", rev = "d1e0876b304968edfa36707ffe4fb8fbbee131d2" }
masp_proofs = { git = "https://github.com/anoma/masp", rev = "d1e0876b304968edfa36707ffe4fb8fbbee131d2", default-features = false, features = ["local-prover"] }
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"] }
num256 = "0.3.5"
num_cpus = "1.13.0"
num-derive = "0.3.3"
Expand Down
26 changes: 6 additions & 20 deletions crates/core/src/arith.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
//! Arithmetics helpers

pub use masp_primitives::num_traits::ops::checked::{
CheckedAdd, CheckedDiv, CheckedMul, CheckedNeg, CheckedRem, CheckedSub,
};
pub use masp_primitives::num_traits::ops::overflowing::{
OverflowingAdd, OverflowingSub,
};
pub use smooth_operator::{checked, Error};

/// Performs addition that returns `None` instead of wrapping around on
/// overflow.
pub trait CheckedAdd: Sized + Copy {
/// Adds two numbers, checking for overflow. If overflow happens, `None` is
/// returned.
fn checked_add(&self, rhs: Self) -> Option<Self>;
}

/// Helpers for testing.
#[cfg(feature = "testing")]
pub mod testing {
use super::*;

impl CheckedAdd for u64 {
fn checked_add(&self, rhs: Self) -> Option<Self> {
u64::checked_add(*self, rhs)
}
}
}
Loading
Loading