Skip to content

Commit

Permalink
change all version strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mattes committed Jan 17, 2025
1 parent 4f775c7 commit 35b78ac
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
24 changes: 12 additions & 12 deletions client/src/circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion client_wasm/demo/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion client_wasm/demo/js/witness.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
16 changes: 8 additions & 8 deletions notary/src/circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions proofs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
18 changes: 9 additions & 9 deletions proofs/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 35b78ac

Please sign in to comment.