From 70f0643cd57d886e67813734dd9be64b54a4aa71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Lindstr=C3=B8m?= Date: Thu, 26 Oct 2023 13:53:22 +0200 Subject: [PATCH 1/6] Renamve prove -> evaluate --- .idea/.gitignore | 8 ++++++++ .idea/fastcrypto.iml | 22 ++++++++++++++++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ 4 files changed, 44 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/fastcrypto.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..13566b81b0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/fastcrypto.iml b/.idea/fastcrypto.iml new file mode 100644 index 0000000000..bd42716d41 --- /dev/null +++ b/.idea/fastcrypto.iml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..c854f02caa --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..35eb1ddfbb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 81442dafe1d6445130420ebba98a71aad42441a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Lindstr=C3=B8m?= Date: Thu, 26 Oct 2023 14:04:30 +0200 Subject: [PATCH 2/6] Revert "Renamve prove -> evaluate" This reverts commit 452cf6feee1a3566fa8bd54e41ce1c26ffef5adc. --- .idea/.gitignore | 8 -------- .idea/fastcrypto.iml | 22 ---------------------- .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ fastcrypto-cli/src/vdf.rs | 14 +++++++------- 5 files changed, 7 insertions(+), 51 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/fastcrypto.iml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81b0..0000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/fastcrypto.iml b/.idea/fastcrypto.iml deleted file mode 100644 index bd42716d41..0000000000 --- a/.idea/fastcrypto.iml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index c854f02caa..0000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbb..0000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/fastcrypto-cli/src/vdf.rs b/fastcrypto-cli/src/vdf.rs index 8b201cc813..9f7be7110c 100644 --- a/fastcrypto-cli/src/vdf.rs +++ b/fastcrypto-cli/src/vdf.rs @@ -18,7 +18,7 @@ enum Command { Discriminant(DiscriminantArguments), /// Compute VDF output and proof. - Evaluate(EvaluateArguments), + Prove(ProveArguments), /// Verify an output . Verify(VerifyArguments), @@ -36,7 +36,7 @@ struct DiscriminantArguments { } #[derive(Parser, Clone)] -struct EvaluateArguments { +struct ProveArguments { /// The hex encoded discriminant. #[clap(short, long)] discriminant: String, @@ -91,7 +91,7 @@ fn execute(cmd: Command) -> Result { Ok(result) } - Command::Evaluate(arguments) => { + Command::Prove(arguments) => { let discriminant_bytes = hex::decode(arguments.discriminant) .map_err(|_| Error::new(ErrorKind::InvalidInput, "Invalid discriminant."))?; let discriminant = Discriminant::try_from_be_bytes(&discriminant_bytes) @@ -150,7 +150,7 @@ fn execute(cmd: Command) -> Result { #[cfg(test)] mod tests { - use crate::{execute, Command, DiscriminantArguments, EvaluateArguments, VerifyArguments}; + use crate::{execute, Command, DiscriminantArguments, ProveArguments, VerifyArguments}; #[test] fn test_discriminant() { @@ -165,10 +165,10 @@ mod tests { } #[test] - fn test_evaluate() { + fn test_prove() { let discriminant = "ff6cb04c161319209d438b6f016a9c3703b69fef3bb701550eb556a7b2dfec8676677282f2dd06c5688c51439c59e5e1f9efe8305df1957d6b7bf3433493668680e8b8bb05262cbdf4d020dafa8d5a3433199b8b53f6d487b3f37a4ab59493f050d1e2b535b7e9be19c0201055c0d7a07db3aaa67fe0eed63b63d86558668a27".to_string(); let iterations = 1000u64; - let result = execute(Command::Evaluate(EvaluateArguments { + let result = execute(Command::Prove(ProveArguments { discriminant, iterations, })) @@ -177,7 +177,7 @@ mod tests { assert_eq!(expected, result); let invalid_discriminant = "abcx".to_string(); - assert!(execute(Command::Evaluate(EvaluateArguments { + assert!(execute(Command::Prove(ProveArguments { discriminant: invalid_discriminant, iterations, })) From 0770406fac7aed46b4d10cbef20a2d9f001e676d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Lindstr=C3=B8m?= Date: Thu, 26 Oct 2023 14:16:00 +0200 Subject: [PATCH 3/6] Try again: Rename Prove -> Evaluate --- fastcrypto-cli/src/vdf.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fastcrypto-cli/src/vdf.rs b/fastcrypto-cli/src/vdf.rs index 9f7be7110c..8b201cc813 100644 --- a/fastcrypto-cli/src/vdf.rs +++ b/fastcrypto-cli/src/vdf.rs @@ -18,7 +18,7 @@ enum Command { Discriminant(DiscriminantArguments), /// Compute VDF output and proof. - Prove(ProveArguments), + Evaluate(EvaluateArguments), /// Verify an output . Verify(VerifyArguments), @@ -36,7 +36,7 @@ struct DiscriminantArguments { } #[derive(Parser, Clone)] -struct ProveArguments { +struct EvaluateArguments { /// The hex encoded discriminant. #[clap(short, long)] discriminant: String, @@ -91,7 +91,7 @@ fn execute(cmd: Command) -> Result { Ok(result) } - Command::Prove(arguments) => { + Command::Evaluate(arguments) => { let discriminant_bytes = hex::decode(arguments.discriminant) .map_err(|_| Error::new(ErrorKind::InvalidInput, "Invalid discriminant."))?; let discriminant = Discriminant::try_from_be_bytes(&discriminant_bytes) @@ -150,7 +150,7 @@ fn execute(cmd: Command) -> Result { #[cfg(test)] mod tests { - use crate::{execute, Command, DiscriminantArguments, ProveArguments, VerifyArguments}; + use crate::{execute, Command, DiscriminantArguments, EvaluateArguments, VerifyArguments}; #[test] fn test_discriminant() { @@ -165,10 +165,10 @@ mod tests { } #[test] - fn test_prove() { + fn test_evaluate() { let discriminant = "ff6cb04c161319209d438b6f016a9c3703b69fef3bb701550eb556a7b2dfec8676677282f2dd06c5688c51439c59e5e1f9efe8305df1957d6b7bf3433493668680e8b8bb05262cbdf4d020dafa8d5a3433199b8b53f6d487b3f37a4ab59493f050d1e2b535b7e9be19c0201055c0d7a07db3aaa67fe0eed63b63d86558668a27".to_string(); let iterations = 1000u64; - let result = execute(Command::Prove(ProveArguments { + let result = execute(Command::Evaluate(EvaluateArguments { discriminant, iterations, })) @@ -177,7 +177,7 @@ mod tests { assert_eq!(expected, result); let invalid_discriminant = "abcx".to_string(); - assert!(execute(Command::Prove(ProveArguments { + assert!(execute(Command::Evaluate(EvaluateArguments { discriminant: invalid_discriminant, iterations, })) From 7f3ad6b87a7733f8faac6883f3a432fc1e6a66d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Lindstr=C3=B8m?= Date: Fri, 27 Oct 2023 09:20:22 +0200 Subject: [PATCH 4/6] Sample discriminant with gmp when possible --- Cargo.lock | 46 ++++++++++++++++++++++++++++ fastcrypto-vdf/Cargo.toml | 1 + fastcrypto-vdf/benches/vdf.rs | 43 ++++++++++++++++++++------ fastcrypto-vdf/src/vdf/wesolowski.rs | 16 ++++++++-- 4 files changed, 93 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 659b585ca4..f3fc19b536 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -782,6 +782,19 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "const-oid" version = "0.9.2" @@ -1237,6 +1250,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encoding_rs" version = "0.8.32" @@ -1419,11 +1438,13 @@ dependencies = [ "criterion 0.5.1", "fastcrypto", "hex", + "indicatif", "num-bigint", "num-integer", "num-modular 0.6.1", "num-prime", "num-traits", + "rand", "rug", ] @@ -1898,6 +1919,19 @@ dependencies = [ "serde", ] +[[package]] +name = "indicatif" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "inout" version = "0.1.3" @@ -2252,6 +2286,12 @@ dependencies = [ "libc", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "once_cell" version = "1.17.1" @@ -2408,6 +2448,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b559898e0b4931ed2d3b959ab0c2da4d99cc644c4b0b1a35b4d344027f474023" + [[package]] name = "poseidon-ark" version = "0.0.1" diff --git a/fastcrypto-vdf/Cargo.toml b/fastcrypto-vdf/Cargo.toml index 37e4459cce..8d61999723 100644 --- a/fastcrypto-vdf/Cargo.toml +++ b/fastcrypto-vdf/Cargo.toml @@ -25,6 +25,7 @@ experimental = [] [dev-dependencies] hex = "0.4.3" criterion = "0.5.1" +rand = "0.8.4" [[bench]] name = "vdf" diff --git a/fastcrypto-vdf/benches/vdf.rs b/fastcrypto-vdf/benches/vdf.rs index ae5afee9e4..b796b4179e 100644 --- a/fastcrypto-vdf/benches/vdf.rs +++ b/fastcrypto-vdf/benches/vdf.rs @@ -5,12 +5,13 @@ extern crate criterion; use criterion::measurement::Measurement; -use criterion::{BenchmarkGroup, Criterion}; +use criterion::{BenchmarkGroup, BenchmarkId, Criterion}; use fastcrypto_vdf::class_group::{Discriminant, QuadraticForm}; use fastcrypto_vdf::vdf::wesolowski::ClassGroupVDF; use fastcrypto_vdf::vdf::VDF; use num_bigint::BigInt; use num_traits::Num; +use rand::{RngCore, thread_rng}; struct VerificationInputs { iterations: u64, @@ -48,29 +49,51 @@ fn verify(c: &mut Criterion) { let mut group = c.benchmark_group(format!("VDF verify ({})", dep)); - // Note that the number of iterations are quite low, but this has very little influence on the benchmark results. - //1024 bits verify_single(VerificationInputs { - iterations: 1000, + iterations: 4000000, discriminant: "cd711f181153e08e08e5ba156db0c4e9469de76f2bd6b64f068f5007918727f5eaa5f6a0e090f82682a4ebf87befdea8f1253265d700ee3ca6b0fdb2677c633c7f37b62f0e0c13b402def0ba9abaf15e4c53bfb6bda0c7a0cad4439864af3eb9af6d6c4b10286eb8ff5e2de5b009196bc60c3000fde8d4b89b7674e61bc2d23f".to_string(), - result: "030039c78c39cff6c29052bfc1453616ec7a47251509b9dbc33d1036bebd4d12e6711a51deb327120310f96be04c90fd4c3b1dab9617c3133132b827abe7bb2348707da8164b964e1b95cd6a8eaf36ffb80bab1f750410e793daec8228b222bd00370100".to_string(), - proof: "000075d043db5f619f5cb4e8ef7729c7cac154434c33d6e52dd086b90a52c7b1231890eda9d1365100e88993e332f0a99bb7763f215de2fb6b632445beeeff22b657dc90d4e110ed03eac10ec445117d211208c79dd4933ba58b8e17b4c54ef1824c0100".to_string(), + result: "02007e64ab640cfd39daeaeab7400797917a2635fca5988ae1ba5e9a7a0b234faf361ae103d36d0838574524a5bc0a6b0bdd8f5e8c90774e92194df23fd5929b343bc7e47a1a07270949ae1b37505a63414aec987e06eabc6738d1ec02b32d6da3690100".to_string(), + proof: "0200c879069103e13f66c38ac8f34a8ec48ec7033f442128de49c7adf0732359e4da4682bff7ad6a2ca2767a39f9eaf4dec9c80fb950d2cb603458738b3d0e17855e6bf0586455e99e75fa23f0ae59e1a922c1d5b18b234428766028f5856b872f720100".to_string(), }, &mut group); // 2048 bits verify_single(VerificationInputs { - iterations: 1000, + iterations: 4000000, discriminant: "f6901cd003679e2f451cda55b032fb49222a9b595b9e5948b793d2d7338d4da01937c637739e7f980d481b742c0fdc5255847ccc848359db822ed6ca7f33bdd54a207e24679c9f1f7e64be59e1bed7afbaa999770743984ed997c2c8187b5a80a0df200c040ac152dd6bb3bfdf3a7f151f2ddbd9debf6c841cebdc9f450cb42f51529ba04e6bda874b43461ed104b39257559bed53200d093f8e6c48f2b1c91e15e37ce695924eafd78fa4ba11e519f9a885399264d1a885d353ce128f1e044ef2feda125167e38ad5db7931b752847388c900868bc6bff2d83f7a6e055c618d3abc0ae104520df25508f40323c35d2d992303e12f1ae7bc44ffd5861d9f768f".to_string(), - result: "02001222c470df6df6e1321aa1c28279d0c64663c7f066888ff6cd854dcd5deb71f63dfe0b867675180fada390e0d7b1ff735b55fea2b88123a32d1e1239126b275578ea26a4a89e5ef290e2b7b8d072ab819d5b9422770339dc87fd4dc4ebf6add3e391067a557be4be5436355ab11035609d5a3dc71e95cf2a0dcbb228b85d9750a1dc670ac51822d7eff49b5cacd4a8cc485e53bbf7e44f95e7fd5ec55fca44eb91c4831b1e839d8b4c8453dce8be69698bc5cb8fa45120d201057e4d72a6746b0100".to_string(), - proof: "03008b91b20ab570b701d394aa095d8c670d95a8a3b26af966e979a27acf417421360ea54014668a121139ab11fe92cc0a8d192a8a675f244f3016ed23a7a82d9dd70de089d5bcb5bb0c9535923b2656b19c8cf0cc6e0e4c800c44fc17e16a1b96572f6e0e0967709af259b854a51bec270e5cf73cc4efa93791ac6a84dc2ab77f02d0234ac60b2a04740644ac845204c67f9063ab139e9a0eb25c4417c892ca52299202d3854243d7eb58cc46a837745a1eb92699eb89138eec89467f7226380b040600".to_string(), + result: "0000d37421051f4f437a727a8d21825ef02a9c33744766947a59140d532756f231d42d8add13fe76e747b130a29becb75c3a3389ee1472325a479afb4275b7e9cf0cedc957e4409cfdea69e901fc8d810617381c0492de46e0387ee42eb3065468ceec55d17f072fa691341ff5b6d835abf35a47b90c127658c4bf4ec8ea6a4ae4177bd96aad7454c36e7bde4bb360a519c9d7b73ecd776d44d18d6441bc5fbe8724227c623477b5c307b89dcea707e1db547d4d0e8c7814e9f24ceedb55653585310100".to_string(), + proof: "02000607e9272f517e3d7aaa2d3f5bcb5925b9e9c46e432b6b292223df502cc4487b5841d9c4f3746adfd1f058482220d38ddf4c6daf30d9cc0cf0cebb36a5b1ef9189e4ed78b022fae17b9fc2e16c6d3450df52877f67b3c7c06db17eb1f1ecb8c78310aa622935ff76abfb3bdf153604359438c1364269a80dd434149b658a6b6629ec86ba04a339b07b4ab71c1f2417c64a2cfa49138a62d0c02e753c1060df68a3f9ed04fc357742b6f927f7550ba79e52c429031ba3f353b9dd5fef6147c4190100".to_string(), }, &mut group); } + +fn sample_discriminant(c: &mut Criterion) { + #[cfg(not(feature = "gmp"))] + let dep = "num-bigint"; + + #[cfg(feature = "gmp")] + let dep = "gmp"; + + let bit_lengths = [128, 256, 512, 1024, 2048]; + + let mut seed = [0u8; 32]; + + let mut rng = thread_rng(); + + for bit_length in bit_lengths { + c.bench_with_input( + BenchmarkId::new(format!("Sample class group discriminant ({})", dep), &bit_length), &bit_length, + |b, n| b.iter(|| { + rng.try_fill_bytes(&mut seed).unwrap(); + Discriminant::from_seed(&seed, *n).unwrap( ); + })); + } +} + criterion_group! { name = vdf_benchmarks; config = Criterion::default().sample_size(100); - targets = verify, + targets = verify, sample_discriminant } criterion_main!(vdf_benchmarks); diff --git a/fastcrypto-vdf/src/vdf/wesolowski.rs b/fastcrypto-vdf/src/vdf/wesolowski.rs index ffc261f073..ad3d98846f 100644 --- a/fastcrypto-vdf/src/vdf/wesolowski.rs +++ b/fastcrypto-vdf/src/vdf/wesolowski.rs @@ -8,9 +8,8 @@ use fastcrypto::error::FastCryptoError::{InvalidInput, InvalidProof}; use fastcrypto::error::FastCryptoResult; use fastcrypto::hash::HashFunction; use fastcrypto::hash::Sha256; -use num_bigint::{BigInt, Sign}; +use num_bigint::{BigInt, BigUint, Sign}; use num_integer::Integer; -use num_prime::nt_funcs::is_prime; use std::cmp::min; use std::marker::PhantomData; use std::ops::Neg; @@ -204,12 +203,23 @@ fn hash_prime(seed: &[u8], length: usize, bitmask: &[usize]) -> FastCryptoResult // The implementations of the primality test used below might be slightly different from the // one used by chiavdf, but since the risk of a false positive is very small (4^{-100}) this // is not an issue. - if is_prime(&x.to_biguint().unwrap(), None).probably() { + if is_prime(&x.to_biguint().unwrap()) { return Ok(x); } } } +#[cfg(feature = "gmp")] +fn is_prime(x: &BigUint) -> bool { + let y = rug::Integer::from_digits(&x.to_bytes_be(), rug::integer::Order::Msf); + y.is_probably_prime(30) != rug::integer::IsPrime::No +} + +#[cfg(not(feature = "gmp"))] +fn is_prime(x: &BigUint) -> bool { + num_prime::nt_funcs::is_prime(x, None).probably() +} + impl Discriminant { /// Compute a valid discriminant (aka a negative prime equal to 3 mod 4) based on the given seed. pub fn from_seed(seed: &[u8], length: usize) -> FastCryptoResult { From 66762a46788bb5a5cbc55526b51bc9528b725b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Lindstr=C3=B8m?= Date: Fri, 27 Oct 2023 09:22:26 +0200 Subject: [PATCH 5/6] fmt --- fastcrypto-vdf/benches/vdf.rs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/fastcrypto-vdf/benches/vdf.rs b/fastcrypto-vdf/benches/vdf.rs index b796b4179e..63775046e2 100644 --- a/fastcrypto-vdf/benches/vdf.rs +++ b/fastcrypto-vdf/benches/vdf.rs @@ -11,7 +11,7 @@ use fastcrypto_vdf::vdf::wesolowski::ClassGroupVDF; use fastcrypto_vdf::vdf::VDF; use num_bigint::BigInt; use num_traits::Num; -use rand::{RngCore, thread_rng}; +use rand::{thread_rng, RngCore}; struct VerificationInputs { iterations: u64, @@ -66,13 +66,12 @@ fn verify(c: &mut Criterion) { }, &mut group); } - fn sample_discriminant(c: &mut Criterion) { #[cfg(not(feature = "gmp"))] - let dep = "num-bigint"; + let dep = "num-bigint"; #[cfg(feature = "gmp")] - let dep = "gmp"; + let dep = "gmp"; let bit_lengths = [128, 256, 512, 1024, 2048]; @@ -82,11 +81,18 @@ fn sample_discriminant(c: &mut Criterion) { for bit_length in bit_lengths { c.bench_with_input( - BenchmarkId::new(format!("Sample class group discriminant ({})", dep), &bit_length), &bit_length, - |b, n| b.iter(|| { - rng.try_fill_bytes(&mut seed).unwrap(); - Discriminant::from_seed(&seed, *n).unwrap( ); - })); + BenchmarkId::new( + format!("Sample class group discriminant ({})", dep), + &bit_length, + ), + &bit_length, + |b, n| { + b.iter(|| { + rng.try_fill_bytes(&mut seed).unwrap(); + Discriminant::from_seed(&seed, *n).unwrap(); + }) + }, + ); } } From 28bc1bd53fc6d3400b8ab03bc063314598dc4e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Lindstr=C3=B8m?= Date: Fri, 27 Oct 2023 09:33:10 +0200 Subject: [PATCH 6/6] clippy --- Cargo.lock | 45 ----------------------------------- fastcrypto-vdf/benches/vdf.rs | 2 +- 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f3fc19b536..37272a14cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -782,19 +782,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "console" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.45.0", -] - [[package]] name = "const-oid" version = "0.9.2" @@ -1250,12 +1237,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - [[package]] name = "encoding_rs" version = "0.8.32" @@ -1438,7 +1419,6 @@ dependencies = [ "criterion 0.5.1", "fastcrypto", "hex", - "indicatif", "num-bigint", "num-integer", "num-modular 0.6.1", @@ -1919,19 +1899,6 @@ dependencies = [ "serde", ] -[[package]] -name = "indicatif" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - [[package]] name = "inout" version = "0.1.3" @@ -2286,12 +2253,6 @@ dependencies = [ "libc", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "once_cell" version = "1.17.1" @@ -2448,12 +2409,6 @@ dependencies = [ "universal-hash", ] -[[package]] -name = "portable-atomic" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b559898e0b4931ed2d3b959ab0c2da4d99cc644c4b0b1a35b4d344027f474023" - [[package]] name = "poseidon-ark" version = "0.0.1" diff --git a/fastcrypto-vdf/benches/vdf.rs b/fastcrypto-vdf/benches/vdf.rs index 63775046e2..82d09e8bd3 100644 --- a/fastcrypto-vdf/benches/vdf.rs +++ b/fastcrypto-vdf/benches/vdf.rs @@ -83,7 +83,7 @@ fn sample_discriminant(c: &mut Criterion) { c.bench_with_input( BenchmarkId::new( format!("Sample class group discriminant ({})", dep), - &bit_length, + bit_length, ), &bit_length, |b, n| {