From ae2ed272ec38ec3668ff2b498fb464501c50b9fd Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Thu, 29 Jun 2023 12:38:37 +0000 Subject: [PATCH 1/7] feat: r1 bindings --- Cargo.lock | 33 +++++----- Cargo.toml | 6 +- src/acvm_interop/proof_system.rs | 3 +- src/barretenberg_structures.rs | 104 ++++++++++++++++++++++++++++--- 4 files changed, 119 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d84a3c4..cad5d54e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,7 @@ version = 3 [[package]] name = "acir" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf51cc323e2a96e381859e6ea26c14fb94cabe72353a4e2bcc2df582110927b" +version = "0.15.1" dependencies = [ "acir_field", "brillig_vm", @@ -18,9 +16,7 @@ dependencies = [ [[package]] name = "acir_field" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c386958918fac40ec59ba165c1efaf3ee8a25a7b9587794dc88736a67f08db" +version = "0.15.1" dependencies = [ "ark-bn254", "ark-ff", @@ -32,9 +28,7 @@ dependencies = [ [[package]] name = "acvm" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be8cf5e532200abd879e0e9a1aecfea6605387bc7fdbf3e6c51e4d3799e760e" +version = "0.15.1" dependencies = [ "acir", "acvm_stdlib", @@ -44,6 +38,7 @@ dependencies = [ "k256", "num-bigint", "num-traits", + "p256", "sha2", "sha3", "thiserror", @@ -70,9 +65,7 @@ dependencies = [ [[package]] name = "acvm_stdlib" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89789ea350d87aeaed31cde2d655a3dbb861a71f1bbed41802e0f8c6a207f11c" +version = "0.15.1" dependencies = [ "acir", ] @@ -382,12 +375,9 @@ dependencies = [ [[package]] name = "brillig_vm" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60857c63a6da410360fca5f98162452561e42dbdff66a6206626b9bf3bb2a4ca" +version = "0.15.1" dependencies = [ "acir_field", - "num-bigint", "serde", ] @@ -1534,6 +1524,17 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2", +] + [[package]] name = "paste" version = "1.0.12" diff --git a/Cargo.toml b/Cargo.toml index ae06b5f3..1d8217bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" crate-type = ["cdylib", "lib"] [dependencies] -acvm = { version = "0.15.0", features = ["bn254"] } +acvm = { path = "../acvm/acvm", features = ["bn254"] } bincode = "1.3.3" bytesize = "1.2" reqwest = { version = "0.11.16", default-features = false, features = ["rustls-tls"] } @@ -55,3 +55,7 @@ wasm = [ "dep:rust-embed", "dep:getrandom" ] + + +[patches.crates-io] +acvm = { path = "../acvm/acvm" } \ No newline at end of file diff --git a/src/acvm_interop/proof_system.rs b/src/acvm_interop/proof_system.rs index 644e205d..75d9f3ea 100644 --- a/src/acvm_interop/proof_system.rs +++ b/src/acvm_interop/proof_system.rs @@ -39,8 +39,9 @@ impl ProofSystemCompiler for Barretenberg { | BlackBoxFunc::Pedersen | BlackBoxFunc::HashToField128Security | BlackBoxFunc::EcdsaSecp256k1 + | BlackBoxFunc::EcdsaSecp256r1 | BlackBoxFunc::FixedBaseScalarMul => true, - + BlackBoxFunc::RecursiveAggregation => false, }, } diff --git a/src/barretenberg_structures.rs b/src/barretenberg_structures.rs index fbcf6140..3a038664 100644 --- a/src/barretenberg_structures.rs +++ b/src/barretenberg_structures.rs @@ -1,4 +1,4 @@ -use acvm::acir::circuit::opcodes::{BlackBoxFuncCall, MemoryBlock, FunctionInput}; +use acvm::acir::circuit::opcodes::{BlackBoxFuncCall, FunctionInput, MemoryBlock}; use acvm::acir::circuit::{Circuit, Opcode}; use acvm::acir::native_types::Expression; use acvm::acir::BlackBoxFunc; @@ -6,7 +6,7 @@ use acvm::FieldElement; use serde::{Deserialize, Serialize}; use serde_big_array::BigArray; -use crate::{Error, BackendError}; +use crate::{BackendError, Error}; #[derive(Debug, Default, Clone, Serialize, Deserialize)] pub(crate) struct Assignments(Vec); @@ -174,6 +174,7 @@ impl EcdsaConstraint { buffer } } + #[derive(Clone, Hash, Debug, Serialize, Deserialize)] pub(crate) struct SchnorrConstraint { pub(crate) message: Vec, @@ -438,6 +439,7 @@ pub struct ConstraintSystem { sha256_constraints: Vec, schnorr_constraints: Vec, ecdsa_secp256k1_constraints: Vec, + ecdsa_secp256r1_constraints: Vec, blake2s_constraints: Vec, block_constraints: Vec, keccak_constraints: Vec, @@ -502,6 +504,14 @@ impl ConstraintSystem { self } + pub(crate) fn ecdsa_secp256r1_constraints( + mut self, + ecdsa_secp256r1_constraints: Vec, + ) -> Self { + self.ecdsa_secp256r1_constraints = ecdsa_secp256r1_constraints; + self + } + pub(crate) fn blake2s_constraints( mut self, blake2s_constraints: Vec, @@ -613,6 +623,12 @@ impl ConstraintSystem { buffer.extend(&constraint.to_bytes()); } + let ecdsa_r1_len = self.ecdsa_secp256r1_constraints.len() as u32; + buffer.extend_from_slice(&ecdsa_r1_len.to_be_bytes()); + for constraint in self.ecdsa_secp256r1_constraints.iter() { + buffer.extend(&constraint.to_bytes()); + } + // Serialize each Blake2s constraint let blake2s_len = self.blake2s_constraints.len() as u32; buffer.extend_from_slice(&blake2s_len.to_be_bytes()); @@ -804,7 +820,6 @@ impl RecursionConstraint { } } - impl TryFrom<&Circuit> for ConstraintSystem { type Error = BackendError; /// Converts an `IR` into the `StandardFormat` constraint system @@ -821,6 +836,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { let mut pedersen_constraints: Vec = Vec::new(); let mut schnorr_constraints: Vec = Vec::new(); let mut ecdsa_secp256k1_constraints: Vec = Vec::new(); + let mut ecdsa_secp256r1_constraints: Vec = Vec::new(); let mut fixed_base_scalar_mul_constraints: Vec = Vec::new(); let mut hash_to_field_constraints: Vec = Vec::new(); let mut recursion_constraints: Vec = Vec::new(); @@ -1019,6 +1035,74 @@ impl TryFrom<&Circuit> for ConstraintSystem { hash_to_field_constraints.push(hash_to_field_constraint); } + BlackBoxFuncCall::EcdsaSecp256r1 { + public_key_x: public_key_x_inputs, + public_key_y: public_key_y_inputs, + signature: signature_inputs, + hashed_message: hashed_message_inputs, + output, + } => { + // public key x + let mut public_key_x_inputs = public_key_x_inputs.iter(); + let mut public_key_x = [0i32; 32]; + for (i, pkx) in public_key_x.iter_mut().enumerate() { + let x_byte = public_key_x_inputs + .next() + .ok_or_else(|| Error::MalformedBlackBoxFunc( + BlackBoxFunc::EcdsaSecp256r1, + format!("Missing rest of `x` component for public key. Tried to get byte {i} but failed"), + ))?; + let x_byte_index = x_byte.witness.witness_index() as i32; + *pkx = x_byte_index; + } + + // public key y + let mut public_key_y_inputs = public_key_y_inputs.iter(); + let mut public_key_y = [0i32; 32]; + for (i, pky) in public_key_y.iter_mut().enumerate() { + let y_byte = public_key_y_inputs + .next() + .ok_or_else(|| Error::MalformedBlackBoxFunc( + BlackBoxFunc::EcdsaSecp256r1, + format!("Missing rest of `y` component for public key. Tried to get byte {i} but failed"), + ))?; + let y_byte_index = y_byte.witness.witness_index() as i32; + *pky = y_byte_index; + } + + // signature + let mut signature_inputs = signature_inputs.iter(); + let mut signature = [0i32; 64]; + for (i, sig) in signature.iter_mut().enumerate() { + let sig_byte = + signature_inputs.next().ok_or_else(|| Error::MalformedBlackBoxFunc( + BlackBoxFunc::EcdsaSecp256r1, + format!("Missing rest of signature. Tried to get byte {i} but failed"), + ))?; + let sig_byte_index = sig_byte.witness.witness_index() as i32; + *sig = sig_byte_index; + } + + // The rest of the input is the message + let mut hashed_message = Vec::new(); + for msg in hashed_message_inputs.iter() { + let msg_byte_index = msg.witness.witness_index() as i32; + hashed_message.push(msg_byte_index); + } + + // result + let result = output.witness_index() as i32; + + let constraint = EcdsaConstraint { + hashed_message, + signature, + public_key_x, + public_key_y, + result, + }; + + ecdsa_secp256r1_constraints.push(constraint); + } BlackBoxFuncCall::EcdsaSecp256k1 { public_key_x: public_key_x_inputs, public_key_y: public_key_y_inputs, @@ -1208,11 +1292,12 @@ impl TryFrom<&Circuit> for ConstraintSystem { // key_hash let key_hash = key_hash.witness.witness_index() as i32; - let input_agg_obj_inputs = if let Some(input_aggregation_object) = input_aggregation_object { - input_aggregation_object.clone() - } else { - vec![FunctionInput::dummy(); output_aggregation_object.len()] - }; + let input_agg_obj_inputs = + if let Some(input_aggregation_object) = input_aggregation_object { + input_aggregation_object.clone() + } else { + vec![FunctionInput::dummy(); output_aggregation_object.len()] + }; // input_aggregation_object let mut input_agg_obj_inputs = input_agg_obj_inputs.iter(); @@ -1247,7 +1332,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { output_aggregation_object, nested_aggregation_object, }; - + recursion_constraints.push(recursion_constraint); } }; @@ -1277,6 +1362,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { pedersen_constraints, schnorr_constraints, ecdsa_secp256k1_constraints, + ecdsa_secp256r1_constraints, blake2s_constraints, block_constraints, keccak_constraints, From 328cd74541d4cc4f15d4c1e4408f0345f6494b15 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Fri, 30 Jun 2023 09:59:31 +0000 Subject: [PATCH 2/7] fix: toml and verbose cbind --- Cargo.lock | 5 + Cargo.toml | 6 +- flake.lock | 10 +- src/barretenberg_structures.rs | 89 ++++++++++---- src/composer.rs | 219 +++++++++++++++++---------------- 5 files changed, 190 insertions(+), 139 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cad5d54e..9af793e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,6 +5,7 @@ version = 3 [[package]] name = "acir" version = "0.15.1" +source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" dependencies = [ "acir_field", "brillig_vm", @@ -17,6 +18,7 @@ dependencies = [ [[package]] name = "acir_field" version = "0.15.1" +source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" dependencies = [ "ark-bn254", "ark-ff", @@ -29,6 +31,7 @@ dependencies = [ [[package]] name = "acvm" version = "0.15.1" +source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" dependencies = [ "acir", "acvm_stdlib", @@ -66,6 +69,7 @@ dependencies = [ [[package]] name = "acvm_stdlib" version = "0.15.1" +source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" dependencies = [ "acir", ] @@ -376,6 +380,7 @@ dependencies = [ [[package]] name = "brillig_vm" version = "0.15.1" +source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" dependencies = [ "acir_field", "serde", diff --git a/Cargo.toml b/Cargo.toml index 1d8217bb..08c4b3f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" crate-type = ["cdylib", "lib"] [dependencies] -acvm = { path = "../acvm/acvm", features = ["bn254"] } +acvm = { git = "https://github.com/noir-lang/acvm", rev = "9a3ff5afd90340b96391271d592a636d89555104" } bincode = "1.3.3" bytesize = "1.2" reqwest = { version = "0.11.16", default-features = false, features = ["rustls-tls"] } @@ -55,7 +55,3 @@ wasm = [ "dep:rust-embed", "dep:getrandom" ] - - -[patches.crates-io] -acvm = { path = "../acvm/acvm" } \ No newline at end of file diff --git a/flake.lock b/flake.lock index 10839bef..590cdffb 100644 --- a/flake.lock +++ b/flake.lock @@ -10,12 +10,10 @@ ] }, "locked": { - "lastModified": 1685812470, - "narHash": "sha256-sJYVipq1EthnjSxVIZnZF15wy9LDMHNPfIJKRHyZrws=", - "owner": "AztecProtocol", - "repo": "barretenberg", - "rev": "193ce1a45ef5eab6a8522178cf918e45320f3de8", - "type": "github" + "lastModified": 1688058990, + "narHash": "sha256-vMrMz086hVIA1DiSr7tkl8tayTuvaKMbdt+zB3rfug8=", + "type": "git", + "url": "file:///mnt/user-data/sean/docs/barretenberg" }, "original": { "owner": "AztecProtocol", diff --git a/src/barretenberg_structures.rs b/src/barretenberg_structures.rs index 3a038664..368af03c 100644 --- a/src/barretenberg_structures.rs +++ b/src/barretenberg_structures.rs @@ -131,7 +131,7 @@ impl RangeConstraint { } } #[derive(Clone, Hash, Debug, Serialize, Deserialize)] -pub(crate) struct EcdsaConstraint { +pub(crate) struct EcdsaK1Constraint { pub(crate) hashed_message: Vec, // Required until Serde adopts const generics: https://github.com/serde-rs/serde/issues/1937 #[serde(with = "BigArray")] @@ -141,7 +141,52 @@ pub(crate) struct EcdsaConstraint { pub(crate) result: i32, } -impl EcdsaConstraint { +impl EcdsaK1Constraint { + fn to_bytes(&self) -> Vec { + let mut buffer = Vec::new(); + + let message_len = (self.hashed_message.len()) as u32; + buffer.extend_from_slice(&message_len.to_be_bytes()); + for constraint in self.hashed_message.iter() { + buffer.extend_from_slice(&constraint.to_be_bytes()); + } + + let sig_len = (self.signature.len()) as u32; + buffer.extend_from_slice(&sig_len.to_be_bytes()); + for sig_byte in self.signature.iter() { + buffer.extend_from_slice(&sig_byte.to_be_bytes()); + } + + let pub_key_x_len = (self.public_key_x.len()) as u32; + buffer.extend_from_slice(&pub_key_x_len.to_be_bytes()); + for x_byte in self.public_key_x.iter() { + buffer.extend_from_slice(&x_byte.to_be_bytes()); + } + + let pub_key_y_len = (self.public_key_y.len()) as u32; + buffer.extend_from_slice(&pub_key_y_len.to_be_bytes()); + for y_byte in self.public_key_y.iter() { + buffer.extend_from_slice(&y_byte.to_be_bytes()); + } + + buffer.extend_from_slice(&self.result.to_be_bytes()); + + buffer + } +} + +#[derive(Clone, Hash, Debug, Serialize, Deserialize)] +pub(crate) struct EcdsaR1Constraint { + pub(crate) hashed_message: Vec, + // Required until Serde adopts const generics: https://github.com/serde-rs/serde/issues/1937 + #[serde(with = "BigArray")] + pub(crate) signature: [i32; 64], + pub(crate) public_key_x: [i32; 32], + pub(crate) public_key_y: [i32; 32], + pub(crate) result: i32, +} + +impl EcdsaR1Constraint { fn to_bytes(&self) -> Vec { let mut buffer = Vec::new(); @@ -438,8 +483,8 @@ pub struct ConstraintSystem { range_constraints: Vec, sha256_constraints: Vec, schnorr_constraints: Vec, - ecdsa_secp256k1_constraints: Vec, - ecdsa_secp256r1_constraints: Vec, + ecdsa_secp256k1_constraints: Vec, + ecdsa_secp256r1_constraints: Vec, blake2s_constraints: Vec, block_constraints: Vec, keccak_constraints: Vec, @@ -498,7 +543,7 @@ impl ConstraintSystem { pub(crate) fn ecdsa_secp256k1_constraints( mut self, - ecdsa_secp256k1_constraints: Vec, + ecdsa_secp256k1_constraints: Vec, ) -> Self { self.ecdsa_secp256k1_constraints = ecdsa_secp256k1_constraints; self @@ -506,7 +551,7 @@ impl ConstraintSystem { pub(crate) fn ecdsa_secp256r1_constraints( mut self, - ecdsa_secp256r1_constraints: Vec, + ecdsa_secp256r1_constraints: Vec, ) -> Self { self.ecdsa_secp256r1_constraints = ecdsa_secp256r1_constraints; self @@ -617,8 +662,8 @@ impl ConstraintSystem { } // Serialize each ECDSA constraint - let ecdsa_len = self.ecdsa_secp256k1_constraints.len() as u32; - buffer.extend_from_slice(&ecdsa_len.to_be_bytes()); + let ecdsa_k1_len = self.ecdsa_secp256k1_constraints.len() as u32; + buffer.extend_from_slice(&ecdsa_k1_len.to_be_bytes()); for constraint in self.ecdsa_secp256k1_constraints.iter() { buffer.extend(&constraint.to_bytes()); } @@ -835,8 +880,8 @@ impl TryFrom<&Circuit> for ConstraintSystem { let mut keccak_var_constraints: Vec = Vec::new(); let mut pedersen_constraints: Vec = Vec::new(); let mut schnorr_constraints: Vec = Vec::new(); - let mut ecdsa_secp256k1_constraints: Vec = Vec::new(); - let mut ecdsa_secp256r1_constraints: Vec = Vec::new(); + let mut ecdsa_secp256k1_constraints: Vec = Vec::new(); + let mut ecdsa_secp256r1_constraints: Vec = Vec::new(); let mut fixed_base_scalar_mul_constraints: Vec = Vec::new(); let mut hash_to_field_constraints: Vec = Vec::new(); let mut recursion_constraints: Vec = Vec::new(); @@ -1035,7 +1080,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { hash_to_field_constraints.push(hash_to_field_constraint); } - BlackBoxFuncCall::EcdsaSecp256r1 { + BlackBoxFuncCall::EcdsaSecp256k1 { public_key_x: public_key_x_inputs, public_key_y: public_key_y_inputs, signature: signature_inputs, @@ -1049,7 +1094,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { let x_byte = public_key_x_inputs .next() .ok_or_else(|| Error::MalformedBlackBoxFunc( - BlackBoxFunc::EcdsaSecp256r1, + BlackBoxFunc::EcdsaSecp256k1, format!("Missing rest of `x` component for public key. Tried to get byte {i} but failed"), ))?; let x_byte_index = x_byte.witness.witness_index() as i32; @@ -1063,7 +1108,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { let y_byte = public_key_y_inputs .next() .ok_or_else(|| Error::MalformedBlackBoxFunc( - BlackBoxFunc::EcdsaSecp256r1, + BlackBoxFunc::EcdsaSecp256k1, format!("Missing rest of `y` component for public key. Tried to get byte {i} but failed"), ))?; let y_byte_index = y_byte.witness.witness_index() as i32; @@ -1076,7 +1121,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { for (i, sig) in signature.iter_mut().enumerate() { let sig_byte = signature_inputs.next().ok_or_else(|| Error::MalformedBlackBoxFunc( - BlackBoxFunc::EcdsaSecp256r1, + BlackBoxFunc::EcdsaSecp256k1, format!("Missing rest of signature. Tried to get byte {i} but failed"), ))?; let sig_byte_index = sig_byte.witness.witness_index() as i32; @@ -1093,7 +1138,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { // result let result = output.witness_index() as i32; - let constraint = EcdsaConstraint { + let constraint = EcdsaK1Constraint { hashed_message, signature, public_key_x, @@ -1101,9 +1146,9 @@ impl TryFrom<&Circuit> for ConstraintSystem { result, }; - ecdsa_secp256r1_constraints.push(constraint); + ecdsa_secp256k1_constraints.push(constraint); } - BlackBoxFuncCall::EcdsaSecp256k1 { + BlackBoxFuncCall::EcdsaSecp256r1 { public_key_x: public_key_x_inputs, public_key_y: public_key_y_inputs, signature: signature_inputs, @@ -1117,7 +1162,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { let x_byte = public_key_x_inputs .next() .ok_or_else(|| Error::MalformedBlackBoxFunc( - BlackBoxFunc::EcdsaSecp256k1, + BlackBoxFunc::EcdsaSecp256r1, format!("Missing rest of `x` component for public key. Tried to get byte {i} but failed"), ))?; let x_byte_index = x_byte.witness.witness_index() as i32; @@ -1131,7 +1176,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { let y_byte = public_key_y_inputs .next() .ok_or_else(|| Error::MalformedBlackBoxFunc( - BlackBoxFunc::EcdsaSecp256k1, + BlackBoxFunc::EcdsaSecp256r1, format!("Missing rest of `y` component for public key. Tried to get byte {i} but failed"), ))?; let y_byte_index = y_byte.witness.witness_index() as i32; @@ -1144,7 +1189,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { for (i, sig) in signature.iter_mut().enumerate() { let sig_byte = signature_inputs.next().ok_or_else(|| Error::MalformedBlackBoxFunc( - BlackBoxFunc::EcdsaSecp256k1, + BlackBoxFunc::EcdsaSecp256r1, format!("Missing rest of signature. Tried to get byte {i} but failed"), ))?; let sig_byte_index = sig_byte.witness.witness_index() as i32; @@ -1161,7 +1206,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { // result let result = output.witness_index() as i32; - let constraint = EcdsaConstraint { + let constraint = EcdsaR1Constraint { hashed_message, signature, public_key_x, @@ -1169,7 +1214,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { result, }; - ecdsa_secp256k1_constraints.push(constraint); + ecdsa_secp256r1_constraints.push(constraint); } BlackBoxFuncCall::FixedBaseScalarMul { input, outputs } => { let scalar = input.witness.witness_index() as i32; diff --git a/src/composer.rs b/src/composer.rs index 27259ee0..5423c496 100644 --- a/src/composer.rs +++ b/src/composer.rs @@ -14,6 +14,7 @@ pub(crate) trait Composer { async fn get_crs(&self, constraint_system: &ConstraintSystem) -> Result { let num_points = self.get_circuit_size(constraint_system)?; + println!("num points: {}", num_points); download_crs(num_points as usize).await } @@ -70,11 +71,13 @@ impl Composer for Barretenberg { fn get_circuit_size(&self, constraint_system: &ConstraintSystem) -> Result { let cs_buf = constraint_system.to_bytes(); + println!("get circuit size start"); let circuit_size; unsafe { circuit_size = barretenberg_sys::composer::get_total_circuit_size(cs_buf.as_slice().as_ptr()); } + println!("get circuit size end"); pow2ceil(circuit_size + NUM_RESERVED_GATES) } @@ -783,112 +786,116 @@ mod test { test_composer_with_pk_vk(constraint_system, vec![case_1]).await } - #[test] - async fn test_memory_constraints() -> Result<(), Error> { - let two_field = FieldElement::one() + FieldElement::one(); - let one = Constraint { - a: 0, - b: 0, - c: 0, - qm: FieldElement::zero(), - ql: FieldElement::zero(), - qr: FieldElement::zero(), - qo: FieldElement::zero(), - qc: FieldElement::one(), - }; - - let two_x_constraint = Constraint { - a: 1, - b: 0, - c: 0, - qm: FieldElement::zero(), - ql: two_field, - qr: FieldElement::zero(), - qo: FieldElement::zero(), - qc: FieldElement::zero(), - }; - let x_1_constraint = Constraint { - a: 1, - b: 0, - c: 0, - qm: FieldElement::zero(), - ql: FieldElement::one(), - qr: FieldElement::zero(), - qo: FieldElement::zero(), - qc: FieldElement::one(), - }; - - let y_constraint = Constraint { - a: 2, - b: 0, - c: 0, - qm: FieldElement::zero(), - ql: FieldElement::one(), - qr: FieldElement::zero(), - qo: FieldElement::zero(), - qc: FieldElement::zero(), - }; - let z_constraint = Constraint { - a: 3, - b: 0, - c: 0, - qm: FieldElement::zero(), - ql: FieldElement::one(), - qr: FieldElement::zero(), - qo: FieldElement::zero(), - qc: FieldElement::zero(), - }; - let op1 = MemOpBarretenberg { - index: two_x_constraint, - value: y_constraint, - is_store: 0, - }; - let op2 = MemOpBarretenberg { - index: x_1_constraint.clone(), - value: z_constraint, - is_store: 0, - }; - let block_constraint = BlockConstraint { - init: vec![one, x_1_constraint], - trace: vec![op1, op2], - is_ram: 0, - }; - - let result_constraint = Constraint { - a: 2, - b: 3, - c: 0, - qm: FieldElement::zero(), - ql: FieldElement::one(), - qr: FieldElement::one(), - qo: FieldElement::zero(), - qc: -(two_field), - }; - let constraint_system = ConstraintSystem::new() - .var_num(4) - .block_constraints(vec![block_constraint]) - .constraints(vec![result_constraint]); - - let scalar_0 = FieldElement::zero(); - let scalar_1 = FieldElement::one(); - let witness_values = vec![scalar_0, scalar_1, scalar_1]; - - let case_1 = WitnessResult { - witness: witness_values.into(), - public_inputs: Assignments::default(), - result: true, - }; - - let bad_values = vec![scalar_0, scalar_1, scalar_1 + scalar_1]; - let case_2 = WitnessResult { - witness: bad_values.into(), - public_inputs: Assignments::default(), - result: false, - }; - - test_composer_with_pk_vk(constraint_system, vec![case_1, case_2]).await - } - + // #[test] + // async fn test_memory_constraints() -> Result<(), Error> { + // let two_field = FieldElement::one() + FieldElement::one(); + // let one = Constraint { + // a: 0, + // b: 0, + // c: 0, + // qm: FieldElement::zero(), + // ql: FieldElement::zero(), + // qr: FieldElement::zero(), + // qo: FieldElement::zero(), + // qc: FieldElement::one(), + // }; + + // let two_x_constraint = Constraint { + // a: 1, + // b: 0, + // c: 0, + // qm: FieldElement::zero(), + // ql: two_field, + // qr: FieldElement::zero(), + // qo: FieldElement::zero(), + // qc: FieldElement::zero(), + // }; + // let x_1_constraint = Constraint { + // a: 1, + // b: 0, + // c: 0, + // qm: FieldElement::zero(), + // ql: FieldElement::one(), + // qr: FieldElement::zero(), + // qo: FieldElement::zero(), + // qc: FieldElement::one(), + // }; + + // let y_constraint = Constraint { + // a: 2, + // b: 0, + // c: 0, + // qm: FieldElement::zero(), + // ql: FieldElement::one(), + // qr: FieldElement::zero(), + // qo: FieldElement::zero(), + // qc: FieldElement::zero(), + // }; + // let z_constraint = Constraint { + // a: 3, + // b: 0, + // c: 0, + // qm: FieldElement::zero(), + // ql: FieldElement::one(), + // qr: FieldElement::zero(), + // qo: FieldElement::zero(), + // qc: FieldElement::zero(), + // }; + // let op1 = MemOpBarretenberg { + // index: two_x_constraint, + // value: y_constraint, + // is_store: 0, + // }; + // let op2 = MemOpBarretenberg { + // index: x_1_constraint.clone(), + // value: z_constraint, + // is_store: 0, + // }; + // let block_constraint = BlockConstraint { + // init: vec![one, x_1_constraint], + // trace: vec![op1, op2], + // is_ram: 0, + // }; + + // let result_constraint = Constraint { + // a: 2, + // b: 3, + // c: 0, + // qm: FieldElement::zero(), + // ql: FieldElement::one(), + // qr: FieldElement::one(), + // qo: FieldElement::zero(), + // qc: -(two_field), + // }; + // let constraint_system = ConstraintSystem::new() + // .var_num(4) + // .block_constraints(vec![block_constraint]) + // .constraints(vec![result_constraint]); + + // let scalar_0 = FieldElement::zero(); + // let scalar_1 = FieldElement::one(); + // let witness_values = vec![scalar_0, scalar_1, scalar_1]; + + // let case_1 = WitnessResult { + // witness: witness_values.into(), + // public_inputs: Assignments::default(), + // result: true, + // }; + + // let bad_values = vec![scalar_0, scalar_1, scalar_1 + scalar_1]; + // let case_2 = WitnessResult { + // witness: bad_values.into(), + // public_inputs: Assignments::default(), + // result: false, + // }; + + // println!("constraint_system: {:?}", constraint_system); + + // println!("case 1 {:?}", case_1); + // println!("case 2 {:?}", case_2); + + // test_composer_with_pk_vk(constraint_system, vec![case_1, case_2]).await + // } #[test] async fn test_logic_constraints() -> Result<(), Error> { /* From 1db4100cd41fbf4e02d591f1e8fd5139d3fb2e80 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Fri, 30 Jun 2023 15:38:33 +0000 Subject: [PATCH 3/7] fix: cleanup --- src/barretenberg_structures.rs | 65 ++++++---------------------------- src/composer.rs | 3 -- 2 files changed, 10 insertions(+), 58 deletions(-) diff --git a/src/barretenberg_structures.rs b/src/barretenberg_structures.rs index 368af03c..47b0f6ff 100644 --- a/src/barretenberg_structures.rs +++ b/src/barretenberg_structures.rs @@ -131,7 +131,7 @@ impl RangeConstraint { } } #[derive(Clone, Hash, Debug, Serialize, Deserialize)] -pub(crate) struct EcdsaK1Constraint { +pub(crate) struct EcdsaConstraint { pub(crate) hashed_message: Vec, // Required until Serde adopts const generics: https://github.com/serde-rs/serde/issues/1937 #[serde(with = "BigArray")] @@ -141,52 +141,7 @@ pub(crate) struct EcdsaK1Constraint { pub(crate) result: i32, } -impl EcdsaK1Constraint { - fn to_bytes(&self) -> Vec { - let mut buffer = Vec::new(); - - let message_len = (self.hashed_message.len()) as u32; - buffer.extend_from_slice(&message_len.to_be_bytes()); - for constraint in self.hashed_message.iter() { - buffer.extend_from_slice(&constraint.to_be_bytes()); - } - - let sig_len = (self.signature.len()) as u32; - buffer.extend_from_slice(&sig_len.to_be_bytes()); - for sig_byte in self.signature.iter() { - buffer.extend_from_slice(&sig_byte.to_be_bytes()); - } - - let pub_key_x_len = (self.public_key_x.len()) as u32; - buffer.extend_from_slice(&pub_key_x_len.to_be_bytes()); - for x_byte in self.public_key_x.iter() { - buffer.extend_from_slice(&x_byte.to_be_bytes()); - } - - let pub_key_y_len = (self.public_key_y.len()) as u32; - buffer.extend_from_slice(&pub_key_y_len.to_be_bytes()); - for y_byte in self.public_key_y.iter() { - buffer.extend_from_slice(&y_byte.to_be_bytes()); - } - - buffer.extend_from_slice(&self.result.to_be_bytes()); - - buffer - } -} - -#[derive(Clone, Hash, Debug, Serialize, Deserialize)] -pub(crate) struct EcdsaR1Constraint { - pub(crate) hashed_message: Vec, - // Required until Serde adopts const generics: https://github.com/serde-rs/serde/issues/1937 - #[serde(with = "BigArray")] - pub(crate) signature: [i32; 64], - pub(crate) public_key_x: [i32; 32], - pub(crate) public_key_y: [i32; 32], - pub(crate) result: i32, -} - -impl EcdsaR1Constraint { +impl EcdsaConstraint { fn to_bytes(&self) -> Vec { let mut buffer = Vec::new(); @@ -483,8 +438,8 @@ pub struct ConstraintSystem { range_constraints: Vec, sha256_constraints: Vec, schnorr_constraints: Vec, - ecdsa_secp256k1_constraints: Vec, - ecdsa_secp256r1_constraints: Vec, + ecdsa_secp256k1_constraints: Vec, + ecdsa_secp256r1_constraints: Vec, blake2s_constraints: Vec, block_constraints: Vec, keccak_constraints: Vec, @@ -543,7 +498,7 @@ impl ConstraintSystem { pub(crate) fn ecdsa_secp256k1_constraints( mut self, - ecdsa_secp256k1_constraints: Vec, + ecdsa_secp256k1_constraints: Vec, ) -> Self { self.ecdsa_secp256k1_constraints = ecdsa_secp256k1_constraints; self @@ -551,7 +506,7 @@ impl ConstraintSystem { pub(crate) fn ecdsa_secp256r1_constraints( mut self, - ecdsa_secp256r1_constraints: Vec, + ecdsa_secp256r1_constraints: Vec, ) -> Self { self.ecdsa_secp256r1_constraints = ecdsa_secp256r1_constraints; self @@ -880,8 +835,8 @@ impl TryFrom<&Circuit> for ConstraintSystem { let mut keccak_var_constraints: Vec = Vec::new(); let mut pedersen_constraints: Vec = Vec::new(); let mut schnorr_constraints: Vec = Vec::new(); - let mut ecdsa_secp256k1_constraints: Vec = Vec::new(); - let mut ecdsa_secp256r1_constraints: Vec = Vec::new(); + let mut ecdsa_secp256k1_constraints: Vec = Vec::new(); + let mut ecdsa_secp256r1_constraints: Vec = Vec::new(); let mut fixed_base_scalar_mul_constraints: Vec = Vec::new(); let mut hash_to_field_constraints: Vec = Vec::new(); let mut recursion_constraints: Vec = Vec::new(); @@ -1138,7 +1093,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { // result let result = output.witness_index() as i32; - let constraint = EcdsaK1Constraint { + let constraint = EcdsaConstraint { hashed_message, signature, public_key_x, @@ -1206,7 +1161,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { // result let result = output.witness_index() as i32; - let constraint = EcdsaR1Constraint { + let constraint = EcdsaConstraint { hashed_message, signature, public_key_x, diff --git a/src/composer.rs b/src/composer.rs index 5423c496..dd9f4e2b 100644 --- a/src/composer.rs +++ b/src/composer.rs @@ -14,7 +14,6 @@ pub(crate) trait Composer { async fn get_crs(&self, constraint_system: &ConstraintSystem) -> Result { let num_points = self.get_circuit_size(constraint_system)?; - println!("num points: {}", num_points); download_crs(num_points as usize).await } @@ -71,13 +70,11 @@ impl Composer for Barretenberg { fn get_circuit_size(&self, constraint_system: &ConstraintSystem) -> Result { let cs_buf = constraint_system.to_bytes(); - println!("get circuit size start"); let circuit_size; unsafe { circuit_size = barretenberg_sys::composer::get_total_circuit_size(cs_buf.as_slice().as_ptr()); } - println!("get circuit size end"); pow2ceil(circuit_size + NUM_RESERVED_GATES) } From 6d5779f2e6e54db535147c9adde5c7622ddd0655 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Mon, 3 Jul 2023 13:08:35 +0000 Subject: [PATCH 4/7] chore: update bb flake --- Cargo.lock | 10 +++++----- Cargo.toml | 2 +- flake.lock | 10 ++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9af793e8..ba7e0804 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ version = 3 [[package]] name = "acir" version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" dependencies = [ "acir_field", "brillig_vm", @@ -18,7 +18,7 @@ dependencies = [ [[package]] name = "acir_field" version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" dependencies = [ "ark-bn254", "ark-ff", @@ -31,7 +31,7 @@ dependencies = [ [[package]] name = "acvm" version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" dependencies = [ "acir", "acvm_stdlib", @@ -69,7 +69,7 @@ dependencies = [ [[package]] name = "acvm_stdlib" version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" dependencies = [ "acir", ] @@ -380,7 +380,7 @@ dependencies = [ [[package]] name = "brillig_vm" version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?rev=9a3ff5afd90340b96391271d592a636d89555104#9a3ff5afd90340b96391271d592a636d89555104" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" dependencies = [ "acir_field", "serde", diff --git a/Cargo.toml b/Cargo.toml index 08c4b3f2..1a46ec58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" crate-type = ["cdylib", "lib"] [dependencies] -acvm = { git = "https://github.com/noir-lang/acvm", rev = "9a3ff5afd90340b96391271d592a636d89555104" } +acvm = { git = "https://github.com/noir-lang/acvm", branch = "md/hackathon-patch", features = ["bn254"] } bincode = "1.3.3" bytesize = "1.2" reqwest = { version = "0.11.16", default-features = false, features = ["rustls-tls"] } diff --git a/flake.lock b/flake.lock index 590cdffb..772858f5 100644 --- a/flake.lock +++ b/flake.lock @@ -10,10 +10,12 @@ ] }, "locked": { - "lastModified": 1688058990, - "narHash": "sha256-vMrMz086hVIA1DiSr7tkl8tayTuvaKMbdt+zB3rfug8=", - "type": "git", - "url": "file:///mnt/user-data/sean/docs/barretenberg" + "lastModified": 1688382740, + "narHash": "sha256-/8DUb58Xm3RM45eiLvOhxNF6uIsDPBtRVSedJZu4h7w=", + "owner": "AztecProtocol", + "repo": "barretenberg", + "rev": "f4ee9010bc269d9b0b3492beec9fb05440e874a4", + "type": "github" }, "original": { "owner": "AztecProtocol", From 2a8b43c9f77e3c4df85bace4462d44ddbc3e2b80 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Tue, 4 Jul 2023 10:36:57 +0000 Subject: [PATCH 5/7] chore(nix): update flake --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 772858f5..c9a24b36 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ ] }, "locked": { - "lastModified": 1688382740, - "narHash": "sha256-/8DUb58Xm3RM45eiLvOhxNF6uIsDPBtRVSedJZu4h7w=", + "lastModified": 1688466270, + "narHash": "sha256-Pxpx2mFp0F3iD2UywT9W6n95Iv34OPKVWtlXTKmlO9M=", "owner": "AztecProtocol", "repo": "barretenberg", - "rev": "f4ee9010bc269d9b0b3492beec9fb05440e874a4", + "rev": "1fb389e30aeb460c4ac25ecb4226322bc420cf40", "type": "github" }, "original": { From 10c5149a394b8ad58282a25bae27775259c8f14a Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Thu, 6 Jul 2023 17:48:43 +0000 Subject: [PATCH 6/7] chore: bump --- Cargo.lock | 440 +++++++++++++++++++++++------------------------------ 1 file changed, 194 insertions(+), 246 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba7e0804..226045dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,8 +4,8 @@ version = 3 [[package]] name = "acir" -version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" +version = "0.16.0" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" dependencies = [ "acir_field", "brillig_vm", @@ -17,8 +17,8 @@ dependencies = [ [[package]] name = "acir_field" -version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" +version = "0.16.0" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" dependencies = [ "ark-bn254", "ark-ff", @@ -30,8 +30,8 @@ dependencies = [ [[package]] name = "acvm" -version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" +version = "0.16.0" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" dependencies = [ "acir", "acvm_stdlib", @@ -68,19 +68,19 @@ dependencies = [ [[package]] name = "acvm_stdlib" -version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" +version = "0.16.0" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" dependencies = [ "acir", ] [[package]] name = "addr2line" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ - "gimli 0.27.2", + "gimli 0.27.3", ] [[package]] @@ -248,13 +248,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", ] [[package]] @@ -265,16 +265,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", - "object 0.30.3", + "miniz_oxide", + "object 0.31.1", "rustc-demangle", ] @@ -379,18 +379,23 @@ dependencies = [ [[package]] name = "brillig_vm" -version = "0.15.1" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#6cfe4c044fb963611b7ef222b82ba5063a3d4426" +version = "0.16.0" +source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" dependencies = [ "acir_field", + "blake2", + "k256", + "p256", "serde", + "sha2", + "sha3", ] [[package]] name = "bstr" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", "serde", @@ -503,9 +508,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "6340df57935414636969091153f35f68d9f00bbc8fb4a9c6054706c213e6c6bc" [[package]] name = "corosensei" @@ -522,9 +527,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -620,22 +625,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -682,7 +687,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", ] [[package]] @@ -693,7 +698,7 @@ checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 2.0.18", + "syn 2.0.23", ] [[package]] @@ -833,7 +838,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", ] [[package]] @@ -899,7 +904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -938,6 +943,17 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", +] + [[package]] name = "futures-sink" version = "0.3.28" @@ -957,9 +973,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-core", + "futures-macro", "futures-task", "pin-project-lite", "pin-utils", + "slab", ] [[package]] @@ -974,9 +992,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -996,9 +1014,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "glob" @@ -1032,9 +1050,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1078,18 +1096,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1142,9 +1151,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1166,10 +1175,11 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ + "futures-util", "http", "hyper", "rustls", @@ -1225,16 +1235,16 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "itertools" @@ -1247,15 +1257,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -1301,9 +1311,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.145" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc86cde3ff845662b8f4ef6cb50ea0e20c524eb3d29ae048287e06a1b3fa6a81" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -1317,9 +1327,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" dependencies = [ "cc", ] @@ -1332,9 +1342,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "log" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "loupe" @@ -1392,9 +1402,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -1411,15 +1421,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1488,11 +1489,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -1510,9 +1511,9 @@ dependencies = [ [[package]] name = "object" -version = "0.30.3" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] @@ -1542,9 +1543,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" [[package]] name = "peeking_take_while" @@ -1560,9 +1561,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -1618,9 +1619,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" dependencies = [ "unicode-ident", ] @@ -1647,9 +1648,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] @@ -1753,9 +1754,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" +dependencies = [ + "aho-corasick 1.0.2", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" dependencies = [ "aho-corasick 1.0.2", "memchr", @@ -1764,9 +1777,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" [[package]] name = "region" @@ -1906,9 +1919,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "6.6.1" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b68543d5527e158213414a92832d2aab11a84d2571a5eb021ebe22c43aab066" +checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -1917,23 +1930,23 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.5.0" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" +checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", "shellexpand", - "syn 1.0.109", + "syn 2.0.23", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "7.5.0" +version = "7.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" +checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" dependencies = [ "globset", "sha2", @@ -1963,9 +1976,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags", "errno", @@ -1977,9 +1990,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.1" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" +checksum = "b19faa85ecb5197342b54f987b142fb3e30d0c90da40f80ef4fa9a726e6676ed" dependencies = [ "log", "ring", @@ -1989,18 +2002,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64", ] [[package]] name = "rustls-webpki" -version = "0.100.1" +version = "0.101.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" dependencies = [ "ring", "untrusted", @@ -2008,15 +2021,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "same-file" @@ -2071,9 +2084,9 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" dependencies = [ "serde_derive", ] @@ -2089,29 +2102,29 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "5a16be4fe5320ade08736447e3198294a5ea9a6d44dde6f35f0a5e06859c427a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" dependencies = [ "itoa", "ryu", @@ -2132,9 +2145,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -2202,9 +2215,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" @@ -2240,9 +2253,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -2257,9 +2270,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" dependencies = [ "proc-macro2", "quote", @@ -2274,41 +2287,42 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "1b1c7f239eb94671427157bd93b3694320f3668d4e1eff08c7285366fd777fac" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if", "fastrand", "redox_syscall 0.3.5", "rustix", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "c16a64ba9387ef3fdae4f9c1a7f07a0997fce91985c0336f1ddc1822b3b37802" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "d14928354b01c4d6a4f0e549069adef399a284e7995c7ccca94e8a07a5346c59" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", ] [[package]] @@ -2338,11 +2352,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -2360,14 +2375,14 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", ] [[package]] name = "tokio-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", @@ -2408,13 +2423,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", ] [[package]] @@ -2468,9 +2483,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] name = "unicode-normalization" @@ -2506,9 +2521,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.3.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" [[package]] name = "valuable" @@ -2534,11 +2549,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -2550,9 +2564,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2560,24 +2574,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -2587,9 +2601,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2597,22 +2611,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-encoder" @@ -2883,9 +2897,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -2965,60 +2979,30 @@ dependencies = [ "windows_x86_64_msvc 0.33.0", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_gnullvm", "windows_aarch64_msvc 0.48.0", "windows_i686_gnu 0.48.0", "windows_i686_msvc 0.48.0", "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_gnullvm", "windows_x86_64_msvc 0.48.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" @@ -3031,12 +3015,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.0" @@ -3049,12 +3027,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.0" @@ -3067,12 +3039,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.0" @@ -3085,24 +3051,12 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" @@ -3115,12 +3069,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.0" @@ -3162,5 +3110,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.23", ] From 79aa315e62fdff774b69eb948852aad7196cbce3 Mon Sep 17 00:00:00 2001 From: kevaundray Date: Sat, 8 Jul 2023 12:54:09 +0000 Subject: [PATCH 7/7] update bb and flake.lock --- Cargo.lock | 25 +++++++++++++++---------- Cargo.toml | 20 ++++++++------------ flake.lock | 6 +++--- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f59364e1..14c79597 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,8 +4,9 @@ version = 3 [[package]] name = "acir" -version = "0.16.0" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502a9126627ae67868515031c2283e64f3e1fef5ff93850009ed89a8a24fac60" dependencies = [ "acir_field", "brillig_vm", @@ -17,8 +18,9 @@ dependencies = [ [[package]] name = "acir_field" -version = "0.16.0" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a98fe4e3f9156f5551c8c9686e8f720a990d000e1e666e08a86e938a36ac8be" dependencies = [ "ark-bn254", "ark-ff", @@ -30,8 +32,9 @@ dependencies = [ [[package]] name = "acvm" -version = "0.16.0" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95315759a51115860af49a492791ae5155c3d2c0555eec1358faa5d74c763391" dependencies = [ "acir", "acvm_stdlib", @@ -68,8 +71,9 @@ dependencies = [ [[package]] name = "acvm_stdlib" -version = "0.16.0" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f7d2d8407e55ac26078af1d783408525e7f906e531cb04adcc47650d7994f62" dependencies = [ "acir", ] @@ -379,8 +383,9 @@ dependencies = [ [[package]] name = "brillig_vm" -version = "0.16.0" -source = "git+https://github.com/noir-lang/acvm?branch=md/hackathon-patch#202f0db43501e731b3cccabb77294539f45e1201" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36821ba87dd1807784d679bca54d753665014b109f6acfe38516eec7f3d71941" dependencies = [ "acir_field", "blake2", diff --git a/Cargo.toml b/Cargo.toml index 415ce308..cda322ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,10 +13,12 @@ license = "MIT OR Apache-2.0" crate-type = ["cdylib", "lib"] [dependencies] -acvm = { git = "https://github.com/noir-lang/acvm", branch = "md/hackathon-patch", features = ["bn254"] } +acvm = { version = "0.17.0", features = ["bn254"] } bincode = "1.3.3" bytesize = "1.2" -reqwest = { version = "0.11.16", default-features = false, features = ["rustls-tls"] } +reqwest = { version = "0.11.16", default-features = false, features = [ + "rustls-tls", +] } serde = { version = "1.0.136", features = ["derive"] } serde-big-array = "0.5.1" thiserror = "1.0.21" @@ -36,22 +38,16 @@ wasmer = { version = "2.3", optional = true, default-features = false, features "cranelift", "default-compiler", "default-cranelift", - "default-universal" + "default-universal", ] } [build-dependencies] pkg-config = "0.3" [dev-dependencies] -tokio = { version = "1.0", features = [ "macros" ] } +tokio = { version = "1.0", features = ["macros"] } [features] default = ["native"] -native = [ - "dep:barretenberg-sys" -] -wasm = [ - "dep:wasmer", - "dep:rust-embed", - "dep:getrandom" -] \ No newline at end of file +native = ["dep:barretenberg-sys"] +wasm = ["dep:wasmer", "dep:rust-embed", "dep:getrandom"] diff --git a/flake.lock b/flake.lock index cd39a5d7..659daec5 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ ] }, "locked": { - "lastModified": 1688470220, - "narHash": "sha256-vkojcKk8jimjEEJ20Gfg86QDAFtUeg0wj1Dq0BiwjaQ=", + "lastModified": 1688820427, + "narHash": "sha256-w7yMeYp50KrlTn23TTKfYmLOQL4uIgw0wSX67v2tvvc=", "owner": "AztecProtocol", "repo": "barretenberg", - "rev": "8f6620b209be9adc5b4dd8a224479ab7a1513d24", + "rev": "fdd46f77531a6fcc9d9b24a698c56590d54d487e", "type": "github" }, "original": {