Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
- name: Run slow tests
run: cargo test --all-features --verbose --release --all -- --ignored
build:
name: Build target ${{ matrix.target }}
name: Build target ${{ matrix.target.tag }}
runs-on: ubuntu-latest
strategy:
matrix:
target:
- wasm32-unknown-unknown
- wasm32-wasi
- {tag: wasm32-unknown-unknown, name: wasm32-unknown-unknown}
- {tag: wasm32-wasi, name: wasm32-wasip2}

steps:
- uses: actions/checkout@v3
Expand All @@ -58,11 +58,11 @@ jobs:
- name: Checkout LFS objects
run: git lfs checkout
- name: Add target
run: rustup target add ${{ matrix.target }}
run: rustup target add ${{ matrix.target.name }}
- run: cargo fetch
- name: Build masp_proofs for target
working-directory: ./masp_proofs
run: cargo build --verbose --no-default-features --target ${{ matrix.target }} --features js
run: cargo build --verbose --no-default-features --target ${{ matrix.target.name }} --features js


bitrot:
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [


[workspace.package]
version = "1.4.1"
version = "1.4.2"

[profile.release]
lto = true
Expand Down
2 changes: 1 addition & 1 deletion masp_note_encryption/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage = "https://github.com/namada-net/masp"
repository = "https://github.com/namada-net/masp"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
edition = "2024"
categories = ["cryptography::cryptocurrencies"]

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions masp_note_encryption/src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use alloc::vec::Vec; // module is alloc only

use crate::{
try_compact_note_decryption_inner, try_note_decryption_inner, BatchDomain, EphemeralKeyBytes,
ShieldedOutput, COMPACT_NOTE_SIZE, ENC_CIPHERTEXT_SIZE,
BatchDomain, COMPACT_NOTE_SIZE, ENC_CIPHERTEXT_SIZE, EphemeralKeyBytes, ShieldedOutput,
try_compact_note_decryption_inner, try_note_decryption_inner,
};

/// Trial decryption of a batch of notes with a set of recipients.
Expand Down
5 changes: 2 additions & 3 deletions masp_note_encryption/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ use alloc::vec::Vec;
use core::convert::TryInto;

use chacha20::{
cipher::{StreamCipher, StreamCipherSeek},
ChaCha20,
cipher::{StreamCipher, StreamCipherSeek},
};
use chacha20poly1305::{aead::AeadInPlace, ChaCha20Poly1305, KeyInit};
use chacha20poly1305::{ChaCha20Poly1305, KeyInit, aead::AeadInPlace};
use cipher::KeyIvInit;

//use crate::constants::ASSET_IDENTIFIER_LENGTH;
Expand Down Expand Up @@ -363,7 +363,6 @@ pub trait ShieldedOutput<D: Domain, const CIPHERTEXT_SIZE: usize> {
///
/// Implements section 4.19 of the
/// [Zcash Protocol Specification](https://zips.z.cash/protocol/nu5.pdf#saplingandorchardinband)

pub struct NoteEncryption<D: Domain> {
epk: D::EphemeralPublicKey,
esk: D::EphemeralSecretKey,
Expand Down
4 changes: 2 additions & 2 deletions masp_primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ homepage = "https://github.com/namada-net/masp"
repository = "https://github.com/namada-net/masp"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.70"
edition = "2024"
rust-version = "1.85"
categories = ["cryptography::cryptocurrencies"]

[package.metadata.docs.rs]
Expand Down
2 changes: 1 addition & 1 deletion masp_primitives/src/asset_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
use blake2s_simd::Params as Blake2sParams;
use borsh::BorshSchema;
use borsh::{BorshDeserialize, BorshSerialize};
use group::{cofactor::CofactorGroup, Group, GroupEncoding};
use group::{Group, GroupEncoding, cofactor::CofactorGroup};
use std::{
cmp::Ordering,
fmt::{Display, Formatter},
Expand Down
6 changes: 3 additions & 3 deletions masp_primitives/src/consensus.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Consensus logic and parameters.

use borsh::schema::add_definition;
use borsh::schema::Definition;
use borsh::schema::add_definition;
use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
use memuse::DynamicUsage;
use std::cmp::{Ord, Ordering};
Expand Down Expand Up @@ -141,7 +141,7 @@ pub trait Parameters: Clone {
/// Determines whether the specified network upgrade is active as of the
/// provided block height on the network to which this Parameters value applies.
fn is_nu_active(&self, nu: NetworkUpgrade, height: BlockHeight) -> bool {
self.activation_height(nu).map_or(false, |h| h <= height)
self.activation_height(nu).is_some_and(|h| h <= height)
}
}

Expand Down Expand Up @@ -383,7 +383,7 @@ mod tests {
use std::convert::TryFrom;

use super::{
BlockHeight, BranchId, NetworkUpgrade, Parameters, MAIN_NETWORK, UPGRADES_IN_ORDER,
BlockHeight, BranchId, MAIN_NETWORK, NetworkUpgrade, Parameters, UPGRADES_IN_ORDER,
};

#[test]
Expand Down
6 changes: 3 additions & 3 deletions masp_primitives/src/convert.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use crate::{
sapling::{
pedersen_hash::{pedersen_hash, Personalization},
Node, ValueCommitment,
pedersen_hash::{Personalization, pedersen_hash},
},
transaction::components::amount::{I128Sum, ValueSum},
};
use borsh::schema::add_definition;
use borsh::BorshSchema;
use borsh::schema::Declaration;
use borsh::schema::Definition;
use borsh::schema::Fields;
use borsh::BorshSchema;
use borsh::schema::add_definition;
use borsh::{BorshDeserialize, BorshSerialize};
use group::{Curve, GroupEncoding};
use std::collections::BTreeMap;
Expand Down
4 changes: 2 additions & 2 deletions masp_primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ mod test_vectors;
pub trait MaybeArbitrary<'a> {}

#[cfg(not(feature = "arbitrary"))]
impl<'a, T> MaybeArbitrary<'a> for T {}
impl<T> MaybeArbitrary<'_> for T {}

#[cfg(feature = "arbitrary")]
pub trait MaybeArbitrary<'a>: arbitrary::Arbitrary<'a> {}

#[cfg(feature = "arbitrary")]
impl<'a, T: for<'b> arbitrary::Arbitrary<'b>> MaybeArbitrary<'a> for T {}
impl<T: for<'b> arbitrary::Arbitrary<'b>> MaybeArbitrary<'_> for T {}
2 changes: 1 addition & 1 deletion masp_primitives/src/memo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl MemoBytes {
.iter()
.enumerate()
.rev()
.find(|(_, &b)| b != 0)
.find(|(_, b)| **b != 0)
.map(|(i, _)| i + 1)
.unwrap_or_default();

Expand Down
Loading
Loading