diff --git a/.github/workflows/download-circuits.yaml b/.github/workflows/download-circuits.yaml index ce9e7ac6..2af25d05 100644 --- a/.github/workflows/download-circuits.yaml +++ b/.github/workflows/download-circuits.yaml @@ -7,7 +7,7 @@ on: version: required: false type: string - default: "v0.7.2" + default: "v0.7.3" outputs: cache-key: description: "Cache key for the downloaded circuits" @@ -37,4 +37,4 @@ jobs: - name: Download and extract circuits if: steps.cache-circuits.outputs.cache-hit != 'true' run: | - cd proofs && make web-prover-circuits \ No newline at end of file + cd proofs && make web-prover-circuits diff --git a/client/src/circuits.rs b/client/src/circuits.rs index 772a6c35..65199105 100644 --- a/client/src/circuits.rs +++ b/client/src/circuits.rs @@ -8,54 +8,54 @@ use proofs::program::data::{R1CSType, SetupData, WitnessGeneratorType}; // -------------------------------------- 1024B circuits -------------------------------------- // pub const MAX_ROM_LENGTH: usize = 5; #[allow(dead_code)] -pub const PROVING_PARAMS_512: &str = "proofs/web_proof_circuits/circom-artifacts-512b-v0.7.2/serialized_setup_512b_rom_length_5.bin"; +pub const PROVING_PARAMS_512: &str = "proofs/web_proof_circuits/circom-artifacts-512b-v0.7.3/serialized_setup_512b_rom_length_5.bin"; #[allow(dead_code)] -pub const PROVING_PARAMS_1024: &str = "proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/serialized_setup_1024b_rom_length_5.bin"; +pub const PROVING_PARAMS_1024: &str = "proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/serialized_setup_1024b_rom_length_5.bin"; // TODO: Not loaded dynamically on iOS (yet) #[cfg(not(target_arch = "wasm32"))] -pub const PROVING_PARAMS_BYTES_1024: &[u8] = include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/serialized_setup_1024b_rom_length_5.bin"); +pub const PROVING_PARAMS_BYTES_1024: &[u8] = include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/serialized_setup_1024b_rom_length_5.bin"); // Circuit 0 #[allow(dead_code)] const PLAINTEXT_AUTHENTICATION_R1CS: &[u8] = include_bytes!( - "../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/plaintext_authentication_1024b.r1cs" + "../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/plaintext_authentication_1024b.r1cs" ); #[cfg(not(target_arch = "wasm32"))] const PLAINTEXT_AUTHENTICATION_GRAPH: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/plaintext_authentication_1024b.bin"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/plaintext_authentication_1024b.bin"); // Circuit 1 #[allow(dead_code)] const HTTP_VERIFICATION_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/http_verification_1024b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/http_verification_1024b.r1cs"); #[cfg(not(target_arch = "wasm32"))] const HTTP_VERIFICATION_GRAPH: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/http_verification_1024b.bin"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/http_verification_1024b.bin"); // Circuit 2 #[allow(dead_code)] const JSON_EXTRACTION_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/json_extraction_1024b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/json_extraction_1024b.r1cs"); #[cfg(not(target_arch = "wasm32"))] const JSON_EXTRACTION_GRAPH: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/json_extraction_1024b.bin"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/json_extraction_1024b.bin"); // -------------------------------------- 512B circuits -------------------------------------- // // Circuit 0 #[allow(dead_code)] const PLAINTEXT_AUTHENTICATION_512B_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.2/plaintext_authentication_512b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.3/plaintext_authentication_512b.r1cs"); // Circuit 1 #[allow(dead_code)] const HTTP_VERIFICATION_512B_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.2/http_verification_512b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.3/http_verification_512b.r1cs"); // Circuit 2 #[allow(dead_code)] const JSON_EXTRACTION_512B_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.2/json_extraction_512b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.3/json_extraction_512b.r1cs"); /// construct [`SetupData`] with all the required inputs for 1024B inputs pub fn construct_setup_data() -> SetupData { diff --git a/client_wasm/demo/js/index.js b/client_wasm/demo/js/index.js index 975cf982..f494009d 100644 --- a/client_wasm/demo/js/index.js +++ b/client_wasm/demo/js/index.js @@ -121,7 +121,7 @@ let proverConfig = { const proofWorker = new Worker(new URL("./proof.js", import.meta.url), { type: "module" }); console.log("sending message to worker"); var proving_params = { - aux_params: await getByteParams("circom-artifacts-512b-v0.7.2/serialized_setup_512b_rom_length_5.bin"), + aux_params: await getByteParams("circom-artifacts-512b-v0.7.3/serialized_setup_512b_rom_length_5.bin"), }; proofWorker.postMessage({ proverConfig, proving_params, memory }); console.log("message sent to worker"); diff --git a/client_wasm/demo/js/witness.js b/client_wasm/demo/js/witness.js index b3011d2e..2dc16b8f 100644 --- a/client_wasm/demo/js/witness.js +++ b/client_wasm/demo/js/witness.js @@ -138,7 +138,7 @@ function toInput(bytes) { } const getWitnessGenerator = async function (circuit) { - const wasmUrl = new URL(`${circuit}.wasm`, `https://localhost:8090/build/circom-artifacts-512b-v0.7.2/${circuit}_js/`).toString(); + const wasmUrl = new URL(`${circuit}.wasm`, `https://localhost:8090/build/circom-artifacts-512b-v0.7.3/${circuit}_js/`).toString(); const wasm = await fetch(wasmUrl).then((r) => r.arrayBuffer()); return wasm; } diff --git a/notary/src/circuits.rs b/notary/src/circuits.rs index e35fed4e..e1d48467 100644 --- a/notary/src/circuits.rs +++ b/notary/src/circuits.rs @@ -16,31 +16,31 @@ use proofs::{ use tracing::debug; pub const MAX_ROM_LENGTH: usize = 5; -pub const PROVING_PARAMS_512: &str = "proofs/web_proof_circuits/circom-artifacts-512b-v0.7.2/serialized_setup_512b_rom_length_5.bin"; -pub const PROVING_PARAMS_1024: &str = "proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/serialized_setup_1024b_rom_length_5.bin"; +pub const PROVING_PARAMS_512: &str = "proofs/web_proof_circuits/circom-artifacts-512b-v0.7.3/serialized_setup_512b_rom_length_5.bin"; +pub const PROVING_PARAMS_1024: &str = "proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/serialized_setup_1024b_rom_length_5.bin"; // -------------------------------------- 1024B circuits -------------------------------------- // // Circuit 0 const PLAINTEXT_AUTHENTICATION_R1CS: &[u8] = include_bytes!( - "../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/plaintext_authentication_1024b.r1cs" + "../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/plaintext_authentication_1024b.r1cs" ); // Circuit 1 const HTTP_VERIFICATION_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/http_verification_1024b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/http_verification_1024b.r1cs"); // Circuit 2 const JSON_EXTRACTION_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.2/json_extraction_1024b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-1024b-v0.7.3/json_extraction_1024b.r1cs"); // -------------------------------------- 512B circuits -------------------------------------- // // Circuit 0 const PLAINTEXT_AUTHENTICATION_512B_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.2/plaintext_authentication_512b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.3/plaintext_authentication_512b.r1cs"); // Circuit 1 const HTTP_VERIFICATION_512B_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.2/http_verification_512b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.3/http_verification_512b.r1cs"); // Circuit 2 const JSON_EXTRACTION_512B_R1CS: &[u8] = - include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.2/json_extraction_512b.r1cs"); + include_bytes!("../../proofs/web_proof_circuits/circom-artifacts-512b-v0.7.3/json_extraction_512b.r1cs"); pub fn construct_setup_data_512() -> SetupData { SetupData { diff --git a/proofs/Makefile b/proofs/Makefile index 3143f8e6..43fb97e0 100644 --- a/proofs/Makefile +++ b/proofs/Makefile @@ -2,11 +2,11 @@ # Second generate the graph bin files using circom-witnesscalc # Finally run test using these files -CIRCUIT_VERSIONS = circom-artifacts-512b-v0.7.2 circom-artifacts-1024b-v0.7.2 +CIRCUIT_VERSIONS = circom-artifacts-512b-v0.7.3 circom-artifacts-1024b-v0.7.3 web-prover-circuits: for version in $(CIRCUIT_VERSIONS); do \ - curl -L -o circuits.zip https://github.com/pluto/web-prover-circuits/releases/download/v0.7.2/$$version.zip; \ + curl -L -o circuits.zip https://github.com/pluto/web-prover-circuits/releases/download/v0.7.3/$$version.zip; \ mkdir -p web_proof_circuits/$$version/; \ unzip -o circuits.zip -d web_proof_circuits/$$version/; \ rm circuits.zip; \ diff --git a/proofs/src/tests/mod.rs b/proofs/src/tests/mod.rs index dead2282..4b295fb8 100644 --- a/proofs/src/tests/mod.rs +++ b/proofs/src/tests/mod.rs @@ -28,33 +28,33 @@ const MAX_HTTP_HEADERS: usize = 25; // Circuit 0 const PLAINTEXT_AUTHENTICATION_R1CS: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.2/plaintext_authentication_1024b.r1cs"); + include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.3/plaintext_authentication_1024b.r1cs"); const PLAINTEXT_AUTHENTICATION_GRAPH: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.2/plaintext_authentication_1024b.bin"); + include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.3/plaintext_authentication_1024b.bin"); // Circuit 1 const HTTP_VERIFICATION_R1CS: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.2/http_verification_1024b.r1cs"); + include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.3/http_verification_1024b.r1cs"); const HTTP_VERIFICATION_GRAPH: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.2/http_verification_1024b.bin"); + include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.3/http_verification_1024b.bin"); // Circuit 2 const JSON_EXTRACTION_R1CS: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.2/json_extraction_1024b.r1cs"); + include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.3/json_extraction_1024b.r1cs"); const JSON_EXTRACTION_GRAPH: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.2/json_extraction_1024b.bin"); + include_bytes!("../../web_proof_circuits/circom-artifacts-1024b-v0.7.3/json_extraction_1024b.bin"); // Circuit 0 const PLAINTEXT_AUTHENTICATION_512B_R1CS: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-512b-v0.7.2/plaintext_authentication_512b.r1cs"); + include_bytes!("../../web_proof_circuits/circom-artifacts-512b-v0.7.3/plaintext_authentication_512b.r1cs"); // Circuit 1 const HTTP_VERIFICATION_512B_R1CS: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-512b-v0.7.2/http_verification_512b.r1cs"); + include_bytes!("../../web_proof_circuits/circom-artifacts-512b-v0.7.3/http_verification_512b.r1cs"); // Circuit 2 const JSON_EXTRACTION_512B_R1CS: &[u8] = - include_bytes!("../../web_proof_circuits/circom-artifacts-512b-v0.7.2/json_extraction_512b.r1cs"); + include_bytes!("../../web_proof_circuits/circom-artifacts-512b-v0.7.3/json_extraction_512b.r1cs"); // HTTP/1.1 200 OK // content-type: application/json; charset=utf-8