Skip to content

Commit

Permalink
Merge branch 'murisi/receive-randomness' (#3140)
Browse files Browse the repository at this point in the history
* origin/murisi/receive-randomness:
  Updated MASP crate dependency to one that allows receiving randomness.
  Added a test to ensure that Tx schemas get generated without name conflicts.
  Renamed CompressedSignature to CompressedAuthorization to show association with Authorization.
  Generate the Borsh schema for the MaspBuilder section correctly.
  • Loading branch information
brentstone committed May 8, 2024
2 parents fee5c7b + 131ecdc commit 497276c
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 100 deletions.
6 changes: 3 additions & 3 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 @@ -120,8 +120,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 = "6cbc8bd90a71cc280492c44bc3415162093daa76" }
masp_proofs = { git = "https://github.com/anoma/masp", rev = "6cbc8bd90a71cc280492c44bc3415162093daa76", default-features = false, features = ["local-prover"] }
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"] }
num256 = "0.3.5"
num_cpus = "1.13.0"
num-derive = "0.3.3"
Expand Down
6 changes: 3 additions & 3 deletions crates/apps/src/lib/client/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use namada::governance::cli::onchain::{
};
use namada::io::Io;
use namada::state::EPOCH_SWITCH_BLOCKS_DELAY;
use namada::tx::{CompressedSignature, Section, Signer, Tx};
use namada::tx::{CompressedAuthorization, Section, Signer, Tx};
use namada_sdk::args::TxBecomeValidator;
use namada_sdk::rpc::{InnerTxResult, TxBroadcastData, TxResponse};
use namada_sdk::wallet::alias::{validator_address, validator_consensus_key};
Expand Down Expand Up @@ -115,7 +115,7 @@ pub async fn with_hardware_wallet<'a, U: WalletIo + Clone>(
.expect("unable to parse signature from Ledger");
// Signatures from the Ledger come back in compressed
// form
let compressed = CompressedSignature {
let compressed = CompressedAuthorization {
targets: response.raw_indices,
signer: Signer::PubKeys(vec![pubkey]),
signatures: [(0, signature)].into(),
Expand All @@ -133,7 +133,7 @@ pub async fn with_hardware_wallet<'a, U: WalletIo + Clone>(
.expect("unable to parse signature from Ledger");
// Signatures from the Ledger come back in compressed
// form
let compressed = CompressedSignature {
let compressed = CompressedAuthorization {
targets: response.wrapper_indices,
signer: Signer::PubKeys(vec![pubkey]),
signatures: [(0, signature)].into(),
Expand Down
3 changes: 2 additions & 1 deletion crates/core/src/masp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::collections::BTreeMap;
use std::fmt::Display;
use std::str::FromStr;

use borsh::{BorshDeserialize, BorshSerialize};
use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
use borsh_ext::BorshSerializeExt;
use masp_primitives::asset_type::AssetType;
use namada_macros::BorshDeserializer;
Expand All @@ -27,6 +27,7 @@ use crate::token::{Denomination, MaspDigitPos};
BorshSerialize,
BorshDeserialize,
BorshDeserializer,
BorshSchema,
Clone,
Debug,
PartialOrd,
Expand Down
1 change: 1 addition & 0 deletions crates/core/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ impl From<Amount> for Uint {
BorshSerialize,
BorshDeserialize,
BorshDeserializer,
BorshSchema,
Serialize,
Deserialize,
)]
Expand Down
Loading

0 comments on commit 497276c

Please sign in to comment.