diff --git a/Makefile b/Makefile index f7df0056de..5c7ebe5cdc 100644 --- a/Makefile +++ b/Makefile @@ -113,8 +113,8 @@ clippy-wasm = $(cargo) +$(nightly) clippy --manifest-path $(wasm)/Cargo.toml --a # Need a separate command for benchmarks to prevent the "testing" feature flag from being activated clippy: - $(cargo) +$(nightly) clippy $(jobs) --all-targets --workspace --exclude namada_benchmarks -- -D warnings && \ - $(cargo) +$(nightly) clippy $(jobs) --all-targets --package namada_benchmarks -- -D warnings && \ + $(cargo) +$(nightly) clippy $(jobs) --all-targets --workspace --exclude namada_benchmarks -- -D warnings --check-cfg 'cfg(fuzzing)' && \ + $(cargo) +$(nightly) clippy $(jobs) --all-targets --package namada_benchmarks -- -D warnings --check-cfg 'cfg(fuzzing)' && \ make -C $(wasms) clippy && \ make -C $(wasms_for_tests) clippy diff --git a/crates/node/src/shell/mod.rs b/crates/node/src/shell/mod.rs index 4c62519bc6..cdff09b79c 100644 --- a/crates/node/src/shell/mod.rs +++ b/crates/node/src/shell/mod.rs @@ -1491,12 +1491,12 @@ pub mod test_utils { /// Generate a random public/private keypair #[inline] - pub(super) fn gen_keypair() -> common::SecretKey { + pub fn gen_keypair() -> common::SecretKey { gen_ed25519_keypair() } /// Generate a random ed25519 public/private keypair - pub(super) fn gen_ed25519_keypair() -> common::SecretKey { + pub fn gen_ed25519_keypair() -> common::SecretKey { use rand::prelude::ThreadRng; use rand::thread_rng; @@ -1505,7 +1505,7 @@ pub mod test_utils { } /// Generate a random secp256k1 public/private keypair - pub(super) fn gen_secp256k1_keypair() -> common::SecretKey { + pub fn gen_secp256k1_keypair() -> common::SecretKey { use rand::prelude::ThreadRng; use rand::thread_rng; @@ -1516,9 +1516,7 @@ pub mod test_utils { } /// Invalidate a valid signature `sig`. - pub(super) fn invalidate_signature( - sig: common::Signature, - ) -> common::Signature { + pub fn invalidate_signature(sig: common::Signature) -> common::Signature { match sig { common::Signature::Ed25519(ed25519::Signature(ref sig)) => { let mut sig_bytes = sig.to_bytes(); @@ -1804,7 +1802,7 @@ pub mod test_utils { /// Start a new test shell and initialize it. Returns the shell paired with /// a broadcast receiver, which will receives any protocol txs sent by the /// shell. - pub(super) fn setup_with_cfg>( + pub fn setup_with_cfg>( SetupCfg { last_height, num_validators, @@ -1865,7 +1863,7 @@ pub mod test_utils { /// Same as [`setup_at_height`], but returns a shell at the given block /// height, with a single validator. #[inline] - pub(super) fn setup_at_height>( + pub fn setup_at_height>( last_height: H, ) -> ( TestShell, @@ -1919,7 +1917,7 @@ pub mod test_utils { } /// Set the Ethereum bridge to be inactive - pub(super) fn deactivate_bridge(shell: &mut TestShell) { + pub fn deactivate_bridge(shell: &mut TestShell) { use namada::eth_bridge::storage::active_key; use namada::eth_bridge::storage::eth_bridge_queries::EthBridgeStatus; shell @@ -1928,7 +1926,7 @@ pub mod test_utils { .expect("Test failed"); } - pub(super) fn get_pkh_from_address( + pub fn get_pkh_from_address( storage: &S, params: &PosParams, address: Address, @@ -1946,7 +1944,7 @@ pub mod test_utils { TryFrom::try_from(decoded).unwrap() } - pub(super) fn next_block_for_inflation( + pub fn next_block_for_inflation( shell: &mut TestShell, proposer_address: Vec, votes: Vec, diff --git a/wasm/Cargo.lock b/wasm/Cargo.lock index 94a4eac8da..e79de15676 100644 --- a/wasm/Cargo.lock +++ b/wasm/Cargo.lock @@ -517,6 +517,16 @@ name = "bls12_381" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "bls12_381" +version = "0.8.0" +source = "git+https://github.com/heliaxdev/bls12_381.git?rev=d3ebe9dd6488fac1923db120a7498079e55dd838#d3ebe9dd6488fac1923db120a7498079e55dd838" dependencies = [ "ff", "group", @@ -3372,7 +3382,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8499f7a74008aafbecb2a2e608a3e13e4dd3e84df198b604451efe93f2de6e61" dependencies = [ "bitvec", - "bls12_381", + "bls12_381 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ff", + "group", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "jubjub" +version = "0.10.0" +source = "git+https://github.com/heliaxdev/jubjub.git?rev=a373686962f4e9d0edb3b4716f86ff6bbd9aa86c#a373686962f4e9d0edb3b4716f86ff6bbd9aa86c" +dependencies = [ + "bitvec", + "bls12_381 0.8.0 (git+https://github.com/heliaxdev/bls12_381.git?rev=d3ebe9dd6488fac1923db120a7498079e55dd838)", "ff", "group", "rand_core 0.6.4", @@ -3518,7 +3541,7 @@ dependencies = [ [[package]] name = "masp_note_encryption" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=8d83b172698098fba393006016072bc201ed9ab7#8d83b172698098fba393006016072bc201ed9ab7" +source = "git+https://github.com/anoma/masp?rev=12ed8b060b295c06502a2ff8468e4a941cb7cca4#12ed8b060b295c06502a2ff8468e4a941cb7cca4" dependencies = [ "borsh 1.4.0", "chacha20", @@ -3531,14 +3554,14 @@ dependencies = [ [[package]] name = "masp_primitives" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=8d83b172698098fba393006016072bc201ed9ab7#8d83b172698098fba393006016072bc201ed9ab7" +source = "git+https://github.com/anoma/masp?rev=12ed8b060b295c06502a2ff8468e4a941cb7cca4#12ed8b060b295c06502a2ff8468e4a941cb7cca4" dependencies = [ "aes", "bip0039", "bitvec", "blake2b_simd", "blake2s_simd", - "bls12_381", + "bls12_381 0.8.0 (git+https://github.com/heliaxdev/bls12_381.git?rev=d3ebe9dd6488fac1923db120a7498079e55dd838)", "borsh 1.4.0", "byteorder", "ff", @@ -3546,7 +3569,7 @@ dependencies = [ "group", "hex", "incrementalmerkletree", - "jubjub", + "jubjub 0.10.0 (git+https://github.com/heliaxdev/jubjub.git?rev=a373686962f4e9d0edb3b4716f86ff6bbd9aa86c)", "lazy_static", "masp_note_encryption", "memuse", @@ -3563,16 +3586,16 @@ dependencies = [ [[package]] name = "masp_proofs" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=8d83b172698098fba393006016072bc201ed9ab7#8d83b172698098fba393006016072bc201ed9ab7" +source = "git+https://github.com/anoma/masp?rev=12ed8b060b295c06502a2ff8468e4a941cb7cca4#12ed8b060b295c06502a2ff8468e4a941cb7cca4" dependencies = [ "bellman", "blake2b_simd", - "bls12_381", + "bls12_381 0.8.0 (git+https://github.com/heliaxdev/bls12_381.git?rev=d3ebe9dd6488fac1923db120a7498079e55dd838)", "directories", "getrandom 0.2.15", "group", "itertools 0.11.0", - "jubjub", + "jubjub 0.10.0 (git+https://github.com/heliaxdev/jubjub.git?rev=a373686962f4e9d0edb3b4716f86ff6bbd9aa86c)", "lazy_static", "masp_primitives", "minreq", @@ -4027,7 +4050,7 @@ dependencies = [ "fd-lock", "futures", "itertools 0.12.1", - "jubjub", + "jubjub 0.10.0 (git+https://github.com/heliaxdev/jubjub.git?rev=a373686962f4e9d0edb3b4716f86ff6bbd9aa86c)", "lazy_static", "linkme", "masp_primitives", @@ -5130,7 +5153,7 @@ dependencies = [ "byteorder", "group", "hex", - "jubjub", + "jubjub 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "pasta_curves", "rand_core 0.6.4", "serde", diff --git a/wasm_for_tests/Cargo.lock b/wasm_for_tests/Cargo.lock index 2e7778bbe4..d89d3fa62f 100644 --- a/wasm_for_tests/Cargo.lock +++ b/wasm_for_tests/Cargo.lock @@ -560,6 +560,16 @@ name = "bls12_381" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "bls12_381" +version = "0.8.0" +source = "git+https://github.com/heliaxdev/bls12_381.git?rev=d3ebe9dd6488fac1923db120a7498079e55dd838#d3ebe9dd6488fac1923db120a7498079e55dd838" dependencies = [ "ff", "group", @@ -3442,7 +3452,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8499f7a74008aafbecb2a2e608a3e13e4dd3e84df198b604451efe93f2de6e61" dependencies = [ "bitvec", - "bls12_381", + "bls12_381 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ff", + "group", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "jubjub" +version = "0.10.0" +source = "git+https://github.com/heliaxdev/jubjub.git?rev=a373686962f4e9d0edb3b4716f86ff6bbd9aa86c#a373686962f4e9d0edb3b4716f86ff6bbd9aa86c" +dependencies = [ + "bitvec", + "bls12_381 0.8.0 (git+https://github.com/heliaxdev/bls12_381.git?rev=d3ebe9dd6488fac1923db120a7498079e55dd838)", "ff", "group", "rand_core 0.6.4", @@ -3568,7 +3591,7 @@ dependencies = [ [[package]] name = "masp_note_encryption" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=8d83b172698098fba393006016072bc201ed9ab7#8d83b172698098fba393006016072bc201ed9ab7" +source = "git+https://github.com/anoma/masp?rev=12ed8b060b295c06502a2ff8468e4a941cb7cca4#12ed8b060b295c06502a2ff8468e4a941cb7cca4" dependencies = [ "borsh 1.2.1", "chacha20", @@ -3581,14 +3604,14 @@ dependencies = [ [[package]] name = "masp_primitives" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=8d83b172698098fba393006016072bc201ed9ab7#8d83b172698098fba393006016072bc201ed9ab7" +source = "git+https://github.com/anoma/masp?rev=12ed8b060b295c06502a2ff8468e4a941cb7cca4#12ed8b060b295c06502a2ff8468e4a941cb7cca4" dependencies = [ "aes", "bip0039", "bitvec", "blake2b_simd", "blake2s_simd", - "bls12_381", + "bls12_381 0.8.0 (git+https://github.com/heliaxdev/bls12_381.git?rev=d3ebe9dd6488fac1923db120a7498079e55dd838)", "borsh 1.2.1", "byteorder", "ff", @@ -3596,7 +3619,7 @@ dependencies = [ "group", "hex", "incrementalmerkletree", - "jubjub", + "jubjub 0.10.0 (git+https://github.com/heliaxdev/jubjub.git?rev=a373686962f4e9d0edb3b4716f86ff6bbd9aa86c)", "lazy_static", "masp_note_encryption", "memuse", @@ -3613,16 +3636,16 @@ dependencies = [ [[package]] name = "masp_proofs" version = "1.0.0" -source = "git+https://github.com/anoma/masp?rev=8d83b172698098fba393006016072bc201ed9ab7#8d83b172698098fba393006016072bc201ed9ab7" +source = "git+https://github.com/anoma/masp?rev=12ed8b060b295c06502a2ff8468e4a941cb7cca4#12ed8b060b295c06502a2ff8468e4a941cb7cca4" dependencies = [ "bellman", "blake2b_simd", - "bls12_381", + "bls12_381 0.8.0 (git+https://github.com/heliaxdev/bls12_381.git?rev=d3ebe9dd6488fac1923db120a7498079e55dd838)", "directories", "getrandom 0.2.15", "group", "itertools 0.11.0", - "jubjub", + "jubjub 0.10.0 (git+https://github.com/heliaxdev/jubjub.git?rev=a373686962f4e9d0edb3b4716f86ff6bbd9aa86c)", "lazy_static", "masp_primitives", "minreq", @@ -4052,7 +4075,7 @@ dependencies = [ "fd-lock", "futures", "itertools 0.12.1", - "jubjub", + "jubjub 0.10.0 (git+https://github.com/heliaxdev/jubjub.git?rev=a373686962f4e9d0edb3b4716f86ff6bbd9aa86c)", "lazy_static", "masp_primitives", "masp_proofs", @@ -5137,7 +5160,7 @@ dependencies = [ "byteorder", "group", "hex", - "jubjub", + "jubjub 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "pasta_curves", "rand_core 0.6.4", "serde",