diff --git a/.cargo/release-version b/.cargo/release-version index f08075098e..60453e6906 100644 --- a/.cargo/release-version +++ b/.cargo/release-version @@ -1 +1 @@ -v0.16.19 \ No newline at end of file +v1.0.0 \ No newline at end of file diff --git a/.rustfmt.toml b/.rustfmt.toml index 30b32606ff..b5dd5e6730 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -13,4 +13,4 @@ imports_layout = "HorizontalVertical" imports_granularity = "Crate" overflow_delimited_expr = true reorder_impl_items = true -version = "Two" +style_edition = "2024" diff --git a/Cargo.lock b/Cargo.lock index 3be34216e7..92294ad772 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2551,7 +2551,7 @@ dependencies = [ [[package]] name = "snarkvm" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anstyle", "anyhow", @@ -2587,7 +2587,7 @@ dependencies = [ [[package]] name = "snarkvm-algorithms" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "anyhow", @@ -2626,7 +2626,7 @@ dependencies = [ [[package]] name = "snarkvm-algorithms-cuda" -version = "0.16.19" +version = "1.0.0" dependencies = [ "blst", "cc", @@ -2636,7 +2636,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-circuit-account", "snarkvm-circuit-algorithms", @@ -2649,7 +2649,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-account" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anyhow", "snarkvm-circuit-algorithms", @@ -2661,7 +2661,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-algorithms" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anyhow", "snarkvm-circuit-types", @@ -2673,7 +2673,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-collections" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anyhow", "snarkvm-circuit-algorithms", @@ -2687,7 +2687,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-environment" -version = "0.16.19" +version = "1.0.0" dependencies = [ "criterion", "indexmap 2.2.6", @@ -2708,11 +2708,11 @@ dependencies = [ [[package]] name = "snarkvm-circuit-environment-witness" -version = "0.16.19" +version = "1.0.0" [[package]] name = "snarkvm-circuit-network" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-collections", @@ -2723,7 +2723,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-program" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anyhow", "paste", @@ -2741,7 +2741,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-address", @@ -2756,7 +2756,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-address" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2768,7 +2768,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-boolean" -version = "0.16.19" +version = "1.0.0" dependencies = [ "criterion", "snarkvm-circuit-environment", @@ -2777,7 +2777,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-field" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2786,7 +2786,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-group" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2798,7 +2798,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-integers" -version = "0.16.19" +version = "1.0.0" dependencies = [ "paste", "snarkvm-circuit-environment", @@ -2811,7 +2811,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-scalar" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2821,7 +2821,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-string" -version = "0.16.19" +version = "1.0.0" dependencies = [ "rand", "snarkvm-circuit-environment", @@ -2834,7 +2834,7 @@ dependencies = [ [[package]] name = "snarkvm-console" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-console-account", "snarkvm-console-algorithms", @@ -2846,7 +2846,7 @@ dependencies = [ [[package]] name = "snarkvm-console-account" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "bs58", @@ -2859,7 +2859,7 @@ dependencies = [ [[package]] name = "snarkvm-console-algorithms" -version = "0.16.19" +version = "1.0.0" dependencies = [ "blake2s_simd", "criterion", @@ -2877,7 +2877,7 @@ dependencies = [ [[package]] name = "snarkvm-console-collections" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "criterion", @@ -2890,7 +2890,7 @@ dependencies = [ [[package]] name = "snarkvm-console-network" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anyhow", "indexmap 2.2.6", @@ -2912,7 +2912,7 @@ dependencies = [ [[package]] name = "snarkvm-console-network-environment" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anyhow", "bech32", @@ -2929,7 +2929,7 @@ dependencies = [ [[package]] name = "snarkvm-console-program" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "enum-iterator", @@ -2951,7 +2951,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types" -version = "0.16.19" +version = "1.0.0" dependencies = [ "criterion", "snarkvm-console-network", @@ -2967,7 +2967,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-address" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "serde_json", @@ -2979,7 +2979,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-boolean" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "serde_json", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-field" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "serde_json", @@ -2999,7 +2999,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-group" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "serde_json", @@ -3011,7 +3011,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-integers" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "serde_json", @@ -3023,7 +3023,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-scalar" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "serde_json", @@ -3035,7 +3035,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-string" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "serde_json", @@ -3047,7 +3047,7 @@ dependencies = [ [[package]] name = "snarkvm-curves" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "criterion", @@ -3062,7 +3062,7 @@ dependencies = [ [[package]] name = "snarkvm-fields" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "anyhow", @@ -3080,7 +3080,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "anyhow", @@ -3109,7 +3109,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-authority" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anyhow", "bincode", @@ -3122,7 +3122,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-block" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "indexmap 2.2.6", @@ -3147,7 +3147,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-committee" -version = "0.16.19" +version = "1.0.0" dependencies = [ "anyhow", "bincode", @@ -3168,7 +3168,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal" -version = "0.16.19" +version = "1.0.0" dependencies = [ "snarkvm-ledger-narwhal", "snarkvm-ledger-narwhal-batch-certificate", @@ -3181,7 +3181,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-batch-certificate" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "indexmap 2.2.6", @@ -3195,7 +3195,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-batch-header" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "indexmap 2.2.6", @@ -3209,7 +3209,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-data" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bytes", "serde_json", @@ -3219,7 +3219,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-subdag" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "indexmap 2.2.6", @@ -3235,7 +3235,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-transmission" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "bytes", @@ -3248,7 +3248,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-transmission-id" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "serde_json", @@ -3258,7 +3258,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-puzzle" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "anyhow", @@ -3279,7 +3279,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-puzzle-epoch" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "anyhow", @@ -3299,7 +3299,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-query" -version = "0.16.19" +version = "1.0.0" dependencies = [ "async-trait", "reqwest", @@ -3311,7 +3311,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-store" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std-storage", "anyhow", @@ -3341,7 +3341,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-test-helpers" -version = "0.16.19" +version = "1.0.0" dependencies = [ "once_cell", "snarkvm-circuit", @@ -3355,7 +3355,7 @@ dependencies = [ [[package]] name = "snarkvm-metrics" -version = "0.16.19" +version = "1.0.0" dependencies = [ "metrics", "metrics-exporter-prometheus", @@ -3363,7 +3363,7 @@ dependencies = [ [[package]] name = "snarkvm-parameters" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "anyhow", @@ -3397,7 +3397,7 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "anyhow", @@ -3436,7 +3436,7 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-process" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "bincode", @@ -3464,7 +3464,7 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-program" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "criterion", @@ -3480,7 +3480,7 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-snark" -version = "0.16.19" +version = "1.0.0" dependencies = [ "bincode", "colored", @@ -3493,7 +3493,7 @@ dependencies = [ [[package]] name = "snarkvm-utilities" -version = "0.16.19" +version = "1.0.0" dependencies = [ "aleo-std", "anyhow", @@ -3513,7 +3513,7 @@ dependencies = [ [[package]] name = "snarkvm-utilities-derives" -version = "0.16.19" +version = "1.0.0" dependencies = [ "proc-macro2", "quote 1.0.35", @@ -3522,7 +3522,7 @@ dependencies = [ [[package]] name = "snarkvm-wasm" -version = "0.16.19" +version = "1.0.0" dependencies = [ "getrandom", "snarkvm-circuit-network", diff --git a/Cargo.toml b/Cargo.toml index 2140fafde8..528cc42cb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A decentralized virtual machine" homepage = "https://aleo.org" @@ -22,7 +22,7 @@ categories = [ include = [ "Cargo.toml", "vm", "README.md", "LICENSE.md" ] license = "Apache-2.0" edition = "2021" -rust-version = "1.76.0" # Attention - Change the MSRV in rust-toolchain and in .circleci/config.yml as well +rust-version = "1.76.0" [workspace] members = [ @@ -152,58 +152,58 @@ wasm = [ "snarkvm-wasm" ] [dependencies.snarkvm-algorithms] path = "./algorithms" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit] path = "./circuit" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console] path = "./console" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-curves] path = "./curves" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-fields] path = "./fields" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-ledger] path = "./ledger" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-metrics] path = "./metrics" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-parameters] path = "./parameters" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-synthesizer] path = "./synthesizer" -version = "=0.16.19" +version = "=1.0.0" default-features = false optional = true [dependencies.snarkvm-utilities] path = "./utilities" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-wasm] path = "./wasm" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.anstyle] diff --git a/algorithms/Cargo.toml b/algorithms/Cargo.toml index 4c6f9d26c0..2ea45acba3 100644 --- a/algorithms/Cargo.toml +++ b/algorithms/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-algorithms" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Algorithms for a decentralized virtual machine" homepage = "https://aleo.org" @@ -47,27 +47,27 @@ required-features = [ "test" ] [dependencies.snarkvm-curves] path = "../curves" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-fields] path = "../fields" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-parameters] path = "../parameters" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-utilities] path = "../utilities" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-algorithms-cuda] path = "./cuda" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.aleo-std] diff --git a/algorithms/benches/crypto_hash/poseidon.rs b/algorithms/benches/crypto_hash/poseidon.rs index 13399e77f3..41c7f018ba 100644 --- a/algorithms/benches/crypto_hash/poseidon.rs +++ b/algorithms/benches/crypto_hash/poseidon.rs @@ -16,7 +16,7 @@ #[macro_use] extern crate criterion; -use snarkvm_algorithms::{crypto_hash::PoseidonSponge, AlgebraicSponge}; +use snarkvm_algorithms::{AlgebraicSponge, crypto_hash::PoseidonSponge}; use snarkvm_curves::bls12_377::{Fq, FqParameters}; use snarkvm_fields::Fp384; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/algorithms/benches/fft/fft.rs b/algorithms/benches/fft/fft.rs index 885516e088..652eef55dc 100644 --- a/algorithms/benches/fft/fft.rs +++ b/algorithms/benches/fft/fft.rs @@ -20,7 +20,7 @@ use snarkvm_curves::bls12_377::Fr as Bls12_377_Fr; use snarkvm_fields::PrimeField; use snarkvm_utilities::TestRng; -use criterion::{criterion_group, criterion_main, Bencher, BenchmarkId, Criterion}; +use criterion::{Bencher, BenchmarkId, Criterion, criterion_group, criterion_main}; use std::cmp::min; /// Degree bounds to benchmark on diff --git a/algorithms/benches/snark/varuna.rs b/algorithms/benches/snark/varuna.rs index 2b536008e4..a18522956d 100644 --- a/algorithms/benches/snark/varuna.rs +++ b/algorithms/benches/snark/varuna.rs @@ -17,10 +17,10 @@ extern crate criterion; use snarkvm_algorithms::{ - crypto_hash::PoseidonSponge, - snark::varuna::{ahp::AHPForR1CS, CircuitVerifyingKey, TestCircuit, VarunaHidingMode, VarunaSNARK}, AlgebraicSponge, SNARK, + crypto_hash::PoseidonSponge, + snark::varuna::{CircuitVerifyingKey, TestCircuit, VarunaHidingMode, VarunaSNARK, ahp::AHPForR1CS}, }; use snarkvm_curves::bls12_377::{Bls12_377, Fq, Fr}; use snarkvm_utilities::{CanonicalDeserialize, CanonicalSerialize, TestRng}; diff --git a/algorithms/cuda/Cargo.toml b/algorithms/cuda/Cargo.toml index 32412acc13..16affe4cbd 100644 --- a/algorithms/cuda/Cargo.toml +++ b/algorithms/cuda/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-algorithms-cuda" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Cuda optimizations for a decentralized virtual machine" homepage = "https://aleo.org" diff --git a/algorithms/src/crypto_hash/poseidon.rs b/algorithms/src/crypto_hash/poseidon.rs index 32ca40563b..71ffd5a02d 100644 --- a/algorithms/src/crypto_hash/poseidon.rs +++ b/algorithms/src/crypto_hash/poseidon.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{nonnative_params::*, AlgebraicSponge, DuplexSpongeMode}; +use crate::{AlgebraicSponge, DuplexSpongeMode, nonnative_params::*}; use snarkvm_fields::{FieldParameters, PoseidonParameters, PrimeField, ToConstraintField}; use snarkvm_utilities::{BigInteger, FromBits, ToBits}; diff --git a/algorithms/src/crypto_hash/tests.rs b/algorithms/src/crypto_hash/tests.rs index 83b630b5a0..90021f055f 100644 --- a/algorithms/src/crypto_hash/tests.rs +++ b/algorithms/src/crypto_hash/tests.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{crypto_hash::PoseidonSponge, AlgebraicSponge, DuplexSpongeMode}; +use crate::{AlgebraicSponge, DuplexSpongeMode, crypto_hash::PoseidonSponge}; use snarkvm_curves::bls12_377::Fr; use snarkvm_fields::{PoseidonDefaultField, PoseidonGrainLFSR}; diff --git a/algorithms/src/fft/domain.rs b/algorithms/src/fft/domain.rs index a1e8490386..64cd932d55 100644 --- a/algorithms/src/fft/domain.rs +++ b/algorithms/src/fft/domain.rs @@ -32,7 +32,7 @@ use crate::{ cfg_iter_mut, fft::{DomainCoeff, SparsePolynomial}, }; -use snarkvm_fields::{batch_inversion, FftField, FftParameters, Field}; +use snarkvm_fields::{FftField, FftParameters, Field, batch_inversion}; #[cfg(not(feature = "serial"))] use snarkvm_utilities::max_available_threads; use snarkvm_utilities::{execute_with_max_available_threads, serialize::*}; @@ -40,7 +40,7 @@ use snarkvm_utilities::{execute_with_max_available_threads, serialize::*}; use rand::Rng; use std::{borrow::Cow, fmt}; -use anyhow::{ensure, Result}; +use anyhow::{Result, ensure}; #[cfg(not(feature = "serial"))] use rayon::prelude::*; diff --git a/algorithms/src/fft/polynomial/mod.rs b/algorithms/src/fft/polynomial/mod.rs index 47b010f9e4..33f57ccd4d 100644 --- a/algorithms/src/fft/polynomial/mod.rs +++ b/algorithms/src/fft/polynomial/mod.rs @@ -16,11 +16,11 @@ //! Work with sparse and dense polynomials. use crate::fft::{EvaluationDomain, Evaluations}; -use snarkvm_fields::{Field, PrimeField}; -use snarkvm_utilities::{cfg_iter_mut, serialize::*, SerializationError}; use Polynomial::*; +use snarkvm_fields::{Field, PrimeField}; +use snarkvm_utilities::{SerializationError, cfg_iter_mut, serialize::*}; -use anyhow::{ensure, Result}; +use anyhow::{Result, ensure}; use std::{borrow::Cow, convert::TryInto}; #[cfg(not(feature = "serial"))] diff --git a/algorithms/src/fft/polynomial/multiplier.rs b/algorithms/src/fft/polynomial/multiplier.rs index d17af70b13..3bdcb76bdd 100644 --- a/algorithms/src/fft/polynomial/multiplier.rs +++ b/algorithms/src/fft/polynomial/multiplier.rs @@ -19,7 +19,7 @@ use crate::fft::domain::{FFTPrecomputation, IFFTPrecomputation}; /// A struct that helps multiply a batch of polynomials use super::*; -use snarkvm_utilities::{cfg_into_iter, cfg_iter, cfg_iter_mut, cfg_reduce_with, ExecutionPool}; +use snarkvm_utilities::{ExecutionPool, cfg_into_iter, cfg_iter, cfg_iter_mut, cfg_reduce_with}; #[derive(Default)] pub struct PolyMultiplier<'a, F: PrimeField> { diff --git a/algorithms/src/fft/tests.rs b/algorithms/src/fft/tests.rs index 01dd8b7b0c..b717d7badf 100644 --- a/algorithms/src/fft/tests.rs +++ b/algorithms/src/fft/tests.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::fft::{domain::*, DensePolynomial}; +use crate::fft::{DensePolynomial, domain::*}; use rand::Rng; use snarkvm_curves::bls12_377::{Fr, G1Projective}; use snarkvm_fields::{FftField, Field, One, Zero}; diff --git a/algorithms/src/msm/fixed_base.rs b/algorithms/src/msm/fixed_base.rs index e29283fcbf..8c6ef90094 100644 --- a/algorithms/src/msm/fixed_base.rs +++ b/algorithms/src/msm/fixed_base.rs @@ -15,7 +15,7 @@ use snarkvm_curves::traits::ProjectiveCurve; use snarkvm_fields::{FieldParameters, PrimeField}; -use snarkvm_utilities::{cfg_into_iter, cfg_iter, cfg_iter_mut, ToBits}; +use snarkvm_utilities::{ToBits, cfg_into_iter, cfg_iter, cfg_iter_mut}; #[cfg(not(feature = "serial"))] use rayon::prelude::*; diff --git a/algorithms/src/msm/tests.rs b/algorithms/src/msm/tests.rs index fb613bcca1..2fd1c243bd 100644 --- a/algorithms/src/msm/tests.rs +++ b/algorithms/src/msm/tests.rs @@ -20,8 +20,8 @@ use snarkvm_curves::{ }; use snarkvm_fields::{PrimeField, Zero}; use snarkvm_utilities::{ - rand::{TestRng, Uniform}, BitIteratorBE, + rand::{TestRng, Uniform}, }; fn naive_variable_base_msm( diff --git a/algorithms/src/msm/variable_base/batched.rs b/algorithms/src/msm/variable_base/batched.rs index 1dd25ce150..0c284754bf 100644 --- a/algorithms/src/msm/variable_base/batched.rs +++ b/algorithms/src/msm/variable_base/batched.rs @@ -15,7 +15,7 @@ use snarkvm_curves::{AffineCurve, ProjectiveCurve}; use snarkvm_fields::{Field, One, PrimeField, Zero}; -use snarkvm_utilities::{cfg_into_iter, BigInteger, BitIteratorBE}; +use snarkvm_utilities::{BigInteger, BitIteratorBE, cfg_into_iter}; #[cfg(not(feature = "serial"))] use rayon::prelude::*; diff --git a/algorithms/src/msm/variable_base/standard.rs b/algorithms/src/msm/variable_base/standard.rs index 9ac77d58ea..5fb1399d0f 100644 --- a/algorithms/src/msm/variable_base/standard.rs +++ b/algorithms/src/msm/variable_base/standard.rs @@ -15,7 +15,7 @@ use snarkvm_curves::{AffineCurve, ProjectiveCurve}; use snarkvm_fields::{One, PrimeField, Zero}; -use snarkvm_utilities::{cfg_into_iter, BigInteger}; +use snarkvm_utilities::{BigInteger, cfg_into_iter}; #[cfg(not(feature = "serial"))] use rayon::prelude::*; diff --git a/algorithms/src/polycommit/kzg10/data_structures.rs b/algorithms/src/polycommit/kzg10/data_structures.rs index 42474d1e9b..d8b2aa91e0 100644 --- a/algorithms/src/polycommit/kzg10/data_structures.rs +++ b/algorithms/src/polycommit/kzg10/data_structures.rs @@ -14,19 +14,19 @@ // limitations under the License. use crate::{ - fft::{DensePolynomial, EvaluationDomain}, AlgebraicSponge, + fft::{DensePolynomial, EvaluationDomain}, }; use snarkvm_curves::{AffineCurve, PairingCurve, PairingEngine, ProjectiveCurve}; use snarkvm_fields::{ConstraintFieldError, ToConstraintField, Zero}; use snarkvm_parameters::mainnet::PowersOfG; use snarkvm_utilities::{ + FromBytes, + ToBytes, borrow::Cow, error, io::{Read, Write}, serialize::{CanonicalDeserialize, CanonicalSerialize, Compress, SerializationError, Valid, Validate}, - FromBytes, - ToBytes, }; use crate::srs::{UniversalProver, UniversalVerifier}; diff --git a/algorithms/src/polycommit/kzg10/mod.rs b/algorithms/src/polycommit/kzg10/mod.rs index 178d5d9d01..986dd3713e 100644 --- a/algorithms/src/polycommit/kzg10/mod.rs +++ b/algorithms/src/polycommit/kzg10/mod.rs @@ -27,9 +27,9 @@ use crate::{ }; use snarkvm_curves::traits::{AffineCurve, PairingCurve, PairingEngine, ProjectiveCurve}; use snarkvm_fields::{One, PrimeField, Zero}; -use snarkvm_utilities::{cfg_iter, cfg_iter_mut, rand::Uniform, BitIteratorBE}; +use snarkvm_utilities::{BitIteratorBE, cfg_iter, cfg_iter_mut, rand::Uniform}; -use anyhow::{anyhow, ensure, Result}; +use anyhow::{Result, anyhow, ensure}; use core::{marker::PhantomData, ops::Mul}; use itertools::Itertools; use rand_core::RngCore; @@ -479,7 +479,7 @@ mod tests { #![allow(clippy::needless_borrow)] use super::*; use snarkvm_curves::bls12_377::{Bls12_377, Fr}; - use snarkvm_utilities::{rand::TestRng, FromBytes, ToBytes}; + use snarkvm_utilities::{FromBytes, ToBytes, rand::TestRng}; use std::borrow::Cow; diff --git a/algorithms/src/polycommit/sonic_pc/data_structures.rs b/algorithms/src/polycommit/sonic_pc/data_structures.rs index fc6c5c371e..a7aaa6d7b3 100644 --- a/algorithms/src/polycommit/sonic_pc/data_structures.rs +++ b/algorithms/src/polycommit/sonic_pc/data_structures.rs @@ -17,7 +17,7 @@ use super::{LabeledPolynomial, PolynomialInfo}; use crate::{crypto_hash::sha256::sha256, fft::EvaluationDomain, polycommit::kzg10}; use snarkvm_curves::PairingEngine; use snarkvm_fields::{ConstraintFieldError, Field, PrimeField, ToConstraintField}; -use snarkvm_utilities::{error, serialize::*, FromBytes, ToBytes}; +use snarkvm_utilities::{FromBytes, ToBytes, error, serialize::*}; use hashbrown::HashMap; use std::{ diff --git a/algorithms/src/polycommit/sonic_pc/mod.rs b/algorithms/src/polycommit/sonic_pc/mod.rs index 62e40932e5..1f295182b2 100644 --- a/algorithms/src/polycommit/sonic_pc/mod.rs +++ b/algorithms/src/polycommit/sonic_pc/mod.rs @@ -14,18 +14,18 @@ // limitations under the License. use crate::{ + AlgebraicSponge, fft::DensePolynomial, msm::variable_base::VariableBase, - polycommit::{kzg10, optional_rng::OptionalRng, PCError}, + polycommit::{PCError, kzg10, optional_rng::OptionalRng}, srs::{UniversalProver, UniversalVerifier}, - AlgebraicSponge, }; use hashbrown::HashMap; use itertools::Itertools; use snarkvm_curves::traits::{AffineCurve, PairingCurve, PairingEngine, ProjectiveCurve}; use snarkvm_fields::{One, Zero}; -use anyhow::{bail, ensure, Result}; +use anyhow::{Result, bail, ensure}; use core::{convert::TryInto, marker::PhantomData, ops::Mul}; use rand_core::{RngCore, SeedableRng}; use std::{ @@ -685,7 +685,7 @@ mod tests { use super::{CommitterKey, SonicKZG10}; use crate::{crypto_hash::PoseidonSponge, polycommit::test_templates::*}; use snarkvm_curves::bls12_377::{Bls12_377, Fq}; - use snarkvm_utilities::{rand::TestRng, FromBytes, ToBytes}; + use snarkvm_utilities::{FromBytes, ToBytes, rand::TestRng}; use rand::distributions::Distribution; diff --git a/algorithms/src/polycommit/sonic_pc/polynomial.rs b/algorithms/src/polycommit/sonic_pc/polynomial.rs index 755379f1e1..912905e35d 100644 --- a/algorithms/src/polycommit/sonic_pc/polynomial.rs +++ b/algorithms/src/polycommit/sonic_pc/polynomial.rs @@ -16,7 +16,7 @@ use super::PolynomialLabel; use crate::fft::{DensePolynomial, EvaluationDomain, Evaluations as EvaluationsOnDomain, Polynomial, SparsePolynomial}; use snarkvm_fields::{Field, PrimeField}; -use snarkvm_utilities::{cfg_iter, cfg_iter_mut, CanonicalDeserialize, CanonicalSerialize}; +use snarkvm_utilities::{CanonicalDeserialize, CanonicalSerialize, cfg_iter, cfg_iter_mut}; use anyhow::Result; use std::borrow::Cow; diff --git a/algorithms/src/polycommit/test_templates.rs b/algorithms/src/polycommit/test_templates.rs index ec03ccf4f7..47288962ff 100644 --- a/algorithms/src/polycommit/test_templates.rs +++ b/algorithms/src/polycommit/test_templates.rs @@ -25,13 +25,13 @@ use super::sonic_pc::{ SonicKZG10, }; use crate::{ + AlgebraicSponge, fft::DensePolynomial, polycommit::{ - sonic_pc::{LabeledPolynomial, LabeledPolynomialWithBasis, LinearCombination}, PCError, + sonic_pc::{LabeledPolynomial, LabeledPolynomialWithBasis, LinearCombination}, }, srs::UniversalVerifier, - AlgebraicSponge, }; use snarkvm_curves::PairingEngine; use snarkvm_fields::{One, Zero}; @@ -39,8 +39,8 @@ use snarkvm_utilities::rand::{TestRng, Uniform}; use itertools::Itertools; use rand::{ - distributions::{self, Distribution}, Rng, + distributions::{self, Distribution}, }; use std::marker::PhantomData; diff --git a/algorithms/src/r1cs/constraint_counter.rs b/algorithms/src/r1cs/constraint_counter.rs index 61d4162f71..af59d4626c 100644 --- a/algorithms/src/r1cs/constraint_counter.rs +++ b/algorithms/src/r1cs/constraint_counter.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::r1cs::{errors::SynthesisError, ConstraintSystem, Index, LinearCombination, Variable}; +use crate::r1cs::{ConstraintSystem, Index, LinearCombination, Variable, errors::SynthesisError}; use snarkvm_fields::Field; /// Constraint counter for testing purposes. diff --git a/algorithms/src/r1cs/constraint_system.rs b/algorithms/src/r1cs/constraint_system.rs index 669dfb10b0..1c9ac45a09 100644 --- a/algorithms/src/r1cs/constraint_system.rs +++ b/algorithms/src/r1cs/constraint_system.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::r1cs::{errors::SynthesisError, Index, LinearCombination, Namespace, Variable}; +use crate::r1cs::{Index, LinearCombination, Namespace, Variable, errors::SynthesisError}; use snarkvm_fields::Field; use std::marker::PhantomData; diff --git a/algorithms/src/r1cs/namespace.rs b/algorithms/src/r1cs/namespace.rs index fa825aeffb..cb863d1c2f 100644 --- a/algorithms/src/r1cs/namespace.rs +++ b/algorithms/src/r1cs/namespace.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::r1cs::{errors::SynthesisError, ConstraintSystem, LinearCombination, Variable}; +use crate::r1cs::{ConstraintSystem, LinearCombination, Variable, errors::SynthesisError}; use snarkvm_fields::Field; use std::marker::PhantomData; diff --git a/algorithms/src/r1cs/test_constraint_checker.rs b/algorithms/src/r1cs/test_constraint_checker.rs index 0c3626c3d7..04fadafe58 100644 --- a/algorithms/src/r1cs/test_constraint_checker.rs +++ b/algorithms/src/r1cs/test_constraint_checker.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::r1cs::{errors::SynthesisError, ConstraintSystem, Index, LinearCombination, Variable}; +use crate::r1cs::{ConstraintSystem, Index, LinearCombination, Variable, errors::SynthesisError}; use snarkvm_fields::Field; /// Constraint system for testing purposes. diff --git a/algorithms/src/r1cs/test_constraint_system.rs b/algorithms/src/r1cs/test_constraint_system.rs index 64681b8cad..267ae50a45 100644 --- a/algorithms/src/r1cs/test_constraint_system.rs +++ b/algorithms/src/r1cs/test_constraint_system.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::r1cs::{errors::SynthesisError, ConstraintSystem, Index, LinearCombination, OptionalVec, Variable}; +use crate::r1cs::{ConstraintSystem, Index, LinearCombination, OptionalVec, Variable, errors::SynthesisError}; use snarkvm_fields::Field; use cfg_if::cfg_if; use fxhash::{FxBuildHasher, FxHashMap}; -use indexmap::{map::Entry, IndexMap, IndexSet}; +use indexmap::{IndexMap, IndexSet, map::Entry}; use itertools::Itertools; /// This field is the scalar field (Fr) of BLS12-377. diff --git a/algorithms/src/snark/varuna/ahp/ahp.rs b/algorithms/src/snark/varuna/ahp/ahp.rs index f7e1818a53..dca44cab16 100644 --- a/algorithms/src/snark/varuna/ahp/ahp.rs +++ b/algorithms/src/snark/varuna/ahp/ahp.rs @@ -15,20 +15,20 @@ use crate::{ fft::{ - domain::{FFTPrecomputation, IFFTPrecomputation}, EvaluationDomain, + domain::{FFTPrecomputation, IFFTPrecomputation}, }, polycommit::sonic_pc::{LCTerm, LabeledPolynomial, LinearCombination}, r1cs::SynthesisError, snark::varuna::{ - ahp::{verifier, AHPError, CircuitId, CircuitInfo}, + SNARKMode, + ahp::{AHPError, CircuitId, CircuitInfo, verifier}, prover, selectors::precompute_selectors, verifier::QueryPoints, - SNARKMode, }, }; -use anyhow::{anyhow, ensure, Result}; +use anyhow::{Result, anyhow, ensure}; use snarkvm_fields::{Field, PrimeField}; use core::{borrow::Borrow, marker::PhantomData}; diff --git a/algorithms/src/snark/varuna/ahp/indexer/circuit.rs b/algorithms/src/snark/varuna/ahp/indexer/circuit.rs index 06bbda5f37..fb48461b83 100644 --- a/algorithms/src/snark/varuna/ahp/indexer/circuit.rs +++ b/algorithms/src/snark/varuna/ahp/indexer/circuit.rs @@ -17,24 +17,24 @@ use core::marker::PhantomData; use crate::{ fft::{ - domain::{FFTPrecomputation, IFFTPrecomputation}, EvaluationDomain, + domain::{FFTPrecomputation, IFFTPrecomputation}, }, polycommit::sonic_pc::LabeledPolynomial, snark::varuna::{ - ahp::matrices::MatrixEvals, - matrices::MatrixArithmetization, AHPForR1CS, CircuitInfo, Matrix, SNARKMode, + ahp::matrices::MatrixEvals, + matrices::MatrixArithmetization, }, }; -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; use blake2::Digest; use hex::FromHex; use snarkvm_fields::PrimeField; -use snarkvm_utilities::{serialize::*, SerializationError}; +use snarkvm_utilities::{SerializationError, serialize::*}; #[derive(Copy, Clone, Debug, PartialEq, Eq, Ord, PartialOrd, CanonicalSerialize, CanonicalDeserialize)] pub struct CircuitId(pub [u8; 32]); diff --git a/algorithms/src/snark/varuna/ahp/indexer/circuit_info.rs b/algorithms/src/snark/varuna/ahp/indexer/circuit_info.rs index 32a464815f..cb586e5cc4 100644 --- a/algorithms/src/snark/varuna/ahp/indexer/circuit_info.rs +++ b/algorithms/src/snark/varuna/ahp/indexer/circuit_info.rs @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::snark::varuna::{ahp::AHPForR1CS, SNARKMode}; +use crate::snark::varuna::{SNARKMode, ahp::AHPForR1CS}; use anyhow::Result; use snarkvm_fields::PrimeField; -use snarkvm_utilities::{serialize::*, ToBytes}; +use snarkvm_utilities::{ToBytes, serialize::*}; /// Information about the circuit, including the field of definition, the number of /// variables, the number of constraints, and the maximum number of non-zero diff --git a/algorithms/src/snark/varuna/ahp/indexer/constraint_system.rs b/algorithms/src/snark/varuna/ahp/indexer/constraint_system.rs index ce293d1d43..2bc8e5a59a 100644 --- a/algorithms/src/snark/varuna/ahp/indexer/constraint_system.rs +++ b/algorithms/src/snark/varuna/ahp/indexer/constraint_system.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::r1cs::{errors::SynthesisError, ConstraintSystem as CS, Index as VarIndex, LinearCombination, Variable}; +use crate::r1cs::{ConstraintSystem as CS, Index as VarIndex, LinearCombination, Variable, errors::SynthesisError}; use snarkvm_fields::Field; use snarkvm_utilities::serialize::*; diff --git a/algorithms/src/snark/varuna/ahp/indexer/indexer.rs b/algorithms/src/snark/varuna/ahp/indexer/indexer.rs index d4cedaeb4d..1bdb09633d 100644 --- a/algorithms/src/snark/varuna/ahp/indexer/indexer.rs +++ b/algorithms/src/snark/varuna/ahp/indexer/indexer.rs @@ -16,21 +16,21 @@ use crate::{ fft::EvaluationDomain, polycommit::sonic_pc::{LinearCombination, PolynomialInfo, PolynomialLabel}, - r1cs::{errors::SynthesisError, ConstraintSynthesizer}, + r1cs::{ConstraintSynthesizer, errors::SynthesisError}, snark::varuna::{ + SNARKMode, ahp::{ - indexer::{Circuit, CircuitId, CircuitInfo, ConstraintSystem as IndexerConstraintSystem}, AHPForR1CS, + indexer::{Circuit, CircuitId, CircuitInfo, ConstraintSystem as IndexerConstraintSystem}, }, - matrices::{into_matrix_helper, matrix_evals, MatrixEvals}, + matrices::{MatrixEvals, into_matrix_helper, matrix_evals}, num_non_zero, - SNARKMode, }, }; use snarkvm_fields::PrimeField; use snarkvm_utilities::cfg_into_iter; -use anyhow::{anyhow, ensure, Result}; +use anyhow::{Result, anyhow, ensure}; use core::marker::PhantomData; use itertools::Itertools; use std::collections::BTreeMap; diff --git a/algorithms/src/snark/varuna/ahp/matrices.rs b/algorithms/src/snark/varuna/ahp/matrices.rs index c055cf8bc1..4f57b78d9b 100644 --- a/algorithms/src/snark/varuna/ahp/matrices.rs +++ b/algorithms/src/snark/varuna/ahp/matrices.rs @@ -20,14 +20,14 @@ use crate::{ polycommit::sonic_pc::LabeledPolynomial, r1cs::{ConstraintSystem, Index as VarIndex}, snark::varuna::{ - ahp::{indexer::Matrix, AHPForR1CS, CircuitId}, VarunaHidingMode, + ahp::{AHPForR1CS, CircuitId, indexer::Matrix}, }, }; use snarkvm_fields::{Field, PrimeField}; use snarkvm_utilities::{cfg_into_iter, cfg_iter, cfg_iter_mut, serialize::*}; -use anyhow::{anyhow, ensure, Result}; +use anyhow::{Result, anyhow, ensure}; #[cfg(feature = "serial")] use itertools::Itertools; diff --git a/algorithms/src/snark/varuna/ahp/prover/constraint_system.rs b/algorithms/src/snark/varuna/ahp/prover/constraint_system.rs index 3d49058d90..dcd046a519 100644 --- a/algorithms/src/snark/varuna/ahp/prover/constraint_system.rs +++ b/algorithms/src/snark/varuna/ahp/prover/constraint_system.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::r1cs::{errors::SynthesisError, ConstraintSystem as CS, Index as VarIndex, LinearCombination, Variable}; +use crate::r1cs::{ConstraintSystem as CS, Index as VarIndex, LinearCombination, Variable, errors::SynthesisError}; use snarkvm_fields::Field; pub(crate) struct ConstraintSystem { diff --git a/algorithms/src/snark/varuna/ahp/prover/message.rs b/algorithms/src/snark/varuna/ahp/prover/message.rs index e5b6e5a8c8..b97e17eb60 100644 --- a/algorithms/src/snark/varuna/ahp/prover/message.rs +++ b/algorithms/src/snark/varuna/ahp/prover/message.rs @@ -15,9 +15,9 @@ use std::collections::BTreeMap; -use crate::snark::varuna::{verifier::BatchCombiners, CircuitId}; +use crate::snark::varuna::{CircuitId, verifier::BatchCombiners}; use snarkvm_fields::PrimeField; -use snarkvm_utilities::{error, serialize::*, ToBytes, Write}; +use snarkvm_utilities::{ToBytes, Write, error, serialize::*}; #[derive(Clone, Debug, Default, PartialEq, Eq, CanonicalSerialize, CanonicalDeserialize)] pub struct MatrixSums { diff --git a/algorithms/src/snark/varuna/ahp/prover/round_functions/fifth.rs b/algorithms/src/snark/varuna/ahp/prover/round_functions/fifth.rs index b1f86293e9..ee695bc4c0 100644 --- a/algorithms/src/snark/varuna/ahp/prover/round_functions/fifth.rs +++ b/algorithms/src/snark/varuna/ahp/prover/round_functions/fifth.rs @@ -19,9 +19,9 @@ use crate::{ fft::DensePolynomial, polycommit::sonic_pc::{LabeledPolynomial, PolynomialInfo, PolynomialLabel}, snark::varuna::{ - ahp::{verifier, AHPError, AHPForR1CS}, - prover, SNARKMode, + ahp::{AHPError, AHPForR1CS, verifier}, + prover, }, }; use snarkvm_fields::PrimeField; diff --git a/algorithms/src/snark/varuna/ahp/prover/round_functions/first.rs b/algorithms/src/snark/varuna/ahp/prover/round_functions/first.rs index d6292eb7ec..35787e0ec6 100644 --- a/algorithms/src/snark/varuna/ahp/prover/round_functions/first.rs +++ b/algorithms/src/snark/varuna/ahp/prover/round_functions/first.rs @@ -17,12 +17,12 @@ use crate::{ fft::{DensePolynomial, EvaluationDomain, Evaluations as EvaluationsOnDomain, SparsePolynomial}, polycommit::sonic_pc::{LabeledPolynomial, PolynomialInfo, PolynomialLabel}, snark::varuna::{ - ahp::{AHPError, AHPForR1CS}, - prover, - witness_label, Circuit, CircuitId, SNARKMode, + ahp::{AHPError, AHPForR1CS}, + prover, + witness_label, }, }; use snarkvm_fields::PrimeField; diff --git a/algorithms/src/snark/varuna/ahp/prover/round_functions/fourth.rs b/algorithms/src/snark/varuna/ahp/prover/round_functions/fourth.rs index 04e7bc2386..840b421bd6 100644 --- a/algorithms/src/snark/varuna/ahp/prover/round_functions/fourth.rs +++ b/algorithms/src/snark/varuna/ahp/prover/round_functions/fourth.rs @@ -15,24 +15,24 @@ use crate::{ fft::{ - domain::{FFTPrecomputation, IFFTPrecomputation}, - polynomial::PolyMultiplier, DensePolynomial, EvaluationDomain, Evaluations as EvaluationsOnDomain, + domain::{FFTPrecomputation, IFFTPrecomputation}, + polynomial::PolyMultiplier, }, polycommit::sonic_pc::{LabeledPolynomial, PolynomialInfo, PolynomialLabel}, snark::varuna::{ - ahp::{indexer::CircuitInfo, verifier, AHPError, AHPForR1CS, CircuitId}, + SNARKMode, + ahp::{AHPError, AHPForR1CS, CircuitId, indexer::CircuitInfo, verifier}, matrices::MatrixEvals, prover, selectors::apply_randomized_selector, witness_label, - SNARKMode, }, }; -use snarkvm_fields::{batch_inversion_and_mul, PrimeField}; -use snarkvm_utilities::{cfg_iter, cfg_iter_mut, ExecutionPool}; +use snarkvm_fields::{PrimeField, batch_inversion_and_mul}; +use snarkvm_utilities::{ExecutionPool, cfg_iter, cfg_iter_mut}; use anyhow::Result; use core::convert::TryInto; diff --git a/algorithms/src/snark/varuna/ahp/prover/round_functions/mod.rs b/algorithms/src/snark/varuna/ahp/prover/round_functions/mod.rs index ea44c75845..67694956cb 100644 --- a/algorithms/src/snark/varuna/ahp/prover/round_functions/mod.rs +++ b/algorithms/src/snark/varuna/ahp/prover/round_functions/mod.rs @@ -16,9 +16,9 @@ use crate::{ r1cs::ConstraintSynthesizer, snark::varuna::{ - ahp::{indexer::Circuit, AHPError, AHPForR1CS}, - prover, SNARKMode, + ahp::{AHPError, AHPForR1CS, indexer::Circuit}, + prover, }, }; use snarkvm_fields::PrimeField; diff --git a/algorithms/src/snark/varuna/ahp/prover/round_functions/second.rs b/algorithms/src/snark/varuna/ahp/prover/round_functions/second.rs index 00b6ca1132..46538ef089 100644 --- a/algorithms/src/snark/varuna/ahp/prover/round_functions/second.rs +++ b/algorithms/src/snark/varuna/ahp/prover/round_functions/second.rs @@ -16,22 +16,22 @@ use std::collections::BTreeMap; use crate::{ - fft::{polynomial::PolyMultiplier, DensePolynomial, EvaluationDomain, Evaluations as EvaluationsOnDomain}, + fft::{DensePolynomial, EvaluationDomain, Evaluations as EvaluationsOnDomain, polynomial::PolyMultiplier}, polycommit::sonic_pc::{LabeledPolynomial, PolynomialInfo, PolynomialLabel}, snark::varuna::{ - ahp::{verifier, AHPForR1CS}, - prover, - selectors::apply_randomized_selector, - witness_label, Circuit, CircuitId, SNARKMode, + ahp::{AHPForR1CS, verifier}, + prover, + selectors::apply_randomized_selector, + witness_label, }, }; use anyhow::Result; use rand_core::RngCore; use snarkvm_fields::PrimeField; -use snarkvm_utilities::{cfg_into_iter, cfg_iter_mut, cfg_reduce, ExecutionPool}; +use snarkvm_utilities::{ExecutionPool, cfg_into_iter, cfg_iter_mut, cfg_reduce}; #[cfg(not(feature = "serial"))] use rayon::prelude::*; diff --git a/algorithms/src/snark/varuna/ahp/prover/round_functions/third.rs b/algorithms/src/snark/varuna/ahp/prover/round_functions/third.rs index 42187cc454..674c13b036 100644 --- a/algorithms/src/snark/varuna/ahp/prover/round_functions/third.rs +++ b/algorithms/src/snark/varuna/ahp/prover/round_functions/third.rs @@ -15,27 +15,27 @@ use crate::{ fft::{ - domain::{FFTPrecomputation, IFFTPrecomputation}, - polynomial::PolyMultiplier, DensePolynomial, EvaluationDomain, Evaluations, + domain::{FFTPrecomputation, IFFTPrecomputation}, + polynomial::PolyMultiplier, }, polycommit::sonic_pc::{LabeledPolynomial, PolynomialInfo, PolynomialLabel}, snark::varuna::{ - ahp::{indexer::CircuitId, verifier, AHPForR1CS}, - matrices::transpose, - prover::{self, MatrixSums, ThirdMessage}, - selectors::apply_randomized_selector, AHPError, Matrix, SNARKMode, + ahp::{AHPForR1CS, indexer::CircuitId, verifier}, + matrices::transpose, + prover::{self, MatrixSums, ThirdMessage}, + selectors::apply_randomized_selector, }, }; use snarkvm_fields::PrimeField; -use snarkvm_utilities::{cfg_iter, ExecutionPool}; +use snarkvm_utilities::{ExecutionPool, cfg_iter}; -use anyhow::{ensure, Result}; +use anyhow::{Result, ensure}; use itertools::Itertools; use rand_core::RngCore; use std::collections::BTreeMap; diff --git a/algorithms/src/snark/varuna/ahp/selectors.rs b/algorithms/src/snark/varuna/ahp/selectors.rs index bb07e92ef9..a202e51222 100644 --- a/algorithms/src/snark/varuna/ahp/selectors.rs +++ b/algorithms/src/snark/varuna/ahp/selectors.rs @@ -15,10 +15,10 @@ use super::verifier::QueryPoints; use crate::fft::{DensePolynomial, EvaluationDomain}; -use snarkvm_fields::{batch_inversion, PrimeField}; +use snarkvm_fields::{PrimeField, batch_inversion}; use snarkvm_utilities::{cfg_into_iter, cfg_iter_mut, serialize::*}; -use anyhow::{ensure, Result}; +use anyhow::{Result, ensure}; use itertools::Itertools; use std::collections::{BTreeMap, HashSet}; diff --git a/algorithms/src/snark/varuna/ahp/verifier/messages.rs b/algorithms/src/snark/varuna/ahp/verifier/messages.rs index ac9f3209c7..9b995415b3 100644 --- a/algorithms/src/snark/varuna/ahp/verifier/messages.rs +++ b/algorithms/src/snark/varuna/ahp/verifier/messages.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::snark::varuna::{witness_label, CircuitId, SNARKMode}; +use crate::snark::varuna::{CircuitId, SNARKMode, witness_label}; use snarkvm_fields::PrimeField; use itertools::Itertools; diff --git a/algorithms/src/snark/varuna/ahp/verifier/state.rs b/algorithms/src/snark/varuna/ahp/verifier/state.rs index e321f35352..486f31e4da 100644 --- a/algorithms/src/snark/varuna/ahp/verifier/state.rs +++ b/algorithms/src/snark/varuna/ahp/verifier/state.rs @@ -18,9 +18,9 @@ use core::marker::PhantomData; use crate::{ fft::EvaluationDomain, snark::varuna::{ - ahp::verifier::{FirstMessage, FourthMessage, SecondMessage, ThirdMessage}, CircuitId, SNARKMode, + ahp::verifier::{FirstMessage, FourthMessage, SecondMessage, ThirdMessage}, }, }; use snarkvm_fields::PrimeField; diff --git a/algorithms/src/snark/varuna/ahp/verifier/verifier.rs b/algorithms/src/snark/varuna/ahp/verifier/verifier.rs index e56abb2bc6..935778eb26 100644 --- a/algorithms/src/snark/varuna/ahp/verifier/verifier.rs +++ b/algorithms/src/snark/varuna/ahp/verifier/verifier.rs @@ -16,20 +16,20 @@ use core::marker::PhantomData; use crate::{ + AlgebraicSponge, fft::EvaluationDomain, snark::varuna::{ + SNARKMode, ahp::{ - indexer::{CircuitId, CircuitInfo}, - verifier::{BatchCombiners, FirstMessage, FourthMessage, QuerySet, SecondMessage, State, ThirdMessage}, AHPError, AHPForR1CS, + indexer::{CircuitId, CircuitInfo}, + verifier::{BatchCombiners, FirstMessage, FourthMessage, QuerySet, SecondMessage, State, ThirdMessage}, }, verifier::CircuitSpecificState, - SNARKMode, }, - AlgebraicSponge, }; -use anyhow::{ensure, Result}; +use anyhow::{Result, ensure}; use smallvec::SmallVec; use snarkvm_fields::PrimeField; use std::collections::BTreeMap; diff --git a/algorithms/src/snark/varuna/data_structures/certificate.rs b/algorithms/src/snark/varuna/data_structures/certificate.rs index 87f9a008f2..48511857d9 100644 --- a/algorithms/src/snark/varuna/data_structures/certificate.rs +++ b/algorithms/src/snark/varuna/data_structures/certificate.rs @@ -16,11 +16,11 @@ use crate::polycommit::sonic_pc; use snarkvm_curves::PairingEngine; use snarkvm_utilities::{ + FromBytes, + ToBytes, error, io::{self, Read, Write}, serialize::*, - FromBytes, - ToBytes, }; /// A certificate for the verifying key. diff --git a/algorithms/src/snark/varuna/data_structures/circuit_proving_key.rs b/algorithms/src/snark/varuna/data_structures/circuit_proving_key.rs index 688f63ea44..789be2ba68 100644 --- a/algorithms/src/snark/varuna/data_structures/circuit_proving_key.rs +++ b/algorithms/src/snark/varuna/data_structures/circuit_proving_key.rs @@ -15,14 +15,14 @@ use crate::{ polycommit::sonic_pc, - snark::varuna::{ahp::indexer::*, CircuitVerifyingKey, SNARKMode}, + snark::varuna::{CircuitVerifyingKey, SNARKMode, ahp::indexer::*}, }; use snarkvm_curves::PairingEngine; use snarkvm_utilities::{ - io::{self, Read, Write}, - serialize::*, FromBytes, ToBytes, + io::{self, Read, Write}, + serialize::*, }; use std::{cmp::Ordering, sync::Arc}; diff --git a/algorithms/src/snark/varuna/data_structures/circuit_verifying_key.rs b/algorithms/src/snark/varuna/data_structures/circuit_verifying_key.rs index e09a36fc01..186b2cc3d1 100644 --- a/algorithms/src/snark/varuna/data_structures/circuit_verifying_key.rs +++ b/algorithms/src/snark/varuna/data_structures/circuit_verifying_key.rs @@ -16,19 +16,19 @@ use crate::{polycommit::sonic_pc, snark::varuna::ahp::indexer::*}; use snarkvm_curves::PairingEngine; use snarkvm_utilities::{ - error, - io::{self, Read, Write}, - serialize::*, - string::String, FromBytes, FromBytesDeserializer, ToBytes, ToBytesSerializer, + error, + io::{self, Read, Write}, + serialize::*, + string::String, }; use anyhow::Result; use core::{fmt, str::FromStr}; -use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; +use serde::{Deserialize, Deserializer, Serialize, Serializer, de}; use std::cmp::Ordering; /// Verification key for a specific index (i.e., R1CS matrices). diff --git a/algorithms/src/snark/varuna/data_structures/proof.rs b/algorithms/src/snark/varuna/data_structures/proof.rs index faaac6a0da..d2c4c9c831 100644 --- a/algorithms/src/snark/varuna/data_structures/proof.rs +++ b/algorithms/src/snark/varuna/data_structures/proof.rs @@ -14,20 +14,20 @@ // limitations under the License. use crate::{ - polycommit::sonic_pc, - snark::varuna::{ahp, CircuitId}, SNARKError, + polycommit::sonic_pc, + snark::varuna::{CircuitId, ahp}, }; use ahp::prover::{FourthMessage, ThirdMessage}; use snarkvm_curves::PairingEngine; use snarkvm_fields::PrimeField; use snarkvm_utilities::{ + FromBytes, + ToBytes, error, io::{self, Read, Write}, serialize::*, - FromBytes, - ToBytes, }; use std::collections::BTreeMap; @@ -393,8 +393,8 @@ mod test { snark::varuna::prover::MatrixSums, }; use snarkvm_curves::{ - bls12_377::{Bls12_377, Fr, G1Affine}, AffineCurve, + bls12_377::{Bls12_377, Fr, G1Affine}, }; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/algorithms/src/snark/varuna/tests.rs b/algorithms/src/snark/varuna/tests.rs index 10d760dd64..ef8fe24049 100644 --- a/algorithms/src/snark/varuna/tests.rs +++ b/algorithms/src/snark/varuna/tests.rs @@ -17,13 +17,13 @@ mod varuna { use crate::{ snark::varuna::{ - mode::SNARKMode, - test_circuit::TestCircuit, AHPForR1CS, CircuitVerifyingKey, VarunaHidingMode, VarunaNonHidingMode, VarunaSNARK, + mode::SNARKMode, + test_circuit::TestCircuit, }, traits::{AlgebraicSponge, SNARK}, }; @@ -32,8 +32,8 @@ mod varuna { use snarkvm_curves::bls12_377::{Bls12_377, Fq, Fr}; use snarkvm_utilities::{ - rand::{TestRng, Uniform}, ToBytes, + rand::{TestRng, Uniform}, }; type FS = crate::crypto_hash::PoseidonSponge; @@ -305,19 +305,19 @@ mod varuna_hiding { use crate::{ crypto_hash::PoseidonSponge, snark::varuna::{ - ahp::AHPForR1CS, - test_circuit::TestCircuit, CircuitVerifyingKey, VarunaHidingMode, VarunaSNARK, + ahp::AHPForR1CS, + test_circuit::TestCircuit, }, traits::{AlgebraicSponge, SNARK}, }; use snarkvm_curves::bls12_377::{Bls12_377, Fq, Fr}; use snarkvm_utilities::{ - rand::{TestRng, Uniform}, FromBytes, ToBytes, + rand::{TestRng, Uniform}, }; use std::str::FromStr; @@ -533,7 +533,7 @@ mod varuna_hiding { mod varuna_test_vectors { use crate::{ fft::EvaluationDomain, - snark::varuna::{ahp::verifier, AHPForR1CS, TestCircuit, VarunaNonHidingMode, VarunaSNARK}, + snark::varuna::{AHPForR1CS, TestCircuit, VarunaNonHidingMode, VarunaSNARK, ahp::verifier}, traits::snark::SNARK, }; use snarkvm_curves::bls12_377::{Bls12_377, Fq, Fr}; diff --git a/algorithms/src/snark/varuna/varuna.rs b/algorithms/src/snark/varuna/varuna.rs index 76d0959033..d14bc6a78d 100644 --- a/algorithms/src/snark/varuna/varuna.rs +++ b/algorithms/src/snark/varuna/varuna.rs @@ -15,6 +15,9 @@ use super::Certificate; use crate::{ + AlgebraicSponge, + SNARK, + SNARKError, fft::EvaluationDomain, polycommit::sonic_pc::{ Commitment, @@ -27,27 +30,24 @@ use crate::{ }, r1cs::{ConstraintSynthesizer, SynthesisError}, snark::varuna::{ - ahp::{AHPError, AHPForR1CS, CircuitId, EvaluationsProvider}, - proof, - prover, - witness_label, CircuitProvingKey, CircuitVerifyingKey, Proof, SNARKMode, UniversalSRS, + ahp::{AHPError, AHPForR1CS, CircuitId, EvaluationsProvider}, + proof, + prover, + witness_label, }, srs::UniversalVerifier, - AlgebraicSponge, - SNARKError, - SNARK, }; use rand::RngCore; use snarkvm_curves::PairingEngine; use snarkvm_fields::{One, PrimeField, ToConstraintField, Zero}; -use snarkvm_utilities::{to_bytes_le, ToBytes}; +use snarkvm_utilities::{ToBytes, to_bytes_le}; -use anyhow::{anyhow, bail, ensure, Result}; +use anyhow::{Result, anyhow, bail, ensure}; use core::marker::PhantomData; use itertools::Itertools; use rand::{CryptoRng, Rng}; diff --git a/algorithms/src/traits/snark.rs b/algorithms/src/traits/snark.rs index 4df74c52e0..cbf1ea6087 100644 --- a/algorithms/src/traits/snark.rs +++ b/algorithms/src/traits/snark.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{r1cs::ConstraintSynthesizer, AlgebraicSponge}; +use crate::{AlgebraicSponge, r1cs::ConstraintSynthesizer}; use snarkvm_fields::PrimeField; use snarkvm_utilities::{CanonicalDeserialize, CanonicalSerialize, FromBytes, ToBytes}; diff --git a/circuit/Cargo.toml b/circuit/Cargo.toml index 10cbf1f459..d602ae10e9 100644 --- a/circuit/Cargo.toml +++ b/circuit/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Circuits for a decentralized virtual machine" homepage = "https://aleo.org" @@ -25,28 +25,28 @@ edition = "2021" [dependencies.snarkvm-circuit-account] path = "./account" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-algorithms] path = "./algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-collections] path = "./collections" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-environment] path = "./environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-network] path = "./network" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-program] path = "./program" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types] path = "./types" -version = "=0.16.19" +version = "=1.0.0" diff --git a/circuit/account/Cargo.toml b/circuit/account/Cargo.toml index 9cf595ceac..c4fd74edef 100644 --- a/circuit/account/Cargo.toml +++ b/circuit/account/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-account" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Account circuit library for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,20 +11,20 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-account" path = "../../console/account" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-algorithms] path = "../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-network] path = "../network" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.snarkvm-utilities] path = "../../utilities" diff --git a/circuit/account/src/compute_key/from.rs b/circuit/account/src/compute_key/from.rs index b03f6062c3..d9f36f9d54 100644 --- a/circuit/account/src/compute_key/from.rs +++ b/circuit/account/src/compute_key/from.rs @@ -28,7 +28,7 @@ impl From<(Group, Group)> for ComputeKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; use snarkvm_circuit_network::AleoV0; diff --git a/circuit/account/src/compute_key/from_private_key.rs b/circuit/account/src/compute_key/from_private_key.rs index 8cf4fce6a1..96488f04ea 100644 --- a/circuit/account/src/compute_key/from_private_key.rs +++ b/circuit/account/src/compute_key/from_private_key.rs @@ -36,7 +36,7 @@ impl ComputeKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/compute_key/mod.rs b/circuit/account/src/compute_key/mod.rs index bd176c3f65..21f8640ea7 100644 --- a/circuit/account/src/compute_key/mod.rs +++ b/circuit/account/src/compute_key/mod.rs @@ -25,7 +25,7 @@ use snarkvm_circuit_types::environment::{assert_count, assert_output_mode, asser use crate::PrivateKey; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Address, Boolean, Field, Group, Scalar}; +use snarkvm_circuit_types::{Address, Boolean, Field, Group, Scalar, environment::prelude::*}; #[derive(Clone)] pub struct ComputeKey { @@ -90,7 +90,7 @@ impl Eject for ComputeKey { #[cfg(all(test, console))] pub(crate) mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/compute_key/to_address.rs b/circuit/account/src/compute_key/to_address.rs index 9eac436cbe..4f34c62a48 100644 --- a/circuit/account/src/compute_key/to_address.rs +++ b/circuit/account/src/compute_key/to_address.rs @@ -28,7 +28,7 @@ impl ComputeKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/graph_key/mod.rs b/circuit/account/src/graph_key/mod.rs index 577a1326ed..4cfd64ef08 100644 --- a/circuit/account/src/graph_key/mod.rs +++ b/circuit/account/src/graph_key/mod.rs @@ -17,7 +17,7 @@ use snarkvm_circuit_types::environment::assert_scope; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Field}; +use snarkvm_circuit_types::{Field, environment::prelude::*}; pub struct GraphKey { /// The graph key `sk_tag` := Hash(view_key || ctr). @@ -65,7 +65,7 @@ impl Eject for GraphKey { #[cfg(all(test, console))] pub(crate) mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/private_key/mod.rs b/circuit/account/src/private_key/mod.rs index 941ec182c8..14df2759ee 100644 --- a/circuit/account/src/private_key/mod.rs +++ b/circuit/account/src/private_key/mod.rs @@ -21,7 +21,7 @@ use snarkvm_circuit_types::environment::assert_scope; use crate::{ComputeKey, ViewKey}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Scalar}; +use snarkvm_circuit_types::{Scalar, environment::prelude::*}; pub struct PrivateKey { /// The signature secret key. @@ -70,7 +70,7 @@ impl Eject for PrivateKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/private_key/to_compute_key.rs b/circuit/account/src/private_key/to_compute_key.rs index 044d56b686..491a4b966d 100644 --- a/circuit/account/src/private_key/to_compute_key.rs +++ b/circuit/account/src/private_key/to_compute_key.rs @@ -25,7 +25,7 @@ impl PrivateKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/private_key/to_view_key.rs b/circuit/account/src/private_key/to_view_key.rs index b1ab3bee83..963b06f7ca 100644 --- a/circuit/account/src/private_key/to_view_key.rs +++ b/circuit/account/src/private_key/to_view_key.rs @@ -25,7 +25,7 @@ impl PrivateKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/signature/mod.rs b/circuit/account/src/signature/mod.rs index d9cdfbab42..3fcb2b7d49 100644 --- a/circuit/account/src/signature/mod.rs +++ b/circuit/account/src/signature/mod.rs @@ -23,7 +23,7 @@ use snarkvm_circuit_types::environment::{assert_count, assert_output_mode, asser use crate::ComputeKey; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Address, Boolean, Field, Scalar}; +use snarkvm_circuit_types::{Address, Boolean, Field, Scalar, environment::prelude::*}; #[derive(Clone)] pub struct Signature { @@ -143,7 +143,7 @@ impl Display for Signature { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use snarkvm_utilities::{TestRng, Uniform}; use anyhow::Result; diff --git a/circuit/account/src/signature/verify.rs b/circuit/account/src/signature/verify.rs index de4447eb7f..f0c78c257c 100644 --- a/circuit/account/src/signature/verify.rs +++ b/circuit/account/src/signature/verify.rs @@ -45,7 +45,7 @@ impl Signature { #[cfg(all(test, console))] pub(crate) mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use snarkvm_circuit_types::Group; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/circuit/account/src/view_key/from_private_key.rs b/circuit/account/src/view_key/from_private_key.rs index 3117bae833..53b135fdd6 100644 --- a/circuit/account/src/view_key/from_private_key.rs +++ b/circuit/account/src/view_key/from_private_key.rs @@ -28,7 +28,7 @@ impl ViewKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/view_key/mod.rs b/circuit/account/src/view_key/mod.rs index 31dc134f3d..207dd50db6 100644 --- a/circuit/account/src/view_key/mod.rs +++ b/circuit/account/src/view_key/mod.rs @@ -21,7 +21,7 @@ use snarkvm_circuit_types::environment::assert_scope; use crate::PrivateKey; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Address, Scalar}; +use snarkvm_circuit_types::{Address, Scalar, environment::prelude::*}; use core::ops::Deref; @@ -64,7 +64,7 @@ impl Deref for ViewKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/account/src/view_key/to_address.rs b/circuit/account/src/view_key/to_address.rs index 52f4586979..8a3bdd3c0e 100644 --- a/circuit/account/src/view_key/to_address.rs +++ b/circuit/account/src/view_key/to_address.rs @@ -25,7 +25,7 @@ impl ViewKey { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{helpers::generate_account, Circuit}; + use crate::{Circuit, helpers::generate_account}; use anyhow::Result; diff --git a/circuit/algorithms/Cargo.toml b/circuit/algorithms/Cargo.toml index f3de7bf569..2480979f49 100644 --- a/circuit/algorithms/Cargo.toml +++ b/circuit/algorithms/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-algorithms" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Algorithm circuit library for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,16 +11,16 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-algorithms" path = "../../console/algorithms" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-fields] path = "../../fields" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dev-dependencies.anyhow] diff --git a/circuit/algorithms/src/keccak/mod.rs b/circuit/algorithms/src/keccak/mod.rs index b4e0a4fe73..e14230b75f 100644 --- a/circuit/algorithms/src/keccak/mod.rs +++ b/circuit/algorithms/src/keccak/mod.rs @@ -21,7 +21,7 @@ use snarkvm_circuit_types::environment::assert_scope; use snarkvm_utilities::{TestRng, Uniform}; use crate::Hash; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, U64}; +use snarkvm_circuit_types::{Boolean, U64, environment::prelude::*}; /// The Keccak-224 hash function. pub type Keccak224 = Keccak; diff --git a/circuit/algorithms/src/poseidon/mod.rs b/circuit/algorithms/src/poseidon/mod.rs index 0ab11d0c49..dc537be6f6 100644 --- a/circuit/algorithms/src/poseidon/mod.rs +++ b/circuit/algorithms/src/poseidon/mod.rs @@ -25,7 +25,7 @@ use snarkvm_circuit_types::environment::assert_scope; use snarkvm_utilities::{TestRng, Uniform}; use crate::{Elligator2, Hash, HashMany, HashToGroup, HashToScalar, PRF}; -use snarkvm_circuit_types::{environment::prelude::*, Field, Group, Scalar}; +use snarkvm_circuit_types::{Field, Group, Scalar, environment::prelude::*}; /// Poseidon2 is a cryptographic hash function of input rate 2. pub type Poseidon2 = Poseidon; diff --git a/circuit/collections/Cargo.toml b/circuit/collections/Cargo.toml index f65be996e6..9576e444bb 100644 --- a/circuit/collections/Cargo.toml +++ b/circuit/collections/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-collections" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Collections circuit library for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,16 +11,16 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-collections" path = "../../console/collections" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-algorithms] path = "../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.snarkvm-circuit-network] path = "../network" diff --git a/circuit/collections/src/kary_merkle_tree/helpers/leaf_hash.rs b/circuit/collections/src/kary_merkle_tree/helpers/leaf_hash.rs index ad3c0fe242..8866316105 100644 --- a/circuit/collections/src/kary_merkle_tree/helpers/leaf_hash.rs +++ b/circuit/collections/src/kary_merkle_tree/helpers/leaf_hash.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::*; -use snarkvm_circuit_algorithms::{Hash, Keccak, Poseidon, BHP}; +use snarkvm_circuit_algorithms::{BHP, Hash, Keccak, Poseidon}; /// A trait for a Merkle leaf hash function. pub trait LeafHash { @@ -77,7 +77,7 @@ impl LeafHash for Keccak { @@ -94,7 +94,7 @@ impl PathHash for Kecca #[cfg(all(test, console))] mod tests { use super::*; - use snarkvm_circuit_algorithms::{Keccak256, Poseidon2, Sha3_256, BHP512}; + use snarkvm_circuit_algorithms::{BHP512, Keccak256, Poseidon2, Sha3_256}; use snarkvm_circuit_types::environment::Circuit; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/circuit/collections/src/kary_merkle_tree/mod.rs b/circuit/collections/src/kary_merkle_tree/mod.rs index 13efec3421..608b7ea580 100644 --- a/circuit/collections/src/kary_merkle_tree/mod.rs +++ b/circuit/collections/src/kary_merkle_tree/mod.rs @@ -21,7 +21,7 @@ mod verify; #[cfg(all(test, console))] use snarkvm_circuit_types::environment::assert_scope; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, U16, U64}; +use snarkvm_circuit_types::{Boolean, Field, U16, U64, environment::prelude::*}; pub struct KaryMerklePath, const DEPTH: u8, const ARITY: u8> { /// The leaf index for the path. @@ -82,7 +82,7 @@ impl, const DEPTH: u8, const ARITY: u8> Eject fo mod tests { use super::*; use console::{ - algorithms::{BHP1024 as NativeBHP1024, BHP512 as NativeBHP512}, + algorithms::{BHP512 as NativeBHP512, BHP1024 as NativeBHP1024}, kary_merkle_tree::KaryMerkleTree, }; use snarkvm_circuit_algorithms::BHP512; diff --git a/circuit/collections/src/kary_merkle_tree/verify.rs b/circuit/collections/src/kary_merkle_tree/verify.rs index 4db6ad5d86..2a9a2af031 100644 --- a/circuit/collections/src/kary_merkle_tree/verify.rs +++ b/circuit/collections/src/kary_merkle_tree/verify.rs @@ -106,7 +106,7 @@ impl, const DEPTH: u8, const ARITY: u8> KaryMerk #[cfg(all(test, console))] mod tests { use super::*; - use snarkvm_circuit_algorithms::{Keccak256, Poseidon2, Poseidon4, Sha3_256, BHP1024, BHP512}; + use snarkvm_circuit_algorithms::{BHP512, BHP1024, Keccak256, Poseidon2, Poseidon4, Sha3_256}; use snarkvm_circuit_types::environment::Circuit; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/circuit/collections/src/merkle_tree/helpers/leaf_hash.rs b/circuit/collections/src/merkle_tree/helpers/leaf_hash.rs index 9abb99d1c7..a465b6d2be 100644 --- a/circuit/collections/src/merkle_tree/helpers/leaf_hash.rs +++ b/circuit/collections/src/merkle_tree/helpers/leaf_hash.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::*; -use snarkvm_circuit_algorithms::{Hash, Poseidon, BHP}; +use snarkvm_circuit_algorithms::{BHP, Hash, Poseidon}; /// A trait for a Merkle leaf hash function. pub trait LeafHash { @@ -58,7 +58,7 @@ impl LeafHash for Poseidon { #[cfg(all(test, console))] mod tests { use super::*; - use snarkvm_circuit_algorithms::{Poseidon4, BHP1024}; + use snarkvm_circuit_algorithms::{BHP1024, Poseidon4}; use snarkvm_circuit_types::environment::Circuit; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/circuit/collections/src/merkle_tree/helpers/path_hash.rs b/circuit/collections/src/merkle_tree/helpers/path_hash.rs index 8c4d458be2..c721a7838b 100644 --- a/circuit/collections/src/merkle_tree/helpers/path_hash.rs +++ b/circuit/collections/src/merkle_tree/helpers/path_hash.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::*; -use snarkvm_circuit_algorithms::{Hash, Poseidon, BHP}; +use snarkvm_circuit_algorithms::{BHP, Hash, Poseidon}; /// A trait for a Merkle path hash function. pub trait PathHash { @@ -59,7 +59,7 @@ impl PathHash for Poseidon { #[cfg(all(test, console))] mod tests { use super::*; - use snarkvm_circuit_algorithms::{Poseidon2, BHP512}; + use snarkvm_circuit_algorithms::{BHP512, Poseidon2}; use snarkvm_circuit_types::environment::Circuit; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/circuit/collections/src/merkle_tree/mod.rs b/circuit/collections/src/merkle_tree/mod.rs index 0066a01fe6..59f880017d 100644 --- a/circuit/collections/src/merkle_tree/mod.rs +++ b/circuit/collections/src/merkle_tree/mod.rs @@ -21,7 +21,7 @@ mod verify; #[cfg(all(test, console))] use snarkvm_circuit_types::environment::assert_scope; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, U64}; +use snarkvm_circuit_types::{Boolean, Field, U64, environment::prelude::*}; pub struct MerklePath { /// The leaf index for the path. diff --git a/circuit/collections/src/merkle_tree/verify.rs b/circuit/collections/src/merkle_tree/verify.rs index 130520d6fe..c4108952cb 100644 --- a/circuit/collections/src/merkle_tree/verify.rs +++ b/circuit/collections/src/merkle_tree/verify.rs @@ -59,7 +59,7 @@ impl MerklePath { #[cfg(all(test, console))] mod tests { use super::*; - use snarkvm_circuit_algorithms::{Poseidon2, Poseidon4, BHP1024, BHP512}; + use snarkvm_circuit_algorithms::{BHP512, BHP1024, Poseidon2, Poseidon4}; use snarkvm_circuit_types::environment::Circuit; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/circuit/environment/Cargo.toml b/circuit/environment/Cargo.toml index 85efe40cf5..042e844f1b 100644 --- a/circuit/environment/Cargo.toml +++ b/circuit/environment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-environment" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Circuit environment for a decentralized virtual machine" homepage = "https://aleo.org" @@ -16,32 +16,32 @@ harness = false [dependencies.console] package = "snarkvm-console-network" path = "../../console/network" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-algorithms] path = "../../algorithms" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "r1cs" ] [dependencies.snarkvm-circuit-environment-witness] path = "./witness" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-curves] path = "../../curves" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-fields] path = "../../fields" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-utilities] path = "../../utilities" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.indexmap] diff --git a/circuit/environment/benches/linear_combination.rs b/circuit/environment/benches/linear_combination.rs index 76ee872e5a..bb5b089519 100644 --- a/circuit/environment/benches/linear_combination.rs +++ b/circuit/environment/benches/linear_combination.rs @@ -17,7 +17,7 @@ extern crate criterion; use snarkvm_circuit::{ - environment::{prelude::num_traits::One as _, Circuit, Eject, Environment, Inject, LinearCombination, Mode, One}, + environment::{Circuit, Eject, Environment, Inject, LinearCombination, Mode, One, prelude::num_traits::One as _}, types::Field, }; diff --git a/circuit/environment/src/canary_circuit.rs b/circuit/environment/src/canary_circuit.rs index a6b48e9c7c..d8aa84553d 100644 --- a/circuit/environment/src/canary_circuit.rs +++ b/circuit/environment/src/canary_circuit.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{helpers::Constraint, Mode, *}; +use crate::{Mode, helpers::Constraint, *}; use core::{ cell::{Cell, RefCell}, diff --git a/circuit/environment/src/circuit.rs b/circuit/environment/src/circuit.rs index e6093251be..d941547d9d 100644 --- a/circuit/environment/src/circuit.rs +++ b/circuit/environment/src/circuit.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{helpers::Constraint, Mode, *}; +use crate::{Mode, helpers::Constraint, *}; use core::{ cell::{Cell, RefCell}, diff --git a/circuit/environment/src/environment.rs b/circuit/environment/src/environment.rs index 550cb21639..f58fd7d7ea 100644 --- a/circuit/environment/src/environment.rs +++ b/circuit/environment/src/environment.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{witness_mode, Assignment, Inject, LinearCombination, Mode, Variable, R1CS}; +use crate::{Assignment, Inject, LinearCombination, Mode, R1CS, Variable, witness_mode}; use snarkvm_curves::AffineCurve; use snarkvm_fields::traits::*; diff --git a/circuit/environment/src/helpers/assignment.rs b/circuit/environment/src/helpers/assignment.rs index 3e31e56d54..d8181dbdad 100644 --- a/circuit/environment/src/helpers/assignment.rs +++ b/circuit/environment/src/helpers/assignment.rs @@ -284,7 +284,7 @@ impl snarkvm_algorithms::r1cs::ConstraintSynthesizer for Assig #[cfg(test)] mod tests { - use snarkvm_algorithms::{r1cs::ConstraintSynthesizer, AlgebraicSponge, SNARK}; + use snarkvm_algorithms::{AlgebraicSponge, SNARK, r1cs::ConstraintSynthesizer}; use snarkvm_circuit::prelude::*; use snarkvm_curves::bls12_377::Fr; @@ -345,7 +345,7 @@ mod tests { use snarkvm_algorithms::{ crypto_hash::PoseidonSponge, - snark::varuna::{ahp::AHPForR1CS, VarunaHidingMode, VarunaSNARK}, + snark::varuna::{VarunaHidingMode, VarunaSNARK, ahp::AHPForR1CS}, }; use snarkvm_curves::bls12_377::{Bls12_377, Fq}; use snarkvm_utilities::rand::TestRng; diff --git a/circuit/environment/src/helpers/converter.rs b/circuit/environment/src/helpers/converter.rs index 1673c45fba..f404d17078 100644 --- a/circuit/environment/src/helpers/converter.rs +++ b/circuit/environment/src/helpers/converter.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{CanaryCircuit, Circuit, LinearCombination, TestnetCircuit, Variable, R1CS}; +use crate::{CanaryCircuit, Circuit, LinearCombination, R1CS, TestnetCircuit, Variable}; use snarkvm_curves::edwards_bls12::Fq; use snarkvm_fields::PrimeField; @@ -201,7 +201,7 @@ impl R1CS { #[cfg(test)] mod tests { - use snarkvm_algorithms::{r1cs::ConstraintSynthesizer, AlgebraicSponge, SNARK}; + use snarkvm_algorithms::{AlgebraicSponge, SNARK, r1cs::ConstraintSynthesizer}; use snarkvm_circuit::prelude::*; use snarkvm_curves::bls12_377::Fr; @@ -253,7 +253,7 @@ mod tests { use snarkvm_algorithms::{ crypto_hash::PoseidonSponge, - snark::varuna::{ahp::AHPForR1CS, VarunaHidingMode, VarunaSNARK}, + snark::varuna::{VarunaHidingMode, VarunaSNARK, ahp::AHPForR1CS}, }; use snarkvm_curves::bls12_377::{Bls12_377, Fq}; use snarkvm_utilities::rand::TestRng; diff --git a/circuit/environment/src/helpers/mode.rs b/circuit/environment/src/helpers/mode.rs index 389b258439..ff1d9296e8 100644 --- a/circuit/environment/src/helpers/mode.rs +++ b/circuit/environment/src/helpers/mode.rs @@ -15,10 +15,10 @@ use crate::prelude::*; use snarkvm_utilities::{ - error, - io::{Read, Result as IoResult, Write}, FromBytes, ToBytes, + error, + io::{Read, Result as IoResult, Write}, }; #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] diff --git a/circuit/environment/src/lib.rs b/circuit/environment/src/lib.rs index b78ca14b31..6b9da587d3 100644 --- a/circuit/environment/src/lib.rs +++ b/circuit/environment/src/lib.rs @@ -44,6 +44,13 @@ pub use traits::*; pub mod prelude { pub use crate::{ + CircuitType, + Count, + Environment, + LinearCombination, + Mode, + OutputMode, + Variable, count, count_is, count_less_than, @@ -52,20 +59,12 @@ pub mod prelude { traits::*, witness, witness_mode, - CircuitType, - Count, - Environment, - LinearCombination, - Mode, - OutputMode, - Variable, }; pub use console::{ + Parser, + ParserResult, + TypeName, prelude::{ - bail, - ensure, - fmt, - has_duplicates, Debug, Display, Error, @@ -74,23 +73,24 @@ pub mod prelude { One as _, Result, Zero as _, + bail, + ensure, + fmt, + has_duplicates, }, traits::{ - string_parser, - types::{ - integer_magnitude::Magnitude, - integer_type::{CheckedPow, IntegerProperties, IntegerType, WrappingDiv, WrappingPow, WrappingRem}, - }, Double as _, FromBits as _, Inverse as _, Square as _, SquareRoot as _, ToBits as _, + string_parser, + types::{ + integer_magnitude::Magnitude, + integer_type::{CheckedPow, IntegerProperties, IntegerType, WrappingDiv, WrappingPow, WrappingRem}, + }, }, - Parser, - ParserResult, - TypeName, }; pub use snarkvm_fields::{self, Field as _, PrimeField, Zero as _}; diff --git a/circuit/environment/src/testnet_circuit.rs b/circuit/environment/src/testnet_circuit.rs index b668353556..3405bb62e6 100644 --- a/circuit/environment/src/testnet_circuit.rs +++ b/circuit/environment/src/testnet_circuit.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{helpers::Constraint, Mode, *}; +use crate::{Mode, helpers::Constraint, *}; use core::{ cell::{Cell, RefCell}, diff --git a/circuit/environment/witness/Cargo.toml b/circuit/environment/witness/Cargo.toml index 119bd793b4..ce639ac43e 100644 --- a/circuit/environment/witness/Cargo.toml +++ b/circuit/environment/witness/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-environment-witness" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A procedural macro to construct a witness in an environment" homepage = "https://aleo.org" diff --git a/circuit/network/Cargo.toml b/circuit/network/Cargo.toml index 55729d299e..7205d3eaed 100644 --- a/circuit/network/Cargo.toml +++ b/circuit/network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-network" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Network circuit library for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,20 +11,20 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-network" path = "../../console/network" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-algorithms] path = "../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-collections] path = "../collections" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.snarkvm-console-types] path = "../../console/types" diff --git a/circuit/network/src/canary_v0.rs b/circuit/network/src/canary_v0.rs index a8ae568e08..6480f58fe6 100644 --- a/circuit/network/src/canary_v0.rs +++ b/circuit/network/src/canary_v0.rs @@ -15,6 +15,10 @@ use crate::Aleo; use snarkvm_circuit_algorithms::{ + BHP256, + BHP512, + BHP768, + BHP1024, Commit, CommitUncompressed, Hash, @@ -25,26 +29,22 @@ use snarkvm_circuit_algorithms::{ Keccak256, Keccak384, Keccak512, - Pedersen128, Pedersen64, + Pedersen128, Poseidon2, Poseidon4, Poseidon8, Sha3_256, Sha3_384, Sha3_512, - BHP1024, - BHP256, - BHP512, - BHP768, }; use snarkvm_circuit_collections::merkle_tree::MerklePath; use snarkvm_circuit_types::{ - environment::{prelude::*, Assignment, CanaryCircuit, R1CS}, Boolean, Field, Group, Scalar, + environment::{Assignment, CanaryCircuit, R1CS, prelude::*}, }; use core::fmt; diff --git a/circuit/network/src/lib.rs b/circuit/network/src/lib.rs index c26b9dc69f..d2558eb9a9 100644 --- a/circuit/network/src/lib.rs +++ b/circuit/network/src/lib.rs @@ -26,7 +26,7 @@ pub mod v0; pub use v0::*; use snarkvm_circuit_collections::merkle_tree::MerklePath; -use snarkvm_circuit_types::{environment::Environment, Boolean, Field, Group, Scalar}; +use snarkvm_circuit_types::{Boolean, Field, Group, Scalar, environment::Environment}; /// Attention: Do not use `Send + Sync` on this trait, as it is not thread-safe. pub trait Aleo: Environment { diff --git a/circuit/network/src/testnet_v0.rs b/circuit/network/src/testnet_v0.rs index 0ac759a6b7..0bfcd7437c 100644 --- a/circuit/network/src/testnet_v0.rs +++ b/circuit/network/src/testnet_v0.rs @@ -15,6 +15,10 @@ use crate::Aleo; use snarkvm_circuit_algorithms::{ + BHP256, + BHP512, + BHP768, + BHP1024, Commit, CommitUncompressed, Hash, @@ -25,26 +29,22 @@ use snarkvm_circuit_algorithms::{ Keccak256, Keccak384, Keccak512, - Pedersen128, Pedersen64, + Pedersen128, Poseidon2, Poseidon4, Poseidon8, Sha3_256, Sha3_384, Sha3_512, - BHP1024, - BHP256, - BHP512, - BHP768, }; use snarkvm_circuit_collections::merkle_tree::MerklePath; use snarkvm_circuit_types::{ - environment::{prelude::*, Assignment, TestnetCircuit, R1CS}, Boolean, Field, Group, Scalar, + environment::{Assignment, R1CS, TestnetCircuit, prelude::*}, }; use core::fmt; diff --git a/circuit/network/src/v0.rs b/circuit/network/src/v0.rs index 726ea8d491..5d595220b0 100644 --- a/circuit/network/src/v0.rs +++ b/circuit/network/src/v0.rs @@ -15,6 +15,10 @@ use crate::Aleo; use snarkvm_circuit_algorithms::{ + BHP256, + BHP512, + BHP768, + BHP1024, Commit, CommitUncompressed, Hash, @@ -25,26 +29,22 @@ use snarkvm_circuit_algorithms::{ Keccak256, Keccak384, Keccak512, - Pedersen128, Pedersen64, + Pedersen128, Poseidon2, Poseidon4, Poseidon8, Sha3_256, Sha3_384, Sha3_512, - BHP1024, - BHP256, - BHP512, - BHP768, }; use snarkvm_circuit_collections::merkle_tree::MerklePath; use snarkvm_circuit_types::{ - environment::{prelude::*, Assignment, Circuit, R1CS}, Boolean, Field, Group, Scalar, + environment::{Assignment, Circuit, R1CS, prelude::*}, }; use core::fmt; diff --git a/circuit/program/Cargo.toml b/circuit/program/Cargo.toml index b9f7bde75f..221c24c450 100644 --- a/circuit/program/Cargo.toml +++ b/circuit/program/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-program" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Program circuit library for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,32 +11,32 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-program" path = "../../console/program" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-account] path = "../account" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-algorithms] path = "../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-collections] path = "../collections" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-network] path = "../network" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-utilities] path = "../../utilities" -version = "=0.16.19" +version = "=1.0.0" [dependencies.paste] version = "1.0" diff --git a/circuit/program/src/data/access/mod.rs b/circuit/program/src/data/access/mod.rs index 0ac21e64e0..c2a2037524 100644 --- a/circuit/program/src/data/access/mod.rs +++ b/circuit/program/src/data/access/mod.rs @@ -15,7 +15,7 @@ use crate::Identifier; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, U32}; +use snarkvm_circuit_types::{U32, environment::prelude::*}; use std::{ fmt, diff --git a/circuit/program/src/data/ciphertext/mod.rs b/circuit/program/src/data/ciphertext/mod.rs index d178e40313..3b5c21c65a 100644 --- a/circuit/program/src/data/ciphertext/mod.rs +++ b/circuit/program/src/data/ciphertext/mod.rs @@ -24,7 +24,7 @@ mod to_fields; use crate::{Plaintext, Visibility}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field}; +use snarkvm_circuit_types::{Boolean, Field, environment::prelude::*}; use core::ops::Deref; diff --git a/circuit/program/src/data/future/mod.rs b/circuit/program/src/data/future/mod.rs index ab57752b76..31d9bcc4c6 100644 --- a/circuit/program/src/data/future/mod.rs +++ b/circuit/program/src/data/future/mod.rs @@ -23,7 +23,7 @@ mod to_fields; use crate::{Access, Identifier, Plaintext, ProgramID, Value}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, U16}; +use snarkvm_circuit_types::{Boolean, Field, U16, environment::prelude::*}; /// A future. #[derive(Clone)] diff --git a/circuit/program/src/data/identifier/from_bits.rs b/circuit/program/src/data/identifier/from_bits.rs index 241b23be2c..9b6603f8d3 100644 --- a/circuit/program/src/data/identifier/from_bits.rs +++ b/circuit/program/src/data/identifier/from_bits.rs @@ -52,7 +52,7 @@ impl FromBits for Identifier { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{data::identifier::tests::sample_console_identifier, Circuit}; + use crate::{Circuit, data::identifier::tests::sample_console_identifier}; use anyhow::Result; diff --git a/circuit/program/src/data/identifier/from_field.rs b/circuit/program/src/data/identifier/from_field.rs index b76d7d970a..bfea3eb5a0 100644 --- a/circuit/program/src/data/identifier/from_field.rs +++ b/circuit/program/src/data/identifier/from_field.rs @@ -28,7 +28,7 @@ impl FromField for Identifier { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{data::identifier::tests::sample_console_identifier, Circuit}; + use crate::{Circuit, data::identifier::tests::sample_console_identifier}; use anyhow::Result; diff --git a/circuit/program/src/data/identifier/mod.rs b/circuit/program/src/data/identifier/mod.rs index 2f93fe285b..3c57a05e5a 100644 --- a/circuit/program/src/data/identifier/mod.rs +++ b/circuit/program/src/data/identifier/mod.rs @@ -24,7 +24,7 @@ mod to_bits; mod to_field; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, U8}; +use snarkvm_circuit_types::{Boolean, Field, U8, environment::prelude::*}; use snarkvm_utilities::ToBits as TB; /// An identifier is an **immutable** UTF-8 string, @@ -159,7 +159,7 @@ pub(crate) mod tests { use crate::Circuit; use console::{Rng, TestRng}; - use anyhow::{bail, Result}; + use anyhow::{Result, bail}; use core::str::FromStr; use rand::distributions::Alphanumeric; diff --git a/circuit/program/src/data/identifier/to_bits.rs b/circuit/program/src/data/identifier/to_bits.rs index 4bc43e441f..da5487b11e 100644 --- a/circuit/program/src/data/identifier/to_bits.rs +++ b/circuit/program/src/data/identifier/to_bits.rs @@ -50,7 +50,7 @@ impl ToBits for &Identifier { #[cfg(all(test, console))] mod tests { use super::*; - use crate::{data::identifier::tests::sample_console_identifier, Circuit}; + use crate::{Circuit, data::identifier::tests::sample_console_identifier}; use anyhow::Result; diff --git a/circuit/program/src/data/literal/cast/boolean.rs b/circuit/program/src/data/literal/cast/boolean.rs index d42f7b8acc..cfe01a9142 100644 --- a/circuit/program/src/data/literal/cast/boolean.rs +++ b/circuit/program/src/data/literal/cast/boolean.rs @@ -68,7 +68,7 @@ mod tests { use super::*; use console::Cast as _; use console_root::{network::MainnetV0, prelude::TestRng}; - use snarkvm_circuit_types::environment::{count_is, Circuit, Eject, Inject, Mode, UpdatableCount}; + use snarkvm_circuit_types::environment::{Circuit, Eject, Inject, Mode, UpdatableCount, count_is}; use std::fmt::Debug; diff --git a/circuit/program/src/data/literal/cast/field.rs b/circuit/program/src/data/literal/cast/field.rs index b959634068..bd9e712b9b 100644 --- a/circuit/program/src/data/literal/cast/field.rs +++ b/circuit/program/src/data/literal/cast/field.rs @@ -89,7 +89,7 @@ mod tests { network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; - use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; + use snarkvm_circuit_types::environment::{Circuit, Eject, Inject, Mode, UpdatableCount, count_is, count_less_than}; use std::fmt::Debug; diff --git a/circuit/program/src/data/literal/cast/integer.rs b/circuit/program/src/data/literal/cast/integer.rs index f55db74b16..aad1cc56f0 100644 --- a/circuit/program/src/data/literal/cast/integer.rs +++ b/circuit/program/src/data/literal/cast/integer.rs @@ -147,7 +147,7 @@ mod tests { network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; - use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; + use snarkvm_circuit_types::environment::{Circuit, Eject, Inject, Mode, UpdatableCount, count_is, count_less_than}; use std::fmt::Debug; diff --git a/circuit/program/src/data/literal/cast/mod.rs b/circuit/program/src/data/literal/cast/mod.rs index eb6c2492a1..0af593ec02 100644 --- a/circuit/program/src/data/literal/cast/mod.rs +++ b/circuit/program/src/data/literal/cast/mod.rs @@ -22,8 +22,6 @@ use crate::data::{CastLossy, Literal}; use console::LiteralType; use snarkvm_circuit_network::Aleo; use snarkvm_circuit_types::prelude::{ - bail, - integers::Integer, Address, BitOr, Boolean, @@ -34,6 +32,7 @@ use snarkvm_circuit_types::prelude::{ FromGroup, Group, IntegerType, + MSB, One, Result, Scalar, @@ -41,11 +40,12 @@ use snarkvm_circuit_types::prelude::{ ToField, ToGroup, Zero, - MSB, + bail, + integers::Integer, }; #[cfg(test)] -use snarkvm_circuit_types::prelude::{I128, I16, I32, I64, I8, U128, U16, U32, U64, U8}; +use snarkvm_circuit_types::prelude::{I8, I16, I32, I64, I128, U8, U16, U32, U64, U128}; /// Unary operator for casting values of one type to another. pub trait Cast { diff --git a/circuit/program/src/data/literal/cast/scalar.rs b/circuit/program/src/data/literal/cast/scalar.rs index 021765ef75..93e4df7b81 100644 --- a/circuit/program/src/data/literal/cast/scalar.rs +++ b/circuit/program/src/data/literal/cast/scalar.rs @@ -91,7 +91,7 @@ mod tests { network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; - use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; + use snarkvm_circuit_types::environment::{Circuit, Eject, Inject, Mode, UpdatableCount, count_is, count_less_than}; use std::fmt::Debug; diff --git a/circuit/program/src/data/literal/cast_lossy/boolean.rs b/circuit/program/src/data/literal/cast_lossy/boolean.rs index e15a8982a3..b371082c7b 100644 --- a/circuit/program/src/data/literal/cast_lossy/boolean.rs +++ b/circuit/program/src/data/literal/cast_lossy/boolean.rs @@ -79,7 +79,7 @@ mod tests { use super::*; use console::CastLossy as _; use console_root::{network::MainnetV0, prelude::TestRng}; - use snarkvm_circuit_types::environment::{count_is, Circuit, Eject, Inject, Mode, UpdatableCount}; + use snarkvm_circuit_types::environment::{Circuit, Eject, Inject, Mode, UpdatableCount, count_is}; use std::fmt::Debug; diff --git a/circuit/program/src/data/literal/cast_lossy/field.rs b/circuit/program/src/data/literal/cast_lossy/field.rs index 89ec79fe6c..f865d70e8e 100644 --- a/circuit/program/src/data/literal/cast_lossy/field.rs +++ b/circuit/program/src/data/literal/cast_lossy/field.rs @@ -120,7 +120,7 @@ mod tests { network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; - use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; + use snarkvm_circuit_types::environment::{Circuit, Eject, Inject, Mode, UpdatableCount, count_is, count_less_than}; use std::fmt::Debug; diff --git a/circuit/program/src/data/literal/cast_lossy/integer.rs b/circuit/program/src/data/literal/cast_lossy/integer.rs index 2785d22b18..f93ed065b7 100644 --- a/circuit/program/src/data/literal/cast_lossy/integer.rs +++ b/circuit/program/src/data/literal/cast_lossy/integer.rs @@ -95,7 +95,7 @@ mod tests { network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; - use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; + use snarkvm_circuit_types::environment::{Circuit, Eject, Inject, Mode, UpdatableCount, count_is, count_less_than}; use std::fmt::Debug; diff --git a/circuit/program/src/data/literal/cast_lossy/mod.rs b/circuit/program/src/data/literal/cast_lossy/mod.rs index 45bd6c5ffa..7d86dd9924 100644 --- a/circuit/program/src/data/literal/cast_lossy/mod.rs +++ b/circuit/program/src/data/literal/cast_lossy/mod.rs @@ -23,8 +23,6 @@ use console::LiteralType; use snarkvm_circuit_algorithms::Elligator2; use snarkvm_circuit_network::Aleo; use snarkvm_circuit_types::prelude::{ - bail, - integers::Integer, Address, Boolean, Environment, @@ -35,6 +33,7 @@ use snarkvm_circuit_types::prelude::{ Group, Inject, IntegerType, + MSB, One, Result, Scalar, @@ -43,11 +42,12 @@ use snarkvm_circuit_types::prelude::{ ToField, ToGroup, Zero, - MSB, + bail, + integers::Integer, }; #[cfg(test)] -use snarkvm_circuit_types::prelude::{I128, I16, I32, I64, I8, U128, U16, U32, U64, U8}; +use snarkvm_circuit_types::prelude::{I8, I16, I32, I64, I128, U8, U16, U32, U64, U128}; /// Unary operator for casting values of one type to another, with lossy truncation. pub trait CastLossy { diff --git a/circuit/program/src/data/literal/cast_lossy/scalar.rs b/circuit/program/src/data/literal/cast_lossy/scalar.rs index b3c68c2aa1..aa02eb8ded 100644 --- a/circuit/program/src/data/literal/cast_lossy/scalar.rs +++ b/circuit/program/src/data/literal/cast_lossy/scalar.rs @@ -93,7 +93,7 @@ mod tests { network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; - use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; + use snarkvm_circuit_types::environment::{Circuit, Eject, Inject, Mode, UpdatableCount, count_is, count_less_than}; use std::fmt::Debug; diff --git a/circuit/program/src/data/plaintext/mod.rs b/circuit/program/src/data/plaintext/mod.rs index 372b747eda..e0b0ef279e 100644 --- a/circuit/program/src/data/plaintext/mod.rs +++ b/circuit/program/src/data/plaintext/mod.rs @@ -28,7 +28,7 @@ mod to_fields; use crate::{Access, Ciphertext, Identifier, Literal, Visibility}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Address, Boolean, Field, Scalar, U16, U32, U8}; +use snarkvm_circuit_types::{Address, Boolean, Field, Scalar, U8, U16, U32, environment::prelude::*}; #[derive(Clone)] pub enum Plaintext { diff --git a/circuit/program/src/data/record/entry/mod.rs b/circuit/program/src/data/record/entry/mod.rs index f51ae8cec2..8b09932c59 100644 --- a/circuit/program/src/data/record/entry/mod.rs +++ b/circuit/program/src/data/record/entry/mod.rs @@ -20,7 +20,7 @@ mod to_bits; use crate::{Access, Ciphertext, Plaintext, Visibility}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean}; +use snarkvm_circuit_types::{Boolean, environment::prelude::*}; /// An entry stored in program data. #[derive(Clone)] diff --git a/circuit/program/src/data/record/helpers/owner.rs b/circuit/program/src/data/record/helpers/owner.rs index 8470ef6269..a8d8f76b99 100644 --- a/circuit/program/src/data/record/helpers/owner.rs +++ b/circuit/program/src/data/record/helpers/owner.rs @@ -15,7 +15,7 @@ use crate::{Ciphertext, Entry, Literal, Plaintext, Visibility}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Address, Boolean, Field}; +use snarkvm_circuit_types::{Address, Boolean, Field, environment::prelude::*}; /// A value stored in program data. #[derive(Clone)] diff --git a/circuit/program/src/data/record/mod.rs b/circuit/program/src/data/record/mod.rs index 7830cd6db2..3a81091ec3 100644 --- a/circuit/program/src/data/record/mod.rs +++ b/circuit/program/src/data/record/mod.rs @@ -36,7 +36,7 @@ mod to_fields; use crate::{Access, Ciphertext, Identifier, Plaintext, ProgramID, Visibility}; use snarkvm_circuit_account::{PrivateKey, ViewKey}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, Group, Scalar, U32}; +use snarkvm_circuit_types::{Boolean, Field, Group, Scalar, U32, environment::prelude::*}; #[derive(Clone)] pub struct Record> { diff --git a/circuit/program/src/data/value/mod.rs b/circuit/program/src/data/value/mod.rs index 833b9729e0..4f0f862acd 100644 --- a/circuit/program/src/data/value/mod.rs +++ b/circuit/program/src/data/value/mod.rs @@ -20,7 +20,7 @@ mod to_fields; use crate::{Access, Entry, Future, Plaintext, Record}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field}; +use snarkvm_circuit_types::{Boolean, Field, environment::prelude::*}; #[derive(Clone)] pub enum Value { diff --git a/circuit/program/src/function_id/mod.rs b/circuit/program/src/function_id/mod.rs index 3a1f798d85..14e6c37777 100644 --- a/circuit/program/src/function_id/mod.rs +++ b/circuit/program/src/function_id/mod.rs @@ -15,7 +15,7 @@ use crate::{Identifier, ProgramID}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Field, U16}; +use snarkvm_circuit_types::{Field, U16, environment::prelude::*}; /// Compute the function ID as `Hash(network_id, program_id.len(), program_id, function_name.len(), function_name)`. pub fn compute_function_id( diff --git a/circuit/program/src/id/mod.rs b/circuit/program/src/id/mod.rs index 30145abe63..2a402b41d6 100644 --- a/circuit/program/src/id/mod.rs +++ b/circuit/program/src/id/mod.rs @@ -22,7 +22,7 @@ mod to_fields; use crate::Identifier; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Address, Boolean, Field}; +use snarkvm_circuit_types::{Address, Boolean, Field, environment::prelude::*}; /// A program ID is of the form `{name}.{network}`. /// If no `network`-level domain is specified, the default network is used. diff --git a/circuit/program/src/id/to_address.rs b/circuit/program/src/id/to_address.rs index c1ce3add71..81c14f6ea9 100644 --- a/circuit/program/src/id/to_address.rs +++ b/circuit/program/src/id/to_address.rs @@ -28,7 +28,7 @@ impl ProgramID { #[cfg(test)] mod tests { use super::*; - use crate::{data::identifier::tests::sample_lowercase_console_identifier_as_string, Circuit}; + use crate::{Circuit, data::identifier::tests::sample_lowercase_console_identifier_as_string}; use anyhow::Result; diff --git a/circuit/program/src/id/to_bits.rs b/circuit/program/src/id/to_bits.rs index 4a9129cb68..5d6867bb24 100644 --- a/circuit/program/src/id/to_bits.rs +++ b/circuit/program/src/id/to_bits.rs @@ -48,7 +48,7 @@ impl ToBits for &ProgramID { #[cfg(test)] mod tests { use super::*; - use crate::{data::identifier::tests::sample_lowercase_console_identifier_as_string, Circuit}; + use crate::{Circuit, data::identifier::tests::sample_lowercase_console_identifier_as_string}; use anyhow::Result; diff --git a/circuit/program/src/lib.rs b/circuit/program/src/lib.rs index a423338bf2..450a5c42a1 100644 --- a/circuit/program/src/lib.rs +++ b/circuit/program/src/lib.rs @@ -39,7 +39,7 @@ mod state_path; pub use state_path::*; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean}; +use snarkvm_circuit_types::{Boolean, environment::prelude::*}; pub trait Visibility: Equal::Boolean> + ToBits> + FromBits + ToFields + FromFields diff --git a/circuit/program/src/request/mod.rs b/circuit/program/src/request/mod.rs index 34aaac0b09..e9aa82a9bd 100644 --- a/circuit/program/src/request/mod.rs +++ b/circuit/program/src/request/mod.rs @@ -19,10 +19,10 @@ use snarkvm_circuit_types::environment::assert_scope; mod to_tpk; mod verify; -use crate::{compute_function_id, Identifier, Plaintext, ProgramID, Record, Value}; +use crate::{Identifier, Plaintext, ProgramID, Record, Value, compute_function_id}; use snarkvm_circuit_account::Signature; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Address, Boolean, Field, Group, U16}; +use snarkvm_circuit_types::{Address, Boolean, Field, Group, U16, environment::prelude::*}; pub enum InputID { /// The hash of the constant input. diff --git a/circuit/program/src/response/mod.rs b/circuit/program/src/response/mod.rs index 3f889954a2..81d3492816 100644 --- a/circuit/program/src/response/mod.rs +++ b/circuit/program/src/response/mod.rs @@ -19,9 +19,9 @@ use snarkvm_circuit_types::environment::assert_scope; mod from_outputs; mod process_outputs_from_callback; -use crate::{compute_function_id, Identifier, ProgramID, Value}; +use crate::{Identifier, ProgramID, Value, compute_function_id}; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Field, U16}; +use snarkvm_circuit_types::{Field, U16, environment::prelude::*}; pub enum OutputID { /// The hash of the constant output. diff --git a/circuit/program/src/state_path/helpers/header_leaf.rs b/circuit/program/src/state_path/helpers/header_leaf.rs index 32a25dd23c..fd32096809 100644 --- a/circuit/program/src/state_path/helpers/header_leaf.rs +++ b/circuit/program/src/state_path/helpers/header_leaf.rs @@ -14,7 +14,7 @@ // limitations under the License. use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, U8}; +use snarkvm_circuit_types::{Boolean, Field, U8, environment::prelude::*}; #[derive(Clone)] pub struct HeaderLeaf { diff --git a/circuit/program/src/state_path/helpers/transaction_leaf.rs b/circuit/program/src/state_path/helpers/transaction_leaf.rs index ae33eff1d2..564033d9df 100644 --- a/circuit/program/src/state_path/helpers/transaction_leaf.rs +++ b/circuit/program/src/state_path/helpers/transaction_leaf.rs @@ -14,7 +14,7 @@ // limitations under the License. use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, U16, U8}; +use snarkvm_circuit_types::{Boolean, Field, U8, U16, environment::prelude::*}; #[derive(Clone)] pub struct TransactionLeaf { diff --git a/circuit/program/src/state_path/helpers/transition_leaf.rs b/circuit/program/src/state_path/helpers/transition_leaf.rs index bdf712f389..b2ffb4c243 100644 --- a/circuit/program/src/state_path/helpers/transition_leaf.rs +++ b/circuit/program/src/state_path/helpers/transition_leaf.rs @@ -14,7 +14,7 @@ // limitations under the License. use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, U8}; +use snarkvm_circuit_types::{Boolean, Field, U8, environment::prelude::*}; #[derive(Clone)] pub struct TransitionLeaf { diff --git a/circuit/program/src/state_path/mod.rs b/circuit/program/src/state_path/mod.rs index 89c88b1922..0d58b2b640 100644 --- a/circuit/program/src/state_path/mod.rs +++ b/circuit/program/src/state_path/mod.rs @@ -23,7 +23,7 @@ use snarkvm_circuit_types::environment::assert_scope; use snarkvm_circuit_collections::merkle_tree::MerklePath; use snarkvm_circuit_network::Aleo; -use snarkvm_circuit_types::{environment::prelude::*, Boolean, Field, U8}; +use snarkvm_circuit_types::{Boolean, Field, U8, environment::prelude::*}; /// The depth of the Merkle tree for the blocks. const BLOCKS_DEPTH: u8 = console::BLOCKS_DEPTH; diff --git a/circuit/types/Cargo.toml b/circuit/types/Cargo.toml index fd6fc5b962..4ec3be91b6 100644 --- a/circuit/types/Cargo.toml +++ b/circuit/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-types" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Primitive circuit for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,35 +10,35 @@ edition = "2021" [dependencies.snarkvm-circuit-environment] path = "../environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-address] path = "./address" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-boolean] path = "./boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-field] path = "./field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-group] path = "./group" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-integers] path = "./integers" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-scalar] path = "./scalar" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-string] path = "./string" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.console] package = "snarkvm-console" diff --git a/circuit/types/address/Cargo.toml b/circuit/types/address/Cargo.toml index c60b444158..40cd55d3d6 100644 --- a/circuit/types/address/Cargo.toml +++ b/circuit/types/address/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-types-address" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Address circuit for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,28 +11,28 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-types-address" path = "../../../console/types/address" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-environment] path = "../../environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-group] path = "../group" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-scalar] path = "../scalar" -version = "=0.16.19" +version = "=1.0.0" [features] default = [ "enable_console" ] diff --git a/circuit/types/boolean/Cargo.toml b/circuit/types/boolean/Cargo.toml index cf2c01f8e9..c018e7d923 100644 --- a/circuit/types/boolean/Cargo.toml +++ b/circuit/types/boolean/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-types-boolean" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Boolean circuit for a decentralized virtual machine" homepage = "https://aleo.org" @@ -16,12 +16,12 @@ harness = false [dependencies.console] package = "snarkvm-console-types-boolean" path = "../../../console/types/boolean" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-environment] path = "../../environment" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.criterion] version = "0.5" diff --git a/circuit/types/field/Cargo.toml b/circuit/types/field/Cargo.toml index f0806e18cc..786e51d016 100644 --- a/circuit/types/field/Cargo.toml +++ b/circuit/types/field/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-types-field" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Field circuit for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,16 +11,16 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-types-field" path = "../../../console/types/field" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-environment] path = "../../environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [features] default = [ "enable_console" ] diff --git a/circuit/types/field/src/div.rs b/circuit/types/field/src/div.rs index 82184094c5..f59b691ecb 100644 --- a/circuit/types/field/src/div.rs +++ b/circuit/types/field/src/div.rs @@ -102,7 +102,7 @@ impl OutputMode, Output = Field>> for Field< #[cfg(test)] mod tests { use super::*; - use snarkvm_circuit_environment::{assert_count_fails, Circuit}; + use snarkvm_circuit_environment::{Circuit, assert_count_fails}; const ITERATIONS: u64 = 1000; diff --git a/circuit/types/field/src/div_unchecked.rs b/circuit/types/field/src/div_unchecked.rs index 38a8cb0aee..97b6e16837 100644 --- a/circuit/types/field/src/div_unchecked.rs +++ b/circuit/types/field/src/div_unchecked.rs @@ -82,7 +82,7 @@ impl OutputMode, Output = Field>> f #[cfg(test)] mod tests { use super::*; - use snarkvm_circuit_environment::{assert_count_fails, Circuit}; + use snarkvm_circuit_environment::{Circuit, assert_count_fails}; const ITERATIONS: u64 = 1000; diff --git a/circuit/types/group/Cargo.toml b/circuit/types/group/Cargo.toml index 4c510b2a8e..0c1d6cae1e 100644 --- a/circuit/types/group/Cargo.toml +++ b/circuit/types/group/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-types-group" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Group circuit for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,24 +11,24 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-types-group" path = "../../../console/types/group" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-environment] path = "../../environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-scalar] path = "../scalar" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.snarkvm-utilities] path = "../../../utilities" diff --git a/circuit/types/integers/Cargo.toml b/circuit/types/integers/Cargo.toml index fe976e9767..8d49d2e750 100644 --- a/circuit/types/integers/Cargo.toml +++ b/circuit/types/integers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-types-integers" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Integer circuit for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,24 +11,24 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-types-integers" path = "../../../console/types/integers" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-environment] path = "../../environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-scalar] path = "../scalar" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.snarkvm-utilities] path = "../../../utilities" diff --git a/circuit/types/scalar/Cargo.toml b/circuit/types/scalar/Cargo.toml index 47c27db3c0..e8bb5a0584 100644 --- a/circuit/types/scalar/Cargo.toml +++ b/circuit/types/scalar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-types-scalar" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Scalar circuit for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,20 +11,20 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-types-scalar" path = "../../../console/types/scalar" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-environment] path = "../../environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [features] default = [ "enable_console" ] diff --git a/circuit/types/src/lib.rs b/circuit/types/src/lib.rs index 031da88e4d..4c10089dab 100644 --- a/circuit/types/src/lib.rs +++ b/circuit/types/src/lib.rs @@ -33,7 +33,7 @@ pub mod modules { pub use snarkvm_circuit_types_group::Group; pub use snarkvm_circuit_types_integers as integers; - pub use snarkvm_circuit_types_integers::{I128, I16, I32, I64, I8, U128, U16, U32, U64, U8}; + pub use snarkvm_circuit_types_integers::{I8, I16, I32, I64, I128, U8, U16, U32, U64, U128}; pub use snarkvm_circuit_types_scalar as scalar; pub use snarkvm_circuit_types_scalar::Scalar; diff --git a/circuit/types/string/Cargo.toml b/circuit/types/string/Cargo.toml index 030b98f3d1..543c38e74b 100644 --- a/circuit/types/string/Cargo.toml +++ b/circuit/types/string/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-circuit-types-string" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "String circuit for a decentralized virtual machine" homepage = "https://aleo.org" @@ -11,24 +11,24 @@ edition = "2021" [dependencies.console] package = "snarkvm-console-types-string" path = "../../../console/types/string" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-circuit-environment] path = "../../environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-circuit-types-integers] path = "../integers" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.snarkvm-utilities] path = "../../../utilities" diff --git a/circuit/types/string/src/helpers/to_fields.rs b/circuit/types/string/src/helpers/to_fields.rs index cef203f79f..ca1017a5f4 100644 --- a/circuit/types/string/src/helpers/to_fields.rs +++ b/circuit/types/string/src/helpers/to_fields.rs @@ -32,7 +32,7 @@ impl ToFields for StringType { mod tests { use super::*; use snarkvm_circuit_environment::Circuit; - use snarkvm_utilities::{bytes_from_bits_le, FromBytes}; + use snarkvm_utilities::{FromBytes, bytes_from_bits_le}; fn native_string_to_fields(string: &str) -> Vec::Network>> { string diff --git a/console/Cargo.toml b/console/Cargo.toml index f2f8ea727b..198cb6dd62 100644 --- a/console/Cargo.toml +++ b/console/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Console environment for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,32 +10,32 @@ edition = "2021" [dependencies.snarkvm-console-account] path = "./account" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-algorithms] path = "./algorithms" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-collections] path = "./collections" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-network] path = "./network" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-program] path = "./program" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-types] path = "./types" -version = "=0.16.19" +version = "=1.0.0" optional = true [features] diff --git a/console/account/Cargo.toml b/console/account/Cargo.toml index ed86fa582e..6dead1526e 100644 --- a/console/account/Cargo.toml +++ b/console/account/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-account" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Account operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -15,11 +15,11 @@ harness = false [dependencies.snarkvm-console-network] path = "../network" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "address", "boolean", "field", "group", "scalar" ] diff --git a/console/account/benches/account.rs b/console/account/benches/account.rs index e6e6aa14cf..b22db044f9 100644 --- a/console/account/benches/account.rs +++ b/console/account/benches/account.rs @@ -17,7 +17,7 @@ extern crate criterion; use snarkvm_console_account::{Address, PrivateKey, ViewKey}; -use snarkvm_console_network::{environment::prelude::*, MainnetV0}; +use snarkvm_console_network::{MainnetV0, environment::prelude::*}; use criterion::Criterion; diff --git a/console/account/src/lib.rs b/console/account/src/lib.rs index 877bdb9575..66ffd4008f 100644 --- a/console/account/src/lib.rs +++ b/console/account/src/lib.rs @@ -18,7 +18,7 @@ #![warn(clippy::cast_possible_truncation)] #![cfg_attr(test, allow(clippy::assertions_on_result_states))] -pub use snarkvm_console_types::{environment::prelude::*, Address, Field, Group, Scalar}; +pub use snarkvm_console_types::{Address, Field, Group, Scalar, environment::prelude::*}; mod address; @@ -50,7 +50,7 @@ pub use view_key::*; #[cfg(test)] mod tests { use crate::{Address, ComputeKey, PrivateKey, Signature, ViewKey}; - use snarkvm_console_network::{prelude::*, MainnetV0}; + use snarkvm_console_network::{MainnetV0, prelude::*}; type CurrentNetwork = MainnetV0; diff --git a/console/algorithms/Cargo.toml b/console/algorithms/Cargo.toml index 378c343383..d2f11c6e74 100644 --- a/console/algorithms/Cargo.toml +++ b/console/algorithms/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-algorithms" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Console algorithms for a decentralized virtual machine" homepage = "https://aleo.org" @@ -25,18 +25,18 @@ harness = false [dependencies.snarkvm-console-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "field", "group", "integers", "scalar" ] [dependencies.snarkvm-fields] path = "../../fields" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-utilities] path = "../../utilities" -version = "=0.16.19" +version = "=1.0.0" [dependencies.blake2s_simd] version = "1.0" diff --git a/console/algorithms/benches/bhp.rs b/console/algorithms/benches/bhp.rs index e276629ece..2ba3e2b6b9 100644 --- a/console/algorithms/benches/bhp.rs +++ b/console/algorithms/benches/bhp.rs @@ -16,7 +16,7 @@ #[macro_use] extern crate criterion; -use snarkvm_console_algorithms::{BHP1024, BHP256, BHP512, BHP768}; +use snarkvm_console_algorithms::{BHP256, BHP512, BHP768, BHP1024}; use snarkvm_console_types::prelude::*; use snarkvm_utilities::{TestRng, Uniform}; diff --git a/console/algorithms/src/lib.rs b/console/algorithms/src/lib.rs index ed5484275c..44df2a4007 100644 --- a/console/algorithms/src/lib.rs +++ b/console/algorithms/src/lib.rs @@ -21,7 +21,7 @@ pub use snarkvm_console_types::prelude::*; pub mod bhp; -pub use bhp::{BHP, BHP1024, BHP256, BHP512, BHP768}; +pub use bhp::{BHP, BHP256, BHP512, BHP768, BHP1024}; mod blake2xs; pub use blake2xs::Blake2Xs; @@ -33,7 +33,7 @@ mod keccak; pub use keccak::*; mod pedersen; -pub use pedersen::{Pedersen, Pedersen128, Pedersen64}; +pub use pedersen::{Pedersen, Pedersen64, Pedersen128}; mod poseidon; pub use poseidon::{Poseidon, Poseidon2, Poseidon4, Poseidon8}; diff --git a/console/algorithms/src/poseidon/helpers/mod.rs b/console/algorithms/src/poseidon/helpers/mod.rs index cb09d64b95..afa0964b89 100644 --- a/console/algorithms/src/poseidon/helpers/mod.rs +++ b/console/algorithms/src/poseidon/helpers/mod.rs @@ -19,7 +19,7 @@ pub(super) use sponge::*; mod state; pub(super) use state::*; -use snarkvm_console_types::{prelude::*, Field}; +use snarkvm_console_types::{Field, prelude::*}; use smallvec::SmallVec; diff --git a/console/algorithms/src/poseidon/helpers/sponge.rs b/console/algorithms/src/poseidon/helpers/sponge.rs index 5843b559e4..7d005868f6 100644 --- a/console/algorithms/src/poseidon/helpers/sponge.rs +++ b/console/algorithms/src/poseidon/helpers/sponge.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::poseidon::{ - helpers::{AlgebraicSponge, DuplexSpongeMode}, State, + helpers::{AlgebraicSponge, DuplexSpongeMode}, }; -use snarkvm_console_types::{prelude::*, Field}; +use snarkvm_console_types::{Field, prelude::*}; use snarkvm_fields::PoseidonParameters; use smallvec::SmallVec; diff --git a/console/algorithms/src/poseidon/helpers/state.rs b/console/algorithms/src/poseidon/helpers/state.rs index 65cc8c15fb..083789b1ac 100644 --- a/console/algorithms/src/poseidon/helpers/state.rs +++ b/console/algorithms/src/poseidon/helpers/state.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use snarkvm_console_types::{prelude::*, Field}; +use snarkvm_console_types::{Field, prelude::*}; use core::ops::{Index, IndexMut, Range}; diff --git a/console/algorithms/src/poseidon/mod.rs b/console/algorithms/src/poseidon/mod.rs index ab5396f3e7..ca5da7f42a 100644 --- a/console/algorithms/src/poseidon/mod.rs +++ b/console/algorithms/src/poseidon/mod.rs @@ -21,7 +21,7 @@ mod hash_to_group; mod hash_to_scalar; mod prf; -use crate::{poseidon::helpers::*, Elligator2}; +use crate::{Elligator2, poseidon::helpers::*}; use snarkvm_console_types::prelude::*; use snarkvm_fields::{PoseidonDefaultField, PoseidonParameters}; diff --git a/console/collections/Cargo.toml b/console/collections/Cargo.toml index 1b3fc84018..3d0f60dfce 100644 --- a/console/collections/Cargo.toml +++ b/console/collections/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-collections" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Collections for a decentralized virtual machine" homepage = "https://aleo.org" @@ -20,11 +20,11 @@ harness = false [dependencies.snarkvm-console-algorithms] path = "../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "field", "integers" ] diff --git a/console/collections/benches/kary_merkle_tree.rs b/console/collections/benches/kary_merkle_tree.rs index 4e6a05f77f..fe2e4e0840 100644 --- a/console/collections/benches/kary_merkle_tree.rs +++ b/console/collections/benches/kary_merkle_tree.rs @@ -19,8 +19,8 @@ extern crate criterion; use snarkvm_console_algorithms::Sha3_256; use snarkvm_console_collections::kary_merkle_tree::KaryMerkleTree; use snarkvm_console_network::{ - prelude::{TestRng, ToBits, Uniform}, MainnetV0, + prelude::{TestRng, ToBits, Uniform}, }; use snarkvm_console_types::Field; diff --git a/console/collections/benches/merkle_tree.rs b/console/collections/benches/merkle_tree.rs index 3731a08421..90b41b2b61 100644 --- a/console/collections/benches/merkle_tree.rs +++ b/console/collections/benches/merkle_tree.rs @@ -17,9 +17,9 @@ extern crate criterion; use snarkvm_console_network::{ - prelude::{TestRng, ToBits, Uniform}, MainnetV0, Network, + prelude::{TestRng, ToBits, Uniform}, }; use snarkvm_console_types::Field; diff --git a/console/collections/src/kary_merkle_tree/helpers/leaf_hash.rs b/console/collections/src/kary_merkle_tree/helpers/leaf_hash.rs index 4667152d1e..cfcd566dd4 100644 --- a/console/collections/src/kary_merkle_tree/helpers/leaf_hash.rs +++ b/console/collections/src/kary_merkle_tree/helpers/leaf_hash.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use snarkvm_console_algorithms::{Keccak, Poseidon, BHP}; +use snarkvm_console_algorithms::{BHP, Keccak, Poseidon}; use snarkvm_console_types::prelude::*; use crate::kary_merkle_tree::BooleanHash; diff --git a/console/collections/src/kary_merkle_tree/helpers/path_hash.rs b/console/collections/src/kary_merkle_tree/helpers/path_hash.rs index 06bd84cb67..5998e3c688 100644 --- a/console/collections/src/kary_merkle_tree/helpers/path_hash.rs +++ b/console/collections/src/kary_merkle_tree/helpers/path_hash.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::BooleanHash; -use snarkvm_console_algorithms::{Keccak, Poseidon, BHP}; +use snarkvm_console_algorithms::{BHP, Keccak, Poseidon}; use snarkvm_console_types::prelude::*; #[cfg(not(feature = "serial"))] diff --git a/console/collections/src/kary_merkle_tree/tests/mod.rs b/console/collections/src/kary_merkle_tree/tests/mod.rs index 05cf928eba..4ee1a09cb2 100644 --- a/console/collections/src/kary_merkle_tree/tests/mod.rs +++ b/console/collections/src/kary_merkle_tree/tests/mod.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::*; -use snarkvm_console_algorithms::{Keccak256, Poseidon, Sha3_256, BHP1024, BHP512}; +use snarkvm_console_algorithms::{BHP512, BHP1024, Keccak256, Poseidon, Sha3_256}; use snarkvm_console_types::prelude::Console; type CurrentEnvironment = Console; diff --git a/console/collections/src/merkle_tree/helpers/leaf_hash.rs b/console/collections/src/merkle_tree/helpers/leaf_hash.rs index 18c6d7b7fe..c0cac0875d 100644 --- a/console/collections/src/merkle_tree/helpers/leaf_hash.rs +++ b/console/collections/src/merkle_tree/helpers/leaf_hash.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use snarkvm_console_algorithms::{Poseidon, BHP}; +use snarkvm_console_algorithms::{BHP, Poseidon}; use snarkvm_console_types::prelude::*; #[cfg(not(feature = "serial"))] diff --git a/console/collections/src/merkle_tree/helpers/path_hash.rs b/console/collections/src/merkle_tree/helpers/path_hash.rs index 441253ad7e..b026beb77a 100644 --- a/console/collections/src/merkle_tree/helpers/path_hash.rs +++ b/console/collections/src/merkle_tree/helpers/path_hash.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use snarkvm_console_algorithms::{Poseidon, BHP}; +use snarkvm_console_algorithms::{BHP, Poseidon}; use snarkvm_console_types::prelude::*; #[cfg(not(feature = "serial"))] diff --git a/console/collections/src/merkle_tree/tests/append.rs b/console/collections/src/merkle_tree/tests/append.rs index cfa8af4d3d..acb5230600 100644 --- a/console/collections/src/merkle_tree/tests/append.rs +++ b/console/collections/src/merkle_tree/tests/append.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::*; -use snarkvm_console_algorithms::{Poseidon, BHP1024, BHP512}; +use snarkvm_console_algorithms::{BHP512, BHP1024, Poseidon}; use snarkvm_console_types::prelude::Console; type CurrentEnvironment = Console; diff --git a/console/collections/src/merkle_tree/tests/remove.rs b/console/collections/src/merkle_tree/tests/remove.rs index a02115f9fd..317c2b53cb 100644 --- a/console/collections/src/merkle_tree/tests/remove.rs +++ b/console/collections/src/merkle_tree/tests/remove.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::*; -use snarkvm_console_algorithms::{Poseidon, BHP1024, BHP512}; +use snarkvm_console_algorithms::{BHP512, BHP1024, Poseidon}; use snarkvm_console_types::prelude::Console; type CurrentEnvironment = Console; diff --git a/console/collections/src/merkle_tree/tests/update.rs b/console/collections/src/merkle_tree/tests/update.rs index be56791924..7e82045862 100644 --- a/console/collections/src/merkle_tree/tests/update.rs +++ b/console/collections/src/merkle_tree/tests/update.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::*; -use snarkvm_console_algorithms::{Poseidon, BHP1024, BHP512}; +use snarkvm_console_algorithms::{BHP512, BHP1024, Poseidon}; use snarkvm_console_types::prelude::Console; use indexmap::IndexMap; diff --git a/console/collections/src/merkle_tree/tests/update_many.rs b/console/collections/src/merkle_tree/tests/update_many.rs index d3ef85bcfe..9890777b26 100644 --- a/console/collections/src/merkle_tree/tests/update_many.rs +++ b/console/collections/src/merkle_tree/tests/update_many.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::*; -use snarkvm_console_algorithms::{Poseidon, BHP1024, BHP512}; +use snarkvm_console_algorithms::{BHP512, BHP1024, Poseidon}; use snarkvm_console_types::prelude::Console; use indexmap::IndexMap; diff --git a/console/network/Cargo.toml b/console/network/Cargo.toml index d199107bc5..6632c3711e 100644 --- a/console/network/Cargo.toml +++ b/console/network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-network" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Network console library for a decentralized virtual machine" homepage = "https://aleo.org" @@ -14,49 +14,49 @@ wasm = [ "snarkvm-algorithms/polycommit_wasm", "snarkvm-parameters/wasm" ] -test = [] +test = [ ] [dependencies.snarkvm-algorithms] path = "../../algorithms" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "snark" ] [dependencies.snarkvm-console-algorithms] path = "../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-collections] path = "../collections" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-network-environment] path = "./environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "field", "group", "scalar" ] [dependencies.snarkvm-curves] path = "../../curves" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-fields] path = "../../fields" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-parameters] path = "../../parameters" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-utilities] path = "../../utilities" -version = "=0.16.19" +version = "=1.0.0" [dependencies.anyhow] version = "1.0.73" diff --git a/console/network/environment/Cargo.toml b/console/network/environment/Cargo.toml index 34cd64b221..53bf99a9b0 100644 --- a/console/network/environment/Cargo.toml +++ b/console/network/environment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-network-environment" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Environment console library for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,17 +10,17 @@ edition = "2021" [dependencies.snarkvm-curves] path = "../../../curves" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-fields] path = "../../../fields" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-utilities] path = "../../../utilities" -version = "=0.16.19" +version = "=1.0.0" [dependencies.anyhow] version = "1.0.73" diff --git a/console/network/environment/src/environment.rs b/console/network/environment/src/environment.rs index bb993d5cd8..d675b6c71f 100644 --- a/console/network/environment/src/environment.rs +++ b/console/network/environment/src/environment.rs @@ -15,13 +15,13 @@ use crate::prelude::{Deserialize, DeserializeOwned, Serialize}; use snarkvm_curves::{ - bls12_377::Bls12_377, - edwards_bls12::{EdwardsAffine, EdwardsParameters}, AffineCurve, MontgomeryParameters, PairingEngine, ProjectiveCurve, TwistedEdwardsParameters, + bls12_377::Bls12_377, + edwards_bls12::{EdwardsAffine, EdwardsParameters}, }; use snarkvm_fields::{PrimeField, SquareRootField}; use snarkvm_utilities::BigInteger; diff --git a/console/network/environment/src/helpers/sanitizer.rs b/console/network/environment/src/helpers/sanitizer.rs index b5c9b29cb1..2da244374b 100644 --- a/console/network/environment/src/helpers/sanitizer.rs +++ b/console/network/environment/src/helpers/sanitizer.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{string_parser::is_char_supported, ParserResult}; +use crate::{ParserResult, string_parser::is_char_supported}; use nom::{ branch::alt, diff --git a/console/network/environment/src/helpers/variable_length.rs b/console/network/environment/src/helpers/variable_length.rs index b8d43401b0..63d94b9aac 100644 --- a/console/network/environment/src/helpers/variable_length.rs +++ b/console/network/environment/src/helpers/variable_length.rs @@ -14,9 +14,9 @@ // limitations under the License. use snarkvm_utilities::{ + FromBytes, error, io::{Read, Result as IoResult}, - FromBytes, }; /// Returns the variable length integer of the given value. diff --git a/console/network/environment/src/lib.rs b/console/network/environment/src/lib.rs index f9e045aaf3..cfd4ec6452 100644 --- a/console/network/environment/src/lib.rs +++ b/console/network/environment/src/lib.rs @@ -30,6 +30,7 @@ pub mod prelude { environment::*, helpers::*, traits::{ + ToBits, algorithms::*, arithmetic::*, bitwise::*, @@ -54,13 +55,22 @@ pub mod prelude { *, }, visibility::*, - ToBits, }, }; pub use snarkvm_curves::{AffineCurve, MontgomeryParameters, ProjectiveCurve, TwistedEdwardsParameters}; pub use snarkvm_fields::{Field as _, PrimeField as _, SquareRootField as _, Zero as _}; pub use snarkvm_utilities::{ + DeserializeExt, + FromBits as _, + FromBytes, + FromBytesDeserializer, + LimitedWriter, + TestRng, + ToBits as _, + ToBytes, + ToBytesSerializer, + Uniform, cfg_chunks, cfg_find, cfg_find_map, @@ -73,16 +83,6 @@ pub mod prelude { error, has_duplicates, io::{Read, Result as IoResult, Write}, - DeserializeExt, - FromBits as _, - FromBytes, - FromBytesDeserializer, - LimitedWriter, - TestRng, - ToBits as _, - ToBytes, - ToBytesSerializer, - Uniform, }; pub use core::{ @@ -119,7 +119,7 @@ pub mod prelude { str::{self, FromStr}, }; - pub use anyhow::{anyhow, bail, ensure, Error, Result}; + pub use anyhow::{Error, Result, anyhow, bail, ensure}; pub use bech32::{self, FromBase32, ToBase32}; pub use itertools::Itertools; pub use nom::{ @@ -132,17 +132,17 @@ pub mod prelude { }; pub use num_traits::{AsPrimitive, One, Pow, Zero}; pub use rand::{ - distributions::{Alphanumeric, Distribution, Standard}, CryptoRng, Rng, + distributions::{Alphanumeric, Distribution, Standard}, }; pub use serde::{ - de, - de::{DeserializeOwned, EnumAccess, MapAccess, SeqAccess, VariantAccess, Visitor}, - ser::{self, SerializeSeq, SerializeStruct}, Deserialize, Deserializer, Serialize, Serializer, + de, + de::{DeserializeOwned, EnumAccess, MapAccess, SeqAccess, VariantAccess, Visitor}, + ser::{self, SerializeSeq, SerializeStruct}, }; } diff --git a/console/network/environment/src/traits/mod.rs b/console/network/environment/src/traits/mod.rs index 87d48da963..125b4000c7 100644 --- a/console/network/environment/src/traits/mod.rs +++ b/console/network/environment/src/traits/mod.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use snarkvm_utilities::{to_bits_le, ToBits}; +pub use snarkvm_utilities::{ToBits, to_bits_le}; pub mod algorithms; pub use algorithms::*; diff --git a/console/network/environment/src/traits/parse.rs b/console/network/environment/src/traits/parse.rs index c3db9a971c..b5931b3d4a 100644 --- a/console/network/environment/src/traits/parse.rs +++ b/console/network/environment/src/traits/parse.rs @@ -14,9 +14,9 @@ // limitations under the License. use nom::{ - error::{convert_error, VerboseError}, Err as NomErr, IResult, + error::{VerboseError, convert_error}, }; /// The `nom`-compatible parser return type. diff --git a/console/network/environment/src/traits/parse_string.rs b/console/network/environment/src/traits/parse_string.rs index e77d2f804e..5427b8a5f5 100644 --- a/console/network/environment/src/traits/parse_string.rs +++ b/console/network/environment/src/traits/parse_string.rs @@ -27,6 +27,8 @@ pub mod string_parser { //! escape and the next non-whitespace character use nom::{ + Err::Error, + IResult, branch::alt, bytes::streaming::{is_not, take_while_m_n}, character::streaming::{char, multispace1}, @@ -34,8 +36,6 @@ pub mod string_parser { error::{ErrorKind, FromExternalError, ParseError}, multi::fold_many0, sequence::{delimited, preceded}, - Err::Error, - IResult, }; /// Checks for supported code points. diff --git a/console/network/src/canary_v0.rs b/console/network/src/canary_v0.rs index 2f78d0118b..f0a973acd9 100644 --- a/console/network/src/canary_v0.rs +++ b/console/network/src/canary_v0.rs @@ -16,22 +16,22 @@ use super::*; use crate::TRANSACTION_PREFIX; use snarkvm_console_algorithms::{ + BHP256, + BHP512, + BHP768, + BHP1024, Blake2Xs, Keccak256, Keccak384, Keccak512, - Pedersen128, Pedersen64, + Pedersen128, Poseidon2, Poseidon4, Poseidon8, Sha3_256, Sha3_384, Sha3_512, - BHP1024, - BHP256, - BHP512, - BHP768, }; lazy_static! { diff --git a/console/network/src/helpers/id.rs b/console/network/src/helpers/id.rs index 81dce0216d..a7d20b5e3b 100644 --- a/console/network/src/helpers/id.rs +++ b/console/network/src/helpers/id.rs @@ -17,7 +17,7 @@ use crate::prelude::*; use anyhow::Result; use bech32::{self, FromBase32, ToBase32}; -use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; +use serde::{Deserialize, Deserializer, Serialize, Serializer, de}; use std::borrow::Borrow; pub trait Bech32ID: diff --git a/console/network/src/helpers/object.rs b/console/network/src/helpers/object.rs index 19a92ce637..2771858872 100644 --- a/console/network/src/helpers/object.rs +++ b/console/network/src/helpers/object.rs @@ -17,7 +17,7 @@ use crate::prelude::*; use anyhow::Result; use bech32::{self, FromBase32, ToBase32}; -use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; +use serde::{Deserialize, Deserializer, Serialize, Serializer, de}; use std::borrow::Borrow; pub trait Bech32Object: diff --git a/console/network/src/lib.rs b/console/network/src/lib.rs index fc5526264b..099044f171 100644 --- a/console/network/src/lib.rs +++ b/console/network/src/lib.rs @@ -36,17 +36,17 @@ mod testnet_v0; pub use testnet_v0::*; pub mod prelude { - pub use crate::{environment::prelude::*, Network}; + pub use crate::{Network, environment::prelude::*}; } use crate::environment::prelude::*; use snarkvm_algorithms::{ + AlgebraicSponge, crypto_hash::PoseidonSponge, snark::varuna::{CircuitProvingKey, CircuitVerifyingKey, VarunaHidingMode}, srs::{UniversalProver, UniversalVerifier}, - AlgebraicSponge, }; -use snarkvm_console_algorithms::{Poseidon2, Poseidon4, BHP1024, BHP512}; +use snarkvm_console_algorithms::{BHP512, BHP1024, Poseidon2, Poseidon4}; use snarkvm_console_collections::merkle_tree::{MerklePath, MerkleTree}; use snarkvm_console_types::{Field, Group, Scalar}; use snarkvm_curves::PairingEngine; diff --git a/console/network/src/mainnet_v0.rs b/console/network/src/mainnet_v0.rs index 2018ca6cf4..6aadaa3f38 100644 --- a/console/network/src/mainnet_v0.rs +++ b/console/network/src/mainnet_v0.rs @@ -15,22 +15,22 @@ use super::*; use snarkvm_console_algorithms::{ + BHP256, + BHP512, + BHP768, + BHP1024, Blake2Xs, Keccak256, Keccak384, Keccak512, - Pedersen128, Pedersen64, + Pedersen128, Poseidon2, Poseidon4, Poseidon8, Sha3_256, Sha3_384, Sha3_512, - BHP1024, - BHP256, - BHP512, - BHP768, }; lazy_static! { diff --git a/console/network/src/testnet_v0.rs b/console/network/src/testnet_v0.rs index 3798521dc6..fd793055a4 100644 --- a/console/network/src/testnet_v0.rs +++ b/console/network/src/testnet_v0.rs @@ -16,22 +16,22 @@ use super::*; use crate::TRANSACTION_PREFIX; use snarkvm_console_algorithms::{ + BHP256, + BHP512, + BHP768, + BHP1024, Blake2Xs, Keccak256, Keccak384, Keccak512, - Pedersen128, Pedersen64, + Pedersen128, Poseidon2, Poseidon4, Poseidon8, Sha3_256, Sha3_384, Sha3_512, - BHP1024, - BHP256, - BHP512, - BHP768, }; lazy_static! { diff --git a/console/program/Cargo.toml b/console/program/Cargo.toml index 72c634bc04..bff029e6d6 100644 --- a/console/program/Cargo.toml +++ b/console/program/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-program" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Program operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -14,27 +14,27 @@ test = [ ] [dependencies.snarkvm-console-account] path = "../account" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-algorithms] path = "../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-collections] path = "../collections" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-network] path = "../network" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types] path = "../types" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-utilities] path = "../../utilities" -version = "=0.16.19" +version = "=1.0.0" [dependencies.enum_index] version = "0.2" diff --git a/console/program/src/data/identifier/mod.rs b/console/program/src/data/identifier/mod.rs index f1ac693241..fa064fc5ed 100644 --- a/console/program/src/data/identifier/mod.rs +++ b/console/program/src/data/identifier/mod.rs @@ -24,7 +24,7 @@ mod to_bits; mod to_field; use snarkvm_console_network::Network; -use snarkvm_console_types::{prelude::*, Field}; +use snarkvm_console_types::{Field, prelude::*}; /// An identifier is an **immutable** UTF-8 string, /// represented as a **constant** field element in the CurrentNetwork. diff --git a/console/program/src/data/literal/cast/mod.rs b/console/program/src/data/literal/cast/mod.rs index 1219668be4..94f5af3b92 100644 --- a/console/program/src/data/literal/cast/mod.rs +++ b/console/program/src/data/literal/cast/mod.rs @@ -20,7 +20,7 @@ mod scalar; use crate::{Literal, LiteralType}; use snarkvm_console_network::Network; -use snarkvm_console_types::{integers::Integer, prelude::*, Boolean}; +use snarkvm_console_types::{Boolean, integers::Integer, prelude::*}; /// Unary operator for casting values of one type to another. pub trait Cast { diff --git a/console/program/src/data/literal/cast_lossy/mod.rs b/console/program/src/data/literal/cast_lossy/mod.rs index b5f68ceca9..c9516539bb 100644 --- a/console/program/src/data/literal/cast_lossy/mod.rs +++ b/console/program/src/data/literal/cast_lossy/mod.rs @@ -21,7 +21,7 @@ mod scalar; use crate::{Literal, LiteralType}; use snarkvm_console_algorithms::Elligator2; use snarkvm_console_network::Network; -use snarkvm_console_types::{integers::Integer, prelude::*, Boolean}; +use snarkvm_console_types::{Boolean, integers::Integer, prelude::*}; /// Unary operator for casting values of one type to another, with lossy truncation. pub trait CastLossy { diff --git a/console/program/src/data/literal/mod.rs b/console/program/src/data/literal/mod.rs index c355444dbc..4f33462ef6 100644 --- a/console/program/src/data/literal/mod.rs +++ b/console/program/src/data/literal/mod.rs @@ -33,7 +33,7 @@ mod variant; use crate::{LiteralType, ProgramID}; use snarkvm_console_account::{ComputeKey, PrivateKey, Signature}; use snarkvm_console_network::Network; -use snarkvm_console_types::{prelude::*, Boolean}; +use snarkvm_console_types::{Boolean, prelude::*}; /// The literal enum represents all supported types in snarkVM. #[derive(Clone)] diff --git a/console/program/src/data_types/literal_type/mod.rs b/console/program/src/data_types/literal_type/mod.rs index a52fb29344..4d0c765edb 100644 --- a/console/program/src/data_types/literal_type/mod.rs +++ b/console/program/src/data_types/literal_type/mod.rs @@ -21,7 +21,7 @@ mod size_in_bytes; use snarkvm_console_account::Signature; use snarkvm_console_network::prelude::*; -use snarkvm_console_types::{prelude::*, Boolean}; +use snarkvm_console_types::{Boolean, prelude::*}; use core::fmt::{self, Debug, Display}; use enum_iterator::Sequence; diff --git a/console/program/src/function_id/mod.rs b/console/program/src/function_id/mod.rs index cf516846f7..6848822afc 100644 --- a/console/program/src/function_id/mod.rs +++ b/console/program/src/function_id/mod.rs @@ -17,7 +17,7 @@ use crate::{Identifier, ProgramID}; use snarkvm_console_account::ToBits; use snarkvm_console_algorithms::Result; use snarkvm_console_network::Network; -use snarkvm_console_types::{Field, U16, U8}; +use snarkvm_console_types::{Field, U8, U16}; /// Compute the function ID as `Hash(network_id, program_id.len(), program_id, function_name.len(), function_name)`. pub fn compute_function_id( diff --git a/console/program/src/request/mod.rs b/console/program/src/request/mod.rs index 8e10daa3f6..b9ca501e45 100644 --- a/console/program/src/request/mod.rs +++ b/console/program/src/request/mod.rs @@ -22,7 +22,7 @@ mod sign; mod string; mod verify; -use crate::{compute_function_id, Identifier, Plaintext, ProgramID, Record, Value, ValueType}; +use crate::{Identifier, Plaintext, ProgramID, Record, Value, ValueType, compute_function_id}; use snarkvm_console_account::{Address, ComputeKey, GraphKey, PrivateKey, Signature, ViewKey}; use snarkvm_console_network::Network; use snarkvm_console_types::prelude::*; diff --git a/console/program/src/response/mod.rs b/console/program/src/response/mod.rs index af38657776..6454192a36 100644 --- a/console/program/src/response/mod.rs +++ b/console/program/src/response/mod.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{compute_function_id, Identifier, ProgramID, Register, Value, ValueType}; +use crate::{Identifier, ProgramID, Register, Value, ValueType, compute_function_id}; use snarkvm_console_network::Network; use snarkvm_console_types::prelude::*; diff --git a/console/program/src/state_path/verify.rs b/console/program/src/state_path/verify.rs index 1bcf3a35ca..debada94cb 100644 --- a/console/program/src/state_path/verify.rs +++ b/console/program/src/state_path/verify.rs @@ -134,7 +134,7 @@ impl StatePath { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::{prelude::TestRng, MainnetV0}; + use snarkvm_console_network::{MainnetV0, prelude::TestRng}; type CurrentNetwork = MainnetV0; diff --git a/console/types/Cargo.toml b/console/types/Cargo.toml index 78c8320de1..a69cf1ee4a 100644 --- a/console/types/Cargo.toml +++ b/console/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-types" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Console types for a decentralized virtual machine" homepage = "https://aleo.org" @@ -15,41 +15,41 @@ harness = false [dependencies.snarkvm-console-network-environment] path = "../network/environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-address] path = "./address" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-types-boolean] path = "./boolean" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-types-field] path = "./field" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-types-group] path = "./group" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-types-integers] path = "./integers" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-types-scalar] path = "./scalar" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-console-types-string] path = "./string" -version = "=0.16.19" +version = "=1.0.0" optional = true [dev-dependencies.criterion] diff --git a/console/types/address/Cargo.toml b/console/types/address/Cargo.toml index 0ed77bd94c..b5ccecb2f7 100644 --- a/console/types/address/Cargo.toml +++ b/console/types/address/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-types-address" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Type operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,19 +10,19 @@ edition = "2021" [dependencies.snarkvm-console-network-environment] path = "../../network/environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-group] path = "../group" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.bincode] version = "1.3" diff --git a/console/types/benches/group.rs b/console/types/benches/group.rs index 23ecfae2d6..a4687e7a73 100644 --- a/console/types/benches/group.rs +++ b/console/types/benches/group.rs @@ -17,7 +17,7 @@ extern crate criterion; use criterion::Criterion; -use snarkvm_console_network::{environment::prelude::*, MainnetV0}; +use snarkvm_console_network::{MainnetV0, environment::prelude::*}; use snarkvm_console_types::{Field, Group}; type CurrentNetwork = MainnetV0; diff --git a/console/types/boolean/Cargo.toml b/console/types/boolean/Cargo.toml index bde92030e3..a9df0b8cc8 100644 --- a/console/types/boolean/Cargo.toml +++ b/console/types/boolean/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-types-boolean" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Type operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,7 +10,7 @@ edition = "2021" [dependencies.snarkvm-console-network-environment] path = "../../network/environment" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.bincode] version = "1.3" diff --git a/console/types/field/Cargo.toml b/console/types/field/Cargo.toml index 32b87184ba..20cfbd26bb 100644 --- a/console/types/field/Cargo.toml +++ b/console/types/field/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-types-field" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Type operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,11 +10,11 @@ edition = "2021" [dependencies.snarkvm-console-network-environment] path = "../../network/environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.zeroize] version = "1" diff --git a/console/types/group/Cargo.toml b/console/types/group/Cargo.toml index d65b05c636..b17b6409d8 100644 --- a/console/types/group/Cargo.toml +++ b/console/types/group/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-types-group" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Type operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,19 +10,19 @@ edition = "2021" [dependencies.snarkvm-console-network-environment] path = "../../network/environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-scalar] path = "../scalar" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.bincode] version = "1.3" diff --git a/console/types/integers/Cargo.toml b/console/types/integers/Cargo.toml index 974401b106..dd22a59a95 100644 --- a/console/types/integers/Cargo.toml +++ b/console/types/integers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-types-integers" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Type operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,19 +10,19 @@ edition = "2021" [dependencies.snarkvm-console-network-environment] path = "../../network/environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-scalar] path = "../scalar" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.bincode] version = "1.3" diff --git a/console/types/scalar/Cargo.toml b/console/types/scalar/Cargo.toml index cc76626783..92ec2e63e3 100644 --- a/console/types/scalar/Cargo.toml +++ b/console/types/scalar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-types-scalar" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Type operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,15 +10,15 @@ edition = "2021" [dependencies.snarkvm-console-network-environment] path = "../../network/environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.zeroize] version = "1" diff --git a/console/types/src/lib.rs b/console/types/src/lib.rs index 8ef2cf7dcf..7b7cf16ef5 100644 --- a/console/types/src/lib.rs +++ b/console/types/src/lib.rs @@ -50,7 +50,7 @@ pub mod modules { #[cfg(feature = "integers")] pub use snarkvm_console_types_integers as integers; #[cfg(feature = "integers")] - pub use snarkvm_console_types_integers::{I128, I16, I32, I64, I8, U128, U16, U32, U64, U8}; + pub use snarkvm_console_types_integers::{I8, I16, I32, I64, I128, U8, U16, U32, U64, U128}; #[cfg(feature = "scalar")] pub use snarkvm_console_types_scalar as scalar; diff --git a/console/types/string/Cargo.toml b/console/types/string/Cargo.toml index 59b9abf297..f33bed0cfb 100644 --- a/console/types/string/Cargo.toml +++ b/console/types/string/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-console-types-string" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Type operations for a decentralized virtual machine" homepage = "https://aleo.org" @@ -10,19 +10,19 @@ edition = "2021" [dependencies.snarkvm-console-network-environment] path = "../../network/environment" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-boolean] path = "../boolean" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-field] path = "../field" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-console-types-integers] path = "../integers" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.bincode] version = "1.3" diff --git a/curves/Cargo.toml b/curves/Cargo.toml index 369960f0a0..7d2721fdb0 100644 --- a/curves/Cargo.toml +++ b/curves/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-curves" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Curves for a decentralized virtual machine" homepage = "https://aleo.org" @@ -36,12 +36,12 @@ harness = false [dependencies.snarkvm-fields] path = "../fields" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-utilities] path = "../utilities" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.rand] diff --git a/curves/benches/bls12_377/ec.rs b/curves/benches/bls12_377/ec.rs index 7fe0c236e7..c9fe867d87 100644 --- a/curves/benches/bls12_377/ec.rs +++ b/curves/benches/bls12_377/ec.rs @@ -15,9 +15,9 @@ pub(crate) mod g1 { use snarkvm_curves::{ + AffineCurve, bls12_377::{Fr, G1Affine, G1Projective as G1}, traits::ProjectiveCurve, - AffineCurve, }; use snarkvm_utilities::rand::{TestRng, Uniform}; diff --git a/curves/build.rs b/curves/build.rs index d43180e82c..81fb6894f5 100644 --- a/curves/build.rs +++ b/curves/build.rs @@ -14,7 +14,7 @@ // limitations under the License. // Detect the rustc channel -use rustc_version::{version_meta, Channel}; +use rustc_version::{Channel, version_meta}; fn main() { // Set cfg flags depending on release channel diff --git a/curves/src/bls12_377/fq12.rs b/curves/src/bls12_377/fq12.rs index fc643af0d4..00a98ecd9d 100644 --- a/curves/src/bls12_377/fq12.rs +++ b/curves/src/bls12_377/fq12.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use snarkvm_fields::{field, Fp12, Fp12Parameters}; +use snarkvm_fields::{Fp12, Fp12Parameters, field}; use snarkvm_utilities::biginteger::BigInteger384 as BigInteger; use crate::bls12_377::{Fq, Fq2, Fq6Parameters}; diff --git a/curves/src/bls12_377/fq2.rs b/curves/src/bls12_377/fq2.rs index 771e92c2a4..d939091e0d 100644 --- a/curves/src/bls12_377/fq2.rs +++ b/curves/src/bls12_377/fq2.rs @@ -15,7 +15,7 @@ use serde::{Deserialize, Serialize}; -use snarkvm_fields::{field, Field, Fp2, Fp2Parameters}; +use snarkvm_fields::{Field, Fp2, Fp2Parameters, field}; use snarkvm_utilities::biginteger::BigInteger384 as BigInteger; use crate::bls12_377::Fq; diff --git a/curves/src/bls12_377/fq6.rs b/curves/src/bls12_377/fq6.rs index 7f537c16b8..464e5d1e96 100644 --- a/curves/src/bls12_377/fq6.rs +++ b/curves/src/bls12_377/fq6.rs @@ -14,9 +14,9 @@ // limitations under the License. use snarkvm_fields::{ + Fp2Parameters, field, fp6_3over2::{Fp6, Fp6Parameters}, - Fp2Parameters, }; use snarkvm_utilities::biginteger::BigInteger384; diff --git a/curves/src/bls12_377/g1.rs b/curves/src/bls12_377/g1.rs index 247132bd8f..f7c23bdfd5 100644 --- a/curves/src/bls12_377/g1.rs +++ b/curves/src/bls12_377/g1.rs @@ -13,19 +13,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -use snarkvm_fields::{field, Field, One, PrimeField, Zero}; +use snarkvm_fields::{Field, One, PrimeField, Zero, field}; use snarkvm_utilities::{ - biginteger::{BigInteger256, BigInteger384}, BigInteger, BitIteratorBE, + biginteger::{BigInteger256, BigInteger384}, }; use crate::{ + AffineCurve, + ProjectiveCurve, bls12_377::{Fq, Fr}, templates::bls12::Bls12Parameters, traits::{ModelParameters, ShortWeierstrassParameters}, - AffineCurve, - ProjectiveCurve, }; use std::ops::Neg; diff --git a/curves/src/bls12_377/g2.rs b/curves/src/bls12_377/g2.rs index 2d6fe48bfe..ff2f1a8d9f 100644 --- a/curves/src/bls12_377/g2.rs +++ b/curves/src/bls12_377/g2.rs @@ -13,18 +13,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -use snarkvm_fields::{field, Field, PrimeField, Zero}; +use snarkvm_fields::{Field, PrimeField, Zero, field}; use snarkvm_utilities::{ - biginteger::{BigInteger256, BigInteger384}, BigInteger, BitIteratorBE, + biginteger::{BigInteger256, BigInteger384}, }; use crate::{ - bls12_377::{g1::Bls12_377G1Parameters, Fq, Fq2, Fr}, - traits::{ModelParameters, ShortWeierstrassParameters}, AffineCurve, ProjectiveCurve, + bls12_377::{Fq, Fq2, Fr, g1::Bls12_377G1Parameters}, + traits::{ModelParameters, ShortWeierstrassParameters}, }; use std::ops::Neg; diff --git a/curves/src/bls12_377/parameters.rs b/curves/src/bls12_377/parameters.rs index f82c19b5e6..dd3f489142 100644 --- a/curves/src/bls12_377/parameters.rs +++ b/curves/src/bls12_377/parameters.rs @@ -15,13 +15,13 @@ use crate::{ bls12_377::{ - g1::Bls12_377G1Parameters, - g2::Bls12_377G2Parameters, Fq, - Fq12, - Fq12Parameters, Fq2Parameters, Fq6Parameters, + Fq12, + Fq12Parameters, + g1::Bls12_377G1Parameters, + g2::Bls12_377G2Parameters, }, templates::bls12::{ Bls12, diff --git a/curves/src/bls12_377/tests.rs b/curves/src/bls12_377/tests.rs index ede1e55e8a..9c63aa4044 100644 --- a/curves/src/bls12_377/tests.rs +++ b/curves/src/bls12_377/tests.rs @@ -16,15 +16,13 @@ #![allow(unused_imports)] use crate::{ bls12_377::{ - g1::Bls12_377G1Parameters, - g2::Bls12_377G2Parameters, Bls12_377, Fq, - Fq12, Fq2, Fq2Parameters, Fq6, Fq6Parameters, + Fq12, FqParameters, Fr, FrParameters, @@ -32,9 +30,15 @@ use crate::{ G1Projective, G2Affine, G2Projective, + g1::Bls12_377G1Parameters, + g2::Bls12_377G2Parameters, }, templates::{short_weierstrass_jacobian::tests::sw_tests, twisted_edwards_extended::tests::edwards_test}, traits::{ + AffineCurve, + PairingEngine, + ProjectiveCurve, + ShortWeierstrassParameters, tests_field::{ bench_sqrt, field_serialization_test, @@ -46,14 +50,9 @@ use crate::{ }, tests_group::*, tests_projective::curve_tests, - AffineCurve, - PairingEngine, - ProjectiveCurve, - ShortWeierstrassParameters, }, }; use snarkvm_fields::{ - fp6_3over2::Fp6Parameters, FftField, FftParameters, Field, @@ -64,11 +63,12 @@ use snarkvm_fields::{ PrimeField, SquareRootField, Zero, + fp6_3over2::Fp6Parameters, }; use snarkvm_utilities::{ + BitIteratorBE, biginteger::{BigInteger, BigInteger256, BigInteger384}, rand::{TestRng, Uniform}, - BitIteratorBE, }; use rand::Rng; diff --git a/curves/src/edwards_bls12/tests.rs b/curves/src/edwards_bls12/tests.rs index ac996b1b79..9e77d4da40 100644 --- a/curves/src/edwards_bls12/tests.rs +++ b/curves/src/edwards_bls12/tests.rs @@ -17,20 +17,20 @@ use crate::{ edwards_bls12::*, templates::twisted_edwards_extended::tests::{edwards_test, montgomery_conversion_test}, traits::{ - tests_field::{field_serialization_test, field_test, primefield_test}, - tests_group::*, - tests_projective::curve_tests, AffineCurve, MontgomeryParameters, ProjectiveCurve, TwistedEdwardsParameters, + tests_field::{field_serialization_test, field_test, primefield_test}, + tests_group::*, + tests_projective::curve_tests, }, }; use snarkvm_fields::{Field, LegendreSymbol, One, SquareRootField, Zero}; use snarkvm_utilities::{ + ToBytes, rand::{TestRng, Uniform}, to_bytes_le, - ToBytes, }; use rand::Rng; diff --git a/curves/src/templates/bls12/bls12.rs b/curves/src/templates/bls12/bls12.rs index 5f1802b28c..d275040ec2 100644 --- a/curves/src/templates/bls12/bls12.rs +++ b/curves/src/templates/bls12/bls12.rs @@ -14,6 +14,7 @@ // limitations under the License. use crate::{ + AffineCurve, templates::{ bls12::{ g1::{G1Affine, G1Prepared, G1Projective}, @@ -22,19 +23,18 @@ use crate::{ short_weierstrass_jacobian, }, traits::{ModelParameters, PairingCurve, PairingEngine, ShortWeierstrassParameters}, - AffineCurve, }; use snarkvm_fields::{ - fp6_3over2::Fp6Parameters, Field, - Fp12, - Fp12Parameters, Fp2, Fp2Parameters, + Fp12, + Fp12Parameters, One, PrimeField, SquareRootField, Zero, + fp6_3over2::Fp6Parameters, }; use snarkvm_utilities::bititerator::BitIteratorBE; diff --git a/curves/src/templates/bls12/g1.rs b/curves/src/templates/bls12/g1.rs index 7c050790b0..fdea8e7445 100644 --- a/curves/src/templates/bls12/g1.rs +++ b/curves/src/templates/bls12/g1.rs @@ -21,7 +21,7 @@ use crate::{ traits::AffineCurve, }; use snarkvm_fields::Zero; -use snarkvm_utilities::{serialize::*, FromBytes, ToBytes}; +use snarkvm_utilities::{FromBytes, ToBytes, serialize::*}; use std::io::{Read, Result as IoResult, Write}; diff --git a/curves/src/templates/bls12/g2.rs b/curves/src/templates/bls12/g2.rs index 826c4409a9..1cb3c4e54d 100644 --- a/curves/src/templates/bls12/g2.rs +++ b/curves/src/templates/bls12/g2.rs @@ -21,7 +21,7 @@ use crate::{ traits::{AffineCurve, ShortWeierstrassParameters}, }; use snarkvm_fields::{Field, Fp2, One, Zero}; -use snarkvm_utilities::{bititerator::BitIteratorBE, serialize::*, ToBytes}; +use snarkvm_utilities::{ToBytes, bititerator::BitIteratorBE, serialize::*}; use std::io::{Result as IoResult, Write}; diff --git a/curves/src/templates/short_weierstrass_jacobian/affine.rs b/curves/src/templates/short_weierstrass_jacobian/affine.rs index b4cbedb071..b339bae637 100644 --- a/curves/src/templates/short_weierstrass_jacobian/affine.rs +++ b/curves/src/templates/short_weierstrass_jacobian/affine.rs @@ -20,12 +20,12 @@ use crate::{ }; use snarkvm_fields::{Field, One, SquareRootField, Zero}; use snarkvm_utilities::{ + FromBytes, + ToBytes, bititerator::BitIteratorBE, io::{Error, ErrorKind, Read, Result as IoResult, Write}, rand::Uniform, serialize::*, - FromBytes, - ToBytes, }; use core::{ @@ -33,8 +33,8 @@ use core::{ ops::{Mul, Neg}, }; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; use serde::{Deserialize, Serialize}; diff --git a/curves/src/templates/short_weierstrass_jacobian/projective.rs b/curves/src/templates/short_weierstrass_jacobian/projective.rs index 4d3557c654..3b0f5b34fb 100644 --- a/curves/src/templates/short_weierstrass_jacobian/projective.rs +++ b/curves/src/templates/short_weierstrass_jacobian/projective.rs @@ -17,8 +17,8 @@ use crate::{ templates::short_weierstrass_jacobian::Affine, traits::{AffineCurve, ProjectiveCurve, ShortWeierstrassParameters as Parameters}, }; -use snarkvm_fields::{impl_add_sub_from_field_ref, Field, One, Zero}; -use snarkvm_utilities::{cfg_iter_mut, rand::Uniform, serialize::*, FromBytes, ToBytes}; +use snarkvm_fields::{Field, One, Zero, impl_add_sub_from_field_ref}; +use snarkvm_utilities::{FromBytes, ToBytes, cfg_iter_mut, rand::Uniform, serialize::*}; use core::{ fmt::{Display, Formatter, Result as FmtResult}, @@ -26,8 +26,8 @@ use core::{ ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}, }; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; #[cfg(not(feature = "serial"))] use rayon::prelude::*; diff --git a/curves/src/templates/short_weierstrass_jacobian/tests.rs b/curves/src/templates/short_weierstrass_jacobian/tests.rs index f698a172aa..74b473183e 100644 --- a/curves/src/templates/short_weierstrass_jacobian/tests.rs +++ b/curves/src/templates/short_weierstrass_jacobian/tests.rs @@ -17,12 +17,12 @@ use super::{Affine, Projective}; use crate::{AffineCurve, ProjectiveCurve, ShortWeierstrassParameters}; use snarkvm_fields::Zero; use snarkvm_utilities::{ - io::Cursor, - rand::Uniform, - serialize::{CanonicalDeserialize, CanonicalSerialize}, Compress, TestRng, Validate, + io::Cursor, + rand::Uniform, + serialize::{CanonicalDeserialize, CanonicalSerialize}, }; pub const ITERATIONS: usize = 10; diff --git a/curves/src/templates/twisted_edwards_extended/affine.rs b/curves/src/templates/twisted_edwards_extended/affine.rs index 27b5b0aaa6..a6712a3303 100644 --- a/curves/src/templates/twisted_edwards_extended/affine.rs +++ b/curves/src/templates/twisted_edwards_extended/affine.rs @@ -20,12 +20,12 @@ use crate::{ }; use snarkvm_fields::{Field, One, PrimeField, SquareRootField, Zero}; use snarkvm_utilities::{ + FromBytes, + ToBytes, bititerator::BitIteratorBE, io::{Read, Result as IoResult, Write}, rand::Uniform, serialize::*, - FromBytes, - ToBytes, }; use core::{ @@ -33,8 +33,8 @@ use core::{ ops::{Mul, Neg}, }; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; use serde::{Deserialize, Serialize}; diff --git a/curves/src/templates/twisted_edwards_extended/projective.rs b/curves/src/templates/twisted_edwards_extended/projective.rs index 6d1457c80c..0cdc2f7d3c 100644 --- a/curves/src/templates/twisted_edwards_extended/projective.rs +++ b/curves/src/templates/twisted_edwards_extended/projective.rs @@ -17,8 +17,8 @@ use crate::{ templates::twisted_edwards_extended::Affine, traits::{AffineCurve, ProjectiveCurve, TwistedEdwardsParameters as Parameters}, }; -use snarkvm_fields::{impl_add_sub_from_field_ref, Field, One, PrimeField, Zero}; -use snarkvm_utilities::{bititerator::BitIteratorBE, rand::Uniform, serialize::*, FromBytes, ToBytes}; +use snarkvm_fields::{Field, One, PrimeField, Zero, impl_add_sub_from_field_ref}; +use snarkvm_utilities::{FromBytes, ToBytes, bititerator::BitIteratorBE, rand::Uniform, serialize::*}; use core::{ fmt::{Display, Formatter, Result as FmtResult}, @@ -26,8 +26,8 @@ use core::{ ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}, }; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; use std::io::{Read, Result as IoResult, Write}; diff --git a/curves/src/templates/twisted_edwards_extended/tests.rs b/curves/src/templates/twisted_edwards_extended/tests.rs index ef7a8ae006..0412c2595a 100644 --- a/curves/src/templates/twisted_edwards_extended/tests.rs +++ b/curves/src/templates/twisted_edwards_extended/tests.rs @@ -16,14 +16,14 @@ use super::{Affine, Projective}; use snarkvm_utilities::{ - io::Cursor, - rand::Uniform, - serialize::{CanonicalDeserialize, CanonicalSerialize}, - to_bytes_le, Compress, TestRng, ToBytes, Validate, + io::Cursor, + rand::Uniform, + serialize::{CanonicalDeserialize, CanonicalSerialize}, + to_bytes_le, }; use crate::traits::{AffineCurve, MontgomeryParameters, ProjectiveCurve, TwistedEdwardsParameters}; diff --git a/curves/src/traits/group.rs b/curves/src/traits/group.rs index 5d5902adfd..c7ca15a80e 100644 --- a/curves/src/traits/group.rs +++ b/curves/src/traits/group.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{templates::short_weierstrass_jacobian, PairingEngine}; +use crate::{PairingEngine, templates::short_weierstrass_jacobian}; use snarkvm_fields::{Field, PrimeField, SquareRootField, Zero}; -use snarkvm_utilities::{rand::Uniform, serialize::*, FromBytes, ToBytes}; +use snarkvm_utilities::{FromBytes, ToBytes, rand::Uniform, serialize::*}; use core::{ fmt::{Debug, Display}, @@ -23,7 +23,7 @@ use core::{ iter, ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}, }; -use serde::{de::DeserializeOwned, Serialize}; +use serde::{Serialize, de::DeserializeOwned}; /// Projective representation of an elliptic curve point guaranteed to be in the prime order subgroup. pub trait ProjectiveCurve: diff --git a/curves/src/traits/tests_field.rs b/curves/src/traits/tests_field.rs index 620d0f4339..76137b31af 100644 --- a/curves/src/traits/tests_field.rs +++ b/curves/src/traits/tests_field.rs @@ -14,12 +14,12 @@ // limitations under the License. use snarkvm_fields::{ - traits::{FftParameters, FieldParameters}, FftField, Field, LegendreSymbol, PrimeField, SquareRootField, + traits::{FftParameters, FieldParameters}, }; use snarkvm_utilities::{ io::Cursor, diff --git a/fields/Cargo.toml b/fields/Cargo.toml index 60914b7fc2..53bca86512 100644 --- a/fields/Cargo.toml +++ b/fields/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-fields" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Fields for a decentralized virtual machine" homepage = "https://aleo.org" @@ -30,7 +30,7 @@ harness = false [dependencies.snarkvm-utilities] path = "../utilities" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.aleo-std] diff --git a/fields/src/fp12_2over3over2.rs b/fields/src/fp12_2over3over2.rs index d2b5992bb1..f890ae6c1b 100644 --- a/fields/src/fp12_2over3over2.rs +++ b/fields/src/fp12_2over3over2.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{fp6_3over2::*, Field, Fp2, Fp2Parameters, One, Zero}; -use snarkvm_utilities::{bititerator::BitIteratorBE, rand::Uniform, serialize::*, FromBytes, ToBits, ToBytes}; +use crate::{Field, Fp2, Fp2Parameters, One, Zero, fp6_3over2::*}; +use snarkvm_utilities::{FromBytes, ToBits, ToBytes, bititerator::BitIteratorBE, rand::Uniform, serialize::*}; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; use serde::{Deserialize, Serialize}; use std::{ diff --git a/fields/src/fp2.rs b/fields/src/fp2.rs index cab2cb54bf..72a260b85b 100644 --- a/fields/src/fp2.rs +++ b/fields/src/fp2.rs @@ -15,16 +15,16 @@ use crate::{Field, LegendreSymbol, One, PrimeField, SquareRootField, Zero}; use snarkvm_utilities::{ - rand::Uniform, - serialize::{SerializationError, *}, FromBytes, ToBits, ToBytes, + rand::Uniform, + serialize::{SerializationError, *}, }; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; use serde::{Deserialize, Serialize}; use std::{ diff --git a/fields/src/fp6_3over2.rs b/fields/src/fp6_3over2.rs index fff684d183..d7ba904c76 100644 --- a/fields/src/fp6_3over2.rs +++ b/fields/src/fp6_3over2.rs @@ -15,16 +15,16 @@ use crate::{Field, Fp2, Fp2Parameters, One, Zero}; use snarkvm_utilities::{ - rand::Uniform, - serialize::{SerializationError, *}, FromBytes, ToBits, ToBytes, + rand::Uniform, + serialize::{SerializationError, *}, }; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; use serde::{Deserialize, Serialize}; use std::{ diff --git a/fields/src/fp_256.rs b/fields/src/fp_256.rs index ad29fd01a7..7d6cc1495d 100644 --- a/fields/src/fp_256.rs +++ b/fields/src/fp_256.rs @@ -14,8 +14,6 @@ // limitations under the License. use crate::{ - impl_add_sub_from_field_ref, - impl_mul_div_from_field_ref, FftField, Field, FieldError, @@ -27,13 +25,15 @@ use crate::{ PrimeField, SquareRootField, Zero, + impl_add_sub_from_field_ref, + impl_mul_div_from_field_ref, }; use snarkvm_utilities::{ - biginteger::{arithmetic as fa, BigInteger as _BigInteger, BigInteger256 as BigInteger}, - serialize::CanonicalDeserialize, FromBytes, ToBits, ToBytes, + biginteger::{BigInteger as _BigInteger, BigInteger256 as BigInteger, arithmetic as fa}, + serialize::CanonicalDeserialize, }; use std::{ diff --git a/fields/src/fp_384.rs b/fields/src/fp_384.rs index 68263ed418..d1ff2ee895 100644 --- a/fields/src/fp_384.rs +++ b/fields/src/fp_384.rs @@ -14,8 +14,6 @@ // limitations under the License. use crate::{ - impl_add_sub_from_field_ref, - impl_mul_div_from_field_ref, FftField, Field, FieldError, @@ -27,13 +25,15 @@ use crate::{ PrimeField, SquareRootField, Zero, + impl_add_sub_from_field_ref, + impl_mul_div_from_field_ref, }; use snarkvm_utilities::{ - biginteger::{arithmetic as fa, BigInteger as _BigInteger, BigInteger384 as BigInteger}, - serialize::CanonicalDeserialize, FromBytes, ToBits, ToBytes, + biginteger::{BigInteger as _BigInteger, BigInteger384 as BigInteger, arithmetic as fa}, + serialize::CanonicalDeserialize, }; use std::{ diff --git a/fields/src/lib.rs b/fields/src/lib.rs index e3c19edd4c..c21d4f764b 100644 --- a/fields/src/lib.rs +++ b/fields/src/lib.rs @@ -50,10 +50,10 @@ pub mod traits; pub use traits::*; use snarkvm_utilities::{ - biginteger::*, - serialize::{CanonicalDeserialize, CanonicalDeserializeWithFlags, CanonicalSerialize, CanonicalSerializeWithFlags}, FromBytes, ToBytes, + biginteger::*, + serialize::{CanonicalDeserialize, CanonicalDeserializeWithFlags, CanonicalSerialize, CanonicalSerializeWithFlags}, }; impl_field_to_biginteger!(Fp256, BigInteger256, Fp256Parameters); diff --git a/fields/src/macros.rs b/fields/src/macros.rs index d865c2841c..ac17e9ece4 100644 --- a/fields/src/macros.rs +++ b/fields/src/macros.rs @@ -193,7 +193,7 @@ macro_rules! impl_primefield_serializer { mut writer: W, flags: F, ) -> Result<(), snarkvm_utilities::serialize::SerializationError> { - use snarkvm_utilities::serialize::{number_of_bits_and_bytes, SerializationError}; + use snarkvm_utilities::serialize::{SerializationError, number_of_bits_and_bytes}; // All reasonable `Flags` should be less than 8 bits in size // (256 values are enough for anyone!) if F::BIT_SIZE > 8 { diff --git a/fields/src/traits/field.rs b/fields/src/traits/field.rs index efd55a310a..fe3309e162 100644 --- a/fields/src/traits/field.rs +++ b/fields/src/traits/field.rs @@ -15,6 +15,9 @@ use crate::{One, PrimeField, Zero}; use snarkvm_utilities::{ + FromBytes, + ToBits, + ToBytes, bititerator::BitIteratorBE, rand::Uniform, serialize::{ @@ -25,9 +28,6 @@ use snarkvm_utilities::{ EmptyFlags, Flags, }, - FromBytes, - ToBits, - ToBytes, }; use std::{ diff --git a/fields/src/traits/poseidon_default.rs b/fields/src/traits/poseidon_default.rs index 4f0b5d1266..0c5d3dd582 100644 --- a/fields/src/traits/poseidon_default.rs +++ b/fields/src/traits/poseidon_default.rs @@ -13,11 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{serial_batch_inversion_and_mul, PoseidonGrainLFSR, PrimeField}; +use crate::{PoseidonGrainLFSR, PrimeField, serial_batch_inversion_and_mul}; use aleo_std::{end_timer, start_timer}; use itertools::Itertools; -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; /// Parameters and RNG used #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/fields/src/traits/poseidon_grain_lfsr.rs b/fields/src/traits/poseidon_grain_lfsr.rs index cf51010db8..e090096453 100644 --- a/fields/src/traits/poseidon_grain_lfsr.rs +++ b/fields/src/traits/poseidon_grain_lfsr.rs @@ -16,9 +16,9 @@ #![allow(dead_code)] use crate::{FieldParameters, PrimeField}; -use snarkvm_utilities::{vec::Vec, FromBits}; +use snarkvm_utilities::{FromBits, vec::Vec}; -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; pub struct PoseidonGrainLFSR { pub field_size_in_bits: u64, diff --git a/ledger/Cargo.toml b/ledger/Cargo.toml index 61668dbc2c..c2eca6484a 100644 --- a/ledger/Cargo.toml +++ b/ledger/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A node ledger for a decentralized virtual machine" homepage = "https://aleo.org" @@ -62,54 +62,54 @@ timer = [ "aleo-std/timer" ] [dependencies.console] package = "snarkvm-console" path = "../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-authority] package = "snarkvm-ledger-authority" path = "./authority" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-block] package = "snarkvm-ledger-block" path = "./block" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-committee] package = "snarkvm-ledger-committee" path = "./committee" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal] package = "snarkvm-ledger-narwhal" path = "./narwhal" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-puzzle] package = "snarkvm-ledger-puzzle" path = "puzzle" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-query] package = "snarkvm-ledger-query" path = "./query" -version = "=0.16.19" +version = "=1.0.0" features = [ "query" ] [dependencies.ledger-store] package = "snarkvm-ledger-store" path = "./store" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-test-helpers] package = "snarkvm-ledger-test-helpers" path = "./test-helpers" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.synthesizer] package = "snarkvm-synthesizer" path = "../synthesizer" -version = "=0.16.19" +version = "=1.0.0" [dependencies.aleo-std] version = "0.1.24" diff --git a/ledger/authority/Cargo.toml b/ledger/authority/Cargo.toml index d0d699121f..45fd41b818 100644 --- a/ledger/authority/Cargo.toml +++ b/ledger/authority/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-authority" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Data structures for a block authority in a decentralized virtual machine" homepage = "https://aleo.org" @@ -32,12 +32,12 @@ test-helpers = [ "narwhal-subdag/test-helpers" ] [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.narwhal-subdag] package = "snarkvm-ledger-narwhal-subdag" path = "../narwhal/subdag" -version = "=0.16.19" +version = "=1.0.0" [dependencies.anyhow] version = "1" diff --git a/ledger/authority/src/lib.rs b/ledger/authority/src/lib.rs index 7149a20d8a..526be0cfc8 100644 --- a/ledger/authority/src/lib.rs +++ b/ledger/authority/src/lib.rs @@ -24,10 +24,6 @@ use console::{ account::{Address, PrivateKey, Signature}, network::Network, prelude::{ - de, - error, - fmt, - ser, Debug, Deserialize, DeserializeExt, @@ -46,6 +42,10 @@ use console::{ ToBytes, ToBytesSerializer, Write, + de, + error, + fmt, + ser, }, types::Field, }; diff --git a/ledger/benches/transaction.rs b/ledger/benches/transaction.rs index 9e3e337fe7..933b0918c0 100644 --- a/ledger/benches/transaction.rs +++ b/ledger/benches/transaction.rs @@ -24,8 +24,8 @@ use console::{ program::{Plaintext, Record, Value}, }; use ledger_block::Transition; -use ledger_store::{helpers::memory::ConsensusMemory, ConsensusStore}; -use synthesizer::{program::Program, VM}; +use ledger_store::{ConsensusStore, helpers::memory::ConsensusMemory}; +use synthesizer::{VM, program::Program}; use criterion::Criterion; use indexmap::IndexMap; diff --git a/ledger/block/Cargo.toml b/ledger/block/Cargo.toml index afda47f922..4429ab54e8 100644 --- a/ledger/block/Cargo.toml +++ b/ledger/block/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-block" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A block for a decentralized virtual machine" homepage = "https://aleo.org" @@ -39,52 +39,52 @@ test = [ ] [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-authority] package = "snarkvm-ledger-authority" path = "../authority" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-committee] package = "snarkvm-ledger-committee" path = "../../ledger/committee" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal-batch-header] package = "snarkvm-ledger-narwhal-batch-header" path = "../narwhal/batch-header" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal-data] package = "snarkvm-ledger-narwhal-data" path = "../narwhal/data" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal-subdag] package = "snarkvm-ledger-narwhal-subdag" path = "../narwhal/subdag" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal-transmission-id] package = "snarkvm-ledger-narwhal-transmission-id" path = "../narwhal/transmission-id" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-puzzle] package = "snarkvm-ledger-puzzle" path = "../puzzle" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-program] package = "snarkvm-synthesizer-program" path = "../../synthesizer/program" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-snark] package = "snarkvm-synthesizer-snark" path = "../../synthesizer/snark" -version = "=0.16.19" +version = "=1.0.0" [dependencies.indexmap] version = "2.0" diff --git a/ledger/block/src/header/mod.rs b/ledger/block/src/header/mod.rs index 5a037cb4a9..27ba50e113 100644 --- a/ledger/block/src/header/mod.rs +++ b/ledger/block/src/header/mod.rs @@ -26,7 +26,7 @@ mod verify; use crate::{Ratifications, Transactions}; use console::{ network::prelude::*, - program::{HeaderLeaf, HeaderPath, HeaderTree, HEADER_DEPTH}, + program::{HEADER_DEPTH, HeaderLeaf, HeaderPath, HeaderTree}, types::Field, }; use synthesizer_program::FinalizeOperation; diff --git a/ledger/block/src/helpers/target.rs b/ledger/block/src/helpers/target.rs index 33738bf199..86c2507bd6 100644 --- a/ledger/block/src/helpers/target.rs +++ b/ledger/block/src/helpers/target.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use console::prelude::{ensure, Network, Result}; +use console::prelude::{Network, Result, ensure}; /// A safety bound (sanity-check) for the coinbase reward. pub const MAX_COINBASE_REWARD: u64 = 190_258_739; // Coinbase reward at block 1. @@ -302,7 +302,7 @@ pub fn to_next_targets( #[cfg(test)] mod tests { use super::*; - use console::network::{prelude::*, MainnetV0}; + use console::network::{MainnetV0, prelude::*}; type CurrentNetwork = MainnetV0; diff --git a/ledger/block/src/lib.rs b/ledger/block/src/lib.rs index db74bebbcd..7b5bc28e45 100644 --- a/ledger/block/src/lib.rs +++ b/ledger/block/src/lib.rs @@ -605,7 +605,7 @@ pub mod test_helpers { use super::*; use console::account::{Address, PrivateKey}; use ledger_query::Query; - use ledger_store::{helpers::memory::BlockMemory, BlockStore}; + use ledger_store::{BlockStore, helpers::memory::BlockMemory}; use synthesizer_process::Process; use once_cell::sync::OnceCell; diff --git a/ledger/block/src/ratifications/mod.rs b/ledger/block/src/ratifications/mod.rs index fae27a4fce..4c6a16138c 100644 --- a/ledger/block/src/ratifications/mod.rs +++ b/ledger/block/src/ratifications/mod.rs @@ -20,7 +20,7 @@ mod string; use crate::Ratify; use console::{ network::prelude::*, - program::{RatificationsPath, RatificationsTree, RATIFICATIONS_DEPTH}, + program::{RATIFICATIONS_DEPTH, RatificationsPath, RatificationsTree}, types::Field, }; diff --git a/ledger/block/src/transaction/fee/mod.rs b/ledger/block/src/transaction/fee/mod.rs index f214136bd1..eaa2a07f8a 100644 --- a/ledger/block/src/transaction/fee/mod.rs +++ b/ledger/block/src/transaction/fee/mod.rs @@ -203,7 +203,7 @@ pub mod test_helpers { use super::*; use console::types::Field; use ledger_query::Query; - use ledger_store::{helpers::memory::BlockMemory, BlockStore}; + use ledger_store::{BlockStore, helpers::memory::BlockMemory}; use synthesizer_process::Process; use once_cell::sync::OnceCell; diff --git a/ledger/block/src/transaction/mod.rs b/ledger/block/src/transaction/mod.rs index ed9397ac6e..61e49e6afe 100644 --- a/ledger/block/src/transaction/mod.rs +++ b/ledger/block/src/transaction/mod.rs @@ -30,7 +30,7 @@ mod string; use crate::Transition; use console::{ network::prelude::*, - program::{Ciphertext, ProgramOwner, Record, TransactionLeaf, TransactionPath, TransactionTree, TRANSACTION_DEPTH}, + program::{Ciphertext, ProgramOwner, Record, TRANSACTION_DEPTH, TransactionLeaf, TransactionPath, TransactionTree}, types::{Field, Group, U64}, }; diff --git a/ledger/block/src/transactions/confirmed/mod.rs b/ledger/block/src/transactions/confirmed/mod.rs index 9737a0b9b9..9593e2ace5 100644 --- a/ledger/block/src/transactions/confirmed/mod.rs +++ b/ledger/block/src/transactions/confirmed/mod.rs @@ -17,7 +17,7 @@ mod bytes; mod serialize; mod string; -use crate::{rejected::Rejected, Transaction}; +use crate::{Transaction, rejected::Rejected}; use console::{network::prelude::*, program::FINALIZE_ID_DEPTH, types::Field}; use synthesizer_program::FinalizeOperation; diff --git a/ledger/block/src/transactions/mod.rs b/ledger/block/src/transactions/mod.rs index d5dd046919..39628f15bb 100644 --- a/ledger/block/src/transactions/mod.rs +++ b/ledger/block/src/transactions/mod.rs @@ -29,13 +29,13 @@ use console::{ network::prelude::*, program::{ Ciphertext, + FINALIZE_ID_DEPTH, + FINALIZE_OPERATIONS_DEPTH, ProgramOwner, Record, + TRANSACTIONS_DEPTH, TransactionsPath, TransactionsTree, - FINALIZE_ID_DEPTH, - FINALIZE_OPERATIONS_DEPTH, - TRANSACTIONS_DEPTH, }, types::{Field, Group, U64}, }; diff --git a/ledger/block/src/transition/mod.rs b/ledger/block/src/transition/mod.rs index 3066dee07b..c72e61b650 100644 --- a/ledger/block/src/transition/mod.rs +++ b/ledger/block/src/transition/mod.rs @@ -27,7 +27,6 @@ mod string; use console::{ network::prelude::*, program::{ - compute_function_id, Ciphertext, Identifier, InputID, @@ -37,12 +36,13 @@ use console::{ Register, Request, Response, + TRANSITION_DEPTH, TransitionLeaf, TransitionPath, TransitionTree, Value, ValueType, - TRANSITION_DEPTH, + compute_function_id, }, types::{Field, Group}, }; diff --git a/ledger/committee/Cargo.toml b/ledger/committee/Cargo.toml index 5fd7c456ab..d59a7d17cd 100644 --- a/ledger/committee/Cargo.toml +++ b/ledger/committee/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-committee" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A committee for a decentralized virtual machine" homepage = "https://aleo.org" @@ -34,11 +34,12 @@ test-helpers = [ "prop-tests", "rand_distr" ] [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal-batch-header] package = "snarkvm-ledger-narwhal-batch-header" path = "../narwhal/batch-header" +version = "=1.0.0" [dependencies.indexmap] version = "2.0" @@ -47,7 +48,7 @@ features = [ "serde", "rayon" ] [dependencies.metrics] package = "snarkvm-metrics" path = "../../metrics" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.serde_json] diff --git a/ledger/committee/src/prop_tests.rs b/ledger/committee/src/prop_tests.rs index c4bb103e63..b04a9dc3f7 100644 --- a/ledger/committee/src/prop_tests.rs +++ b/ledger/committee/src/prop_tests.rs @@ -19,8 +19,8 @@ use console::account::PrivateKey; use anyhow::Result; use proptest::{ - collection::{hash_set, SizeRange}, - prelude::{any, Arbitrary, BoxedStrategy, Just, Strategy}, + collection::{SizeRange, hash_set}, + prelude::{Arbitrary, BoxedStrategy, Just, Strategy, any}, sample::size_range, }; use rand::SeedableRng; diff --git a/ledger/narwhal/Cargo.toml b/ledger/narwhal/Cargo.toml index 49845ebdf1..c90e20183f 100644 --- a/ledger/narwhal/Cargo.toml +++ b/ledger/narwhal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-narwhal" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Data structures for a Narwhal-style memory pool in a decentralized virtual machine" homepage = "https://aleo.org" @@ -64,37 +64,37 @@ transmission-id = [ "narwhal-transmission-id" ] [dependencies.narwhal-batch-certificate] package = "snarkvm-ledger-narwhal-batch-certificate" path = "./batch-certificate" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.narwhal-batch-header] package = "snarkvm-ledger-narwhal-batch-header" path = "./batch-header" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.narwhal-data] package = "snarkvm-ledger-narwhal-data" path = "./data" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.narwhal-subdag] package = "snarkvm-ledger-narwhal-subdag" path = "./subdag" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.narwhal-transmission] package = "snarkvm-ledger-narwhal-transmission" path = "./transmission" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.narwhal-transmission-id] package = "snarkvm-ledger-narwhal-transmission-id" path = "./transmission-id" -version = "=0.16.19" +version = "=1.0.0" optional = true [dev-dependencies.snarkvm-ledger-narwhal] diff --git a/ledger/narwhal/batch-certificate/Cargo.toml b/ledger/narwhal/batch-certificate/Cargo.toml index 799776ab84..1554439139 100644 --- a/ledger/narwhal/batch-certificate/Cargo.toml +++ b/ledger/narwhal/batch-certificate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-narwhal-batch-certificate" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A batch certificate for a Narwhal-style memory pool in a decentralized virtual machine" homepage = "https://aleo.org" @@ -32,17 +32,17 @@ test-helpers = [ "narwhal-batch-header/test-helpers" ] [dependencies.console] package = "snarkvm-console" path = "../../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.narwhal-batch-header] package = "snarkvm-ledger-narwhal-batch-header" path = "../batch-header" -version = "=0.16.19" +version = "=1.0.0" [dependencies.narwhal-transmission-id] package = "snarkvm-ledger-narwhal-transmission-id" path = "../transmission-id" -version = "=0.16.19" +version = "=1.0.0" [dependencies.indexmap] version = "2.0" diff --git a/ledger/narwhal/batch-header/Cargo.toml b/ledger/narwhal/batch-header/Cargo.toml index 5642d135c6..c4a0f7a31e 100644 --- a/ledger/narwhal/batch-header/Cargo.toml +++ b/ledger/narwhal/batch-header/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-narwhal-batch-header" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A batch header for a Narwhal-style memory pool in a decentralized virtual machine" homepage = "https://aleo.org" @@ -32,12 +32,12 @@ test-helpers = [ "narwhal-transmission-id/test-helpers", "time" ] [dependencies.console] package = "snarkvm-console" path = "../../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.narwhal-transmission-id] package = "snarkvm-ledger-narwhal-transmission-id" path = "../transmission-id" -version = "=0.16.19" +version = "=1.0.0" [dependencies.indexmap] version = "2.0" diff --git a/ledger/narwhal/data/Cargo.toml b/ledger/narwhal/data/Cargo.toml index 733978e9d8..988f7353d3 100644 --- a/ledger/narwhal/data/Cargo.toml +++ b/ledger/narwhal/data/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-narwhal-data" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A batch certificate for a Narwhal-style memory pool in a decentralized virtual machine" homepage = "https://aleo.org" @@ -29,7 +29,7 @@ async = [ "tokio" ] [dependencies.console] package = "snarkvm-console" path = "../../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.bytes] version = "1" diff --git a/ledger/narwhal/subdag/Cargo.toml b/ledger/narwhal/subdag/Cargo.toml index b81b71bc65..3b6801f76c 100644 --- a/ledger/narwhal/subdag/Cargo.toml +++ b/ledger/narwhal/subdag/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-narwhal-subdag" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A subdag for a Narwhal-style memory pool in a decentralized virtual machine" homepage = "https://aleo.org" @@ -32,27 +32,27 @@ test-helpers = [ "narwhal-batch-certificate/test-helpers" ] [dependencies.console] package = "snarkvm-console" path = "../../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.narwhal-batch-certificate] package = "snarkvm-ledger-narwhal-batch-certificate" path = "../batch-certificate" -version = "=0.16.19" +version = "=1.0.0" [dependencies.narwhal-batch-header] package = "snarkvm-ledger-narwhal-batch-header" path = "../batch-header" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-committee] package = "snarkvm-ledger-committee" path = "../../committee" -version = "=0.16.19" +version = "=1.0.0" [dependencies.narwhal-transmission-id] package = "snarkvm-ledger-narwhal-transmission-id" path = "../transmission-id" -version = "=0.16.19" +version = "=1.0.0" [dependencies.indexmap] version = "2.0" diff --git a/ledger/narwhal/subdag/src/lib.rs b/ledger/narwhal/subdag/src/lib.rs index 9c87fd63b9..d5f1efc5c6 100644 --- a/ledger/narwhal/subdag/src/lib.rs +++ b/ledger/narwhal/subdag/src/lib.rs @@ -231,7 +231,7 @@ pub mod test_helpers { use super::*; use console::{network::MainnetV0, prelude::TestRng}; - use indexmap::{indexset, IndexSet}; + use indexmap::{IndexSet, indexset}; type CurrentNetwork = MainnetV0; diff --git a/ledger/narwhal/transmission-id/Cargo.toml b/ledger/narwhal/transmission-id/Cargo.toml index 7fbaa3a006..1d0a5153bb 100644 --- a/ledger/narwhal/transmission-id/Cargo.toml +++ b/ledger/narwhal/transmission-id/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-narwhal-transmission-id" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A transmission ID for a Narwhal-style memory pool in a decentralized virtual machine" homepage = "https://aleo.org" @@ -32,12 +32,12 @@ test-helpers = [ ] [dependencies.console] package = "snarkvm-console" path = "../../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-puzzle] package = "snarkvm-ledger-puzzle" path = "../../puzzle" -version = "=0.16.19" +version = "=1.0.0" [dev-dependencies.bincode] version = "1.3" diff --git a/ledger/narwhal/transmission-id/src/lib.rs b/ledger/narwhal/transmission-id/src/lib.rs index b8bb346d04..6f333834ba 100644 --- a/ledger/narwhal/transmission-id/src/lib.rs +++ b/ledger/narwhal/transmission-id/src/lib.rs @@ -21,7 +21,7 @@ mod serialize; mod string; use console::{network::TRANSACTION_PREFIX, prelude::*}; -use ledger_puzzle::{SolutionID, SOLUTION_ID_PREFIX}; +use ledger_puzzle::{SOLUTION_ID_PREFIX, SolutionID}; #[derive(Copy, Clone, PartialEq, Eq, Hash)] pub enum TransmissionID { diff --git a/ledger/narwhal/transmission/Cargo.toml b/ledger/narwhal/transmission/Cargo.toml index f5edc7a49c..4ac74caa5e 100644 --- a/ledger/narwhal/transmission/Cargo.toml +++ b/ledger/narwhal/transmission/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-narwhal-transmission" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A transmission for a Narwhal-style memory pool in a decentralized virtual machine" homepage = "https://aleo.org" @@ -32,22 +32,22 @@ test-helpers = [ ] [dependencies.console] package = "snarkvm-console" path = "../../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-block] package = "snarkvm-ledger-block" path = "../../block" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal-data] package = "snarkvm-ledger-narwhal-data" path = "../data" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-puzzle] package = "snarkvm-ledger-puzzle" path = "../../puzzle" -version = "=0.16.19" +version = "=1.0.0" [dependencies.bytes] version = "1" diff --git a/ledger/puzzle/Cargo.toml b/ledger/puzzle/Cargo.toml index c36d4b0dd0..17acb70d26 100644 --- a/ledger/puzzle/Cargo.toml +++ b/ledger/puzzle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-puzzle" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Puzzle for a decentralized virtual machine" homepage = "https://aleo.org" @@ -32,25 +32,19 @@ required-features = [ "setup" ] [features] default = [ "indexmap/rayon", "rayon" ] cuda = [ "snarkvm-algorithms/cuda" ] -serial = [ - "console/serial", - "snarkvm-algorithms/serial", -] +serial = [ "console/serial", "snarkvm-algorithms/serial" ] setup = [ ] timer = [ "aleo-std/timer" ] -wasm = [ - "console/wasm", - "snarkvm-algorithms/wasm", -] +wasm = [ "console/wasm", "snarkvm-algorithms/wasm" ] [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-algorithms] path = "../../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.aleo-std] version = "0.1.24" @@ -102,4 +96,3 @@ version = "0.8" [dev-dependencies.snarkvm-ledger-puzzle-epoch] path = "epoch" -version = "=0.16.19" diff --git a/ledger/puzzle/benches/puzzle.rs b/ledger/puzzle/benches/puzzle.rs index dd0887d782..6018d894ce 100644 --- a/ledger/puzzle/benches/puzzle.rs +++ b/ledger/puzzle/benches/puzzle.rs @@ -26,7 +26,7 @@ use snarkvm_ledger_puzzle::{Puzzle, PuzzleSolutions}; use snarkvm_ledger_puzzle_epoch::MerklePuzzle; use criterion::Criterion; -use rand::{self, thread_rng, CryptoRng, RngCore}; +use rand::{self, CryptoRng, RngCore, thread_rng}; fn sample_address_and_counter(rng: &mut (impl CryptoRng + RngCore)) -> (Address, u64) { let private_key = PrivateKey::new(rng).unwrap(); diff --git a/ledger/puzzle/epoch/Cargo.toml b/ledger/puzzle/epoch/Cargo.toml index b2a30bf139..90b5e47961 100644 --- a/ledger/puzzle/epoch/Cargo.toml +++ b/ledger/puzzle/epoch/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-puzzle-epoch" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Epoch puzzle for a decentralized virtual machine" homepage = "https://aleo.org" @@ -25,10 +25,7 @@ edition = "2021" [features] default = [ "synthesis", "rayon" ] -serial = [ - "console/serial", - "snarkvm-ledger-puzzle/serial", -] +serial = [ "console/serial", "snarkvm-ledger-puzzle/serial" ] merkle = [ ] synthesis = [ "aleo-std", @@ -44,26 +41,26 @@ wasm = [ "console/wasm" ] [dependencies.circuit] package = "snarkvm-circuit" path = "../../../circuit" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.console] package = "snarkvm-console" path = "../../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-ledger-puzzle] path = "../." -version = "=0.16.19" +version = "=1.0.0" [dependencies.snarkvm-synthesizer-process] path = "../../../synthesizer/process" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-synthesizer-program] path = "../../../synthesizer/program" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.aleo-std] diff --git a/ledger/puzzle/epoch/src/merkle/mod.rs b/ledger/puzzle/epoch/src/merkle/mod.rs index c876f4a577..9161e7e452 100644 --- a/ledger/puzzle/epoch/src/merkle/mod.rs +++ b/ledger/puzzle/epoch/src/merkle/mod.rs @@ -15,7 +15,7 @@ use console::{ network::Network, - prelude::{cfg_into_iter, FromBytes, ToBits as TBits, ToBytes, Uniform}, + prelude::{FromBytes, ToBits as TBits, ToBytes, Uniform, cfg_into_iter}, types::Field, }; use snarkvm_ledger_puzzle::PuzzleTrait; diff --git a/ledger/puzzle/epoch/src/synthesis/helpers/instruction_set.rs b/ledger/puzzle/epoch/src/synthesis/helpers/instruction_set.rs index 17feedd999..81f7bf27ab 100644 --- a/ledger/puzzle/epoch/src/synthesis/helpers/instruction_set.rs +++ b/ledger/puzzle/epoch/src/synthesis/helpers/instruction_set.rs @@ -17,7 +17,7 @@ use crate::synthesis::helpers::{PuzzleDestination, PuzzleInstructionType, Puzzle use console::{ prelude::Zero, program::{Field, Literal, LiteralType, Network}, - types::{I128, I16, I32, I64, I8, U128, U16, U32, U64, U8}, + types::{I8, I16, I32, I64, I128, U8, U16, U32, U64, U128}, }; type Instruction = PuzzleInstructionType; diff --git a/ledger/puzzle/epoch/src/synthesis/helpers/mod.rs b/ledger/puzzle/epoch/src/synthesis/helpers/mod.rs index f6d27f5648..b63ce3d79a 100644 --- a/ledger/puzzle/epoch/src/synthesis/helpers/mod.rs +++ b/ledger/puzzle/epoch/src/synthesis/helpers/mod.rs @@ -40,7 +40,7 @@ use snarkvm_synthesizer_program::Instruction; use anyhow::Result; use indexmap::IndexSet; -use rand::{prelude::*, SeedableRng}; +use rand::{SeedableRng, prelude::*}; use rand_chacha::ChaChaRng; use std::{collections::HashMap, str::FromStr}; diff --git a/ledger/puzzle/epoch/src/synthesis/helpers/register_table.rs b/ledger/puzzle/epoch/src/synthesis/helpers/register_table.rs index fe95e0166f..bbf87ba585 100644 --- a/ledger/puzzle/epoch/src/synthesis/helpers/register_table.rs +++ b/ledger/puzzle/epoch/src/synthesis/helpers/register_table.rs @@ -15,8 +15,8 @@ use crate::synthesis::helpers::{LiteralType, PuzzleRegister}; -use anyhow::{anyhow, bail, Result}; -use indexmap::{indexmap, indexset, IndexMap, IndexSet}; +use anyhow::{Result, anyhow, bail}; +use indexmap::{IndexMap, IndexSet, indexmap, indexset}; /// A register table is used to track the registers for each literal type. /// diff --git a/ledger/puzzle/epoch/src/synthesis/mod.rs b/ledger/puzzle/epoch/src/synthesis/mod.rs index 6a4bc391b5..1441baea82 100644 --- a/ledger/puzzle/epoch/src/synthesis/mod.rs +++ b/ledger/puzzle/epoch/src/synthesis/mod.rs @@ -23,7 +23,7 @@ use circuit::Aleo; use console::network::Network; use snarkvm_ledger_puzzle::PuzzleTrait; -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use core::{marker::PhantomData, num::NonZeroUsize}; use lru::LruCache; use parking_lot::RwLock; diff --git a/ledger/puzzle/epoch/src/synthesis/program/mod.rs b/ledger/puzzle/epoch/src/synthesis/program/mod.rs index 7e08597e9f..d1a1ac2298 100644 --- a/ledger/puzzle/epoch/src/synthesis/program/mod.rs +++ b/ledger/puzzle/epoch/src/synthesis/program/mod.rs @@ -18,7 +18,7 @@ mod to_leaves; mod to_r1cs; use crate::synthesis::helpers::*; -use circuit::{environment::R1CS, Mode}; +use circuit::{Mode, environment::R1CS}; use console::{ account::PrivateKey, network::Network, @@ -29,7 +29,7 @@ use snarkvm_synthesizer_process::{CallStack, Process, Registers, Stack, StackPro use snarkvm_synthesizer_program::{Instruction, Program, RegistersStoreCircuit, StackProgram}; use aleo_std::prelude::{finish, lap, timer}; -use anyhow::{anyhow, bail, ensure, Result}; +use anyhow::{Result, anyhow, bail, ensure}; use rand::Rng; use rand_chacha::ChaChaRng; use std::{ diff --git a/ledger/puzzle/src/lib.rs b/ledger/puzzle/src/lib.rs index c39cd8a1fd..29915fa413 100644 --- a/ledger/puzzle/src/lib.rs +++ b/ledger/puzzle/src/lib.rs @@ -34,6 +34,9 @@ use console::{ algorithms::Sha3_256, collections::kary_merkle_tree::KaryMerkleTree, prelude::{ + FromBits, + Network, + Result, anyhow, bail, cfg_into_iter, @@ -42,9 +45,6 @@ use console::{ cfg_values, ensure, has_duplicates, - FromBits, - Network, - Result, }, types::U64, }; diff --git a/ledger/query/Cargo.toml b/ledger/query/Cargo.toml index 7e10c5af65..de6fce2c4d 100644 --- a/ledger/query/Cargo.toml +++ b/ledger/query/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-query" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A query for a decentralized virtual machine" homepage = "https://aleo.org" @@ -34,18 +34,18 @@ query = [ "ledger-store", "synthesizer-program", "ureq" ] [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-store] package = "snarkvm-ledger-store" path = "../store" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.synthesizer-program] package = "snarkvm-synthesizer-program" path = "../../synthesizer/program" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.async-trait] diff --git a/ledger/src/helpers/bft.rs b/ledger/src/helpers/bft.rs index 2781ab0be5..29c73ca6fb 100644 --- a/ledger/src/helpers/bft.rs +++ b/ledger/src/helpers/bft.rs @@ -20,7 +20,7 @@ use ledger_block::{Ratify, Transaction}; use ledger_narwhal::{Transmission, TransmissionID}; use ledger_puzzle::Solution; -use anyhow::{bail, ensure, Result}; +use anyhow::{Result, bail, ensure}; use std::collections::HashSet; /// Takes in an iterator of transmissions and returns a tuple of ratifications, solutions, and transactions. diff --git a/ledger/src/helpers/supply.rs b/ledger/src/helpers/supply.rs index a846c079c2..6770bbb25b 100644 --- a/ledger/src/helpers/supply.rs +++ b/ledger/src/helpers/supply.rs @@ -16,7 +16,7 @@ use console::network::Network; use ledger_block::Transactions; -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; /// Returns the next total supply in microcredits, given the starting total supply and newly-confirmed transactions. pub fn update_total_supply( diff --git a/ledger/src/lib.rs b/ledger/src/lib.rs index 800ac4d2a8..2774a5fe4d 100644 --- a/ledger/src/lib.rs +++ b/ledger/src/lib.rs @@ -64,8 +64,8 @@ use synthesizer::{ }; use aleo_std::{ - prelude::{finish, lap, timer}, StorageMode, + prelude::{finish, lap, timer}, }; use anyhow::Result; use core::ops::Range; diff --git a/ledger/src/tests.rs b/ledger/src/tests.rs index 2a2d8752d9..cc5989c0e5 100644 --- a/ledger/src/tests.rs +++ b/ledger/src/tests.rs @@ -14,15 +14,15 @@ // limitations under the License. use crate::{ - advance::split_candidate_solutions, - test_helpers::{CurrentAleo, CurrentLedger, CurrentNetwork}, Ledger, RecordsFilter, + advance::split_candidate_solutions, + test_helpers::{CurrentAleo, CurrentLedger, CurrentNetwork}, }; use aleo_std::StorageMode; use console::{ account::{Address, PrivateKey}, - network::{prelude::*, MainnetV0}, + network::{MainnetV0, prelude::*}, program::{Entry, Identifier, Literal, Plaintext, ProgramID, Value}, types::U16, }; @@ -30,9 +30,9 @@ use ledger_authority::Authority; use ledger_block::{Block, ConfirmedTransaction, Execution, Ratify, Rejected, Transaction}; use ledger_committee::{Committee, MIN_VALIDATOR_STAKE}; use ledger_narwhal::{BatchCertificate, BatchHeader, Data, Subdag, Transmission, TransmissionID}; -use ledger_store::{helpers::memory::ConsensusMemory, ConsensusStore}; +use ledger_store::{ConsensusStore, helpers::memory::ConsensusMemory}; use snarkvm_utilities::try_vm_runtime; -use synthesizer::{program::Program, vm::VM, Stack}; +use synthesizer::{Stack, program::Program, vm::VM}; use indexmap::{IndexMap, IndexSet}; use rand::seq::SliceRandom; diff --git a/ledger/store/Cargo.toml b/ledger/store/Cargo.toml index 73f0cb1f48..6e2bc81d8e 100644 --- a/ledger/store/Cargo.toml +++ b/ledger/store/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-store" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A data store for a decentralized virtual machine" homepage = "https://aleo.org" @@ -42,42 +42,42 @@ test = [ ] [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-authority] package = "snarkvm-ledger-authority" path = "../authority" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-block] package = "snarkvm-ledger-block" path = "../block" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-committee] package = "snarkvm-ledger-committee" path = "../committee" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal-batch-certificate] package = "snarkvm-ledger-narwhal-batch-certificate" path = "../narwhal/batch-certificate" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-puzzle] package = "snarkvm-ledger-puzzle" path = "../puzzle" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-program] package = "snarkvm-synthesizer-program" path = "../../synthesizer/program" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-snark] package = "snarkvm-synthesizer-snark" path = "../../synthesizer/snark" -version = "=0.16.19" +version = "=1.0.0" [dependencies.aleo-std-storage] version = "0.1.7" diff --git a/ledger/store/src/block/mod.rs b/ledger/store/src/block/mod.rs index 59e5b4ad86..dd95020619 100644 --- a/ledger/store/src/block/mod.rs +++ b/ledger/store/src/block/mod.rs @@ -17,14 +17,14 @@ pub mod confirmed_tx_type; pub use confirmed_tx_type::*; use crate::{ - atomic_batch_scope, - cow_to_cloned, - cow_to_copied, - helpers::{Map, MapRead}, TransactionStorage, TransactionStore, TransitionStorage, TransitionStore, + atomic_batch_scope, + cow_to_cloned, + cow_to_copied, + helpers::{Map, MapRead}, }; use console::{ network::prelude::*, diff --git a/ledger/store/src/helpers/memory/block.rs b/ledger/store/src/helpers/memory/block.rs index 80a41a69ea..04ee35c308 100644 --- a/ledger/store/src/helpers/memory/block.rs +++ b/ledger/store/src/helpers/memory/block.rs @@ -14,11 +14,11 @@ // limitations under the License. use crate::{ - helpers::memory::{MemoryMap, TransactionMemory, TransitionMemory}, BlockStorage, ConfirmedTxType, TransactionStore, TransitionStore, + helpers::memory::{MemoryMap, TransactionMemory, TransitionMemory}, }; use console::{prelude::*, types::Field}; use ledger_authority::Authority; diff --git a/ledger/store/src/helpers/memory/consensus.rs b/ledger/store/src/helpers/memory/consensus.rs index b80d79eab8..b29a1cad6e 100644 --- a/ledger/store/src/helpers/memory/consensus.rs +++ b/ledger/store/src/helpers/memory/consensus.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::{ - helpers::memory::{BlockMemory, FinalizeMemory, TransactionMemory, TransitionMemory}, BlockStore, ConsensusStorage, FinalizeStore, + helpers::memory::{BlockMemory, FinalizeMemory, TransactionMemory, TransitionMemory}, }; use console::prelude::*; diff --git a/ledger/store/src/helpers/memory/internal/map.rs b/ledger/store/src/helpers/memory/internal/map.rs index 1eb1b535e8..e932b7a416 100644 --- a/ledger/store/src/helpers/memory/internal/map.rs +++ b/ledger/store/src/helpers/memory/internal/map.rs @@ -23,10 +23,10 @@ use core::{borrow::Borrow, hash::Hash}; use parking_lot::{Mutex, RwLock}; use std::{ borrow::Cow, - collections::{btree_map, BTreeMap}, + collections::{BTreeMap, btree_map}, sync::{ - atomic::{AtomicBool, Ordering}, Arc, + atomic::{AtomicBool, Ordering}, }, }; @@ -384,7 +384,7 @@ impl< #[cfg(test)] mod tests { use super::*; - use crate::{atomic_batch_scope, atomic_finalize, FinalizeMode}; + use crate::{FinalizeMode, atomic_batch_scope, atomic_finalize}; use console::{account::Address, network::MainnetV0}; type CurrentNetwork = MainnetV0; diff --git a/ledger/store/src/helpers/memory/internal/nested_map.rs b/ledger/store/src/helpers/memory/internal/nested_map.rs index 0f1caff12f..1133e7a42f 100644 --- a/ledger/store/src/helpers/memory/internal/nested_map.rs +++ b/ledger/store/src/helpers/memory/internal/nested_map.rs @@ -22,10 +22,10 @@ use core::hash::Hash; use parking_lot::{Mutex, RwLock}; use std::{ borrow::Cow, - collections::{btree_map, BTreeMap, BTreeSet}, + collections::{BTreeMap, BTreeSet, btree_map}, sync::{ - atomic::{AtomicBool, Ordering}, Arc, + atomic::{AtomicBool, Ordering}, }, }; @@ -591,7 +591,7 @@ fn to_map_key(m: &[u8], k: &[u8]) -> Vec { #[cfg(test)] mod tests { use super::*; - use crate::{atomic_batch_scope, atomic_finalize, FinalizeMode}; + use crate::{FinalizeMode, atomic_batch_scope, atomic_finalize}; use console::{account::Address, network::MainnetV0}; type CurrentNetwork = MainnetV0; diff --git a/ledger/store/src/helpers/memory/program.rs b/ledger/store/src/helpers/memory/program.rs index 7e84cb1dda..b48edf62c0 100644 --- a/ledger/store/src/helpers/memory/program.rs +++ b/ledger/store/src/helpers/memory/program.rs @@ -16,10 +16,10 @@ #![allow(clippy::type_complexity)] use crate::{ - helpers::memory::{MemoryMap, NestedMemoryMap}, CommitteeStorage, CommitteeStore, FinalizeStorage, + helpers::memory::{MemoryMap, NestedMemoryMap}, }; use console::{ prelude::*, diff --git a/ledger/store/src/helpers/memory/transaction.rs b/ledger/store/src/helpers/memory/transaction.rs index 2d474dde98..31dc8ac3d3 100644 --- a/ledger/store/src/helpers/memory/transaction.rs +++ b/ledger/store/src/helpers/memory/transaction.rs @@ -14,7 +14,6 @@ // limitations under the License. use crate::{ - helpers::memory::{MemoryMap, TransitionMemory}, DeploymentStorage, DeploymentStore, ExecutionStorage, @@ -24,6 +23,7 @@ use crate::{ TransactionStorage, TransactionType, TransitionStore, + helpers::memory::{MemoryMap, TransitionMemory}, }; use console::{ prelude::*, diff --git a/ledger/store/src/helpers/memory/transition.rs b/ledger/store/src/helpers/memory/transition.rs index d4b41d665f..1b1b56be27 100644 --- a/ledger/store/src/helpers/memory/transition.rs +++ b/ledger/store/src/helpers/memory/transition.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{helpers::memory::MemoryMap, InputStorage, InputStore, OutputStorage, OutputStore, TransitionStorage}; +use crate::{InputStorage, InputStore, OutputStorage, OutputStore, TransitionStorage, helpers::memory::MemoryMap}; use console::{ prelude::*, program::{Ciphertext, Future, Identifier, Plaintext, ProgramID, Record}, diff --git a/ledger/store/src/helpers/rocksdb/block.rs b/ledger/store/src/helpers/rocksdb/block.rs index d1dc1a2c0c..97a86cc3d1 100644 --- a/ledger/store/src/helpers/rocksdb/block.rs +++ b/ledger/store/src/helpers/rocksdb/block.rs @@ -14,17 +14,17 @@ // limitations under the License. use crate::{ + BlockStorage, + ConfirmedTxType, + TransactionStore, + TransitionStore, helpers::rocksdb::{ - internal::{self, DataMap, Database}, BlockMap, MapID, TransactionDB, TransitionDB, + internal::{self, DataMap, Database}, }, - BlockStorage, - ConfirmedTxType, - TransactionStore, - TransitionStore, }; use console::{prelude::*, types::Field}; use ledger_authority::Authority; diff --git a/ledger/store/src/helpers/rocksdb/consensus.rs b/ledger/store/src/helpers/rocksdb/consensus.rs index 4da2e994d9..0ff5df0aff 100644 --- a/ledger/store/src/helpers/rocksdb/consensus.rs +++ b/ledger/store/src/helpers/rocksdb/consensus.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::{ - helpers::rocksdb::{BlockDB, FinalizeDB, TransactionDB, TransitionDB}, BlockStore, ConsensusStorage, FinalizeStore, + helpers::rocksdb::{BlockDB, FinalizeDB, TransactionDB, TransitionDB}, }; use console::prelude::*; diff --git a/ledger/store/src/helpers/rocksdb/internal/map.rs b/ledger/store/src/helpers/rocksdb/internal/map.rs index 4887caf5df..11cf03fd51 100644 --- a/ledger/store/src/helpers/rocksdb/internal/map.rs +++ b/ledger/store/src/helpers/rocksdb/internal/map.rs @@ -555,10 +555,10 @@ impl fmt::Debu mod tests { use super::*; use crate::{ + FinalizeMode, atomic_batch_scope, atomic_finalize, - helpers::rocksdb::{internal::tests::temp_dir, MapID, TestMap}, - FinalizeMode, + helpers::rocksdb::{MapID, TestMap, internal::tests::temp_dir}, }; use console::{ account::{Address, FromStr}, diff --git a/ledger/store/src/helpers/rocksdb/internal/mod.rs b/ledger/store/src/helpers/rocksdb/internal/mod.rs index 33127ece31..0c21ba2e75 100644 --- a/ledger/store/src/helpers/rocksdb/internal/mod.rs +++ b/ledger/store/src/helpers/rocksdb/internal/mod.rs @@ -26,18 +26,18 @@ pub use nested_map::*; mod tests; use aleo_std_storage::StorageMode; -use anyhow::{bail, ensure, Result}; +use anyhow::{Result, bail, ensure}; use once_cell::sync::OnceCell; use parking_lot::Mutex; -use serde::{de::DeserializeOwned, Serialize}; +use serde::{Serialize, de::DeserializeOwned}; use std::{ borrow::Borrow, marker::PhantomData, mem, ops::Deref, sync::{ - atomic::{AtomicBool, AtomicUsize, Ordering}, Arc, + atomic::{AtomicBool, AtomicUsize, Ordering}, }, }; diff --git a/ledger/store/src/helpers/rocksdb/internal/nested_map.rs b/ledger/store/src/helpers/rocksdb/internal/nested_map.rs index e9d67b917b..1e3f718e00 100644 --- a/ledger/store/src/helpers/rocksdb/internal/nested_map.rs +++ b/ledger/store/src/helpers/rocksdb/internal/nested_map.rs @@ -17,7 +17,7 @@ use super::*; use crate::helpers::{NestedMap, NestedMapRead}; -use console::prelude::{anyhow, cfg_into_iter, FromBytes}; +use console::prelude::{FromBytes, anyhow, cfg_into_iter}; use core::{fmt, fmt::Debug, hash::Hash, mem}; use std::{borrow::Cow, sync::atomic::Ordering}; @@ -758,13 +758,13 @@ impl<'a, V: 'a + Clone + PartialEq + Eq + Serialize + DeserializeOwned> Iterator mod tests { use super::*; use crate::{ + FinalizeMode, atomic_batch_scope, atomic_finalize, helpers::{ - rocksdb::{internal::tests::temp_dir, MapID, TestMap}, + rocksdb::{MapID, TestMap, internal::tests::temp_dir}, traits::Map, }, - FinalizeMode, }; use console::{ account::{Address, FromStr}, diff --git a/ledger/store/src/helpers/rocksdb/internal/tests.rs b/ledger/store/src/helpers/rocksdb/internal/tests.rs index 9e1a41dde1..cbae47a770 100644 --- a/ledger/store/src/helpers/rocksdb/internal/tests.rs +++ b/ledger/store/src/helpers/rocksdb/internal/tests.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::helpers::{ - rocksdb::{MapID, RocksDB, TestMap as TestMapID}, Map, MapRead, + rocksdb::{MapID, RocksDB, TestMap as TestMapID}, }; use console::{ network::{MainnetV0, Network}, diff --git a/ledger/store/src/helpers/rocksdb/program.rs b/ledger/store/src/helpers/rocksdb/program.rs index 34bf42d73d..d57a6fb286 100644 --- a/ledger/store/src/helpers/rocksdb/program.rs +++ b/ledger/store/src/helpers/rocksdb/program.rs @@ -16,10 +16,10 @@ #![allow(clippy::type_complexity)] use crate::{ - helpers::rocksdb::{self, CommitteeMap, DataMap, Database, MapID, NestedDataMap, ProgramMap}, CommitteeStorage, CommitteeStore, FinalizeStorage, + helpers::rocksdb::{self, CommitteeMap, DataMap, Database, MapID, NestedDataMap, ProgramMap}, }; use console::{ prelude::*, diff --git a/ledger/store/src/helpers/rocksdb/transaction.rs b/ledger/store/src/helpers/rocksdb/transaction.rs index 0430fd5f47..fbb026a5c9 100644 --- a/ledger/store/src/helpers/rocksdb/transaction.rs +++ b/ledger/store/src/helpers/rocksdb/transaction.rs @@ -14,6 +14,15 @@ // limitations under the License. use crate::{ + DeploymentStorage, + DeploymentStore, + ExecutionStorage, + ExecutionStore, + FeeStorage, + FeeStore, + TransactionStorage, + TransactionType, + TransitionStore, helpers::rocksdb::{ self, DataMap, @@ -25,15 +34,6 @@ use crate::{ TransactionMap, TransitionDB, }, - DeploymentStorage, - DeploymentStore, - ExecutionStorage, - ExecutionStore, - FeeStorage, - FeeStore, - TransactionStorage, - TransactionType, - TransitionStore, }; use console::{ prelude::*, diff --git a/ledger/store/src/helpers/rocksdb/transition.rs b/ledger/store/src/helpers/rocksdb/transition.rs index c445e34e52..0b6e801c71 100644 --- a/ledger/store/src/helpers/rocksdb/transition.rs +++ b/ledger/store/src/helpers/rocksdb/transition.rs @@ -14,12 +14,12 @@ // limitations under the License. use crate::{ - helpers::rocksdb::{self, DataMap, Database, MapID, TransitionInputMap, TransitionMap, TransitionOutputMap}, InputStorage, InputStore, OutputStorage, OutputStore, TransitionStorage, + helpers::rocksdb::{self, DataMap, Database, MapID, TransitionInputMap, TransitionMap, TransitionOutputMap}, }; use console::{ prelude::*, diff --git a/ledger/store/src/lib.rs b/ledger/store/src/lib.rs index 37824f3403..6eb10f7b69 100644 --- a/ledger/store/src/lib.rs +++ b/ledger/store/src/lib.rs @@ -53,7 +53,7 @@ macro_rules! cow_to_cloned { }; } -use console::prelude::{bail, Result}; +use console::prelude::{Result, bail}; #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum FinalizeMode { diff --git a/ledger/store/src/transaction/deployment.rs b/ledger/store/src/transaction/deployment.rs index 6cbefda5af..a0c3d685a7 100644 --- a/ledger/store/src/transaction/deployment.rs +++ b/ledger/store/src/transaction/deployment.rs @@ -14,12 +14,12 @@ // limitations under the License. use crate::{ + FeeStorage, + FeeStore, atomic_batch_scope, cow_to_cloned, cow_to_copied, helpers::{Map, MapRead}, - FeeStorage, - FeeStore, }; use console::{ network::prelude::*, @@ -672,7 +672,7 @@ impl> DeploymentStore { #[cfg(test)] mod tests { use super::*; - use crate::{helpers::memory::DeploymentMemory, TransitionStore}; + use crate::{TransitionStore, helpers::memory::DeploymentMemory}; #[test] fn test_insert_get_remove() { diff --git a/ledger/store/src/transaction/execution.rs b/ledger/store/src/transaction/execution.rs index 353ea5766d..089372b788 100644 --- a/ledger/store/src/transaction/execution.rs +++ b/ledger/store/src/transaction/execution.rs @@ -14,13 +14,13 @@ // limitations under the License. use crate::{ + FeeStorage, + FeeStore, + TransitionStore, atomic_batch_scope, cow_to_cloned, cow_to_copied, helpers::{Map, MapRead}, - FeeStorage, - FeeStore, - TransitionStore, }; use console::network::prelude::*; use ledger_block::{Execution, Transaction, Transition}; @@ -393,7 +393,7 @@ impl> ExecutionStore { #[cfg(test)] mod tests { use super::*; - use crate::{helpers::memory::ExecutionMemory, TransitionStore}; + use crate::{TransitionStore, helpers::memory::ExecutionMemory}; type CurrentNetwork = console::network::MainnetV0; diff --git a/ledger/store/src/transaction/fee.rs b/ledger/store/src/transaction/fee.rs index acd2fff3e2..a757d73981 100644 --- a/ledger/store/src/transaction/fee.rs +++ b/ledger/store/src/transaction/fee.rs @@ -14,12 +14,12 @@ // limitations under the License. use crate::{ + TransitionStorage, + TransitionStore, atomic_batch_scope, cow_to_cloned, cow_to_copied, helpers::{Map, MapRead}, - TransitionStorage, - TransitionStore, }; use console::network::prelude::*; use ledger_block::Fee; diff --git a/ledger/store/src/transaction/mod.rs b/ledger/store/src/transaction/mod.rs index dccb01a898..1bb6966e1d 100644 --- a/ledger/store/src/transaction/mod.rs +++ b/ledger/store/src/transaction/mod.rs @@ -23,11 +23,11 @@ mod fee; pub use fee::*; use crate::{ + TransitionStorage, + TransitionStore, atomic_batch_scope, cow_to_copied, helpers::{Map, MapRead}, - TransitionStorage, - TransitionStore, }; use console::{ network::prelude::*, diff --git a/ledger/test-helpers/Cargo.toml b/ledger/test-helpers/Cargo.toml index e34649d7a4..d0ac094931 100644 --- a/ledger/test-helpers/Cargo.toml +++ b/ledger/test-helpers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-ledger-test-helpers" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Test helpers for a decentralized virtual machine" homepage = "https://aleo.org" @@ -19,39 +19,39 @@ edition = "2021" [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.circuit] package = "snarkvm-circuit" path = "../../circuit" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-block] package = "snarkvm-ledger-block" path = "../block" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-query] package = "snarkvm-ledger-query" path = "../query" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "query" ] [dependencies.ledger-store] package = "snarkvm-ledger-store" path = "../store" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-program] package = "snarkvm-synthesizer-program" path = "../../synthesizer/program" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-process] package = "snarkvm-synthesizer-process" path = "../../synthesizer/process" -version = "=0.16.19" +version = "=1.0.0" [dependencies.once_cell] version = "1.18" diff --git a/ledger/test-helpers/src/lib.rs b/ledger/test-helpers/src/lib.rs index 559f192515..7d789c6fdd 100644 --- a/ledger/test-helpers/src/lib.rs +++ b/ledger/test-helpers/src/lib.rs @@ -35,7 +35,7 @@ use ledger_block::{ Transition, }; use ledger_query::Query; -use ledger_store::{helpers::memory::BlockMemory, BlockStore}; +use ledger_store::{BlockStore, helpers::memory::BlockMemory}; use synthesizer_process::Process; use synthesizer_program::Program; diff --git a/metrics/Cargo.toml b/metrics/Cargo.toml index 65d7eadeec..c40cc74c5d 100644 --- a/metrics/Cargo.toml +++ b/metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-metrics" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Metrics for a decentralized virtual machine" homepage = "https://aleo.org" diff --git a/parameters/Cargo.toml b/parameters/Cargo.toml index f75e3322e9..0cdb6fc265 100644 --- a/parameters/Cargo.toml +++ b/parameters/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-parameters" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Parameters for a decentralized virtual machine" homepage = "https://aleo.org" @@ -31,12 +31,12 @@ wasm = [ "encoding", "js-sys", "web-sys" ] [dependencies.snarkvm-curves] path = "../curves" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.snarkvm-utilities] path = "../utilities" -version = "=0.16.19" +version = "=1.0.0" [dependencies.aleo-std] version = "0.1.24" diff --git a/parameters/examples/inclusion.rs b/parameters/examples/inclusion.rs index 11d8a935f3..dc241cbd95 100644 --- a/parameters/examples/inclusion.rs +++ b/parameters/examples/inclusion.rs @@ -22,12 +22,12 @@ use snarkvm_console::{ program::{Plaintext, Record, StatePath}, types::Field, }; -use snarkvm_ledger_store::{helpers::memory::ConsensusMemory, ConsensusStore}; -use snarkvm_synthesizer::{process::InclusionAssignment, snark::UniversalSRS, VM}; +use snarkvm_ledger_store::{ConsensusStore, helpers::memory::ConsensusMemory}; +use snarkvm_synthesizer::{VM, process::InclusionAssignment, snark::UniversalSRS}; -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; use rand::thread_rng; -use serde_json::{json, Value}; +use serde_json::{Value, json}; use std::{ fs::File, io::{BufWriter, Write}, diff --git a/parameters/examples/setup.rs b/parameters/examples/setup.rs index 0e164e77e7..323581081a 100644 --- a/parameters/examples/setup.rs +++ b/parameters/examples/setup.rs @@ -15,11 +15,11 @@ use snarkvm_algorithms::crypto_hash::sha256::sha256; use snarkvm_circuit::Aleo; -use snarkvm_console::network::{prelude::ToBytes, CanaryV0, MainnetV0, Network, TestnetV0}; +use snarkvm_console::network::{CanaryV0, MainnetV0, Network, TestnetV0, prelude::ToBytes}; use snarkvm_synthesizer::{Process, Program}; use anyhow::Result; -use serde_json::{json, Value}; +use serde_json::{Value, json}; use std::{ fs, fs::File, diff --git a/parameters/src/mainnet/mod.rs b/parameters/src/mainnet/mod.rs index 5f1dc1b181..029e0922f5 100644 --- a/parameters/src/mainnet/mod.rs +++ b/parameters/src/mainnet/mod.rs @@ -29,9 +29,6 @@ const REMOTE_URL: &str = "https://parameters.aleo.org/mainnet"; impl_local!(Degree15, "resources/", "powers-of-beta-15", "usrs"); #[cfg(feature = "wasm")] impl_remote!(Degree15, REMOTE_URL, "resources/", "powers-of-beta-15", "usrs"); -#[cfg(not(feature = "wasm"))] -impl_local!(Degree16, "resources/", "powers-of-beta-16", "usrs"); -#[cfg(feature = "wasm")] impl_remote!(Degree16, REMOTE_URL, "resources/", "powers-of-beta-16", "usrs"); impl_remote!(Degree17, REMOTE_URL, "resources/", "powers-of-beta-17", "usrs"); impl_remote!(Degree18, REMOTE_URL, "resources/", "powers-of-beta-18", "usrs"); diff --git a/parameters/src/mainnet/powers.rs b/parameters/src/mainnet/powers.rs index 760382f6d5..c12245f07c 100644 --- a/parameters/src/mainnet/powers.rs +++ b/parameters/src/mainnet/powers.rs @@ -28,7 +28,7 @@ use snarkvm_utilities::{ Write, }; -use anyhow::{anyhow, bail, ensure, Result}; +use anyhow::{Result, anyhow, bail, ensure}; use parking_lot::RwLock; use std::{collections::BTreeMap, ops::Range, sync::Arc}; diff --git a/parameters/src/mainnet/resources/bond_validator.prover b/parameters/src/mainnet/resources/bond_validator.prover deleted file mode 100644 index 14bebd9746..0000000000 Binary files a/parameters/src/mainnet/resources/bond_validator.prover and /dev/null differ diff --git a/parameters/src/mainnet/resources/powers-of-beta-16.usrs b/parameters/src/mainnet/resources/powers-of-beta-16.usrs deleted file mode 100644 index eb015eb960..0000000000 Binary files a/parameters/src/mainnet/resources/powers-of-beta-16.usrs and /dev/null differ diff --git a/synthesizer/Cargo.toml b/synthesizer/Cargo.toml index d5ff3f1557..8ce6d33350 100644 --- a/synthesizer/Cargo.toml +++ b/synthesizer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-synthesizer" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Synthesizer for a decentralized virtual machine" homepage = "https://aleo.org" @@ -69,78 +69,78 @@ harness = false [dependencies.algorithms] package = "snarkvm-algorithms" path = "../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.circuit] package = "snarkvm-circuit" path = "../circuit" -version = "=0.16.19" +version = "=1.0.0" [dependencies.console] package = "snarkvm-console" path = "../console" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-block] package = "snarkvm-ledger-block" path = "../ledger/block" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-committee] package = "snarkvm-ledger-committee" path = "../ledger/committee" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-narwhal-data] package = "snarkvm-ledger-narwhal-data" path = "../ledger/narwhal/data" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-puzzle] package = "snarkvm-ledger-puzzle" path = "../ledger/puzzle" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-puzzle-epoch] package = "snarkvm-ledger-puzzle-epoch" path = "../ledger/puzzle/epoch" -version = "=0.16.19" +version = "=1.0.0" features = [ "synthesis" ] [dependencies.ledger-query] package = "snarkvm-ledger-query" path = "../ledger/query" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "query" ] [dependencies.ledger-store] package = "snarkvm-ledger-store" path = "../ledger/store" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-process] package = "snarkvm-synthesizer-process" path = "./process" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.synthesizer-program] package = "snarkvm-synthesizer-program" path = "./program" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.synthesizer-snark] package = "snarkvm-synthesizer-snark" path = "./snark" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.utilities] package = "snarkvm-utilities" path = "../utilities" -version = "=0.16.19" +version = "=1.0.0" [dependencies.aleo-std] version = "0.1.24" diff --git a/synthesizer/benches/kary_merkle_tree.rs b/synthesizer/benches/kary_merkle_tree.rs index 312d2ff00b..612709b21a 100644 --- a/synthesizer/benches/kary_merkle_tree.rs +++ b/synthesizer/benches/kary_merkle_tree.rs @@ -16,13 +16,13 @@ #[macro_use] extern crate criterion; -use circuit::{collections::kary_merkle_tree::*, AleoV0, Eject, Environment, Inject, Mode}; +use circuit::{AleoV0, Eject, Environment, Inject, Mode, collections::kary_merkle_tree::*}; use console::{ algorithms::Sha3_256, collections::kary_merkle_tree::KaryMerkleTree, network::{ - prelude::{TestRng, ToBits, Uniform}, MainnetV0, + prelude::{TestRng, ToBits, Uniform}, }, types::Field, }; diff --git a/synthesizer/process/Cargo.toml b/synthesizer/process/Cargo.toml index 0e007a2998..bc73c68f54 100644 --- a/synthesizer/process/Cargo.toml +++ b/synthesizer/process/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-synthesizer-process" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "A process for a decentralized virtual machine" homepage = "https://aleo.org" @@ -53,45 +53,45 @@ harness = false [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "network", "program", "types" ] [dependencies.circuit] package = "snarkvm-circuit" path = "../../circuit" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-block] package = "snarkvm-ledger-block" path = "../../ledger/block" -version = "=0.16.19" +version = "=1.0.0" [dependencies.ledger-query] package = "snarkvm-ledger-query" path = "../../ledger/query" -version = "=0.16.19" +version = "=1.0.0" default-features = false [dependencies.ledger-store] package = "snarkvm-ledger-store" path = "../../ledger/store" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-program] package = "snarkvm-synthesizer-program" path = "../../synthesizer/program" -version = "=0.16.19" +version = "=1.0.0" [dependencies.synthesizer-snark] package = "snarkvm-synthesizer-snark" path = "../../synthesizer/snark" -version = "=0.16.19" +version = "=1.0.0" [dependencies.utilities] package = "snarkvm-utilities" path = "../../utilities" -version = "=0.16.19" +version = "=1.0.0" [dependencies.aleo-std] version = "0.1.24" diff --git a/synthesizer/process/benches/stack_operations.rs b/synthesizer/process/benches/stack_operations.rs index 03722d17f7..353eb569e7 100644 --- a/synthesizer/process/benches/stack_operations.rs +++ b/synthesizer/process/benches/stack_operations.rs @@ -27,7 +27,7 @@ use synthesizer_program::{Program, StackProgram}; use circuit::prelude::bail; use console::{network::Network, prelude::SizeInDataBits}; use criterion::{BatchSize, Criterion}; -use rand::{distributions::Alphanumeric, Rng}; +use rand::{Rng, distributions::Alphanumeric}; use std::str::FromStr; use utilities::TestRng; diff --git a/synthesizer/process/src/finalize.rs b/synthesizer/process/src/finalize.rs index 4f7f5b19a5..6606d2d152 100644 --- a/synthesizer/process/src/finalize.rs +++ b/synthesizer/process/src/finalize.rs @@ -450,8 +450,8 @@ mod tests { use crate::tests::test_execute::{sample_fee, sample_finalize_state}; use console::prelude::TestRng; use ledger_store::{ - helpers::memory::{BlockMemory, FinalizeMemory}, BlockStore, + helpers::memory::{BlockMemory, FinalizeMemory}, }; type CurrentNetwork = console::network::MainnetV0; diff --git a/synthesizer/process/src/lib.rs b/synthesizer/process/src/lib.rs index 207dbe8fca..80650bbf70 100644 --- a/synthesizer/process/src/lib.rs +++ b/synthesizer/process/src/lib.rs @@ -46,11 +46,11 @@ mod tests; use console::{ account::PrivateKey, network::prelude::*, - program::{compute_function_id, Identifier, Literal, Locator, Plaintext, ProgramID, Record, Response, Value}, + program::{Identifier, Literal, Locator, Plaintext, ProgramID, Record, Response, Value, compute_function_id}, types::{Field, U16, U64}, }; use ledger_block::{Deployment, Execution, Fee, Input, Transition}; -use ledger_store::{atomic_batch_scope, FinalizeStorage, FinalizeStore}; +use ledger_store::{FinalizeStorage, FinalizeStore, atomic_batch_scope}; use synthesizer_program::{ Branch, Closure, @@ -295,7 +295,7 @@ pub mod test_helpers { use console::{account::PrivateKey, network::MainnetV0, program::Identifier}; use ledger_block::Transition; use ledger_query::Query; - use ledger_store::{helpers::memory::BlockMemory, BlockStore}; + use ledger_store::{BlockStore, helpers::memory::BlockMemory}; use synthesizer_program::Program; use once_cell::sync::OnceCell; diff --git a/synthesizer/process/src/stack/call/mod.rs b/synthesizer/process/src/stack/call/mod.rs index 8327102fc2..d5f1a805c9 100644 --- a/synthesizer/process/src/stack/call/mod.rs +++ b/synthesizer/process/src/stack/call/mod.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{stack::Address, CallStack, Registers, RegistersCall, StackEvaluate, StackExecute}; +use crate::{CallStack, Registers, RegistersCall, StackEvaluate, StackExecute, stack::Address}; use aleo_std::prelude::{finish, lap, timer}; use console::{ account::Field, diff --git a/synthesizer/process/src/stack/deploy.rs b/synthesizer/process/src/stack/deploy.rs index c48fd2d80d..19de63e11b 100644 --- a/synthesizer/process/src/stack/deploy.rs +++ b/synthesizer/process/src/stack/deploy.rs @@ -15,7 +15,7 @@ use super::*; -use rand::{rngs::StdRng, SeedableRng}; +use rand::{SeedableRng, rngs::StdRng}; impl Stack { /// Deploys the given program ID, if it does not exist. diff --git a/synthesizer/process/src/stack/finalize_types/mod.rs b/synthesizer/process/src/stack/finalize_types/mod.rs index c6e95f69aa..d2563f4a71 100644 --- a/synthesizer/process/src/stack/finalize_types/mod.rs +++ b/synthesizer/process/src/stack/finalize_types/mod.rs @@ -45,6 +45,7 @@ use synthesizer_program::{ GetOrUse, Instruction, InstructionTrait, + MAX_ADDITIONAL_SEEDS, Opcode, Operand, Program, @@ -53,7 +54,6 @@ use synthesizer_program::{ Set, StackMatches, StackProgram, - MAX_ADDITIONAL_SEEDS, }; use indexmap::IndexMap; diff --git a/synthesizer/process/src/stack/mod.rs b/synthesizer/process/src/stack/mod.rs index 900d0ce59f..5b3e627424 100644 --- a/synthesizer/process/src/stack/mod.rs +++ b/synthesizer/process/src/stack/mod.rs @@ -37,7 +37,7 @@ mod evaluate; mod execute; mod helpers; -use crate::{cost_in_microcredits, traits::*, CallMetrics, Process, Trace}; +use crate::{CallMetrics, Process, Trace, cost_in_microcredits, traits::*}; use console::{ account::{Address, PrivateKey}, network::prelude::*, @@ -65,7 +65,7 @@ use console::{ types::{Field, Group}, }; use ledger_block::{Deployment, Transition}; -use synthesizer_program::{traits::*, CallOperator, Closure, Function, Instruction, Operand, Program}; +use synthesizer_program::{CallOperator, Closure, Function, Instruction, Operand, Program, traits::*}; use synthesizer_snark::{Certificate, ProvingKey, UniversalSRS, VerifyingKey}; use aleo_std::prelude::{finish, lap, timer}; diff --git a/synthesizer/process/src/tests/test_credits.rs b/synthesizer/process/src/tests/test_credits.rs index 078b440e00..d4806e5c1b 100644 --- a/synthesizer/process/src/tests/test_credits.rs +++ b/synthesizer/process/src/tests/test_credits.rs @@ -17,19 +17,19 @@ use crate::Process; use circuit::network::AleoV0; use console::{ account::{Address, PrivateKey}, - network::{prelude::*, MainnetV0}, + network::{MainnetV0, prelude::*}, program::{Identifier, Literal, Plaintext, ProgramID, Value}, types::U64, }; use ledger_committee::{MIN_DELEGATOR_STAKE, MIN_VALIDATOR_SELF_STAKE, MIN_VALIDATOR_STAKE}; use ledger_query::Query; use ledger_store::{ - atomic_finalize, - helpers::memory::{BlockMemory, FinalizeMemory}, BlockStore, FinalizeMode, FinalizeStorage, FinalizeStore, + atomic_finalize, + helpers::memory::{BlockMemory, FinalizeMemory}, }; use synthesizer_program::{FinalizeGlobalState, FinalizeStoreTrait, Program}; diff --git a/synthesizer/process/src/tests/test_execute.rs b/synthesizer/process/src/tests/test_execute.rs index 3a1b4c23de..3af7055726 100644 --- a/synthesizer/process/src/tests/test_execute.rs +++ b/synthesizer/process/src/tests/test_execute.rs @@ -14,27 +14,27 @@ // limitations under the License. use crate::{ - traits::{StackEvaluate, StackExecute}, CallStack, Process, Stack, Trace, + traits::{StackEvaluate, StackExecute}, }; -use circuit::{network::AleoV0, Aleo}; +use circuit::{Aleo, network::AleoV0}; use console::{ account::{Address, PrivateKey, ViewKey}, - network::{prelude::*, MainnetV0}, + network::{MainnetV0, prelude::*}, program::{Identifier, Literal, Plaintext, ProgramID, Record, Value}, types::{Field, U64}, }; use ledger_block::{Fee, Transaction}; use ledger_query::Query; use ledger_store::{ - helpers::memory::{BlockMemory, FinalizeMemory}, BlockStorage, BlockStore, FinalizeStorage, FinalizeStore, + helpers::memory::{BlockMemory, FinalizeMemory}, }; use synthesizer_program::{FinalizeGlobalState, FinalizeStoreTrait, Program, StackProgram}; use synthesizer_snark::UniversalSRS; diff --git a/synthesizer/process/src/trace/inclusion/mod.rs b/synthesizer/process/src/trace/inclusion/mod.rs index 6ce561e666..0517a29460 100644 --- a/synthesizer/process/src/trace/inclusion/mod.rs +++ b/synthesizer/process/src/trace/inclusion/mod.rs @@ -20,7 +20,7 @@ use crate::Stack; use console::{ network::prelude::*, - program::{InputID, StatePath, TransactionLeaf, TransitionLeaf, TransitionPath, TRANSACTION_DEPTH}, + program::{InputID, StatePath, TRANSACTION_DEPTH, TransactionLeaf, TransitionLeaf, TransitionPath}, types::{Field, Group}, }; use ledger_block::{Input, Output, Transaction, Transition}; diff --git a/synthesizer/program/Cargo.toml b/synthesizer/program/Cargo.toml index 47acd2cca1..52c119291e 100644 --- a/synthesizer/program/Cargo.toml +++ b/synthesizer/program/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-synthesizer-program" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Program for a decentralized virtual machine" homepage = "https://aleo.org" @@ -31,12 +31,12 @@ wasm = [ "console/wasm" ] [dependencies.circuit] package = "snarkvm-circuit" path = "../../circuit" -version = "=0.16.19" +version = "=1.0.0" [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "account", "network", "program", "types" ] diff --git a/synthesizer/program/src/lib.rs b/synthesizer/program/src/lib.rs index 0a518a57fa..d6d06cddd9 100644 --- a/synthesizer/program/src/lib.rs +++ b/synthesizer/program/src/lib.rs @@ -49,19 +49,6 @@ mod serialize; use console::{ network::prelude::{ - alt, - anyhow, - bail, - de, - ensure, - error, - fmt, - many0, - many1, - map, - map_res, - tag, - take, Debug, Deserialize, Deserializer, @@ -84,6 +71,19 @@ use console::{ ToBytesSerializer, TypeName, Write, + alt, + anyhow, + bail, + de, + ensure, + error, + fmt, + many0, + many1, + map, + map_res, + tag, + take, }, program::{Identifier, PlaintextType, ProgramID, RecordType, StructType}, }; diff --git a/synthesizer/program/src/logic/command/contains.rs b/synthesizer/program/src/logic/command/contains.rs index 350ce6b220..375f56bdde 100644 --- a/synthesizer/program/src/logic/command/contains.rs +++ b/synthesizer/program/src/logic/command/contains.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::{ - traits::{FinalizeStoreTrait, RegistersLoad, RegistersStore, StackMatches, StackProgram}, CallOperator, Opcode, Operand, + traits::{FinalizeStoreTrait, RegistersLoad, RegistersStore, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/command/get.rs b/synthesizer/program/src/logic/command/get.rs index 1a54b75fe7..9bcf7c2dce 100644 --- a/synthesizer/program/src/logic/command/get.rs +++ b/synthesizer/program/src/logic/command/get.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::{ - traits::{FinalizeStoreTrait, RegistersLoad, RegistersStore, StackMatches, StackProgram}, CallOperator, Opcode, Operand, + traits::{FinalizeStoreTrait, RegistersLoad, RegistersStore, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/command/get_or_use.rs b/synthesizer/program/src/logic/command/get_or_use.rs index efc1b4aacc..fea8d94fc9 100644 --- a/synthesizer/program/src/logic/command/get_or_use.rs +++ b/synthesizer/program/src/logic/command/get_or_use.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::{ - traits::{FinalizeStoreTrait, RegistersLoad, RegistersStore, StackMatches, StackProgram}, CallOperator, Opcode, Operand, + traits::{FinalizeStoreTrait, RegistersLoad, RegistersStore, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/command/mod.rs b/synthesizer/program/src/logic/command/mod.rs index dd970bb36e..e31408db76 100644 --- a/synthesizer/program/src/logic/command/mod.rs +++ b/synthesizer/program/src/logic/command/mod.rs @@ -41,6 +41,10 @@ mod set; pub use set::*; use crate::{ + CastType, + FinalizeOperation, + FinalizeRegistersState, + Instruction, traits::{ CommandTrait, FinalizeStoreTrait, @@ -50,10 +54,6 @@ use crate::{ StackMatches, StackProgram, }, - CastType, - FinalizeOperation, - FinalizeRegistersState, - Instruction, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/command/rand_chacha.rs b/synthesizer/program/src/logic/command/rand_chacha.rs index b97712fa24..44aa938c97 100644 --- a/synthesizer/program/src/logic/command/rand_chacha.rs +++ b/synthesizer/program/src/logic/command/rand_chacha.rs @@ -14,15 +14,15 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, RegistersStore, StackMatches, StackProgram}, FinalizeRegistersState, Opcode, Operand, + traits::{RegistersLoad, RegistersStore, StackMatches, StackProgram}, }; use console::{ network::prelude::*, program::{Literal, LiteralType, Plaintext, Register, Value}, - types::{Address, Boolean, Field, Group, Scalar, I128, I16, I32, I64, I8, U128, U16, U32, U64, U8}, + types::{Address, Boolean, Field, Group, I8, I16, I32, I64, I128, Scalar, U8, U16, U32, U64, U128}, }; use rand::SeedableRng; diff --git a/synthesizer/program/src/logic/command/remove.rs b/synthesizer/program/src/logic/command/remove.rs index f9c6ef2643..185a26048d 100644 --- a/synthesizer/program/src/logic/command/remove.rs +++ b/synthesizer/program/src/logic/command/remove.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::{ - traits::{FinalizeStoreTrait, RegistersLoad, StackMatches, StackProgram}, FinalizeOperation, Opcode, Operand, + traits::{FinalizeStoreTrait, RegistersLoad, StackMatches, StackProgram}, }; use console::{network::prelude::*, program::Identifier}; diff --git a/synthesizer/program/src/logic/command/set.rs b/synthesizer/program/src/logic/command/set.rs index b6029159a4..68c5b9e96e 100644 --- a/synthesizer/program/src/logic/command/set.rs +++ b/synthesizer/program/src/logic/command/set.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::{ - traits::{FinalizeStoreTrait, RegistersLoad, StackMatches, StackProgram}, FinalizeOperation, Opcode, Operand, + traits::{FinalizeStoreTrait, RegistersLoad, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/instruction/mod.rs b/synthesizer/program/src/logic/instruction/mod.rs index f3f07f0e1e..c54ce23919 100644 --- a/synthesizer/program/src/logic/instruction/mod.rs +++ b/synthesizer/program/src/logic/instruction/mod.rs @@ -39,13 +39,6 @@ use crate::traits::{ use console::{ network::Network, prelude::{ - alt, - bail, - ensure, - error, - fmt, - map, - tag, Debug, Display, Error, @@ -60,6 +53,13 @@ use console::{ Sanitizer, ToBytes, Write, + alt, + bail, + ensure, + error, + fmt, + map, + tag, }, program::{Register, RegisterType}, }; diff --git a/synthesizer/program/src/logic/instruction/operation/assert.rs b/synthesizer/program/src/logic/instruction/operation/assert.rs index 1e213f26f7..57b05b1a5c 100644 --- a/synthesizer/program/src/logic/instruction/operation/assert.rs +++ b/synthesizer/program/src/logic/instruction/operation/assert.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, RegistersLoadCircuit, StackMatches, StackProgram}, Opcode, Operand, + traits::{RegistersLoad, RegistersLoadCircuit, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/instruction/operation/async_.rs b/synthesizer/program/src/logic/instruction/operation/async_.rs index 26e69a6319..b151dd7313 100644 --- a/synthesizer/program/src/logic/instruction/operation/async_.rs +++ b/synthesizer/program/src/logic/instruction/operation/async_.rs @@ -14,13 +14,13 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, StackMatches, StackProgram}, Opcode, Operand, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, Result, + traits::{RegistersLoad, StackMatches, StackProgram}, }; use circuit::{Inject, Mode}; diff --git a/synthesizer/program/src/logic/instruction/operation/call.rs b/synthesizer/program/src/logic/instruction/operation/call.rs index 0de41ac0e9..b5cbaf8d51 100644 --- a/synthesizer/program/src/logic/instruction/operation/call.rs +++ b/synthesizer/program/src/logic/instruction/operation/call.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, RegistersLoadCircuit, StackMatches, StackProgram}, Opcode, Operand, + traits::{RegistersLoad, RegistersLoadCircuit, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/instruction/operation/cast.rs b/synthesizer/program/src/logic/instruction/operation/cast.rs index e69c0701f0..fb24f67c2b 100644 --- a/synthesizer/program/src/logic/instruction/operation/cast.rs +++ b/synthesizer/program/src/logic/instruction/operation/cast.rs @@ -14,6 +14,8 @@ // limitations under the License. use crate::{ + Opcode, + Operand, traits::{ RegistersLoad, RegistersLoadCircuit, @@ -24,8 +26,6 @@ use crate::{ StackMatches, StackProgram, }, - Opcode, - Operand, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/instruction/operation/commit.rs b/synthesizer/program/src/logic/instruction/operation/commit.rs index 07a78b1fc8..df86369984 100644 --- a/synthesizer/program/src/logic/instruction/operation/commit.rs +++ b/synthesizer/program/src/logic/instruction/operation/commit.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, Opcode, Operand, + traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/instruction/operation/hash.rs b/synthesizer/program/src/logic/instruction/operation/hash.rs index 71240eb066..7a7ef228f2 100644 --- a/synthesizer/program/src/logic/instruction/operation/hash.rs +++ b/synthesizer/program/src/logic/instruction/operation/hash.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, Opcode, Operand, + traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/instruction/operation/is.rs b/synthesizer/program/src/logic/instruction/operation/is.rs index 48c7d6549a..7a5aaa8243 100644 --- a/synthesizer/program/src/logic/instruction/operation/is.rs +++ b/synthesizer/program/src/logic/instruction/operation/is.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, Opcode, Operand, + traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/instruction/operation/literals.rs b/synthesizer/program/src/logic/instruction/operation/literals.rs index 8f639d1a5a..c2b2c630dc 100644 --- a/synthesizer/program/src/logic/instruction/operation/literals.rs +++ b/synthesizer/program/src/logic/instruction/operation/literals.rs @@ -14,10 +14,10 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, Opcode, Operand, Operation, + traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, }; use console::{ network::prelude::*, diff --git a/synthesizer/program/src/logic/instruction/operation/sign_verify.rs b/synthesizer/program/src/logic/instruction/operation/sign_verify.rs index 3c0a696e57..2b9c829b7d 100644 --- a/synthesizer/program/src/logic/instruction/operation/sign_verify.rs +++ b/synthesizer/program/src/logic/instruction/operation/sign_verify.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::{ - traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, Opcode, Operand, + traits::{RegistersLoad, RegistersLoadCircuit, RegistersStore, RegistersStoreCircuit, StackMatches, StackProgram}, }; use circuit::prelude::ToFields as CircuitToFields; use console::{ diff --git a/synthesizer/program/src/traits/stack_and_registers.rs b/synthesizer/program/src/traits/stack_and_registers.rs index 369b2ff179..459a064b39 100644 --- a/synthesizer/program/src/traits/stack_and_registers.rs +++ b/synthesizer/program/src/traits/stack_and_registers.rs @@ -19,7 +19,7 @@ use crate::{FinalizeGlobalState, Function, Operand, Program}; use console::{ account::Group, network::Network, - prelude::{bail, Result}, + prelude::{Result, bail}, program::{ Future, Identifier, diff --git a/synthesizer/program/tests/helpers/sample.rs b/synthesizer/program/tests/helpers/sample.rs index 5d28e41882..4f6395125b 100644 --- a/synthesizer/program/tests/helpers/sample.rs +++ b/synthesizer/program/tests/helpers/sample.rs @@ -20,8 +20,8 @@ use console::{ program::{Identifier, Literal, Plaintext, Register, Value}, }; use snarkvm_synthesizer_program::{ - traits::{RegistersStore, RegistersStoreCircuit}, FinalizeGlobalState, + traits::{RegistersStore, RegistersStoreCircuit}, }; use synthesizer_process::{Authorization, CallStack, FinalizeRegisters, Registers, Stack, StackProgramTypes}; diff --git a/synthesizer/program/tests/instruction/commit.rs b/synthesizer/program/tests/instruction/commit.rs index e0b9ca0b46..c22f362f11 100644 --- a/synthesizer/program/tests/instruction/commit.rs +++ b/synthesizer/program/tests/instruction/commit.rs @@ -24,13 +24,13 @@ use console::{ program::{Identifier, Literal, LiteralType, Plaintext, Register, Value}, }; use snarkvm_synthesizer_program::{ - CommitBHP1024, CommitBHP256, CommitBHP512, CommitBHP768, + CommitBHP1024, CommitInstruction, - CommitPED128, CommitPED64, + CommitPED128, Opcode, Operand, Program, diff --git a/synthesizer/program/tests/instruction/hash.rs b/synthesizer/program/tests/instruction/hash.rs index ecb684509e..106474e978 100644 --- a/synthesizer/program/tests/instruction/hash.rs +++ b/synthesizer/program/tests/instruction/hash.rs @@ -24,16 +24,16 @@ use console::{ program::{Identifier, Literal, LiteralType, Plaintext, PlaintextType, Register, Value}, }; use snarkvm_synthesizer_program::{ - HashBHP1024, HashBHP256, HashBHP512, HashBHP768, + HashBHP1024, HashInstruction, HashKeccak256, HashKeccak384, HashKeccak512, - HashPED128, HashPED64, + HashPED128, HashPSD2, HashPSD4, HashPSD8, diff --git a/synthesizer/snark/Cargo.toml b/synthesizer/snark/Cargo.toml index 5c8071f21a..701e7dfc1e 100644 --- a/synthesizer/snark/Cargo.toml +++ b/synthesizer/snark/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-synthesizer-snark" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "SNARK wrappers for a decentralized virtual machine" homepage = "https://aleo.org" @@ -33,18 +33,18 @@ wasm = [ "console/wasm", "snarkvm-algorithms/wasm" ] [dependencies.circuit] package = "snarkvm-circuit" path = "../../circuit" -version = "=0.16.19" +version = "=1.0.0" [dependencies.console] package = "snarkvm-console" path = "../../console" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "network" ] [dependencies.snarkvm-algorithms] path = "../../algorithms" -version = "=0.16.19" +version = "=1.0.0" [dependencies.bincode] version = "1" diff --git a/synthesizer/snark/src/lib.rs b/synthesizer/snark/src/lib.rs index 6f18358a5c..4abcb2b580 100644 --- a/synthesizer/snark/src/lib.rs +++ b/synthesizer/snark/src/lib.rs @@ -18,7 +18,7 @@ #![warn(clippy::cast_possible_truncation)] #![cfg_attr(not(feature = "aleo-cli"), allow(unused_variables))] -use console::network::{prelude::*, FiatShamir}; +use console::network::{FiatShamir, prelude::*}; use snarkvm_algorithms::{snark::varuna, traits::SNARK}; use once_cell::sync::OnceCell; @@ -166,7 +166,7 @@ mod test { fn test_varuna_verify_public_input_size() { /// Creates a simple circuit: a * b. fn create_assignment() -> circuit::Assignment<::Field> { - use circuit::{environment::Mode, types::Field, Inject}; + use circuit::{Inject, environment::Mode, types::Field}; // Ensure the circuit environment is clean. Circuit::reset(); diff --git a/synthesizer/src/restrictions/helpers/block_range.rs b/synthesizer/src/restrictions/helpers/block_range.rs index c17a26efd8..6ce1d051e1 100644 --- a/synthesizer/src/restrictions/helpers/block_range.rs +++ b/synthesizer/src/restrictions/helpers/block_range.rs @@ -15,7 +15,7 @@ use console::{ network::Network, - prelude::{de, Deserialize, Deserializer, EnumAccess, One, Result, Serialize, Serializer, VariantAccess, Visitor}, + prelude::{Deserialize, Deserializer, EnumAccess, One, Result, Serialize, Serializer, VariantAccess, Visitor, de}, types::Field, }; diff --git a/synthesizer/src/vm/helpers/committee.rs b/synthesizer/src/vm/helpers/committee.rs index 66814f835f..77a51bb695 100644 --- a/synthesizer/src/vm/helpers/committee.rs +++ b/synthesizer/src/vm/helpers/committee.rs @@ -20,12 +20,12 @@ use console::{ network::Network, prelude::{cfg_into_iter, cfg_iter, cfg_reduce}, program::{Identifier, Literal, Plaintext, Value}, - types::{Boolean, U64, U8}, + types::{Boolean, U8, U64}, }; use ledger_committee::Committee; -use anyhow::{bail, ensure, Result}; -use indexmap::{indexmap, IndexMap}; +use anyhow::{Result, bail, ensure}; +use indexmap::{IndexMap, indexmap}; use std::str::FromStr; #[cfg(not(feature = "serial"))] diff --git a/synthesizer/src/vm/helpers/history.rs b/synthesizer/src/vm/helpers/history.rs index 7dcbce6c2f..568d93f624 100644 --- a/synthesizer/src/vm/helpers/history.rs +++ b/synthesizer/src/vm/helpers/history.rs @@ -15,7 +15,7 @@ use console::prelude::{Deserialize, Serialize}; -use aleo_std::{aleo_ledger_dir, StorageMode}; +use aleo_std::{StorageMode, aleo_ledger_dir}; use anyhow::Result; use serde_json; diff --git a/synthesizer/src/vm/mod.rs b/synthesizer/src/vm/mod.rs index 91ab48733a..6edec6338e 100644 --- a/synthesizer/src/vm/mod.rs +++ b/synthesizer/src/vm/mod.rs @@ -22,7 +22,7 @@ mod execute; mod finalize; mod verify; -use crate::{cast_mut_ref, cast_ref, convert, process, Restrictions}; +use crate::{Restrictions, cast_mut_ref, cast_ref, convert, process}; use console::{ account::{Address, PrivateKey}, network::prelude::*, @@ -49,7 +49,6 @@ use ledger_narwhal_data::Data; use ledger_puzzle::Puzzle; use ledger_query::Query; use ledger_store::{ - atomic_finalize, BlockStore, ConsensusStorage, ConsensusStore, @@ -58,8 +57,9 @@ use ledger_store::{ TransactionStorage, TransactionStore, TransitionStore, + atomic_finalize, }; -use synthesizer_process::{deployment_cost, execution_cost, Authorization, Process, Trace}; +use synthesizer_process::{Authorization, Process, Trace, deployment_cost, execution_cost}; use synthesizer_program::{FinalizeGlobalState, FinalizeOperation, FinalizeStoreTrait, Program}; use utilities::try_vm_runtime; @@ -68,7 +68,7 @@ use indexmap::{IndexMap, IndexSet}; use itertools::Either; use lru::LruCache; use parking_lot::{Mutex, RwLock}; -use rand::{rngs::StdRng, SeedableRng}; +use rand::{SeedableRng, rngs::StdRng}; use std::{collections::HashSet, num::NonZeroUsize, sync::Arc}; #[cfg(not(feature = "serial"))] diff --git a/synthesizer/tests/test_vm_execute_and_finalize.rs b/synthesizer/tests/test_vm_execute_and_finalize.rs index c8ef34b9d5..3626e72255 100644 --- a/synthesizer/tests/test_vm_execute_and_finalize.rs +++ b/synthesizer/tests/test_vm_execute_and_finalize.rs @@ -18,7 +18,7 @@ mod utilities; use console::{ account::{PrivateKey, ViewKey}, network::prelude::*, - program::{Entry, Identifier, Literal, Plaintext, ProgramID, Record, Value, U64}, + program::{Entry, Identifier, Literal, Plaintext, ProgramID, Record, U64, Value}, types::{Boolean, Field}, }; use ledger_block::{ @@ -31,8 +31,8 @@ use ledger_block::{ Transactions, Transition, }; -use ledger_store::{helpers::memory::ConsensusMemory, ConsensusStorage, ConsensusStore}; -use snarkvm_synthesizer::{program::FinalizeOperation, VM}; +use ledger_store::{ConsensusStorage, ConsensusStore, helpers::memory::ConsensusMemory}; +use snarkvm_synthesizer::{VM, program::FinalizeOperation}; use synthesizer_program::FinalizeGlobalState; use anyhow::Result; diff --git a/synthesizer/tests/utilities/tests/file_parse_test.rs b/synthesizer/tests/utilities/tests/file_parse_test.rs index 2f0e7e2b86..66da5c350a 100644 --- a/synthesizer/tests/utilities/tests/file_parse_test.rs +++ b/synthesizer/tests/utilities/tests/file_parse_test.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{get_expectation_path, print_difference, ExpectedTest}; +use crate::{ExpectedTest, get_expectation_path, print_difference}; -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use std::path::{Path, PathBuf}; /// A test for a parser, where the entire file is the test input. diff --git a/synthesizer/tests/utilities/tests/line_parse_test.rs b/synthesizer/tests/utilities/tests/line_parse_test.rs index 4ffc5638c2..af27483727 100644 --- a/synthesizer/tests/utilities/tests/line_parse_test.rs +++ b/synthesizer/tests/utilities/tests/line_parse_test.rs @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{get_expectation_path, print_difference, ExpectedTest}; +use crate::{ExpectedTest, get_expectation_path, print_difference}; -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use itertools::Itertools; use std::path::{Path, PathBuf}; diff --git a/synthesizer/tests/utilities/tests/program_test.rs b/synthesizer/tests/utilities/tests/program_test.rs index d32b0a1072..349cc103ab 100644 --- a/synthesizer/tests/utilities/tests/program_test.rs +++ b/synthesizer/tests/utilities/tests/program_test.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{get_expectation_path, print_difference, CurrentNetwork, ExpectedTest}; +use crate::{CurrentNetwork, ExpectedTest, get_expectation_path, print_difference}; use console::{account::PrivateKey, program::Identifier}; use snarkvm_synthesizer::program::Program; -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use itertools::Itertools; use serde_yaml::{Mapping, Sequence, Value}; use std::{ diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index d21f44151d..be9f7256b4 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-utilities" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Utilities for a decentralized virtual machine" homepage = "https://aleo.org" @@ -25,7 +25,7 @@ edition = "2021" [dependencies.snarkvm-utilities-derives] path = "./derives" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.aleo-std] diff --git a/utilities/derives/Cargo.toml b/utilities/derives/Cargo.toml index 57d3dc04a1..0191b6565e 100644 --- a/utilities/derives/Cargo.toml +++ b/utilities/derives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-utilities-derives" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "Canonical serialization for a decentralized virtual machine" homepage = "https://aleo.org" diff --git a/utilities/derives/src/canonical_serialize.rs b/utilities/derives/src/canonical_serialize.rs index d8fc860ccf..3e7d8b2053 100644 --- a/utilities/derives/src/canonical_serialize.rs +++ b/utilities/derives/src/canonical_serialize.rs @@ -14,7 +14,7 @@ // limitations under the License. use proc_macro2::TokenStream; -use quote::{quote, ToTokens}; +use quote::{ToTokens, quote}; use syn::{Data, Index, Type}; pub(crate) enum IdentOrIndex { diff --git a/utilities/src/biginteger/bigint_256.rs b/utilities/src/biginteger/bigint_256.rs index dbf138c8ac..83ca9ba96f 100644 --- a/utilities/src/biginteger/bigint_256.rs +++ b/utilities/src/biginteger/bigint_256.rs @@ -14,21 +14,21 @@ // limitations under the License. use crate::{ - biginteger::BigInteger, - bititerator::{BitIteratorBE, BitIteratorLE}, - io::{Read, Result as IoResult, Write}, FromBits, FromBytes, ToBits, ToBytes, + biginteger::BigInteger, + bititerator::{BitIteratorBE, BitIteratorLE}, + io::{Read, Result as IoResult, Write}, }; use anyhow::Result; use core::fmt::{Debug, Display}; use num_bigint::BigUint; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; use zeroize::Zeroize; diff --git a/utilities/src/biginteger/bigint_384.rs b/utilities/src/biginteger/bigint_384.rs index 4101639e5a..4ee46574a5 100644 --- a/utilities/src/biginteger/bigint_384.rs +++ b/utilities/src/biginteger/bigint_384.rs @@ -14,21 +14,21 @@ // limitations under the License. use crate::{ - biginteger::BigInteger, - bititerator::{BitIteratorBE, BitIteratorLE}, - io::{Read, Result as IoResult, Write}, FromBits, FromBytes, ToBits, ToBytes, + biginteger::BigInteger, + bititerator::{BitIteratorBE, BitIteratorLE}, + io::{Read, Result as IoResult, Write}, }; use anyhow::Result; use core::fmt::{Debug, Display}; use num_bigint::BigUint; use rand::{ - distributions::{Distribution, Standard}, Rng, + distributions::{Distribution, Standard}, }; use zeroize::Zeroize; diff --git a/utilities/src/biginteger/mod.rs b/utilities/src/biginteger/mod.rs index 1c541543a6..e404bb1648 100644 --- a/utilities/src/biginteger/mod.rs +++ b/utilities/src/biginteger/mod.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{rand::Uniform, FromBits, FromBytes, ToBits, ToBytes}; +use crate::{FromBits, FromBytes, ToBits, ToBytes, rand::Uniform}; use num_bigint::BigUint; use std::fmt::{Debug, Display}; diff --git a/utilities/src/bits.rs b/utilities/src/bits.rs index 6b2f41112c..257ebff250 100644 --- a/utilities/src/bits.rs +++ b/utilities/src/bits.rs @@ -15,7 +15,7 @@ use crate::Vec; -use anyhow::{ensure, Result}; +use anyhow::{Result, ensure}; /// Takes as input a sequence of objects, and converts them to a series of little-endian bits. /// All traits that implement `ToBits` can be automatically converted to bits in this manner. @@ -319,7 +319,7 @@ mod tests { use crate::{TestRng, Uniform}; use anyhow::Result; - use rand::{distributions::Alphanumeric, Rng}; + use rand::{Rng, distributions::Alphanumeric}; const ITERATIONS: u64 = 10000; diff --git a/utilities/src/bytes.rs b/utilities/src/bytes.rs index b4d18a0513..d7e7477559 100644 --- a/utilities/src/bytes.rs +++ b/utilities/src/bytes.rs @@ -14,17 +14,17 @@ // limitations under the License. use crate::{ + Vec, error, fmt, io::{Read, Result as IoResult, Write}, marker::PhantomData, - Vec, }; use serde::{ - de::{self, Error, SeqAccess, Visitor}, - ser::{self, SerializeTuple}, Deserializer, Serializer, + de::{self, Error, SeqAccess, Visitor}, + ser::{self, SerializeTuple}, }; use smol_str::SmolStr; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}; diff --git a/utilities/src/rand.rs b/utilities/src/rand.rs index 38155d037e..b93671256a 100644 --- a/utilities/src/rand.rs +++ b/utilities/src/rand.rs @@ -14,10 +14,10 @@ // limitations under the License. use rand::{ - distributions::{Distribution, Standard}, - rngs::StdRng, Rng, SeedableRng, + distributions::{Distribution, Standard}, + rngs::StdRng, }; use rand_xorshift::XorShiftRng; diff --git a/utilities/src/serialize/helpers.rs b/utilities/src/serialize/helpers.rs index 13d0aa3cc7..3385795a99 100644 --- a/utilities/src/serialize/helpers.rs +++ b/utilities/src/serialize/helpers.rs @@ -14,12 +14,12 @@ // limitations under the License. pub use crate::{ - io::{self, Read, Write}, FromBytes, ToBytes, Vec, + io::{self, Read, Write}, }; -use crate::{serialize::traits::*, SerializationError}; +use crate::{SerializationError, serialize::traits::*}; /// Serialize a Vector's elements without serializing the Vector's length /// If you want to serialize the full Vector, use `CanonicalSerialize for Vec` diff --git a/utilities/src/serialize/impls.rs b/utilities/src/serialize/impls.rs index 1d29546c00..e20d707d3a 100644 --- a/utilities/src/serialize/impls.rs +++ b/utilities/src/serialize/impls.rs @@ -14,12 +14,12 @@ // limitations under the License. pub use crate::{ - io::{Read, Write}, FromBytes, ToBytes, Vec, + io::{Read, Write}, }; -use crate::{serialize::traits::*, SerializationError}; +use crate::{SerializationError, serialize::traits::*}; use bincode::Options; diff --git a/utilities/src/serialize/traits.rs b/utilities/src/serialize/traits.rs index 5c92ba3583..8e4e3702f7 100644 --- a/utilities/src/serialize/traits.rs +++ b/utilities/src/serialize/traits.rs @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use crate::io::{Read, Write}; use crate::SerializationError; +pub use crate::io::{Read, Write}; use serde::de::{self, DeserializeOwned, Deserializer}; diff --git a/vm/cli/cli.rs b/vm/cli/cli.rs index 26a7cd7127..6597cf1012 100644 --- a/vm/cli/cli.rs +++ b/vm/cli/cli.rs @@ -17,7 +17,7 @@ use crate::cli::commands::{Build, Clean, Execute, New, Run, Update}; use anstyle::{AnsiColor, Color, Style}; use anyhow::Result; -use clap::{builder::Styles, Parser}; +use clap::{Parser, builder::Styles}; const HEADER_COLOR: Option = Some(Color::Ansi(AnsiColor::Yellow)); const LITERAL_COLOR: Option = Some(Color::Ansi(AnsiColor::Green)); diff --git a/vm/cli/commands/run.rs b/vm/cli/commands/run.rs index 9e98e49a32..7a98e075fb 100644 --- a/vm/cli/commands/run.rs +++ b/vm/cli/commands/run.rs @@ -101,7 +101,7 @@ impl Run { mod tests { use super::*; use crate::{ - cli::{Command, CLI}, + cli::{CLI, Command}, prelude::{Identifier, Value}, }; diff --git a/vm/cli/helpers/env.rs b/vm/cli/helpers/env.rs index 65ccc9df1d..e4b2111b6d 100644 --- a/vm/cli/helpers/env.rs +++ b/vm/cli/helpers/env.rs @@ -15,7 +15,7 @@ use crate::{cli::CurrentNetwork, console::account::PrivateKey}; -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; fn env_template() -> String { r#" diff --git a/vm/cli/helpers/updater.rs b/vm/cli/helpers/updater.rs index 35a0a02d51..7912cdfa03 100644 --- a/vm/cli/helpers/updater.rs +++ b/vm/cli/helpers/updater.rs @@ -17,7 +17,7 @@ use crate::cli::errors::UpdaterError; use anyhow::Result; use colored::Colorize; -use self_update::{backends::github, version::bump_is_greater, Status}; +use self_update::{Status, backends::github, version::bump_is_greater}; pub struct Updater; diff --git a/vm/cli/main.rs b/vm/cli/main.rs index 53078b2703..402532954c 100644 --- a/vm/cli/main.rs +++ b/vm/cli/main.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use snarkvm::cli::{Updater, CLI}; +use snarkvm::cli::{CLI, Updater}; use clap::Parser; diff --git a/vm/file/aleo.rs b/vm/file/aleo.rs index ff44f354b6..9eaecd769f 100644 --- a/vm/file/aleo.rs +++ b/vm/file/aleo.rs @@ -19,7 +19,7 @@ use crate::{ synthesizer::Program, }; -use anyhow::{anyhow, bail, ensure, Result}; +use anyhow::{Result, anyhow, bail, ensure}; use core::str::FromStr; use std::{ fs::{self, File}, diff --git a/vm/file/avm.rs b/vm/file/avm.rs index f30057dd47..ee0b7443a5 100644 --- a/vm/file/avm.rs +++ b/vm/file/avm.rs @@ -18,7 +18,7 @@ use crate::{ synthesizer::Program, }; -use anyhow::{anyhow, ensure, Result}; +use anyhow::{Result, anyhow, ensure}; use std::{ fs::{self, File}, io::Write, diff --git a/vm/file/manifest.rs b/vm/file/manifest.rs index 2383a9a1e2..e9e4ee68a1 100644 --- a/vm/file/manifest.rs +++ b/vm/file/manifest.rs @@ -18,7 +18,7 @@ use crate::{ synthesizer::Program, }; -use anyhow::{anyhow, ensure, Result}; +use anyhow::{Result, anyhow, ensure}; use core::str::FromStr; use std::{ fs::{self, File}, diff --git a/vm/file/prover.rs b/vm/file/prover.rs index b2f5edcfd0..1bac807b46 100644 --- a/vm/file/prover.rs +++ b/vm/file/prover.rs @@ -15,10 +15,10 @@ use crate::{ prelude::{FromBytes, Identifier, IoResult, Network, Read, ToBytes}, - synthesizer::{snark::ProvingKey, Program}, + synthesizer::{Program, snark::ProvingKey}, }; -use anyhow::{anyhow, bail, ensure, Result}; +use anyhow::{Result, anyhow, bail, ensure}; use std::{ fs::{self, File}, io::Write, diff --git a/vm/file/readme_file.rs b/vm/file/readme_file.rs index 3008f44f63..8b5e049c18 100644 --- a/vm/file/readme_file.rs +++ b/vm/file/readme_file.rs @@ -18,7 +18,7 @@ use crate::{ synthesizer::Program, }; -use anyhow::{ensure, Result}; +use anyhow::{Result, ensure}; use std::{ fs::File, io::Write, diff --git a/vm/file/verifier.rs b/vm/file/verifier.rs index ba0306166f..af0b4f9673 100644 --- a/vm/file/verifier.rs +++ b/vm/file/verifier.rs @@ -15,10 +15,10 @@ use crate::{ prelude::{FromBytes, Identifier, IoResult, Network, Read, ToBytes}, - synthesizer::{snark::VerifyingKey, Program}, + synthesizer::{Program, snark::VerifyingKey}, }; -use anyhow::{anyhow, bail, ensure, Result}; +use anyhow::{Result, anyhow, bail, ensure}; use std::{ fs::{self, File}, io::Write, diff --git a/vm/package/mod.rs b/vm/package/mod.rs index 89a0f569d3..678d892400 100644 --- a/vm/package/mod.rs +++ b/vm/package/mod.rs @@ -29,7 +29,7 @@ use crate::{ network::Network, program::{Identifier, Locator, ProgramID, Response, Value}, }, - file::{AVMFile, AleoFile, Manifest, ProverFile, VerifierFile, README}, + file::{AVMFile, AleoFile, Manifest, ProverFile, README, VerifierFile}, ledger::{block::Execution, query::Query, store::helpers::memory::BlockMemory}, prelude::{Deserialize, Deserializer, Serialize, SerializeStruct, Serializer}, synthesizer::{ @@ -39,7 +39,7 @@ use crate::{ }, }; -use anyhow::{bail, ensure, Error, Result}; +use anyhow::{Error, Result, bail, ensure}; use core::str::FromStr; use rand::{CryptoRng, Rng}; use std::path::{Path, PathBuf}; diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml index 836832c094..ece1022b6c 100644 --- a/wasm/Cargo.toml +++ b/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snarkvm-wasm" -version = "0.16.19" +version = "1.0.0" authors = [ "The Aleo Team " ] description = "WASM for a decentralized virtual machine" homepage = "https://aleo.org" @@ -51,54 +51,54 @@ utilities = [ "snarkvm-utilities" ] [dependencies.snarkvm-circuit-network] path = "../circuit/network" -version = "=0.16.19" +version = "=1.0.0" features = [ "wasm" ] optional = true [dependencies.snarkvm-console] path = "../console" -version = "=0.16.19" +version = "=1.0.0" features = [ "wasm" ] optional = true [dependencies.snarkvm-curves] path = "../curves" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-fields] path = "../fields" -version = "=0.16.19" +version = "=1.0.0" optional = true [dependencies.snarkvm-ledger-block] path = "../ledger/block" -version = "=0.16.19" +version = "=1.0.0" features = [ "wasm" ] optional = true [dependencies.snarkvm-ledger-query] path = "../ledger/query" -version = "=0.16.19" +version = "=1.0.0" features = [ "async", "wasm" ] optional = true [dependencies.snarkvm-ledger-store] path = "../ledger/store" -version = "=0.16.19" +version = "=1.0.0" features = [ "wasm" ] optional = true [dependencies.snarkvm-synthesizer] path = "../synthesizer" -version = "=0.16.19" +version = "=1.0.0" default-features = false features = [ "async", "wasm" ] optional = true [dependencies.snarkvm-utilities] path = "../utilities" -version = "=0.16.19" +version = "=1.0.0" features = [ "wasm" ] optional = true