diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..3963d5e --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[env] +RUST_RAPIDSNARK_LINK_TEST_WITNESS="1" \ No newline at end of file diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 04180e1..e7489b9 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -29,7 +29,46 @@ jobs: - name: Check formatting run: cargo fmt --all -- --check - test: + build-ios: + runs-on: macos-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + strategy: + matrix: + target: + - aarch64-apple-ios + - aarch64-apple-ios-sim + - x86_64-apple-ios + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: "1.81.0" + targets: ${{ matrix.target }} + - name: Build + run: cargo build --target ${{ matrix.target }} + build-android: + runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + strategy: + matrix: + target: + - x86_64-linux-android + - aarch64-linux-android + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: "1.81.0" + targets: ${{ matrix.target }} + - name: Install Android NDK + run: cargo install cargo-ndk + - name: Build + run: cargo ndk -t ${{ matrix.target }} build + test-linux: runs-on: ubuntu-latest if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: @@ -37,7 +76,31 @@ jobs: - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: "1.81.0" + override: true + - name: Run tests + run: cargo test + test-macOS: + runs-on: macos-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: "1.81.0" + override: true + - name: Run tests + run: cargo test + test-macOS-x86_64: + runs-on: macos-13 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: "1.81.0" override: true - name: Run tests run: cargo test diff --git a/Cargo.lock b/Cargo.lock index 4a26afd..f939ad7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,1139 +2,35 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - [[package]] name = "anyhow" version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" -[[package]] -name = "ark-bls12-381" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", -] - -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-circom" -version = "0.1.0" -source = "git+https://github.com/zkmopro/circom-compat.git?branch=wasm-delete#0755f5bc5ae2097760ab0f9c6c490a89af3c076c" -dependencies = [ - "ark-bls12-381", - "ark-bn254", - "ark-crypto-primitives", - "ark-ec", - "ark-ff", - "ark-groth16", - "ark-poly", - "ark-relations", - "ark-serialize", - "ark-std", - "byteorder", - "cfg-if", - "color-eyre", - "criterion", - "ethers-core", - "fnv", - "hex", - "num", - "num-bigint", - "num-traits", - "thiserror 2.0.3", - "url", -] - -[[package]] -name = "ark-crypto-primitives" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-relations", - "ark-serialize", - "ark-snark", - "ark-std", - "blake2", - "derivative", - "digest", - "rayon", - "sha2", -] - -[[package]] -name = "ark-ec" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c60370a92f8e1a5f053cad73a862e1b99bc642333cd676fa11c0c39f80f4ac2" -dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools", - "num-traits", - "rayon", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2d42532524bee1da5a4f6f733eb4907301baa480829557adcff5dfaeee1d9a" -dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest", - "itertools", - "num-bigint", - "num-traits", - "paste", - "rayon", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-groth16" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" -dependencies = [ - "ark-crypto-primitives", - "ark-ec", - "ark-ff", - "ark-poly", - "ark-relations", - "ark-serialize", - "ark-std", - "rayon", -] - -[[package]] -name = "ark-poly" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6ec811462cabe265cfe1b102fcfe3df79d7d2929c2425673648ee9abfd0272" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "rayon", -] - -[[package]] -name = "ark-relations" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" -dependencies = [ - "ark-ff", - "ark-std", - "tracing", - "tracing-subscriber 0.2.25", -] - -[[package]] -name = "ark-serialize" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e735959bc173ea4baf13327b19c22d452b8e9e8e8f7b7fc34e6bf0e316c33e" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest", - "num-bigint", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-snark" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" -dependencies = [ - "ark-ff", - "ark-relations", - "ark-serialize", - "ark-std", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand", - "rayon", -] - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "auto_impl" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12882f59de5360c748c4cbf569a042d5fb0eb515f7bea9c1f470b47f6ffbd73" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - [[package]] name = "autocfg" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" -dependencies = [ - "serde", -] - -[[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - [[package]] name = "cc" -version = "1.2.9" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8293772165d9345bdaaa39b45b2109591e63fe5e6fbc23c6ff930a048aa310b" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" dependencies = [ "jobserver", "libc", "shlex", ] -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" -dependencies = [ - "num-traits", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "bitflags 1.3.2", - "textwrap", - "unicode-width", -] - -[[package]] -name = "color-eyre" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204" -dependencies = [ - "backtrace", - "color-spantrace", - "eyre", - "indenter", - "once_cell", - "owo-colors", - "tracing-error", -] - -[[package]] -name = "color-spantrace" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" -dependencies = [ - "once_cell", - "owo-colors", - "tracing-core", - "tracing-error", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "cpufeatures" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" -dependencies = [ - "libc", -] - -[[package]] -name = "criterion" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" -dependencies = [ - "atty", - "cast", - "clap", - "criterion-plot", - "csv", - "itertools", - "lazy_static", - "num-traits", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_cbor", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", -] - -[[package]] -name = "criterion-plot" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" -dependencies = [ - "cast", - "itertools", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "csv" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" -dependencies = [ - "memchr", -] - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror 1.0.69", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers-core" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da5fa198af0d3be20c19192df2bd9590b92ce09a8421e793bec8851270f1b05" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "elliptic-curve", - "ethabi", - "generic-array", - "hex", - "k256", - "num_enum", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "tempfile", - "thiserror 1.0.69", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core", - "subtle", -] - -[[package]] -name = "fixed-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" -dependencies = [ - "byteorder", - "rand", - "rustc-hex", - "static_assertions", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" -dependencies = [ - "equivalent", - "hashbrown 0.15.2", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.14" @@ -1150,97 +46,18 @@ dependencies = [ "libc", ] -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - [[package]] name = "libc" version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "litemap" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" - -[[package]] -name = "log" -version = "0.4.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" - [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "num" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.4.6" @@ -1249,16 +66,6 @@ checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", - "rand", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", ] [[package]] @@ -1270,28 +77,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -1301,203 +86,12 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "oorandom" -version = "11.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" - -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - -[[package]] -name = "parity-scale-codec" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" -dependencies = [ - "proc-macro-crate 3.2.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "plotters" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" -dependencies = [ - "num-traits", - "plotters-backend", - "plotters-svg", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "plotters-backend" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" - -[[package]] -name = "plotters-svg" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" -dependencies = [ - "plotters-backend", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "primitive-types" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" -dependencies = [ - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit 0.22.22", -] - [[package]] name = "proc-macro2" version = "1.0.93" @@ -1516,132 +110,14 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rlp-derive", - "rustc-hex", -] - -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rust-rapidsnark" version = "0.1.0" dependencies = [ "anyhow", - "ark-bn254", - "ark-circom", "cc", "num-bigint", + "num-traits", "rust-witness", "serde", "serde_json", @@ -1662,50 +138,10 @@ dependencies = [ ] [[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" -dependencies = [ - "bitflags 2.8.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rustversion" +name = "ryu" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "same-file" @@ -1716,50 +152,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scale-info" -version = "2.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" -dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" -dependencies = [ - "proc-macro-crate 3.2.0", - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "semver" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" - [[package]] name = "serde" version = "1.0.217" @@ -1769,16 +161,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - [[package]] name = "serde_derive" version = "1.0.217" @@ -1787,14 +169,14 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn", ] [[package]] name = "serde_json" -version = "1.0.135" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -1802,119 +184,12 @@ dependencies = [ "serde", ] -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.96" @@ -1926,273 +201,11 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" -dependencies = [ - "cfg-if", - "fastrand", - "getrandom", - "once_cell", - "rustix", - "windows-sys", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" -dependencies = [ - "thiserror-impl 2.0.3", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinystr" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.6.24", -] - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-error" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" -dependencies = [ - "tracing", - "tracing-subscriber 0.3.19", -] - -[[package]] -name = "tracing-subscriber" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" -dependencies = [ - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" -dependencies = [ - "sharded-slab", - "thread_local", - "tracing-core", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - [[package]] name = "unicode-ident" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" - -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "url" -version = "2.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "walkdir" @@ -2204,96 +217,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.96", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.9" @@ -2303,12 +226,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.59.0" @@ -2381,150 +298,3 @@ name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.6.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" -dependencies = [ - "memchr", -] - -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "yoke" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "zerofrom" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] - -[[package]] -name = "zerovec" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.96", -] diff --git a/Cargo.toml b/Cargo.toml index 99dc04c..933da6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,12 +7,11 @@ edition = "2021" [dependencies] anyhow = "1.0.95" -ark-bn254 = "0.4.0" -ark-circom = { git = "https://github.com/zkmopro/circom-compat.git", version = "0.1.0", branch = "wasm-delete" } num-bigint = "0.4.6" rust-witness = "0.1.2" serde = { version = "1.0.217", features = ["derive"] } serde_json = "1.0.135" +num-traits = "0.2.19" [build-dependencies] cc = "1.0" diff --git a/build.rs b/build.rs index 051843a..bd59b9f 100644 --- a/build.rs +++ b/build.rs @@ -1,8 +1,12 @@ +use std::env; +use std::fs; +use std::path::Path; use std::path::PathBuf; fn main() { - // #[cfg(test)] - rust_witness::transpile::transpile_wasm("./test-vectors".to_string()); + if std::env::var("RUST_RAPIDSNARK_LINK_TEST_WITNESS").is_ok() { + rust_witness::transpile::transpile_wasm("./test-vectors".to_string()); + } let target = std::env::var("TARGET").unwrap(); let arch = target.split('-').next().unwrap(); @@ -39,4 +43,29 @@ fn main() { println!("cargo:rustc-link-lib=static=fr"); println!("cargo:rustc-link-lib=static=fq"); println!("cargo:rustc-link-lib=static=gmp"); + + // refer to https://github.com/bbqsrc/cargo-ndk to see how to link the libc++_shared.so file in Android + if env::var("CARGO_CFG_TARGET_OS").unwrap() == "android" { + android(); + } +} + +fn android() { + println!("cargo:rustc-link-lib=c++_shared"); + + if let Ok(output_path) = env::var("CARGO_NDK_OUTPUT_PATH") { + let sysroot_libs_path = PathBuf::from(env::var_os("CARGO_NDK_SYSROOT_LIBS_PATH").unwrap()); + let lib_path = sysroot_libs_path.join("libc++_shared.so"); + assert!( + lib_path.exists(), + "Error: Source file {:?} does not exist", + lib_path + ); + let dest_dir = Path::new(&output_path).join(env::var("CARGO_NDK_ANDROID_TARGET").unwrap()); + println!("cargo:rerun-if-changed={}", dest_dir.display()); + if !dest_dir.exists() { + fs::create_dir_all(&dest_dir).unwrap(); + } + fs::copy(lib_path, Path::new(&dest_dir).join("libc++_shared.so")).unwrap(); + } } diff --git a/rapidsnark/aarch64-apple-darwin/libfq.a b/rapidsnark/aarch64-apple-darwin/libfq.a index 7f572f6..7369d1a 100644 Binary files a/rapidsnark/aarch64-apple-darwin/libfq.a and b/rapidsnark/aarch64-apple-darwin/libfq.a differ diff --git a/rapidsnark/aarch64-apple-darwin/libfr.a b/rapidsnark/aarch64-apple-darwin/libfr.a index e60e2cd..9bc7fc3 100644 Binary files a/rapidsnark/aarch64-apple-darwin/libfr.a and b/rapidsnark/aarch64-apple-darwin/libfr.a differ diff --git a/rapidsnark/aarch64-apple-darwin/libgmp.a b/rapidsnark/aarch64-apple-darwin/libgmp.a index edb0759..88a0e61 100644 Binary files a/rapidsnark/aarch64-apple-darwin/libgmp.a and b/rapidsnark/aarch64-apple-darwin/libgmp.a differ diff --git a/rapidsnark/aarch64-apple-darwin/librapidsnark-fr-fq.a b/rapidsnark/aarch64-apple-darwin/librapidsnark-fr-fq.a new file mode 100644 index 0000000..15547b9 Binary files /dev/null and b/rapidsnark/aarch64-apple-darwin/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/aarch64-apple-darwin/librapidsnark.a b/rapidsnark/aarch64-apple-darwin/librapidsnark.a index a741648..d9a56e0 100644 Binary files a/rapidsnark/aarch64-apple-darwin/librapidsnark.a and b/rapidsnark/aarch64-apple-darwin/librapidsnark.a differ diff --git a/rapidsnark/aarch64-apple-darwin/librapidsnark.dylib b/rapidsnark/aarch64-apple-darwin/librapidsnark.dylib new file mode 100755 index 0000000..38e26ce Binary files /dev/null and b/rapidsnark/aarch64-apple-darwin/librapidsnark.dylib differ diff --git a/rapidsnark/aarch64-apple-ios-sim/libfq.a b/rapidsnark/aarch64-apple-ios-sim/libfq.a index c9e7808..36b533d 100644 Binary files a/rapidsnark/aarch64-apple-ios-sim/libfq.a and b/rapidsnark/aarch64-apple-ios-sim/libfq.a differ diff --git a/rapidsnark/aarch64-apple-ios-sim/libfq_fat.a b/rapidsnark/aarch64-apple-ios-sim/libfq_fat.a deleted file mode 100644 index 2a068b6..0000000 Binary files a/rapidsnark/aarch64-apple-ios-sim/libfq_fat.a and /dev/null differ diff --git a/rapidsnark/aarch64-apple-ios-sim/libfr.a b/rapidsnark/aarch64-apple-ios-sim/libfr.a index bafc6b7..0bfd08b 100644 Binary files a/rapidsnark/aarch64-apple-ios-sim/libfr.a and b/rapidsnark/aarch64-apple-ios-sim/libfr.a differ diff --git a/rapidsnark/aarch64-apple-ios-sim/libfr_fat.a b/rapidsnark/aarch64-apple-ios-sim/libfr_fat.a deleted file mode 100644 index c835972..0000000 Binary files a/rapidsnark/aarch64-apple-ios-sim/libfr_fat.a and /dev/null differ diff --git a/rapidsnark/aarch64-apple-ios-sim/libgmp.a b/rapidsnark/aarch64-apple-ios-sim/libgmp.a index 2cdfc40..9117f22 100644 Binary files a/rapidsnark/aarch64-apple-ios-sim/libgmp.a and b/rapidsnark/aarch64-apple-ios-sim/libgmp.a differ diff --git a/rapidsnark/aarch64-apple-ios-sim/libgmp_fat.a b/rapidsnark/aarch64-apple-ios-sim/libgmp_fat.a deleted file mode 100644 index 32bd8b5..0000000 Binary files a/rapidsnark/aarch64-apple-ios-sim/libgmp_fat.a and /dev/null differ diff --git a/rapidsnark/aarch64-apple-ios-sim/librapidsnark-fr-fq.a b/rapidsnark/aarch64-apple-ios-sim/librapidsnark-fr-fq.a new file mode 100644 index 0000000..ba881b9 Binary files /dev/null and b/rapidsnark/aarch64-apple-ios-sim/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/aarch64-apple-ios-sim/librapidsnark.a b/rapidsnark/aarch64-apple-ios-sim/librapidsnark.a index 3172670..2af5a92 100644 Binary files a/rapidsnark/aarch64-apple-ios-sim/librapidsnark.a and b/rapidsnark/aarch64-apple-ios-sim/librapidsnark.a differ diff --git a/rapidsnark/aarch64-apple-ios-sim/librapidsnark.dylib b/rapidsnark/aarch64-apple-ios-sim/librapidsnark.dylib new file mode 100755 index 0000000..7a26d89 Binary files /dev/null and b/rapidsnark/aarch64-apple-ios-sim/librapidsnark.dylib differ diff --git a/rapidsnark/aarch64-apple-ios-sim/librapidsnark_arm64.a b/rapidsnark/aarch64-apple-ios-sim/librapidsnark_arm64.a deleted file mode 100644 index 7b83624..0000000 Binary files a/rapidsnark/aarch64-apple-ios-sim/librapidsnark_arm64.a and /dev/null differ diff --git a/rapidsnark/aarch64-apple-ios-sim/librapidsnark_fat.a b/rapidsnark/aarch64-apple-ios-sim/librapidsnark_fat.a deleted file mode 100644 index c5395d3..0000000 Binary files a/rapidsnark/aarch64-apple-ios-sim/librapidsnark_fat.a and /dev/null differ diff --git a/rapidsnark/aarch64-apple-ios/libfq.a b/rapidsnark/aarch64-apple-ios/libfq.a index ea810a4..6545f05 100644 Binary files a/rapidsnark/aarch64-apple-ios/libfq.a and b/rapidsnark/aarch64-apple-ios/libfq.a differ diff --git a/rapidsnark/aarch64-apple-ios/libfr.a b/rapidsnark/aarch64-apple-ios/libfr.a index a57071e..0f04d3f 100644 Binary files a/rapidsnark/aarch64-apple-ios/libfr.a and b/rapidsnark/aarch64-apple-ios/libfr.a differ diff --git a/rapidsnark/aarch64-apple-ios/libgmp_fat.a b/rapidsnark/aarch64-apple-ios/libgmp_fat.a deleted file mode 100644 index 7e4b25c..0000000 Binary files a/rapidsnark/aarch64-apple-ios/libgmp_fat.a and /dev/null differ diff --git a/rapidsnark/aarch64-apple-ios/librapidsnark-fr-fq.a b/rapidsnark/aarch64-apple-ios/librapidsnark-fr-fq.a new file mode 100644 index 0000000..5e1bcaf Binary files /dev/null and b/rapidsnark/aarch64-apple-ios/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/aarch64-apple-ios/librapidsnark.a b/rapidsnark/aarch64-apple-ios/librapidsnark.a index fc0f602..87a38ce 100644 Binary files a/rapidsnark/aarch64-apple-ios/librapidsnark.a and b/rapidsnark/aarch64-apple-ios/librapidsnark.a differ diff --git a/rapidsnark/aarch64-apple-ios/librapidsnark.dylib b/rapidsnark/aarch64-apple-ios/librapidsnark.dylib new file mode 100755 index 0000000..c434474 Binary files /dev/null and b/rapidsnark/aarch64-apple-ios/librapidsnark.dylib differ diff --git a/rapidsnark/aarch64-linux-android/libfq.a b/rapidsnark/aarch64-linux-android/libfq.a new file mode 100644 index 0000000..5e1e98c Binary files /dev/null and b/rapidsnark/aarch64-linux-android/libfq.a differ diff --git a/rapidsnark/aarch64-linux-android/libfr.a b/rapidsnark/aarch64-linux-android/libfr.a new file mode 100644 index 0000000..1cb1de1 Binary files /dev/null and b/rapidsnark/aarch64-linux-android/libfr.a differ diff --git a/rapidsnark/aarch64-linux-android/libgmp.a b/rapidsnark/aarch64-linux-android/libgmp.a new file mode 100644 index 0000000..a3364a2 Binary files /dev/null and b/rapidsnark/aarch64-linux-android/libgmp.a differ diff --git a/rapidsnark/aarch64-linux-android/librapidsnark-fr-fq.a b/rapidsnark/aarch64-linux-android/librapidsnark-fr-fq.a new file mode 100644 index 0000000..8dd8311 Binary files /dev/null and b/rapidsnark/aarch64-linux-android/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/aarch64-linux-android/librapidsnark.a b/rapidsnark/aarch64-linux-android/librapidsnark.a new file mode 100644 index 0000000..5438903 Binary files /dev/null and b/rapidsnark/aarch64-linux-android/librapidsnark.a differ diff --git a/rapidsnark/aarch64-linux-android/librapidsnark.so b/rapidsnark/aarch64-linux-android/librapidsnark.so new file mode 100755 index 0000000..013e89b Binary files /dev/null and b/rapidsnark/aarch64-linux-android/librapidsnark.so differ diff --git a/rapidsnark/aarch64/libfq.a b/rapidsnark/aarch64/libfq.a index 7f572f6..09b3e68 100644 Binary files a/rapidsnark/aarch64/libfq.a and b/rapidsnark/aarch64/libfq.a differ diff --git a/rapidsnark/aarch64/libfr.a b/rapidsnark/aarch64/libfr.a index e60e2cd..55c093d 100644 Binary files a/rapidsnark/aarch64/libfr.a and b/rapidsnark/aarch64/libfr.a differ diff --git a/rapidsnark/aarch64/libgmp.a b/rapidsnark/aarch64/libgmp.a index edb0759..2559928 100644 Binary files a/rapidsnark/aarch64/libgmp.a and b/rapidsnark/aarch64/libgmp.a differ diff --git a/rapidsnark/aarch64/librapidsnark-fr-fq.a b/rapidsnark/aarch64/librapidsnark-fr-fq.a new file mode 100644 index 0000000..2e42455 Binary files /dev/null and b/rapidsnark/aarch64/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/aarch64/librapidsnark.a b/rapidsnark/aarch64/librapidsnark.a index a741648..0a8036f 100644 Binary files a/rapidsnark/aarch64/librapidsnark.a and b/rapidsnark/aarch64/librapidsnark.a differ diff --git a/rapidsnark/aarch64/librapidsnark.so b/rapidsnark/aarch64/librapidsnark.so new file mode 100644 index 0000000..7d7aece Binary files /dev/null and b/rapidsnark/aarch64/librapidsnark.so differ diff --git a/rapidsnark/x86_64-apple-darwin/libfq.a b/rapidsnark/x86_64-apple-darwin/libfq.a new file mode 100644 index 0000000..4abfbf5 Binary files /dev/null and b/rapidsnark/x86_64-apple-darwin/libfq.a differ diff --git a/rapidsnark/x86_64-apple-darwin/libfr.a b/rapidsnark/x86_64-apple-darwin/libfr.a new file mode 100644 index 0000000..cf36b3e Binary files /dev/null and b/rapidsnark/x86_64-apple-darwin/libfr.a differ diff --git a/rapidsnark/x86_64-apple-darwin/libgmp.a b/rapidsnark/x86_64-apple-darwin/libgmp.a new file mode 100644 index 0000000..a76bba1 Binary files /dev/null and b/rapidsnark/x86_64-apple-darwin/libgmp.a differ diff --git a/rapidsnark/x86_64-apple-darwin/librapidsnark-fr-fq.a b/rapidsnark/x86_64-apple-darwin/librapidsnark-fr-fq.a new file mode 100644 index 0000000..c03261f Binary files /dev/null and b/rapidsnark/x86_64-apple-darwin/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/x86_64-apple-darwin/librapidsnark.a b/rapidsnark/x86_64-apple-darwin/librapidsnark.a new file mode 100644 index 0000000..77b66af Binary files /dev/null and b/rapidsnark/x86_64-apple-darwin/librapidsnark.a differ diff --git a/rapidsnark/x86_64-apple-darwin/librapidsnark.dylib b/rapidsnark/x86_64-apple-darwin/librapidsnark.dylib new file mode 100755 index 0000000..974321e Binary files /dev/null and b/rapidsnark/x86_64-apple-darwin/librapidsnark.dylib differ diff --git a/rapidsnark/x86_64-apple-ios/libfq.a b/rapidsnark/x86_64-apple-ios/libfq.a index 51bbad2..2e0b50c 100644 Binary files a/rapidsnark/x86_64-apple-ios/libfq.a and b/rapidsnark/x86_64-apple-ios/libfq.a differ diff --git a/rapidsnark/x86_64-apple-ios/libfr.a b/rapidsnark/x86_64-apple-ios/libfr.a index 927d401..c02df24 100644 Binary files a/rapidsnark/x86_64-apple-ios/libfr.a and b/rapidsnark/x86_64-apple-ios/libfr.a differ diff --git a/rapidsnark/x86_64-apple-ios/libgmp.a b/rapidsnark/x86_64-apple-ios/libgmp.a index 76b123d..14e6214 100644 Binary files a/rapidsnark/x86_64-apple-ios/libgmp.a and b/rapidsnark/x86_64-apple-ios/libgmp.a differ diff --git a/rapidsnark/x86_64-apple-ios/libgmp_fat.a b/rapidsnark/x86_64-apple-ios/libgmp_fat.a deleted file mode 100644 index ded1266..0000000 Binary files a/rapidsnark/x86_64-apple-ios/libgmp_fat.a and /dev/null differ diff --git a/rapidsnark/x86_64-apple-ios/librapidsnark-fr-fq.a b/rapidsnark/x86_64-apple-ios/librapidsnark-fr-fq.a new file mode 100644 index 0000000..0cf9f3b Binary files /dev/null and b/rapidsnark/x86_64-apple-ios/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/x86_64-apple-ios/librapidsnark.a b/rapidsnark/x86_64-apple-ios/librapidsnark.a index 7f9edad..1f5369f 100644 Binary files a/rapidsnark/x86_64-apple-ios/librapidsnark.a and b/rapidsnark/x86_64-apple-ios/librapidsnark.a differ diff --git a/rapidsnark/x86_64-apple-ios/librapidsnark.dylib b/rapidsnark/x86_64-apple-ios/librapidsnark.dylib new file mode 100755 index 0000000..b67dfcd Binary files /dev/null and b/rapidsnark/x86_64-apple-ios/librapidsnark.dylib differ diff --git a/rapidsnark/x86_64-linux-android/libfq.a b/rapidsnark/x86_64-linux-android/libfq.a new file mode 100644 index 0000000..06e7b85 Binary files /dev/null and b/rapidsnark/x86_64-linux-android/libfq.a differ diff --git a/rapidsnark/x86_64-linux-android/libfr.a b/rapidsnark/x86_64-linux-android/libfr.a new file mode 100644 index 0000000..8cc898b Binary files /dev/null and b/rapidsnark/x86_64-linux-android/libfr.a differ diff --git a/rapidsnark/x86_64-linux-android/libgmp.a b/rapidsnark/x86_64-linux-android/libgmp.a new file mode 100644 index 0000000..ba1b623 Binary files /dev/null and b/rapidsnark/x86_64-linux-android/libgmp.a differ diff --git a/rapidsnark/x86_64-linux-android/librapidsnark-fr-fq.a b/rapidsnark/x86_64-linux-android/librapidsnark-fr-fq.a new file mode 100644 index 0000000..787f089 Binary files /dev/null and b/rapidsnark/x86_64-linux-android/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/x86_64-linux-android/librapidsnark.a b/rapidsnark/x86_64-linux-android/librapidsnark.a new file mode 100644 index 0000000..9ea3be0 Binary files /dev/null and b/rapidsnark/x86_64-linux-android/librapidsnark.a differ diff --git a/rapidsnark/x86_64-linux-android/librapidsnark.so b/rapidsnark/x86_64-linux-android/librapidsnark.so new file mode 100644 index 0000000..186266e Binary files /dev/null and b/rapidsnark/x86_64-linux-android/librapidsnark.so differ diff --git a/rapidsnark/x86_64/libfq.a b/rapidsnark/x86_64/libfq.a index 14bd413..e13732b 100644 Binary files a/rapidsnark/x86_64/libfq.a and b/rapidsnark/x86_64/libfq.a differ diff --git a/rapidsnark/x86_64/libfr.a b/rapidsnark/x86_64/libfr.a index 618200c..adc3fc6 100644 Binary files a/rapidsnark/x86_64/libfr.a and b/rapidsnark/x86_64/libfr.a differ diff --git a/rapidsnark/x86_64/libgmp.a b/rapidsnark/x86_64/libgmp.a index 0bde54a..210e918 100644 Binary files a/rapidsnark/x86_64/libgmp.a and b/rapidsnark/x86_64/libgmp.a differ diff --git a/rapidsnark/x86_64/librapidsnark-fr-fq.a b/rapidsnark/x86_64/librapidsnark-fr-fq.a index cb8ddda..cf8e61c 100644 Binary files a/rapidsnark/x86_64/librapidsnark-fr-fq.a and b/rapidsnark/x86_64/librapidsnark-fr-fq.a differ diff --git a/rapidsnark/x86_64/librapidsnark.a b/rapidsnark/x86_64/librapidsnark.a index e12ec29..89bfe2f 100644 Binary files a/rapidsnark/x86_64/librapidsnark.a and b/rapidsnark/x86_64/librapidsnark.a differ diff --git a/rapidsnark/x86_64/librapidsnark.so b/rapidsnark/x86_64/librapidsnark.so index 569c15c..8f0de26 100644 Binary files a/rapidsnark/x86_64/librapidsnark.so and b/rapidsnark/x86_64/librapidsnark.so differ diff --git a/src/lib.rs b/src/lib.rs index 6161609..9f566c6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,177 +14,185 @@ //! use std::collections::HashMap; -use std::ffi::CString; -use std::fs::File; -use std::os::raw::c_char; -use std::os::raw::c_uint; use std::str::FromStr; -use anyhow::Context; use anyhow::Result; -use ark_bn254::Bn254; -use ark_circom::read_proving_key; -use ark_circom::ZkeyHeaderReader; use num_bigint::BigInt; -use serde::Deserialize; -use serde::Serialize; /// A function that converts named inputs to a full witness. This should be generated using e.g. /// [rust-witness](https://crates.io/crates/rust-witness). pub type WtnsFn = fn(HashMap>) -> Vec; -// match what rapidsnark expects -#[derive(Debug, Serialize, Deserialize)] -#[allow(non_snake_case)] -struct VerificationKey { - protocol: String, - curve: String, - nPublic: u32, - vk_alpha_1: [String; 3], - vk_beta_2: [[String; 2]; 3], - vk_gamma_2: [[String; 2]; 3], - vk_delta_2: [[String; 2]; 3], - IC: Vec<[String; 3]>, -} - /// A structure representing a proof and public signals. -#[repr(C)] +#[derive(Debug)] pub struct ProofResult { - proof: *mut c_char, - public_signals: *mut c_char, + pub proof: String, + pub public_signals: String, } extern "C" { - fn groth16_api_prove( - zkeyFilename: *const c_char, - wtnsData: *mut u8, - wtnsDataLen: c_uint, - ) -> *mut ProofResult; - fn groth16_api_verify(proof: *mut ProofResult, key_json: *const c_char) -> bool; - fn free_proof_result(result: *mut ProofResult); + pub fn groth16_prover_zkey_file( + zkey_file_path: *const std::os::raw::c_char, + wtns_buffer: *const std::os::raw::c_void, + wtns_size: std::ffi::c_ulong, + proof_buffer: *mut std::os::raw::c_char, + proof_size: *mut std::ffi::c_ulong, + public_buffer: *mut std::os::raw::c_char, + public_size: *mut std::ffi::c_ulong, + error_msg: *mut std::os::raw::c_char, + error_msg_maxsize: std::ffi::c_ulong, + ) -> i32; + + pub fn groth16_verify( + proof: *const std::os::raw::c_char, + inputs: *const std::os::raw::c_char, + verification_key: *const std::os::raw::c_char, + error_msg: *mut std::os::raw::c_char, + error_msg_maxsize: std::ffi::c_ulong, + ) -> i32; } -/// Verify a proof using a zkey. The proof is expected to be encoded as json. -pub fn verify_proof(zkey_path: &str, proof: String) -> Result { - let mut header_reader = ZkeyHeaderReader::new(zkey_path); - header_reader.read(); - let file = File::open(zkey_path)?; - let mut reader = std::io::BufReader::new(file); - let proving_key = read_proving_key::<_, Bn254>(&mut reader)?; - // convert out proving key to json so we can - // use it with rapidsnark - let vk = proving_key.vk; - // let v = proving_key.vk.alpha_g1.to_string(); - let vkey = VerificationKey { - protocol: "groth16".to_string(), - curve: "bn128".to_string(), - nPublic: 0, // this is unused in the rapidsnark verifier - vk_alpha_1: [ - vk.alpha_g1.x.to_string(), - vk.alpha_g1.y.to_string(), - "1".to_string(), - ], - vk_beta_2: [ - [vk.beta_g2.x.c0.to_string(), vk.beta_g2.x.c1.to_string()], - [vk.beta_g2.y.c0.to_string(), vk.beta_g2.y.c1.to_string()], - ["1".to_string(), "0".to_string()], - ], - vk_gamma_2: [ - [vk.gamma_g2.x.c0.to_string(), vk.gamma_g2.x.c1.to_string()], - [vk.gamma_g2.y.c0.to_string(), vk.gamma_g2.y.c1.to_string()], - ["1".to_string(), "0".to_string()], - ], - vk_delta_2: [ - [vk.delta_g2.x.c0.to_string(), vk.delta_g2.x.c1.to_string()], - [vk.delta_g2.y.c0.to_string(), vk.delta_g2.y.c1.to_string()], - ["1".to_string(), "0".to_string()], - ], - IC: vk - .gamma_abc_g1 - .iter() - .map(|p| [p.x.to_string(), p.y.to_string(), "1".to_string()]) - .collect(), - }; - let vkey_json = serde_json::to_string(&vkey)?; - let vkey_json_cstr = CString::new(vkey_json)?; - let v: serde_json::Value = serde_json::from_str(&proof)?; - let proof = v["proof"].to_string(); - let signals = v["signals"].to_string(); +use num_traits::ops::bytes::ToBytes; +use std::io::{self}; + +/// Parse bigints to `wtns` format.
+/// Reference: [witnesscalc/src/witnesscalc.cpp](https://github.com/0xPolygonID/witnesscalc/blob/4a789880727aa0df50f1c4ef78ec295f5a30a15e/src/witnesscalc.cpp) +pub fn parse_bigints_to_witness(bigints: Vec) -> io::Result> { + let mut buffer = Vec::new(); + let version: u32 = 2; + let n_sections: u32 = 2; + let n8: u32 = 32; + let q = BigInt::from_str( + "21888242871839275222246405745257275088548364400416034343698204186575808495617", + ) + .unwrap(); + let n_witness_values: u32 = bigints.len() as u32; + + // Write the format bytes (4 bytes) + let wtns_format = "wtns".as_bytes(); + buffer.extend_from_slice(wtns_format); + + // Write version (4 bytes) + buffer.extend_from_slice(&version.to_le_bytes()); + + // Write number of sections (4 bytes) + buffer.extend_from_slice(&n_sections.to_le_bytes()); + + // Iterate through sections to write the data + // Section 1 (Field parameters) + let section_id_1: u32 = 1; + let section_length_1: u64 = 8 + n8 as u64; + buffer.extend_from_slice(§ion_id_1.to_le_bytes()); + buffer.extend_from_slice(§ion_length_1.to_le_bytes()); + + // Write n8 (4 bytes), q (32 bytes), and n_witness_values (4 bytes) + buffer.extend_from_slice(&n8.to_le_bytes()); + buffer.extend_from_slice(&q.to_signed_bytes_le()); + buffer.extend_from_slice(&n_witness_values.to_le_bytes()); + + // Section 2 (Witness data) + let section_id_2: u32 = 2; + let section_length_2: u64 = bigints.len() as u64 * n8 as u64; // Witness data size + buffer.extend_from_slice(§ion_id_2.to_le_bytes()); + buffer.extend_from_slice(§ion_length_2.to_le_bytes()); + + // Write the witness data (each BigInt to n8 bytes) + for bigint in bigints { + let mut bytes = bigint.to_le_bytes(); + bytes.resize(n8 as usize, 0); // Ensure each BigInt is padded to n8 bytes + buffer.extend_from_slice(&bytes); + } + + // Return the buffer containing the complete witness data + Ok(buffer) +} + +/// Wrapper for `groth16_prover_zkey_file` +pub fn groth16_prover_zkey_file_wrapper( + zkey_path: &str, + wtns_buffer: Vec, +) -> Result { + let wtns_size = wtns_buffer.len() as u64; + + let mut proof_buffer = vec![0u8; 4 * 1024 * 1024]; // Adjust size as needed + let mut proof_size: u64 = 4 * 1024 * 1024; + let proof_ptr = proof_buffer.as_mut_ptr() as *mut std::ffi::c_char; + + let mut public_buffer = vec![0u8; 4 * 1024 * 1024]; // Adjust size as needed + let mut public_size: u64 = 4 * 1024 * 1024; + let public_ptr = public_buffer.as_mut_ptr() as *mut std::ffi::c_char; + + let mut error_msg = vec![0u8; 256]; // Error message buffer + let error_msg_ptr = error_msg.as_mut_ptr() as *mut std::ffi::c_char; + unsafe { - let result = groth16_api_verify( - &mut ProofResult { - proof: CString::new(proof).unwrap().into_raw(), - public_signals: CString::new(signals).unwrap().into_raw(), - }, - vkey_json_cstr.as_ptr(), + let result = groth16_prover_zkey_file( + zkey_path.as_ptr() as *const std::ffi::c_char, + wtns_buffer.as_ptr() as *const std::os::raw::c_void, // Witness buffer + wtns_size, + proof_ptr, + &mut proof_size, + public_ptr, + &mut public_size, + error_msg_ptr, + error_msg.len() as u64, ); - Ok(result) + if result != 0 { + let error_string = std::ffi::CStr::from_ptr(error_msg_ptr) + .to_string_lossy() + .into_owned(); + return Err(anyhow::anyhow!("Proof generation failed: {}", error_string)); + } + // Convert both strings + let proof = std::ffi::CStr::from_ptr(proof_ptr) + .to_string_lossy() + .into_owned(); + let public_signals = std::ffi::CStr::from_ptr(public_ptr) + .to_string_lossy() + .into_owned(); + Ok(ProofResult { + proof, + public_signals, + }) } } -/// Generate a groth16 proof using a specific zkey. Inputs are expected to be base 10 encoded -/// strings. Returns a json encoded proof and public signals. -pub fn generate_proof( - zkey_path: &str, - inputs: std::collections::HashMap>, - witness_fn: WtnsFn, -) -> Result { - // Form the inputs - let bigint_inputs = inputs - .into_iter() - .map(|(k, v)| { - ( - k, - v.into_iter() - .map(|i| BigInt::from_str(&i).unwrap()) - .collect(), - ) - }) - .collect(); - - let mut wtns = witness_fn(bigint_inputs) - .into_iter() - .map(|w| w.to_biguint().unwrap()) - .flat_map(|v| { - let mut bytes = v.to_bytes_le(); - bytes.resize(32, 0); - bytes - }) - .collect::>(); - - // Convert Rust strings to C strings - let zkey_cstr = CString::new(zkey_path).context("Failed to create CString for zkey path")?; +/// Wrapper for `groth16_verify` +pub fn groth16_verify_wrapper(proof: &str, inputs: &str, verification_key: &str) -> Result { + let proof_cstr = std::ffi::CString::new(proof).unwrap(); + let inputs_cstr = std::ffi::CString::new(inputs).unwrap(); + let verification_key_cstr = std::ffi::CString::new(verification_key).unwrap(); + let mut error_msg = vec![0u8; 256]; // Error message buffer + let error_msg_ptr = error_msg.as_mut_ptr() as *mut std::ffi::c_char; unsafe { - let proof_ptr = - groth16_api_prove(zkey_cstr.as_ptr(), wtns.as_mut_ptr(), wtns.len() as c_uint); - - if proof_ptr.is_null() { - return Err(anyhow::anyhow!("Proof generation failed")); + let result = groth16_verify( + proof_cstr.as_ptr() as *const std::ffi::c_char, + inputs_cstr.as_ptr() as *const std::ffi::c_char, + verification_key_cstr.as_ptr() as *const std::ffi::c_char, + error_msg_ptr, + error_msg.len() as u64, + ); + if result == 2 { + let error_string = std::ffi::CStr::from_ptr(error_msg_ptr) + .to_string_lossy() + .into_owned(); + return Err(anyhow::anyhow!( + "Proof verification failed: {}", + error_string + )); } - - // Convert both strings - let result = &*proof_ptr; - let proof = std::ffi::CStr::from_ptr(result.proof) - .to_string_lossy() - .into_owned(); - let public_signals = std::ffi::CStr::from_ptr(result.public_signals) - .to_string_lossy() - .into_owned(); - free_proof_result(proof_ptr); - Ok(format!( - "{{ \"proof\": {proof},\"signals\": {public_signals}}}" - )) + Ok(result == 0) } } #[cfg(test)] mod tests { - use anyhow::bail; use anyhow::Result; use num_bigint::BigInt; - use std::collections::HashMap; - use std::str::FromStr; + use std::{collections::HashMap, str::FromStr}; + + use crate::{parse_bigints_to_witness, WtnsFn}; rust_witness::witness!(multiplier2); rust_witness::witness!(keccak256256test); @@ -211,6 +219,28 @@ mod tests { inputs } + fn compute_witness( + inputs: HashMap>, + witness_fn: WtnsFn, + ) -> Result> { + // Form the inputs + let bigint_inputs = inputs + .into_iter() + .map(|(k, v)| { + ( + k, + v.into_iter() + .map(|i| BigInt::from_str(&i).unwrap()) + .collect(), + ) + }) + .collect(); + + let wtns: Vec = witness_fn(bigint_inputs); + let witnesscalc_wtns = parse_bigints_to_witness(wtns)?; + Ok(witnesscalc_wtns) + } + #[test] fn test_prove_rapidsnark() -> Result<()> { // Create a new MoproCircom instance @@ -222,15 +252,22 @@ mod tests { ) .unwrap(); let b = BigInt::from(1u8); - // let c = a.clone() * b.clone(); inputs.insert("a".to_string(), vec![a.to_string()]); inputs.insert("b".to_string(), vec![b.to_string()]); - let proof_json = super::generate_proof(&zkey_path, inputs, multiplier2_witness)?; - let valid = super::verify_proof(&zkey_path, proof_json)?; - if !valid { - bail!("Proof is invalid"); - } + // Generate Witness Buffer + let wtns_buffer = compute_witness(inputs, multiplier2_witness)?; + + // Generate Proof + let proof_result = super::groth16_prover_zkey_file_wrapper(&zkey_path, wtns_buffer)?; + + let vkey = std::fs::read_to_string("./test-vectors/multiplier2.vkey.json")?; + let valid = super::groth16_verify_wrapper( + &proof_result.proof, + &proof_result.public_signals, + &vkey, + )?; + assert!(valid); Ok(()) } @@ -246,12 +283,21 @@ mod tests { let inputs = bytes_to_circuit_inputs(&input_vec); + // Generate Witness Buffer + let wtns_buffer = compute_witness(inputs, keccak256256test_witness)?; + let wtns_data = std::fs::read("./test-vectors/keccak256_256_test.wtns")?; + assert_eq!(wtns_buffer, wtns_data); + // Generate Proof - let proof_json = super::generate_proof(&zkey_path, inputs, keccak256256test_witness)?; - let valid = super::verify_proof(&zkey_path, proof_json)?; - if !valid { - bail!("Proof is invalid"); - } + let proof_result = super::groth16_prover_zkey_file_wrapper(&zkey_path, wtns_buffer)?; + + let vkey = std::fs::read_to_string("./test-vectors/keccak256_256_test.vkey.json")?; + let valid = super::groth16_verify_wrapper( + &proof_result.proof, + &proof_result.public_signals, + &vkey, + )?; + assert!(valid); Ok(()) } } diff --git a/test-vectors/keccak256_256_test.vkey.json b/test-vectors/keccak256_256_test.vkey.json new file mode 100644 index 0000000..9a51e61 --- /dev/null +++ b/test-vectors/keccak256_256_test.vkey.json @@ -0,0 +1,1369 @@ +{ + "protocol": "groth16", + "curve": "bn128", + "nPublic": 256, + "vk_alpha_1": [ + "20491192805390485299153009773594534940189261866228447918068658471970481763042", + "9383485363053290200918347156157836566562967994039712273449902621266178545958", + "1" + ], + "vk_beta_2": [ + [ + "6375614351688725206403948262868962793625744043794305715222011528459656738731", + "4252822878758300859123897981450591353533073413197771768651442665752259397132" + ], + [ + "10505242626370262277552901082094356697409835680220590971873171140371331206856", + "21847035105528745403288232691147584728191162732299865338377159692350059136679" + ], + [ + "1", + "0" + ] + ], + "vk_gamma_2": [ + [ + "10857046999023057135944570762232829481370756359578518086990519993285655852781", + "11559732032986387107991004021392285783925812861821192530917403151452391805634" + ], + [ + "8495653923123431417604973247489272438418190587263600148770280649306958101930", + "4082367875863433681332203403145435568316851327593401208105741076214120093531" + ], + [ + "1", + "0" + ] + ], + "vk_delta_2": [ + [ + "6297894437972645638149489686175262957505034263069298804658866776802361905289", + "18872138360647554907394630188964714636901196967663673779680925559295276005060" + ], + [ + "9065427428788736973390346911309315932876177420602119929009211552431568022098", + "5501951161405727786894274586090689595700009501865059342728074301573950458533" + ], + [ + "1", + "0" + ] + ], + "vk_alphabeta_12": [ + [ + [ + "2029413683389138792403550203267699914886160938906632433982220835551125967885", + "21072700047562757817161031222997517981543347628379360635925549008442030252106" + ], + [ + "5940354580057074848093997050200682056184807770593307860589430076672439820312", + "12156638873931618554171829126792193045421052652279363021382169897324752428276" + ], + [ + "7898200236362823042373859371574133993780991612861777490112507062703164551277", + "7074218545237549455313236346927434013100842096812539264420499035217050630853" + ] + ], + [ + [ + "7077479683546002997211712695946002074877511277312570035766170199895071832130", + "10093483419865920389913245021038182291233451549023025229112148274109565435465" + ], + [ + "4595479056700221319381530156280926371456704509942304414423590385166031118820", + "19831328484489333784475432780421641293929726139240675179672856274388269393268" + ], + [ + "11934129596455521040620786944827826205713621633706285934057045369193958244500", + "8037395052364110730298837004334506829870972346962140206007064471173334027475" + ] + ] + ], + "IC": [ + [ + "13542259662509880697115304753079295881603013205230108921372666701952188889347", + "16290951981141655829833123347473801604028067399701248382689670382175085808746", + "1" + ], + [ + "13082126331333440774622268395738581470262292173868544944507934020066118633285", + "7693312185311232730363487546717481865062704171023505644483149378301037211718", + "1" + ], + [ + "58200301638315296346777605528378481634206405868461427769340586412213455902", + "15315377082129691349591807947915080910119251657303541927869104779886420033028", + "1" + ], + [ + "13450724404320651835447108239754980976592743467220750474974173953267106002661", + "4386233626506256534814695927591116716120109801061602352809157757956743606113", + "1" + ], + [ + "6839522180679610099377753360248154413817353976398168145481302321072799493032", + "14784285549980127748106353023204961592305894675905800423629513732135913152279", + "1" + ], + [ + "8644547939308757996365465244401261920694917363877190081876691849071630259296", + "14477508437454576270983840662048749132237650837099765663350707272588027697334", + "1" + ], + [ + "4025377698882864397002883160528465345540277809810971796911546862391020095519", + "6692175354583728638182661406375245081020634644768165117639005620776940735679", + "1" + ], + [ + "12910391500661093127174326721882930012490868886571010551334421806397776017992", + "18746240914402394053536836889397713807805928270489509932384009803994673039935", + "1" + ], + [ + "16623071837076811454963616836421703399512416275406128221422369378751161149633", + "11047240907810940455307480208133549910004809886562039068276902241865701693442", + "1" + ], + [ + "8347654796061712136463776970889905314687267067221470253510608690824081593882", + "14310867448367453470010733306583217183983046953111793736733865651453559546867", + "1" + ], + [ + "12279088776829207044249086530015864356564593899197115132111154160503192306589", + "17012805365511805554436248232241739000143722699694205805853676655199674078283", + "1" + ], + [ + "19760431495779714174632524880356259998232797192332617173159032642611124634923", + "20846024414499976586391444717837974656280218817734347681793253542166557363152", + "1" + ], + [ + "7769191438341711799975100930945482073966776725882615943408401484417606589619", + "10208467762644113675474858804394266792686997313048154367664093547577508501702", + "1" + ], + [ + "12031944135980517064355924004344926830445696899214035790120522826390571949755", + "460668335481966618470033749673512351456594545634718960323975037568115236990", + "1" + ], + [ + "1768589318487981400761132905993361554717305967991229947744349023249302858967", + "11222935748104268462809437804111026203314583199225624844936920255728523361035", + "1" + ], + [ + "6603137648975378676224132808074511620843193383836397832522677022146905650469", + "20876227442535978602927479085868437090307180360825613461600643405002711427157", + "1" + ], + [ + "17555683597161092742602080698934466916888416725917542420881073858848631126092", + "1032321687809645981798110127040503358232697270626146864608072624979895296238", + "1" + ], + [ + "11687586409192510668766142006307590801852767717147770878264380394101863096841", + "8434453703032527944760973779292699135687734059841415741871762317190553889213", + "1" + ], + [ + "15269591960356805387242294109846896313467457733050807879561075875527678899855", + "14748902888678628598938023713235054422833397164598358626308045099597516094105", + "1" + ], + [ + "7699606166724469976723202853711822309477026958070475174013036751735069000004", + "4303159397355634581118786161268971284987072570613174331442271675156887416571", + "1" + ], + [ + "7224179211122240530334681228447940047310118723750051163282238408175266161412", + "3213996564686175236088716389067889668822474639289996252351529189459900723364", + "1" + ], + [ + "1675557144263056933480601584021711069053987483625639715171119219368766357882", + "5862410450764844385612551190743765003801066039073066383193917310144487765763", + "1" + ], + [ + "12429676091109943055844380020669934613373934381411936740296695746459351361956", + "544902560604230177248092262263106314548933429464453774204926946262009371524", + "1" + ], + [ + "1565782269471802274261220850311774788001673743985938139953107227459973068732", + "15133613253038074758891372848711651598251596987139778912198880142986457738176", + "1" + ], + [ + "15072644516245937554898690390382390962339387095966853006634156918543415641873", + "17011412779701620223766503014330069184139602518536850498663212680453041986683", + "1" + ], + [ + "1710117522386370930809829420526442203568102919051537241852002050151161207407", + "16401505777498916373285734116507328461262773063769512416561731700724314406074", + "1" + ], + [ + "5590565201828702900054993166345341357867612858494313457457266959716924634592", + "3216992338420841614485408449315387103593076253111079624976989082268446181076", + "1" + ], + [ + "21475434886932772100832494950642543967059386398342302293776209893725061815544", + "9615823734414824804662335377630088713255628868620057110133506104525314530749", + "1" + ], + [ + "8116705036281063945005946844799592429108318698675708050192009646625713713347", + "21002019527838758185035746177119857292336765301276303781358812552379492161239", + "1" + ], + [ + "4619841793245034379994332212962558581974961321360503701809283519840931112750", + "2135455807787518802888186912095326639994561225189186248564992449653048116030", + "1" + ], + [ + "17744072614015060082949606811390195521863813508410309028210203135074597100614", + "9267684710669417097452688901976353746533122984953430459208976882166104587736", + "1" + ], + [ + "9878486120031918269596320905301901348308738033553004472235688008706194039104", + "6189763047749360827723886893014728107274306260991236960269572435999231156524", + "1" + ], + [ + "11676521593049147802563499977836397057296834267690416813487773226741110269954", + "18159509802362747182987027945071153775741020127956442988221665168808574953319", + "1" + ], + [ + "12998491112541801214913722547975362191920780593101438028167030774879443883328", + "18557073129974611090065172632243679269633374934080571135273071829588390619263", + "1" + ], + [ + "15074775271197395931775628632663177827143651637604107513312968304985024836508", + "3308563960102270445047507974327084690557415715960800227265066713870696375867", + "1" + ], + [ + "1723996927298477671369978207239012883777681249466116910659828538337394306951", + "11054205932344590499932616201896779427372271252586070437679035947664751631544", + "1" + ], + [ + "7631934247236323263644471286770133410370134101129767015069955916933853171167", + "17736909389705038378756538518172600004939724152696572987825834794361827692573", + "1" + ], + [ + "20906860538067171220208946952538613187348362732962843693364371614520148640873", + "13827718710082801214243582961097774256106848176463694309897524514256670630891", + "1" + ], + [ + "7741550787660599040029625478206814121300820833283108872742885793079387974023", + "4730475014513971294673599799316547253169413541570646881150763432336762980544", + "1" + ], + [ + "20486604084430508256926000176545438254619688394153810864345404059028779012765", + "19709838147609771220902049587751078630110859193458561635808509163596402859084", + "1" + ], + [ + "995337393402531767417041378878637232319927589639587606303341356166860829550", + "13807522014973724874276143406647228688864094933196070791743622154068472153913", + "1" + ], + [ + "986747614114682959696136927439444711291067057207893833573170629990066700143", + "14659399718256464840381165482215793401858001528961229398364175289445347562113", + "1" + ], + [ + "8364658009300441087859787684317498497548560383464895268519406627012141277225", + "21632032049528123656516943180227563244419836283751274959398946736356715115048", + "1" + ], + [ + "12688051498135816204134334599263722230299433591840350091470102297359960440457", + "10674193678066618184555607072184963395888181632758427253162113355133302420032", + "1" + ], + [ + "302919583354682922225109897573924724292957450043320313405886956524153340058", + "2757324831658687107100263247093466881812091795439129491561687021335226652139", + "1" + ], + [ + "3477477405264024731545887580769436945813282424508375160216784747570096657234", + "6373646930101112913978600904456551980730853116610845715772316603865786407468", + "1" + ], + [ + "9546811583372708582899851460304187994044120130983987178282605869659536377343", + "11728161765613305049227457095562711599217957021523180181021359425619357857885", + "1" + ], + [ + "17113573972240840826851876063808109662242592983480720093358460277096606542082", + "6047497017185336175455399376653799527970508716871768137462655004007414691681", + "1" + ], + [ + "17129771040446313243305419180515253630151478292087768419269171844911215366859", + "3273933181257200504590236973694828413949939934930665622068020333627789060609", + "1" + ], + [ + "18458507373267613570594432517488263449645112614298197101672256363585747765166", + "6858141932659784626289617654147144202729494104009096618906541883793411997019", + "1" + ], + [ + "18375697036834941632408226650394507063373985318086412078120853678764458188539", + "114880147991553845474967675866233808852673712708354445628896765989837141864", + "1" + ], + [ + "7090347436221625935024505345537029308087185776582899927550173360026894533989", + "19216046090994490228593533352713088761321243996678209361584023544742841769637", + "1" + ], + [ + "5256802124863824601801809699338525432338667145021784792131679652042661229378", + "19908616704229622811829429018563478086367860113984527373600669389031302844418", + "1" + ], + [ + "5183797023848914792967996619165740562314220774203417266271178566176203543598", + "936933062577717357774976387099067939788895283372733090579538779185924155987", + "1" + ], + [ + "13194036953375598185848259746778185291626939498977911891702655820383587368652", + "20426013922663216394525292387922292563237960697248329569742906076308425715429", + "1" + ], + [ + "20956806568264858578512880515416879987827856195873791162261632241054456011497", + "18144014473936996305259914058380834240157003980268812354542521405793250571112", + "1" + ], + [ + "17315250252788040473480063274536011429890246457607685853805308447736902409072", + "1499900499969467904102294254643109936714909045249696895586955169050772783738", + "1" + ], + [ + "17845840734330757015603022518799452730499551082056848750170256138992463215049", + "3715603172088154544115685117402497819437651197761119655216013239033221123581", + "1" + ], + [ + "11541036823507062883285231305710660177933758804987333571401483046859693641427", + "18288594022185904242026971880700318686883330695719086059183209194914713279153", + "1" + ], + [ + "18584012092574511205343819598450714995395039967904662854837399663225207620722", + "19878205434457881837184343447280848153711826320308120515793448220328653513978", + "1" + ], + [ + "21618563263608140046373350044193377276517537241842373269449569527181351559068", + "15626776544780718007230385792607834957600999519619192054027292991445833898094", + "1" + ], + [ + "17873457089782092242257742496087301500011538139446998011733159459322356392607", + "11185898958545372070499417816688158270049499316743096120142414659121219805925", + "1" + ], + [ + "4719888384823951370300228262648478093420876143488437297182653207480140571422", + "19281314968611076814188913307346543461220018238174657830916776608146379692700", + "1" + ], + [ + "6890841251133627576393526346719318792038802575265206880805523454173302973618", + "21032562133119483413041367532094407573604389983420947895631852866650578510972", + "1" + ], + [ + "6784753120735866295671416566348123776984223395293971348627705388777036829831", + "16987688376058939600840682430236901347390264348042743509887752023837345949535", + "1" + ], + [ + "12996724683556610945860607067325423672939262909891277759036778647198799453492", + "4431448747488303205336656144759735292171122922882014751476932984076774637789", + "1" + ], + [ + "6289520303845040738036646320842828181409077268090344368566773855025579995317", + "3023424231097538524163276510329163523968799426365600591547087493885713506794", + "1" + ], + [ + "20493212667201009344108837122246137785839121964274306619033994763059579433234", + "14897944635047977776638615941825729114464216656543002180369011393812482633054", + "1" + ], + [ + "5037286480772556301312115195158961608026625367083912101996778524023149612377", + "11952095786475728271355791765359072920359923433133239981645847524862974726764", + "1" + ], + [ + "3211799190951327294384832112581887327000900739873461968599999050663933385735", + "2534590993484712290078462824835829948643277881293311384168215468005253279673", + "1" + ], + [ + "16508666611123584576274899155036758745492285885264063063230841339988230585132", + "8369278115345694554042768125052559704443465113143355106388959180305460872877", + "1" + ], + [ + "18022759882454065935309848488460880217986965457653835198252392363897551823585", + "19008304768635615117808324018635016282880206243189036554216256116172186040788", + "1" + ], + [ + "14242877197850317496218563043485296627607326788511234243999828951735069973497", + "16609174802465179231428220793302363782907877666243423276664202605668563440515", + "1" + ], + [ + "10443736447362997608694586222281250439672359609755302006855935453484432588281", + "8692768200275777656389133610043080664420691778835435662962558434085862560115", + "1" + ], + [ + "4688998320826362387388315889737943013400953709520481965447902658509727918047", + "3210529054344656893051427465077527412445316238633900341614506431359147025553", + "1" + ], + [ + "11974231124380544756496117509566710038551766039744736069595279158393916625549", + "15876683324695103073282285606127155325556014907126629361561920710250840070836", + "1" + ], + [ + "21491611080121828413595121351825462502849585726482550987591132081392545015226", + "7287008694291712777718386958531194588194388466451975667789982319985924463207", + "1" + ], + [ + "8091286407116109084953852305109794270123712369180562588499489350506144517651", + "12466355577116021093148122630648994930762874357419383756850157818868230733910", + "1" + ], + [ + "1487957556086419043123981875194528785923231986532567596150444220978040677285", + "13060375865809040070622279880026768282142021544757960064658984437547109525569", + "1" + ], + [ + "17730235564752500501079777161133024342397575785537876696312420630604969182448", + "5683465031169804016306654985092965332358503708932304104232432536478995662079", + "1" + ], + [ + "8022031766144342915106611886153875373528189223620313456641643710459315699089", + "19357425568527391000403538694865961525982289928555969578546372500925002639529", + "1" + ], + [ + "11662344265976714496979215126764772267353039845647482179195635242950376781867", + "4041112462122137849134459584538070581626602286770083014369063024471847106121", + "1" + ], + [ + "149834378396447912968132141117101724970768718738818632013752015746874545460", + "12282161758984627706396925614989744525199672962062075006111337090502862817503", + "1" + ], + [ + "10745017193573665725873313796852462612676645205926505405668577199568839879820", + "11877987418115536322083141944437238650475219041213640191809889000992418574366", + "1" + ], + [ + "21082023554424342634215801235190000205844731896901227109939407058638014165695", + "2612247946677246281436591500935578602581601073077387376401627448148517685514", + "1" + ], + [ + "16426624752703168828562154901566765054020908933095124468370546121055960416741", + "14808132680322502050241717721204534327645715897477791625145834505002091328419", + "1" + ], + [ + "7310573966812929608002743594865685703488004403922575342907981227778769071047", + "4918940012000040456840845483690113553489641965980324252852334915603910190434", + "1" + ], + [ + "18307397127602492316812618442625486555752227462239168274931440092948391853645", + "13895159585265579581650187340706946051025566275033684065934979974994933255685", + "1" + ], + [ + "10660933259546478342333566872392492604305628202317133602039975648106971745435", + "3888202969762282333132958065460762495569384128077932531826070162823961466176", + "1" + ], + [ + "7012098416178176322048772013903672267340219556796883852902843978080818332253", + "1300558525733020652729085489450937469892937034628192149120817751264909970420", + "1" + ], + [ + "17507338688908020730901733031659287939453475371228901054928372864194606309014", + "4350762995147615402639284888080148017845784934851952490140092499947423214326", + "1" + ], + [ + "3796910090431286521931815917393900011525629617201238031845450903388292751738", + "5195919077328747974248384427674711455191877285732192394787234893574421316964", + "1" + ], + [ + "18368293056982821325461262382472824353569250896749074188618979353640735455565", + "20578873380782202490378416704237887121582051225120251495147252652094617915940", + "1" + ], + [ + "17790348273682063552745967949852713644270343506924611319827637764269295970625", + "20917263242321087538073406580762820006627418366314404965334975399252540647904", + "1" + ], + [ + "15502173990752614847769394345709719881627415208302514808724684971141676723515", + "13693249320947600134811722967908173296971666804086397640333013241306304006614", + "1" + ], + [ + "7224160890615844571673190081401513140517084659817577587091340097758624290700", + "3739522679395754694299803150078881150038979112852196623130176421735474682896", + "1" + ], + [ + "7311914555369394766185313642542415348607635642547787063890117271471663115615", + "21183119043246363281069847815463637014927946150265737657962645418064096055239", + "1" + ], + [ + "12231825563885303613082112517432006973013943473661272274786699212883033345251", + "7834989731249682304533078318056723461185561439096824330066948052640750424869", + "1" + ], + [ + "15366808076912457447373673440222909661336093062440671757004545893084397409210", + "1720236051283417918665755798156174900129834260766531246382207077671863578091", + "1" + ], + [ + "16277919843816420418868280454411139876668461141522424694995897116800682748425", + "15111041506968509856232482718631023067789466191636637737293228194950584844735", + "1" + ], + [ + "811518670100786075338293968068123837414836757157870450339538763310243509692", + "10688517075015551354843233748904028580004605572069140468904400644751731029752", + "1" + ], + [ + "17913076733563914218552422656893485932762784045130115225591490502091503673292", + "7720838496250691581455083270678458369678426714123522348978343940295481803356", + "1" + ], + [ + "13093559812848940692896019978665182660623691372967780546624067909759330784297", + "1601703025862782933308276037259112990523403058815420287478456025205188753869", + "1" + ], + [ + "18468057078737409722044031139092695908968064611120556200479446395511156207366", + "5696560629557878789760709420717153481920004256436820641459372081677954502968", + "1" + ], + [ + "4847400538473325429613833624124094711831158219198270754237137500500813657364", + "19572998849985736581925536066830192464020235626049679774540149812359288583244", + "1" + ], + [ + "21868967521062490937055068252010019416497570701019924966787244234019244522890", + "6458679510389617268959172475618459587011108744399658430806055449318075725373", + "1" + ], + [ + "11164777485714395696776976005528116782666099662416133887082986639906772724822", + "2406629834569330592443278110900782059619744998042669678678660346392165934005", + "1" + ], + [ + "15590986240463464173877396405605802975054508926729375082014820291218688533643", + "12499492845368029513191745297035453316561318947893804596726403860466955470657", + "1" + ], + [ + "14066293334343356364579445211989467783227859089399217726677915662802406036354", + "17856901313729663936452736434023331263601688542713347446700375850104846238563", + "1" + ], + [ + "18790213900606420112578832745578638020866727339191056767215865388854606000744", + "21566464867982373066539028581883022940579005871846164715527433243557961933009", + "1" + ], + [ + "943052766755770768574344299144536806985977737014299041665968121137606670276", + "12538838296824105142785474257053658629772010146732999947320307693180045629449", + "1" + ], + [ + "1394625967149175647492506789439011412569026780640177079525257699741504876465", + "20030195718723690517956504998000201957749162229597281441439907286023978547340", + "1" + ], + [ + "20785108166064695952999251209122060392353962766939000399041233258644260023451", + "2063653829180232016741927983139955712791589161817957012152382002401316172816", + "1" + ], + [ + "4401569052825827442824742613583058215671290842681797137668053691181336384023", + "11837211095153126110003444267416417211205531661146126923692649257468220742111", + "1" + ], + [ + "6281671468609849911296192178201266517331333553927654081218073279061997670669", + "20760808772370754518539001615614131774556222412417133502257651014636167336109", + "1" + ], + [ + "13179322636067876236064900433088616649674953649087546759755482778569333139635", + "2883935617896233845766869417287674199306750858938284046657422763380668808155", + "1" + ], + [ + "15850067367479923664401467834568081397857797703561509005333901655172112569114", + "12526032943789779686403311197559978484233766113852588365057888678541799721761", + "1" + ], + [ + "3172402558721103652803692537278886951214341238430293278122208398021637110137", + "21133323160438153088289390818632670261857923168332433662039517054196332166652", + "1" + ], + [ + "2842427279344576397774515544710144469335097701860302049303622963696804793846", + "17851608091167581039129891894014707839306452259011787758974011221051723532674", + "1" + ], + [ + "20037274550199823993376355031614675941358850013579509146114971942899867968380", + "8473844024624005045506626656654045931286169921468516239909540910027909733122", + "1" + ], + [ + "8009187814206496250334778674613484199770100159580819179500052288236555566531", + "10733338679647370126933905544670427099089334612480420436382265072671640901081", + "1" + ], + [ + "14924324428621097621334615052208219579170163594430315493623320538079340099456", + "20836438898410956489581755986810818241436369655948418687162000446698311189064", + "1" + ], + [ + "1339698292606141440413780076539532034019812392859346803361683305766437958512", + "9281154664203829949166268558578115542897603446388350497322074394992372314789", + "1" + ], + [ + "9919433536231361053534184954536716474067205944365647021789043107666892850557", + "4212646733898859753296778983796128354073818575213153557713807925751896612258", + "1" + ], + [ + "5866976257849220972671822633596626127510922339492761030715519402614454540398", + "21044252929830524512542966674007198276773140829945294528717013182738014064059", + "1" + ], + [ + "14029216486091505186158637754865762730187101722394495575488141512137216986004", + "15302855662145705594164048335874857144080359866252575250140153067101575931559", + "1" + ], + [ + "3164399619927006113834801411907237508682611422510839896103074661823800989383", + "6047612369340979741540523734107713571422575022264145818884318277623548435897", + "1" + ], + [ + "20123842637242119368869046302438734325052196031119627675936106240785097842563", + "12875608924721412783618192766859658089879992614671089038629961062887712788092", + "1" + ], + [ + "9888641911079308478441591091528502537323650578262010618270080596306808020783", + "2822598725185631029534024611310031574891834533950681827419436951230726124911", + "1" + ], + [ + "11339454920319003791544793234718455109170357304281198142872817911058009688343", + "7617873004469356018580069292453429618507811982769851465095326836823239616872", + "1" + ], + [ + "18169719099116717983644473717689340153685860961126137365541784770475465107150", + "3654460509623135914919943943370799585418263850693381308007247821812662569464", + "1" + ], + [ + "11470376097863614380345793364350530085575586244271975680966681432827543814945", + "21646741955542044463099041235438358189394277359782174832145628223541782193107", + "1" + ], + [ + "2132665893512171533650768712239787850123196702813749388827733618081612709593", + "11017138100325095095043600498205856171358184096238508639669322534333410906233", + "1" + ], + [ + "3479712203183533425039512068489500855181707898668566683382736067868564933399", + "6065294060224399483279811241974264472125469878280048762779408791908037506963", + "1" + ], + [ + "12051914472511553979153882423795467452527400898840966444746724379300532867133", + "2013994799300144662063599151587652748460374362497525901430307982919416439398", + "1" + ], + [ + "13408427555500521368428360014651360369885112210737208455953827811802855327031", + "13252329736600458095323309776142999363647911314584352533678566418254054698504", + "1" + ], + [ + "9253770946644583704694802615117594314420792172611823771437179970687573115272", + "6896833203409898225407851036307267027980020781516686412109866019629525482018", + "1" + ], + [ + "6645322302568177119169390661365560601364916039358203514272419319576115718808", + "114158498925813385311997373017781256011908512992873497972390303480279468576", + "1" + ], + [ + "3802711766728395263742064317156713168878333336414210593831839915363386714176", + "7389155633529535629978227179420791145842777789712362624140276330582913978287", + "1" + ], + [ + "10632894079972304901673631751655695766306189902367579438851525145418088479216", + "20815194024516487874958947876157023103467137309295286816510473777410939152075", + "1" + ], + [ + "18989121237394675729608003379737597559411053835718700407171117146682433790885", + "12455876533451348463272336422716677924526044209400259661262835904963906572322", + "1" + ], + [ + "12066384912762049147886163391644048302044568982546711201384015620388410848420", + "3858673116136350944818866487314789528543113805375870618249518940197756952222", + "1" + ], + [ + "18510010779837736509624592065557383038405265761427462819449951666109156932076", + "20150069793352698671939143277389483495495779797860246562402801352462679704553", + "1" + ], + [ + "17976165070300922535532769457017545333359913788677415108432975007989138880724", + "21222989375465860455662715335900887504848841320152262624925044671354845253971", + "1" + ], + [ + "6687878255213508829356471332830152652571466313385376559682631231258561182420", + "16072508808032810761145329729030408887819054146015366737195555870366596677541", + "1" + ], + [ + "12495827593965282750601312841845812234862884619249279601611825990544039212472", + "14766397687046580108392840416981523812986500515601630371814565967752168739755", + "1" + ], + [ + "9110928577674410619086972459957895207061979772105620960446487881942467943856", + "6313228230308850609025035245220877052358606446953661391296399873626163624319", + "1" + ], + [ + "9334213204944324351914701363591195365307166242984121083875422040297255173227", + "17319578388733220639347948010592041278594108310652590660965382399365816715280", + "1" + ], + [ + "18050441425045976978163850870965879362356164220621088267255859705288234709304", + "21298452608797602099370817057648942220213055647134660246022502952895083330287", + "1" + ], + [ + "2270076940214559396124768767887883225241733895204783407212310656101659327844", + "11902256533041740680959456802933029658497254703039733904957395322377309449590", + "1" + ], + [ + "14328072216475145957550858651250265286542825660817697957361164491269452594119", + "11138299445608629329807265440738504462481027766233077953969734906014212763517", + "1" + ], + [ + "1077716600859735037099762925113721145514952817235230456277175207317573609743", + "12694417592679815990009283929007022091025363303595194711981492757299265248923", + "1" + ], + [ + "9515880048301936511986517536574392117332876754210102803190496023492913005100", + "17480012255234416820489421761944283416017683657888153464414357430576751561644", + "1" + ], + [ + "1407746594030977811088818931613213045977859994932247573400802428408519214707", + "21660697872300590530300570205852487478995068881299239672846415239599743577834", + "1" + ], + [ + "17258192404296768901578670645275929562849964094680488693236569011689921912261", + "17235827187559479231098734848148334441405800757815650417435150333103026555375", + "1" + ], + [ + "10782195183454981319390772558164327743312068654383781744535095507197188692570", + "14789743611601015322775763609362565369011783039437912764843090590156204479014", + "1" + ], + [ + "21590853472356075023953739891330814712804708503454409142117076855192573141113", + "2067994883499577539605416961677316613022988503963666530532750301922333201366", + "1" + ], + [ + "16615163869073211844787432226672588276066957933992543882940474715744865996646", + "18580846249423301482869732468459311850682416388881803154019761884878189404832", + "1" + ], + [ + "9677985795998288779035132379281089326854605796808583601412691124844654867490", + "3933358371195293820511157983231516769554888335903516054041755940418324030141", + "1" + ], + [ + "17687499372615798675903190968180084942286312559952378859019359864249009311139", + "6253016206729952530523028663944172872967115690350506617863443049146416383715", + "1" + ], + [ + "8130720815532276555038787213036773077376794351891167601485691315227116299206", + "11890283160793159383595608372642819152487031439786898436540728909109549234725", + "1" + ], + [ + "412279211999975832556718717052332936522562609494525761544648510507158865640", + "6029432489180358037496828558588982404483834343303134681090436055513837680965", + "1" + ], + [ + "4508853380233315669920782814853892619628542512480824568497257243601768790245", + "17178832026180404399662190488202072897128097603411213610407442812564300880484", + "1" + ], + [ + "7133205509963665212148458894342249569477102461450891275214649127169763613968", + "18748997093102599535012794531331230807051413400438794874172886823829851669405", + "1" + ], + [ + "16615554167111380234646865368645031313966283470892558489776308810012286326453", + "8130216812940156506829877545548902987460486650595921138977535910494010163183", + "1" + ], + [ + "1957499532592380924174900772790425606074624152144417380894042237040290855520", + "15480052780557768506057874152249512649226417033828296031588910067016405050335", + "1" + ], + [ + "3130234012019289910638293673464769072190859781572222521122302462130434151268", + "4385576070752617485347056954300993721054700230832239137921421598581707100980", + "1" + ], + [ + "9896788869745697163476212299007598498020201995067764798028142800694921173156", + "9949488535935667349041388570883592076305778741609734573365081074558900772629", + "1" + ], + [ + "9883320662528937962872941814045325693808614717891049118620722836938497296060", + "5582328512288830327749670973370323010640919240287350077351829364820523239198", + "1" + ], + [ + "12010543715428085397003577081328766485033498300098061183905716979106077540648", + "6331283969430660065144228572365623732956874272936086727551036796123924849636", + "1" + ], + [ + "18579820072094703170500344659704754806785171113683305793949928833092116354249", + "19558580103083995841933258777009121601951034908039059624856370302672634982486", + "1" + ], + [ + "9187060497136834904910060540968086811702594340385790488404419663670076194143", + "6827951830593717689099003549821934873794596479367333220951107054916345311046", + "1" + ], + [ + "17283895809472233251020266081807253573576777673279848744661530154400577513700", + "4135816804463302338270870461693180248772374981608798086038486869249721220987", + "1" + ], + [ + "3187821431560734485759435370201856636554720663195386278410225198599199284173", + "2107442017090522109718249143144678874389365990155805795168873520775420404601", + "1" + ], + [ + "3489136353340071820146189369499820557419590330125426200304334853685655568618", + "2289457827423334581018601652596800113985807263834061921708316217631521674258", + "1" + ], + [ + "15179108791805228008554030621939194217525245528848349321390553235099021980068", + "15703748479756965193478777785840273309016209673382933861389697023285524630968", + "1" + ], + [ + "9953633869498994409070760560698045922167519037205327072263329388151995224874", + "5480070171407198689667459695796392337266915105573922983500801875569873375106", + "1" + ], + [ + "18882090647627957118797326367280560875712856370337104563818525012023451401384", + "20098942971518004361660919226551541239648151351614177310207680751884299107143", + "1" + ], + [ + "4336824375964110123055501449077235519744502967736614797959213096840792279315", + "11478789196252962696980579198159411453255495427343515896275823371088673263263", + "1" + ], + [ + "5665831661616995849901101367997185983211544399962646704056940404415642195162", + "3922601290618122323274641314378235935252124238582972559151790849065548715414", + "1" + ], + [ + "10250756873091316530148095346138839472360090323032624750830832147620295077720", + "5149406332642059688341737563864534420882456143925496292278427887886042715457", + "1" + ], + [ + "16908161016775920408571795725252717742124620417082187667074862675211379430943", + "14888589352633969806622891065350884653441173700374629997635826824870670217274", + "1" + ], + [ + "18104310573498119562448607891284334258556906211609745773995815119620062303383", + "7803878141512042298299961800197598739112142577724090520091789748484018694281", + "1" + ], + [ + "13667543756896204108488604586872944777657213005621864669264667492016189520849", + "16465079461295557050406310936555482420029198721291324610088167918784702045031", + "1" + ], + [ + "6530940292542565787144911126290284082535575500613440683063715949953584740371", + "17096223438748979315085530115007322187660499049428853263409670834461056245752", + "1" + ], + [ + "1497795205217806677665389117725345881570354338018285721052508748823243859907", + "4630632695955454016998728205831105696045642652163925271933435124328882484207", + "1" + ], + [ + "10632482173340120755425991552797151752907680991097810137086005973763608094759", + "5732495161615198754055122294994400938598259054553862686184546876779062689138", + "1" + ], + [ + "14895110509088250103912971811468445459941660576328364459177199722005698993120", + "9597736171987824512985590647504644088437835949051613985359048568759177628685", + "1" + ], + [ + "14581069318877532041244991780352580780412006841466771845692551991104987103600", + "16832640156817581485180426441941952108912483402556411763826873236990295204204", + "1" + ], + [ + "11647762971769847350118661160346829775560014158335531467112470131142534893312", + "9931512462215746356384885260143587201660396669863853041572478653097893091932", + "1" + ], + [ + "13710342105855680392498223190775506942410981507273401935027046512603519716255", + "3174406910286398083372408901236977594029754970873370212104592393458293855680", + "1" + ], + [ + "68707894481310629386133774348029265668279522893341323886269734283390446112", + "5752229999993008702913523304670237132351331550887013206874210735783326299329", + "1" + ], + [ + "10978747590851975450489736005850252732429560376069168574729764732374755330460", + "3797656416691934078638569519131125575680778417274179266998234226041881200085", + "1" + ], + [ + "13216705495397762166477076638077427960016531613036638365188572060335884685410", + "13848471451628800956447416944291942841254081353281676248059938459836152943832", + "1" + ], + [ + "17807377652495890728512568891183686005645248777568409092052301979249301648762", + "19901579967201229886028794237010241348435590550166053809064718751815403857906", + "1" + ], + [ + "17600734427331819306796480338665959873032975576417299961253767582704337937517", + "15511358823406561955655485928163056191270013817455332622617415607872974313338", + "1" + ], + [ + "19617568111753751951231423530814800764779861315114523052268022283283698909788", + "3723404280487376518401525884942536962005561384659871769985946883193310990706", + "1" + ], + [ + "3273823260520558833311485319179866338143823845382946016409468841404361437257", + "14650989849160436347389474759944100025678762511851655069048593478257948199784", + "1" + ], + [ + "13572416213407780738923738519848459758911357209964078484816527737646429810993", + "886239676683175238181182769456109382367934477382637743628982269471836942783", + "1" + ], + [ + "6400118223055755644978133187348444012424922399026010257412499749670946720768", + "9740556135260616185768366125762457264312245951908483230024937339185699210625", + "1" + ], + [ + "5209417166871631384544273762790687408679961823759491637864458347965552044706", + "7635045645418683268181684955328867666267492242894412859965393285397433246882", + "1" + ], + [ + "2194105488143802775447887105563938087250648761821245022692621144626933128617", + "12479164800118208076803247611899645418146959321276840356719912236044909782083", + "1" + ], + [ + "10553781427042168672342690193359242676438043300286068002352586940513361214263", + "2600926873580817570955039847535308726907952893567611556403304780617535351690", + "1" + ], + [ + "2872862997192354078974138224286521114974696352151605142451759439643695481470", + "15076716189780319378670207071439070983583370013048402881701370321118579859783", + "1" + ], + [ + "4928283091297250116280253517978300465309310745441733375003207250318445781442", + "6441523262947665895467061258217895921172803746092464520803118094555617341651", + "1" + ], + [ + "14977004473194569205633558876798462914866135496429312194918036761804811424404", + "4456152683064107373664250984864609546881111304513741900327788687755476438987", + "1" + ], + [ + "17025352003400096441695465102549393235869156045734566544263076813274071242123", + "903363793993157823890361374167933857966681003075756311436517253000793694973", + "1" + ], + [ + "14890214168783369681767206578267081118678311265429166739720527765726241951462", + "18103053315317548144640883301226181036732996427262573262641124840322147900873", + "1" + ], + [ + "3265122415972582068196312747544871546627805974459674430574001830108219134762", + "4110936289825061158757099127976456310917072682496058260318567802722520470160", + "1" + ], + [ + "13574987188695354607786381665655557900031931081616653007622867065819267592131", + "21727204535494590594545805624652901419163080132507602720832838939594265464035", + "1" + ], + [ + "18937159323429719633253153019611821538757896100916543824676750387496437777037", + "5663968506707568612620402701529147495046111950591241318969223382840537855957", + "1" + ], + [ + "15027977809310463153816211233818662613347161849029402467632457687223577914817", + "17050901382068758654256867752871584741314500599510010672435485144257781787936", + "1" + ], + [ + "21077143964932933945362452876938075674613390201630249865967360379495545967228", + "1772953310142135447008002116808762601135418928528815190049433378168143028478", + "1" + ], + [ + "14477451359072930383778897801033295885717872371659351190758622662186985964013", + "5538972312221211523315839475500034930628568322989453426677155452487263319161", + "1" + ], + [ + "11059074531433606123445748032227646384503680037321094802548590083857153844935", + "12314576498804683916542010525088531046001555376787494640020671637435463865595", + "1" + ], + [ + "13851023365690202693590321796647213795203277532167856766492168575339143976505", + "21493493763722389573671502821817172141233663435472127274247025200539709669861", + "1" + ], + [ + "17398944202640794523921955986276446758368360601297785357449825262459763220896", + "4031337688326207304124041037944702125497851283053555603361030969719358456143", + "1" + ], + [ + "2844284759491298822562355256040359833996243122552856206185944316842222195389", + "2542397550909668851303691118056107579393460396908366011580293242722957999036", + "1" + ], + [ + "4402001909320021371169601106572614061782044748718189023916187039429412086812", + "11987227867349560024476826654728539704306552399742034280068164840087788304072", + "1" + ], + [ + "15736238535328428605163103158300320048584510187742666370550028696260369334962", + "9645135602672113323918435359834385127515490157123528995515267679341510548016", + "1" + ], + [ + "4666693599661170869859443455383200903440067622930020423498750629360061987777", + "11415322487198625700163027781066365189204728309683600689724168691405085667817", + "1" + ], + [ + "9626576670487386232653166230356902662821228612747584092604507510721900347638", + "9356773587555470224517338010068225542747170833033832710643824108546733546837", + "1" + ], + [ + "3136826989802227419475078946134962973472844117438066044749249390799245952450", + "21112152519573813088331259994398323353639064121451412197355674581454300151920", + "1" + ], + [ + "4057650529000515327407364831701197363418424849656396535749849986003791639455", + "422644116984557075261051970484108810997416931267456120243700769528192982251", + "1" + ], + [ + "15508780852428441857547598312588712958012453125004034425144980461995143246279", + "11518389881202963069908761253784999650045785931443698565237513471579452944948", + "1" + ], + [ + "8458011272462172432968598912349373545534665965390793581625238551387810884536", + "6570904141894206807117245467349852731551185412787248037429943630385022713984", + "1" + ], + [ + "2438326499197922246301941691379062431145368676699762759952183170585832587462", + "15529436768663520389495738779249194591607997925123243639785635056983069299687", + "1" + ], + [ + "12765788805996365876986766759333767596593849276501081092874722146636733050165", + "15714508308338106596307540628769097300257103125979200155635335564061650012700", + "1" + ], + [ + "14249620916932069475777516587180806541212722294479531694488997436000405608180", + "21537199799709566813942762389186394147179583973796822348858834588270621611585", + "1" + ], + [ + "4392685787388628327128550626709563830445238542098609165478159666547965817657", + "9316203447785041684480371488559436754659599671154989592057493442645166449906", + "1" + ], + [ + "10632976745973438332234708138454330743156973251314763309260940892419629791051", + "15490109046946787994596353061582260788761293082006431690353666265708566736794", + "1" + ], + [ + "18072225125113806608980321403525892809944678946365718872658721048648078938075", + "21098428983788906641854135669489101196680181756919497998590157228130199462130", + "1" + ], + [ + "5780070246661524703164761755467209278936114712037144095516828082559627269430", + "16629993773429266215990803743689531374641500135385596040890916685195217655270", + "1" + ], + [ + "7253638361066042084037667958119875228328318715466553647342936745205404306515", + "1162851403595582110182140809787309920111083881116331868986488938964226815877", + "1" + ], + [ + "17383067281051004500937045952389840422168648331520755126552492725790646787723", + "2025490599685063551429367299766904721469153329173598650500056674301353359117", + "1" + ], + [ + "13118017463383292137184615315348206363050402748397813115526003734522203827076", + "14747262438209728973996272268774478985306603771361716008972123415777420896020", + "1" + ], + [ + "11450072030649773860867898310869777825278050525897742969573201099668456647773", + "20550184668519911887992034107762041571631291808395111119095526739028422861589", + "1" + ], + [ + "8280504722371510409667516309414511140046006813557832234617712538869634011687", + "6826089396635971420997217118363556718872751618192094349155124835026219216985", + "1" + ], + [ + "13153381476993631482235751762922886852285118506575145234084444966678014158412", + "8033991084127083340341117608975548535579402948965500402539453560276062439671", + "1" + ], + [ + "20413860271521486894718012806508500211024105274679654387036579929611414533430", + "20335278325299750863082586125268213670312612431695873119881681613070009519786", + "1" + ], + [ + "6403431810453580931321941935745354148288307014315693312532384091467532544173", + "3228566460332792532549405311916397664305122076241639000766177114791081413044", + "1" + ], + [ + "19818824025641599462702443606711210387991213599354040818552196611886158054389", + "13585573621733053388458095808950484389414979179088346722897892096778643437766", + "1" + ], + [ + "20784520526090084979668459049707612699646688700939678324146827345130663685771", + "20067490162008526753123279544026863492998501551870019722244835925024175503302", + "1" + ], + [ + "9699294089550420839150630206823021442759146648511011486206476875892839359412", + "18203519334530656981216252254843914788713859089507448193135054900920970104817", + "1" + ], + [ + "7055503854571326281089482138080939638994024923306103081761951073868427854608", + "19535330260902353566930328996486677103028604122970127772240255089538610606433", + "1" + ], + [ + "19040815493701992136693735336623664132934400283607455790537296269411424557185", + "5257090988881297614790689693414609107604272406498827478098830789685794957702", + "1" + ], + [ + "20169560846472588479543213680694641189909363921531248101617498416494561901381", + "9444614325582467547128644838246544767166324759683122404701193516788869271729", + "1" + ], + [ + "15779980502307593431264758543550893007835162188019322973449340629040150536128", + "2927741155691609026768906647188278981639674386065565605808510987422568369547", + "1" + ], + [ + "16087781499390127314465900847810095161384885368149306802736742232220231294450", + "15185830181110739741276091285431251583937891933776601222708563851393984464289", + "1" + ], + [ + "12809116127476058948072938695393434035340286836042765648531155685749818512817", + "12541038344312745362417851188545955859296778019842420840495339472458915311411", + "1" + ], + [ + "5673887305604224272966360878441016219492214940581469984496007084246521368450", + "2635253323322909955504014942360634558917938692450608798107272096782554033146", + "1" + ], + [ + "29506416715660776077969604297353627806477555308382285277183804865212807977", + "19235604259252624931625205110124421691325485308816806466415330189116029968240", + "1" + ], + [ + "969201607297517956748144085059920728404482406779541684961508553642525939402", + "6343436633755569993838675856720270161817647095752354770739678381528297487497", + "1" + ], + [ + "8408652576825774764130606789044948944804206570379787919667905998995977248376", + "6265331171378329783109310578694672238778562574820048127484518059010312921174", + "1" + ], + [ + "3862196039980941346790829711074783657325097482301495711049538772068680666009", + "5728314205765325262605693249008889257667535236037490369918083967470764907005", + "1" + ], + [ + "3402199646531303840467646612755212848623625839788479419743939156056079239097", + "696399131900335770074646061621836257027640236017103974787786123057483938347", + "1" + ], + [ + "3767927707586416508398509589884740720161003612482245998239307485988761921576", + "14517409043272247309513108625855368728270693938904717076514562498760503574837", + "1" + ] + ] +} \ No newline at end of file diff --git a/test-vectors/keccak256_256_test.wtns b/test-vectors/keccak256_256_test.wtns new file mode 100644 index 0000000..714c3db Binary files /dev/null and b/test-vectors/keccak256_256_test.wtns differ diff --git a/test-vectors/multiplier2.vkey.json b/test-vectors/multiplier2.vkey.json new file mode 100644 index 0000000..329201c --- /dev/null +++ b/test-vectors/multiplier2.vkey.json @@ -0,0 +1,99 @@ +{ + "protocol": "groth16", + "curve": "bn128", + "nPublic": 2, + "vk_alpha_1": [ + "20491192805390485299153009773594534940189261866228447918068658471970481763042", + "9383485363053290200918347156157836566562967994039712273449902621266178545958", + "1" + ], + "vk_beta_2": [ + [ + "6375614351688725206403948262868962793625744043794305715222011528459656738731", + "4252822878758300859123897981450591353533073413197771768651442665752259397132" + ], + [ + "10505242626370262277552901082094356697409835680220590971873171140371331206856", + "21847035105528745403288232691147584728191162732299865338377159692350059136679" + ], + [ + "1", + "0" + ] + ], + "vk_gamma_2": [ + [ + "10857046999023057135944570762232829481370756359578518086990519993285655852781", + "11559732032986387107991004021392285783925812861821192530917403151452391805634" + ], + [ + "8495653923123431417604973247489272438418190587263600148770280649306958101930", + "4082367875863433681332203403145435568316851327593401208105741076214120093531" + ], + [ + "1", + "0" + ] + ], + "vk_delta_2": [ + [ + "21433406528933179909930745994334927660178418579094216084923767796468271186424", + "13751094566666250787453117075390489314032734336035585479837046065555811806277" + ], + [ + "16699850258000131247573555544305336535932817397817319735498422046083998163923", + "12877331500166317036475448636193806012569545897268783945479551162026182231936" + ], + [ + "1", + "0" + ] + ], + "vk_alphabeta_12": [ + [ + [ + "2029413683389138792403550203267699914886160938906632433982220835551125967885", + "21072700047562757817161031222997517981543347628379360635925549008442030252106" + ], + [ + "5940354580057074848093997050200682056184807770593307860589430076672439820312", + "12156638873931618554171829126792193045421052652279363021382169897324752428276" + ], + [ + "7898200236362823042373859371574133993780991612861777490112507062703164551277", + "7074218545237549455313236346927434013100842096812539264420499035217050630853" + ] + ], + [ + [ + "7077479683546002997211712695946002074877511277312570035766170199895071832130", + "10093483419865920389913245021038182291233451549023025229112148274109565435465" + ], + [ + "4595479056700221319381530156280926371456704509942304414423590385166031118820", + "19831328484489333784475432780421641293929726139240675179672856274388269393268" + ], + [ + "11934129596455521040620786944827826205713621633706285934057045369193958244500", + "8037395052364110730298837004334506829870972346962140206007064471173334027475" + ] + ] + ], + "IC": [ + [ + "6819801395408938350212900248749732364821477541620635511814266536599629892365", + "9092252330033992554755034971584864587974280972948086568597554018278609861372", + "1" + ], + [ + "17882351432929302592725330552407222299541667716607588771282887857165175611387", + "18907419617206324833977586007131055763810739835484972981819026406579664278293", + "1" + ], + [ + "15838138634521468894153380932528531886891906022296751863057552941301429532008", + "10499496224041775125547926627482656159317436804293654376137218419558038465083", + "1" + ] + ] +} \ No newline at end of file