-
Notifications
You must be signed in to change notification settings - Fork 956
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'murisi+grarco/multi-tx-masp-vp-rebased2' (#3264)
* origin/murisi+grarco/multi-tx-masp-vp-rebased2: Enable governance to change MASP token map. Moved SignedAmount into core and removed use of unchecked arithmetic. Use try_fold to build the ChangedBalances object. Created a structure for representing conversion leafs. Factored the accumulation code out of verify_sapling_balancing_value. Updated the WASM binaries. Extend SignedAmount to hold MASP value balance. Use a MASP crate that guarantees ValueSums. Make MASP VP accept IBC transactions. Ensure that all implied transfers have been authorized by the relevant party. Split validate_transparent_bundle into 3 functions. Now check that the diff between pre and post is the value balance. Now decode AssetTypes separately. Unifies `DeltaBalance` and `SignedAmount` Fix transparent bundle validation bug Fixes balances check in masp vp to allow non-masp transfers Fixes balance owner when token is minted Changelog #2690 Refactors transparent bundle validation into a separate function. Removes unchecked operation. `valid_spend_descriptions_anchor` does not expect the presence of the sapling bundle anymore Refactors balances split Fixes unrecognized assets Refactors transparent bundle check to just compare maps Reworks masp vp to accept multiple transfers in a single tx
- Loading branch information
Showing
38 changed files
with
1,162 additions
and
800 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
([\#3264](https://github.com/anoma/namada/pull/3264)) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.