diff --git a/.gitmodules b/.gitmodules index 7f10142..e58693e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "zksync-os"] path = zksync-os - url = git@github.com:matter-labs/zksync-os.git + url = https://github.com/matter-labs/zksync-os.git diff --git a/Cargo.lock b/Cargo.lock index 666a23e..100c4ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -358,7 +358,7 @@ dependencies = [ [[package]] name = "blake2_with_compression_verifier" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "field", "unroll", @@ -368,7 +368,7 @@ dependencies = [ [[package]] name = "blake2s_u32" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "unroll", ] @@ -458,7 +458,7 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "common_constants" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" [[package]] name = "console_error_panic_hook" @@ -570,7 +570,7 @@ dependencies = [ [[package]] name = "cs" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "bincode 1.3.3", "blake2s_u32", @@ -737,7 +737,7 @@ dependencies = [ [[package]] name = "fft" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "field", "seq-macro", @@ -750,7 +750,7 @@ dependencies = [ [[package]] name = "field" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "rand 0.9.2", "seq-macro", @@ -782,7 +782,7 @@ dependencies = [ [[package]] name = "full_statement_verifier" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "blake2_with_compression_verifier", "common_constants", @@ -1036,7 +1036,7 @@ dependencies = [ [[package]] name = "non_determinism_source" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" [[package]] name = "num-bigint" @@ -1170,7 +1170,7 @@ dependencies = [ [[package]] name = "poseidon2" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "field", "non_determinism_source", @@ -1252,7 +1252,7 @@ dependencies = [ [[package]] name = "prover" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "blake2s_u32", "common_constants", @@ -1421,7 +1421,7 @@ dependencies = [ [[package]] name = "risc_v_simulator" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "addr2line", "blake2s_u32", @@ -1439,7 +1439,7 @@ dependencies = [ [[package]] name = "riscv_transpiler" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "blake2s_u32", "common_constants", @@ -1738,7 +1738,7 @@ dependencies = [ [[package]] name = "trace_holder" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "field", "worker", @@ -1747,7 +1747,7 @@ dependencies = [ [[package]] name = "transcript" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "blake2s_u32", "unroll", @@ -1818,7 +1818,7 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unified_reduced_machine_verifier" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "field", "unroll", @@ -1856,7 +1856,7 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "verifier_common" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "blake2s_u32", "cs", @@ -1974,7 +1974,7 @@ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "worker" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?branch=popzxc-optimize-builds#853e7941e9a1cc72932c1c2959124e8297e8d4dc" +source = "git+https://github.com/matter-labs/zksync-airbender?branch=dev#b1af1cf84aefab06ca0c2d2a5c7d0a21f02fe502" dependencies = [ "num_cpus", "rayon", diff --git a/proof_verifier_js/ts/package.json b/proof_verifier_js/ts/package.json index ebcff89..d279f47 100644 --- a/proof_verifier_js/ts/package.json +++ b/proof_verifier_js/ts/package.json @@ -25,7 +25,7 @@ } }, "scripts": { - "build:wasm": "cd ../wasm && RUST_MIN_STACK=267108864 wasm-pack build --target web --out-dir ../ts/wasm/pkg", + "build:wasm": "cd ../wasm && ./build_for_ts.sh", "build:ts": "tsup", "build": "yarn build:wasm && yarn build:ts", "prepack": "yarn build" diff --git a/proof_verifier_js/wasm/Cargo.toml b/proof_verifier_js/wasm/Cargo.toml index 0183b05..5ede2ee 100644 --- a/proof_verifier_js/wasm/Cargo.toml +++ b/proof_verifier_js/wasm/Cargo.toml @@ -4,8 +4,9 @@ version = "0.1.0" edition = "2021" license = "MIT OR Apache-2.0" -[package.metadata.wasm-pack.profile.release] -wasm-opt = false +# Disabling `wasm-opt` makes the build faster, but the resulting wasm file is much larger. +# [package.metadata.wasm-pack.profile.release] +# wasm-opt = false [lib] crate-type = ["cdylib"] @@ -19,11 +20,11 @@ serde = { version = "1", features = ["derive"] } serde_json = "1" wasm-bindgen = "0.2" -full_statement_verifier = { git = "https://github.com/matter-labs/zksync-airbender", branch = "popzxc-optimize-builds", default-features = false, features = ["unified_verifier_only_security_80"] } -verifier_common = { git = "https://github.com/matter-labs/zksync-airbender", branch = "popzxc-optimize-builds", default-features = false, features = ["proof_utils"] } -prover = { git = "https://github.com/matter-labs/zksync-airbender", branch = "popzxc-optimize-builds", default-features = false, features = ["definitions_only"] } -cs = { git = "https://github.com/matter-labs/zksync-airbender", branch = "popzxc-optimize-builds", default-features = false, features = ["compiler"] } -field = { git = "https://github.com/matter-labs/zksync-airbender", branch = "popzxc-optimize-builds", default-features = false, features = ["no_inline"] } +full_statement_verifier = { git = "https://github.com/matter-labs/zksync-airbender", branch = "dev", default-features = false, features = ["unified_verifier_only_security_80"] } +verifier_common = { git = "https://github.com/matter-labs/zksync-airbender", branch = "dev", default-features = false, features = ["proof_utils"] } +prover = { git = "https://github.com/matter-labs/zksync-airbender", branch = "dev", default-features = false, features = ["definitions_only"] } +cs = { git = "https://github.com/matter-labs/zksync-airbender", branch = "dev", default-features = false, features = ["compiler"] } +field = { git = "https://github.com/matter-labs/zksync-airbender", branch = "dev", default-features = false, features = ["no_inline"] } # full_statement_verifier = { path = "../../../zksync-airbender/full_statement_verifier", default-features = false, features = ["unified_verifier_only_security_80"] } # verifier_common = { path = "../../../zksync-airbender/verifier_common", default-features = false, features = ["proof_utils"] } diff --git a/proof_verifier_js/wasm/build_for_ts.sh b/proof_verifier_js/wasm/build_for_ts.sh new file mode 100755 index 0000000..856e775 --- /dev/null +++ b/proof_verifier_js/wasm/build_for_ts.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set -e + +RUST_MIN_STACK=267108864 wasm-pack build --target web --out-dir ../ts/wasm/pkg + +# `wasm-pack` generates `.gitignore`, which prevents these files to be published to npm +# Right now, there is no flag to omit generating this file, so we just remove it here +# See: https://github.com/drager/wasm-pack/issues/728 +rm ../ts/wasm/pkg/.gitignore