From c5884ec830df2a61e38b2151c5100010dd31885b Mon Sep 17 00:00:00 2001 From: rymnc <43716372+rymnc@users.noreply.github.com> Date: Tue, 9 Apr 2024 01:19:25 +0300 Subject: [PATCH] chore: sunset deprecated crates for rln-v1 branch --- .github/workflows/ci.yml | 47 +- .gitmodules | 8 - Cargo.lock | 1583 ++--------------- Cargo.toml | 13 +- multiplier/Cargo.toml | 32 - multiplier/Makefile.toml | 7 - multiplier/README.md | 21 - multiplier/resources/circom2_multiplier2.r1cs | Bin 264 -> 0 bytes multiplier/resources/circom2_multiplier2.wasm | Bin 29071 -> 0 bytes multiplier/src/ffi.rs | 77 - multiplier/src/lib.rs | 2 - multiplier/src/main.rs | 49 - multiplier/src/public.rs | 79 - multiplier/tests/public.rs | 21 - private-settlement/Cargo.toml | 9 - private-settlement/Makefile.toml | 7 - private-settlement/README.md | 11 - private-settlement/src/lib.rs | 1 - .../tests/private-settlement.rs | 11 - semaphore/Cargo.toml | 50 - semaphore/Makefile.toml | 7 - semaphore/README.md | 18 - semaphore/build.rs | 111 -- semaphore/src/circuit.rs | 79 - semaphore/src/lib.rs | 7 - semaphore/src/protocol.rs | 215 --- semaphore/tests/protocol.rs | 115 -- semaphore/vendor/semaphore | 1 - 28 files changed, 127 insertions(+), 2454 deletions(-) delete mode 100644 .gitmodules delete mode 100644 multiplier/Cargo.toml delete mode 100644 multiplier/Makefile.toml delete mode 100644 multiplier/README.md delete mode 100644 multiplier/resources/circom2_multiplier2.r1cs delete mode 100644 multiplier/resources/circom2_multiplier2.wasm delete mode 100644 multiplier/src/ffi.rs delete mode 100644 multiplier/src/lib.rs delete mode 100644 multiplier/src/main.rs delete mode 100644 multiplier/src/public.rs delete mode 100644 multiplier/tests/public.rs delete mode 100644 private-settlement/Cargo.toml delete mode 100644 private-settlement/Makefile.toml delete mode 100644 private-settlement/README.md delete mode 100644 private-settlement/src/lib.rs delete mode 100644 private-settlement/tests/private-settlement.rs delete mode 100644 semaphore/Cargo.toml delete mode 100644 semaphore/Makefile.toml delete mode 100644 semaphore/README.md delete mode 100644 semaphore/build.rs delete mode 100644 semaphore/src/circuit.rs delete mode 100644 semaphore/src/lib.rs delete mode 100644 semaphore/src/protocol.rs delete mode 100644 semaphore/tests/protocol.rs delete mode 160000 semaphore/vendor/semaphore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12fd929..31da1de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,27 +3,20 @@ on: branches: - master paths-ignore: - - '**.md' - - '!.github/workflows/*.yml' - - '!multiplier/src/**' - - '!private-settlement/src/**' - - '!rln-wasm/**' - - '!rln/src/**' - - '!rln/resources/**' - - '!semaphore/src/**' - - '!utils/src/**' + - "**.md" + - "!.github/workflows/*.yml" + - "!rln-wasm/**" + - "!rln/src/**" + - "!rln/resources/**" + - "!utils/src/**" pull_request: paths-ignore: - - '**.md' - - '!.github/workflows/*.yml' - - '!multiplier/src/**' - - '!private-settlement/src/**' - - '!rln-wasm/**' - - '!rln/src/**' - - '!rln/resources/**' - - '!semaphore/src/**' - - '!utils/src/**' - + - "**.md" + - "!.github/workflows/*.yml" + - "!rln-wasm/**" + - "!rln/src/**" + - "!rln/resources/**" + - "!utils/src/**" name: Tests @@ -32,10 +25,10 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest] - crate: [multiplier, semaphore, rln, utils] + crate: [rln, utils] runs-on: ${{ matrix.platform }} timeout-minutes: 60 - + name: test - ${{ matrix.crate }} - ${{ matrix.platform }} steps: - name: Checkout sources @@ -51,16 +44,16 @@ jobs: run: make installdeps - name: cargo-make test run: | - cargo make test --release + cargo make test --release working-directory: ${{ matrix.crate }} - + rln-wasm: strategy: matrix: platform: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.platform }} timeout-minutes: 60 - + name: test - rln-wasm - ${{ matrix.platform }} steps: - uses: actions/checkout@v3 @@ -85,11 +78,11 @@ jobs: matrix: # we run lint tests only on ubuntu platform: [ubuntu-latest] - crate: [multiplier, semaphore, rln, utils] + crate: [rln, utils] runs-on: ${{ matrix.platform }} timeout-minutes: 60 - name: lint - ${{ matrix.crate }} - ${{ matrix.platform }} + name: lint - ${{ matrix.crate }} - ${{ matrix.platform }} steps: - name: Checkout sources uses: actions/checkout@v3 @@ -110,7 +103,7 @@ jobs: - name: cargo clippy if: success() || failure() run: | - cargo clippy --release -- -D warnings + cargo clippy --release -- -D warnings working-directory: ${{ matrix.crate }} # We skip clippy on rln-wasm, since wasm target is managed by cargo make # Currently not treating warnings as error, too noisy diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index b7cb592..0000000 --- a/.gitmodules +++ /dev/null @@ -1,8 +0,0 @@ -[submodule "rln/vendor/rln"] - path = rln/vendor/rln - ignore = dirty - url = https://github.com/Rate-Limiting-Nullifier/rln_circuits.git -[submodule "semaphore/vendor/semaphore"] - path = semaphore/vendor/semaphore - ignore = dirty - url = https://github.com/appliedzkp/semaphore.git diff --git a/Cargo.lock b/Cargo.lock index b45a23f..dbafb31 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,15 +39,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "aho-corasick" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" -dependencies = [ - "memchr", -] - [[package]] name = "anes" version = "0.1.6" @@ -103,26 +94,15 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "ark-bn254" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea691771ebbb28aea556c044e2e5c5227398d840cee0c34d4d20fa8eb2689e8c" -dependencies = [ - "ark-ec 0.3.0", - "ark-ff 0.3.0", - "ark-std 0.3.0", -] - [[package]] name = "ark-bn254" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" dependencies = [ - "ark-ec 0.4.1", - "ark-ff 0.4.1", - "ark-std 0.4.0", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] @@ -131,18 +111,18 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "295bb8e275f3e211b36a822469ba88deb028ecb3d7fe8684102598a9158a7350" dependencies = [ - "ark-bn254 0.4.0", - "ark-crypto-primitives 0.4.0", - "ark-ec 0.4.1", - "ark-ff 0.4.1", - "ark-groth16 0.4.0", - "ark-poly 0.4.1", - "ark-relations 0.4.0", - "ark-serialize 0.4.1", - "ark-std 0.4.0", + "ark-bn254", + "ark-crypto-primitives", + "ark-ec", + "ark-ff", + "ark-groth16", + "ark-poly", + "ark-relations", + "ark-serialize", + "ark-std", "byteorder", "cfg-if", - "color-eyre 0.6.2", + "color-eyre", "criterion 0.3.6", "fnv", "hex", @@ -153,122 +133,35 @@ dependencies = [ "wasmer", ] -[[package]] -name = "ark-circom" -version = "0.1.0" -source = "git+https://github.com/gakonst/ark-circom?rev=35ce5a9#35ce5a909ee09ae8c3101e69cc57785a21ed7f64" -dependencies = [ - "ark-bn254 0.3.0", - "ark-ec 0.3.0", - "ark-ff 0.3.0", - "ark-groth16 0.3.0", - "ark-poly 0.3.0", - "ark-relations 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "byteorder", - "cfg-if", - "color-eyre 0.6.2", - "criterion 0.3.6", - "ethers-core 2.0.4", - "fnv", - "hex", - "num", - "num-bigint", - "num-traits", - "thiserror", - "wasmer", -] - -[[package]] -name = "ark-circom" -version = "0.1.0" -source = "git+https://github.com/gakonst/ark-circom?rev=a93c8b0#a93c8b03d4376e197ceb36aa410a8903c283dab7" -dependencies = [ - "ark-bn254 0.3.0", - "ark-ec 0.3.0", - "ark-ff 0.3.0", - "ark-groth16 0.3.0", - "ark-poly 0.3.0", - "ark-relations 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "byteorder", - "cfg-if", - "color-eyre 0.5.11", - "criterion 0.3.6", - "ethers-core 2.0.4", - "fnv", - "hex", - "num", - "num-bigint", - "num-traits", - "thiserror", - "wasmer", -] - -[[package]] -name = "ark-crypto-primitives" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff773c0ef8c655c98071d3026a63950798a66b2f45baef22d8334c1756f1bd18" -dependencies = [ - "ark-ec 0.3.0", - "ark-ff 0.3.0", - "ark-relations 0.3.0", - "ark-serialize 0.3.0", - "ark-snark 0.3.0", - "ark-std 0.3.0", - "blake2 0.9.2", - "derivative", - "digest 0.9.0", - "rayon", -] - [[package]] name = "ark-crypto-primitives" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" dependencies = [ - "ark-ec 0.4.1", - "ark-ff 0.4.1", - "ark-relations 0.4.0", - "ark-serialize 0.4.1", - "ark-snark 0.4.0", - "ark-std 0.4.0", - "blake2 0.10.6", + "ark-ec", + "ark-ff", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "blake2", "derivative", - "digest 0.10.6", + "digest", "rayon", "sha2", ] -[[package]] -name = "ark-ec" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea978406c4b1ca13c2db2373b05cc55429c3575b8b21f1b9ee859aa5b03dd42" -dependencies = [ - "ark-ff 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-traits", - "rayon", - "zeroize", -] - [[package]] name = "ark-ec" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c60370a92f8e1a5f053cad73a862e1b99bc642333cd676fa11c0c39f80f4ac2" dependencies = [ - "ark-ff 0.4.1", - "ark-poly 0.4.1", - "ark-serialize 0.4.1", - "ark-std 0.4.0", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", "derivative", "hashbrown 0.13.2", "itertools", @@ -277,56 +170,27 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ark-ff" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" -dependencies = [ - "ark-ff-asm 0.3.0", - "ark-ff-macros 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-bigint", - "num-traits", - "paste", - "rayon", - "rustc_version 0.3.3", - "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 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.1", - "ark-std 0.4.0", + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", "derivative", - "digest 0.10.6", + "digest", "itertools", "num-bigint", "num-traits", "paste", "rayon", - "rustc_version 0.4.0", + "rustc_version", "zeroize", ] -[[package]] -name = "ark-ff-asm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -337,18 +201,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "ark-ff-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" -dependencies = [ - "num-bigint", - "num-traits", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -362,48 +214,19 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "ark-groth16" -version = "0.3.0" -source = "git+https://github.com/arkworks-rs/groth16?rev=765817f#765817f77a6e14964c6f264d565b18676b11bd59" -dependencies = [ - "ark-crypto-primitives 0.3.0", - "ark-ec 0.3.0", - "ark-ff 0.3.0", - "ark-poly 0.3.0", - "ark-relations 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "rayon", -] - [[package]] name = "ark-groth16" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" dependencies = [ - "ark-crypto-primitives 0.4.0", - "ark-ec 0.4.1", - "ark-ff 0.4.1", - "ark-poly 0.4.1", - "ark-relations 0.4.0", - "ark-serialize 0.4.1", - "ark-std 0.4.0", - "rayon", -] - -[[package]] -name = "ark-poly" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0f78f47537c2f15706db7e98fe64cc1711dbf9def81218194e17239e53e5aa" -dependencies = [ - "ark-ff 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "hashbrown 0.11.2", + "ark-crypto-primitives", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-relations", + "ark-serialize", + "ark-std", "rayon", ] @@ -413,72 +236,38 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f6ec811462cabe265cfe1b102fcfe3df79d7d2929c2425673648ee9abfd0272" dependencies = [ - "ark-ff 0.4.1", - "ark-serialize 0.4.1", - "ark-std 0.4.0", + "ark-ff", + "ark-serialize", + "ark-std", "derivative", "hashbrown 0.13.2", "rayon", ] -[[package]] -name = "ark-relations" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cba4c1c99792a6834bd97f7fd76578ec2cd58d2afc5139a17e1d1bec65b38f6" -dependencies = [ - "ark-ff 0.3.0", - "ark-std 0.3.0", - "tracing", - "tracing-subscriber 0.2.25", -] - [[package]] name = "ark-relations" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" dependencies = [ - "ark-ff 0.4.1", - "ark-std 0.4.0", + "ark-ff", + "ark-std", "tracing", "tracing-subscriber 0.2.25", ] -[[package]] -name = "ark-serialize" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-serialize-derive 0.3.0", - "ark-std 0.3.0", - "digest 0.9.0", -] - [[package]] name = "ark-serialize" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7e735959bc173ea4baf13327b19c22d452b8e9e8e8f7b7fc34e6bf0e316c33e" dependencies = [ - "ark-serialize-derive 0.4.2", - "ark-std 0.4.0", - "digest 0.10.6", + "ark-serialize-derive", + "ark-std", + "digest", "num-bigint", ] -[[package]] -name = "ark-serialize-derive" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd4e5f0bf8285d5ed538d27fab7411f3e297908fd93c62195de8bee3f199e82" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-serialize-derive" version = "0.4.2" @@ -490,38 +279,16 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "ark-snark" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc3dff1a5f67a9c0b34df32b079752d8dd17f1e9d06253da0453db6c1b7cc8a" -dependencies = [ - "ark-ff 0.3.0", - "ark-relations 0.3.0", - "ark-std 0.3.0", -] - [[package]] name = "ark-snark" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" dependencies = [ - "ark-ff 0.4.1", - "ark-relations 0.4.0", - "ark-serialize 0.4.1", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-std" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" -dependencies = [ - "num-traits", - "rand", - "rayon", + "ark-ff", + "ark-relations", + "ark-serialize", + "ark-std", ] [[package]] @@ -535,12 +302,6 @@ dependencies = [ "rayon", ] -[[package]] -name = "arrayvec" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - [[package]] name = "atty" version = "0.2.14" @@ -552,18 +313,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "auto_impl" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -585,18 +334,6 @@ dependencies = [ "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" @@ -615,24 +352,13 @@ dependencies = [ "wyz", ] -[[package]] -name = "blake2" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" -dependencies = [ - "crypto-mac", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "blake2" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.6", + "digest", ] [[package]] @@ -650,12 +376,6 @@ version = "3.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - [[package]] name = "bytecheck" version = "0.6.11" @@ -684,15 +404,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" -dependencies = [ - "serde", -] - [[package]] name = "cast" version = "0.3.0" @@ -711,16 +422,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" -dependencies = [ - "num-integer", - "num-traits", -] - [[package]] name = "ciborium" version = "0.2.1" @@ -823,21 +524,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" -[[package]] -name = "color-eyre" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f1885697ee8a177096d42f158922251a41973117f6d8a234cee94b9509157b7" -dependencies = [ - "backtrace", - "color-spantrace 0.1.6", - "eyre", - "indenter", - "once_cell", - "owo-colors 1.3.0", - "tracing-error 0.1.2", -] - [[package]] name = "color-eyre" version = "0.6.2" @@ -845,24 +531,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204" dependencies = [ "backtrace", - "color-spantrace 0.2.0", + "color-spantrace", "eyre", "indenter", "once_cell", - "owo-colors 3.5.0", - "tracing-error 0.2.0", -] - -[[package]] -name = "color-spantrace" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eee477a4a8a72f4addd4de416eb56d54bc307b284d6601bafdee1f4ea462d1" -dependencies = [ - "once_cell", - "owo-colors 1.3.0", - "tracing-core", - "tracing-error 0.1.2", + "owo-colors", + "tracing-error", ] [[package]] @@ -872,9 +546,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ba75b3d9449ecdccb27ecbc479fdc0b87fa2dd43d2f8298f9bf0e59aacc8dce" dependencies = [ "once_cell", - "owo-colors 3.5.0", + "owo-colors", "tracing-core", - "tracing-error 0.2.0", + "tracing-error", ] [[package]] @@ -893,18 +567,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "const-oid" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "corosensei" version = "0.1.3" @@ -933,16 +595,7 @@ version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ - "cranelift-entity 0.82.3", -] - -[[package]] -name = "cranelift-bforest" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" -dependencies = [ - "cranelift-entity 0.91.1", + "cranelift-entity", ] [[package]] @@ -951,10 +604,10 @@ version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ - "cranelift-bforest 0.82.3", - "cranelift-codegen-meta 0.82.3", - "cranelift-codegen-shared 0.82.3", - "cranelift-entity 0.82.3", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-entity", "gimli 0.26.2", "log", "regalloc", @@ -962,43 +615,13 @@ dependencies = [ "target-lexicon", ] -[[package]] -name = "cranelift-codegen" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" -dependencies = [ - "arrayvec", - "bumpalo", - "cranelift-bforest 0.91.1", - "cranelift-codegen-meta 0.91.1", - "cranelift-codegen-shared 0.91.1", - "cranelift-egraph", - "cranelift-entity 0.91.1", - "cranelift-isle", - "gimli 0.26.2", - "log", - "regalloc2", - "smallvec", - "target-lexicon", -] - [[package]] name = "cranelift-codegen-meta" version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ - "cranelift-codegen-shared 0.82.3", -] - -[[package]] -name = "cranelift-codegen-meta" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" -dependencies = [ - "cranelift-codegen-shared 0.91.1", + "cranelift-codegen-shared", ] [[package]] @@ -1007,68 +630,24 @@ version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" -[[package]] -name = "cranelift-codegen-shared" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" - -[[package]] -name = "cranelift-egraph" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" -dependencies = [ - "cranelift-entity 0.91.1", - "fxhash", - "hashbrown 0.12.3", - "indexmap", - "log", - "smallvec", -] - [[package]] name = "cranelift-entity" version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" -[[package]] -name = "cranelift-entity" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" - [[package]] name = "cranelift-frontend" version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ - "cranelift-codegen 0.82.3", + "cranelift-codegen", "log", "smallvec", "target-lexicon", ] -[[package]] -name = "cranelift-frontend" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" -dependencies = [ - "cranelift-codegen 0.91.1", - "log", - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cranelift-isle" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" - [[package]] name = "crc32fast" version = "1.3.2" @@ -1199,18 +778,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "crypto-bigint" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -1221,16 +788,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "csv" version = "1.2.1" @@ -1286,29 +843,6 @@ dependencies = [ "syn 2.0.16", ] -[[package]] -name = "dashmap" -version = "5.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" -dependencies = [ - "cfg-if", - "hashbrown 0.12.3", - "lock_api", - "once_cell", - "parking_lot_core 0.9.7", -] - -[[package]] -name = "der" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e58dffcdcc8ee7b22f0c1f71a69243d7c2d9ad87b5a14361f2424a1565c219" -dependencies = [ - "const-oid", - "zeroize", -] - [[package]] name = "derivative" version = "2.2.0" @@ -1320,28 +854,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.6" @@ -1349,50 +861,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer", - "const-oid", "crypto-common", "subtle", ] -[[package]] -name = "ecdsa" -version = "0.16.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" -dependencies = [ - "der", - "digest 0.10.6", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - [[package]] name = "either" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" -[[package]] -name = "elliptic-curve" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c71eaa367f2e5d556414a8eea812bc62985c879748d6403edabd9cb03f16e7" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.6", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - [[package]] name = "enum-iterator" version = "0.7.0" @@ -1455,108 +933,6 @@ dependencies = [ "libc", ] -[[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", - "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.4" -source = "git+https://github.com/gakonst/ethers-rs#34f6a8c5d4c26ce3dc85aa5c34ac02b3930b18f2" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "elliptic-curve", - "ethabi", - "generic-array", - "getrandom", - "hex", - "k256", - "num_enum", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum 0.24.1", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-core" -version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ca2514feb98918a0a31de7e1983c29f2267ebf61b2dc5d4294f91e5b866623" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "elliptic-curve", - "ethabi", - "generic-array", - "hex", - "k256", - "num_enum", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum 0.25.0", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - [[package]] name = "eyre" version = "0.6.8" @@ -1582,43 +958,12 @@ dependencies = [ "instant", ] -[[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.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" -dependencies = [ - "percent-encoding", -] - [[package]] name = "fs2" version = "0.4.3" @@ -1652,7 +997,6 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", - "zeroize", ] [[package]] @@ -1685,17 +1029,6 @@ version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" -[[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.2" @@ -1771,69 +1104,12 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.6", -] - [[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "include_dir" version = "0.7.3" @@ -1926,28 +1202,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "k256" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -2079,18 +1333,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" -[[package]] -name = "multiplier" -version = "0.3.0" -dependencies = [ - "ark-bn254 0.3.0", - "ark-circom 0.1.0 (git+https://github.com/gakonst/ark-circom?rev=35ce5a9)", - "ark-groth16 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "color-eyre 0.6.2", -] - [[package]] name = "num" version = "0.4.0" @@ -2179,27 +1421,6 @@ dependencies = [ "libc", ] -[[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", - "proc-macro2", - "quote", - "syn 2.0.16", -] - [[package]] name = "object" version = "0.28.4" @@ -2233,81 +1454,18 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[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 = "os_str_bytes" version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" -[[package]] -name = "owo-colors" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55" - [[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.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "parking_lot" version = "0.11.2" @@ -2316,7 +1474,7 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.6", + "parking_lot_core", ] [[package]] @@ -2333,57 +1491,18 @@ dependencies = [ "winapi", ] -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "windows-sys 0.45.0", -] - [[package]] name = "paste" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" -[[package]] -name = "percent-encoding" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" - -[[package]] -name = "pest" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" -dependencies = [ - "thiserror", - "ucd-trie", -] - [[package]] name = "pin-project-lite" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" -[[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.4" @@ -2427,34 +1546,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "primitive-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" -dependencies = [ - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "uint", -] - -[[package]] -name = "private-settlement" -version = "0.3.0" - -[[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", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2604,26 +1695,12 @@ dependencies = [ "smallvec", ] -[[package]] -name = "regalloc2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" -dependencies = [ - "fxhash", - "log", - "slice-group-by", - "smallvec", -] - [[package]] name = "regex" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ - "aho-corasick", - "memchr", "regex-syntax", ] @@ -2654,16 +1731,6 @@ dependencies = [ "bytecheck", ] -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - [[package]] name = "rkyv" version = "0.7.42" @@ -2673,7 +1740,6 @@ dependencies = [ "bitvec", "bytecheck", "hashbrown 0.12.3", - "indexmap", "ptr_meta", "rend", "rkyv_derive", @@ -2697,16 +1763,16 @@ dependencies = [ name = "rln" version = "0.3.6" dependencies = [ - "ark-bn254 0.4.0", - "ark-circom 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ark-ec 0.4.1", - "ark-ff 0.4.1", - "ark-groth16 0.4.0", - "ark-relations 0.4.0", - "ark-serialize 0.4.1", - "ark-std 0.4.0", + "ark-bn254", + "ark-circom", + "ark-ec", + "ark-ff", + "ark-groth16", + "ark-relations", + "ark-serialize", + "ark-std", "cfg-if", - "color-eyre 0.6.2", + "color-eyre", "criterion 0.4.0", "include_dir", "num-bigint", @@ -2729,7 +1795,7 @@ version = "0.3.0" dependencies = [ "clap 4.2.7", "clap_derive", - "color-eyre 0.6.2", + "color-eyre", "rln", "serde", "serde_json", @@ -2753,49 +1819,6 @@ dependencies = [ "web-sys", ] -[[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 = "ruint" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d470e29e933dac4101180fd6574971892315c414cf2961a192729089687cc9b" -dependencies = [ - "ark-ff 0.3.0", - "derive_more", - "num-bigint", - "ruint-macro", - "rustc_version 0.4.0", - "serde", - "thiserror", -] - -[[package]] -name = "ruint-macro" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc5760263ea229d367e7dff3c0cbf09e4797a125bd87059a6c095804f3b2d1" - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -2808,28 +1831,13 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[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.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver", ] [[package]] @@ -2867,30 +1875,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scale-info" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdef77228a4c05dc94211441595746732131ad7f6530c6c18f045da7b7ab937" -dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "scoped-tls" version = "1.0.1" @@ -2909,98 +1893,12 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" -[[package]] -name = "sec1" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "semaphore" -version = "0.1.0" -source = "git+https://github.com/worldcoin/semaphore-rs?rev=ee658c2#ee658c22684696232f68ef08beb8494280fb7da4" -dependencies = [ - "ark-bn254 0.3.0", - "ark-circom 0.1.0 (git+https://github.com/gakonst/ark-circom?rev=a93c8b0)", - "ark-ec 0.3.0", - "ark-ff 0.3.0", - "ark-groth16 0.3.0", - "ark-relations 0.3.0", - "ark-std 0.3.0", - "color-eyre 0.6.2", - "enumset", - "ethers-core 2.0.4", - "hex", - "hex-literal", - "num-bigint", - "once_cell", - "rand", - "rayon", - "ruint", - "serde", - "sha2", - "thiserror", - "tiny-keccak", - "wasmer", -] - -[[package]] -name = "semaphore-wrapper" -version = "0.3.0" -dependencies = [ - "ark-bn254 0.3.0", - "ark-circom 0.1.0 (git+https://github.com/gakonst/ark-circom?rev=35ce5a9)", - "ark-ec 0.3.0", - "ark-groth16 0.3.0", - "ark-relations 0.3.0", - "ark-std 0.3.0", - "color-eyre 0.6.2", - "ethers-core 2.0.8", - "once_cell", - "rand", - "rand_chacha", - "ruint", - "semaphore", - "serde", - "serde_json", - "thiserror", - "wasmer", - "wasmer-compiler-cranelift 3.3.0", - "wasmer-engine-dylib", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" version = "1.0.163" @@ -3070,17 +1968,7 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.6", - "keccak", + "digest", ] [[package]] @@ -3092,16 +1980,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "signature" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" -dependencies = [ - "digest 0.10.6", - "rand_core", -] - [[package]] name = "simdutf8" version = "0.1.4" @@ -3124,90 +2002,24 @@ dependencies = [ "parking_lot", ] -[[package]] -name = "slice-group-by" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" - [[package]] name = "smallvec" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" -[[package]] -name = "spki" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" -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 = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" -dependencies = [ - "strum_macros 0.24.3", -] - -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros 0.25.1", -] - -[[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 = "strum_macros" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6069ca09d878a33f883cc06aaa9718ede171841d3832450354410b718b097232" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.16", -] - [[package]] name = "subtle" version = "2.4.1" @@ -3340,23 +2152,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -[[package]] -name = "toml_datetime" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" - -[[package]] -name = "toml_edit" -version = "0.19.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - [[package]] name = "tracing" version = "0.1.37" @@ -3391,16 +2186,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-error" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d7c0b83d4a500748fa5879461652b361edf5c9d51ede2a2ac03875ca185e24" -dependencies = [ - "tracing", - "tracing-subscriber 0.2.25", -] - [[package]] name = "tracing-error" version = "0.2.0" @@ -3417,8 +2202,6 @@ version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" dependencies = [ - "sharded-slab", - "thread_local", "tracing-core", ] @@ -3439,68 +2222,18 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" -[[package]] -name = "ucd-trie" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" - -[[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-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - [[package]] name = "unicode-ident" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-width" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "url" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - [[package]] name = "utf8parse" version = "0.2.1" @@ -3655,14 +2388,14 @@ dependencies = [ "thiserror", "wasm-bindgen", "wasmer-artifact", - "wasmer-compiler 2.3.0", - "wasmer-compiler-cranelift 2.3.0", + "wasmer-compiler", + "wasmer-compiler-cranelift", "wasmer-derive", "wasmer-engine", "wasmer-engine-dylib", "wasmer-engine-universal", - "wasmer-types 2.3.0", - "wasmer-vm 2.3.0", + "wasmer-types", + "wasmer-vm", "wat", "winapi", ] @@ -3676,8 +2409,8 @@ dependencies = [ "enumset", "loupe", "thiserror", - "wasmer-compiler 2.3.0", - "wasmer-types 2.3.0", + "wasmer-compiler", + "wasmer-types", ] [[package]] @@ -3694,31 +2427,8 @@ dependencies = [ "smallvec", "target-lexicon", "thiserror", - "wasmer-types 2.3.0", - "wasmparser 0.83.0", -] - -[[package]] -name = "wasmer-compiler" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726a8450541af4a57c34af7b6973fdbfc79f896cc7e733429577dfd1d1687180" -dependencies = [ - "backtrace", - "cfg-if", - "enum-iterator", - "enumset", - "lazy_static", - "leb128", - "memmap2", - "more-asserts", - "region", - "smallvec", - "thiserror", - "wasmer-types 3.3.0", - "wasmer-vm 3.3.0", - "wasmparser 0.95.0", - "winapi", + "wasmer-types", + "wasmparser", ] [[package]] @@ -3727,9 +2437,9 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" dependencies = [ - "cranelift-codegen 0.82.3", - "cranelift-entity 0.82.3", - "cranelift-frontend 0.82.3", + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", "gimli 0.26.2", "loupe", "more-asserts", @@ -3737,27 +2447,8 @@ dependencies = [ "smallvec", "target-lexicon", "tracing", - "wasmer-compiler 2.3.0", - "wasmer-types 2.3.0", -] - -[[package]] -name = "wasmer-compiler-cranelift" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e5633f90f372563ebbdf3f9799c7b29ba11c90e56cf9b54017112d2e656c95" -dependencies = [ - "cranelift-codegen 0.91.1", - "cranelift-entity 0.91.1", - "cranelift-frontend 0.91.1", - "gimli 0.26.2", - "more-asserts", - "rayon", - "smallvec", - "target-lexicon", - "tracing", - "wasmer-compiler 3.3.0", - "wasmer-types 3.3.0", + "wasmer-compiler", + "wasmer-types", ] [[package]] @@ -3790,9 +2481,9 @@ dependencies = [ "target-lexicon", "thiserror", "wasmer-artifact", - "wasmer-compiler 2.3.0", - "wasmer-types 2.3.0", - "wasmer-vm 2.3.0", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", ] [[package]] @@ -3813,11 +2504,11 @@ dependencies = [ "tempfile", "tracing", "wasmer-artifact", - "wasmer-compiler 2.3.0", + "wasmer-compiler", "wasmer-engine", "wasmer-object", - "wasmer-types 2.3.0", - "wasmer-vm 2.3.0", + "wasmer-types", + "wasmer-vm", "which", ] @@ -3833,11 +2524,11 @@ dependencies = [ "loupe", "region", "rkyv", - "wasmer-compiler 2.3.0", + "wasmer-compiler", "wasmer-engine", "wasmer-engine-universal-artifact", - "wasmer-types 2.3.0", - "wasmer-vm 2.3.0", + "wasmer-types", + "wasmer-vm", "winapi", ] @@ -3853,8 +2544,8 @@ dependencies = [ "rkyv", "thiserror", "wasmer-artifact", - "wasmer-compiler 2.3.0", - "wasmer-types 2.3.0", + "wasmer-compiler", + "wasmer-types", ] [[package]] @@ -3865,8 +2556,8 @@ checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" dependencies = [ "object 0.28.4", "thiserror", - "wasmer-compiler 2.3.0", - "wasmer-types 2.3.0", + "wasmer-compiler", + "wasmer-types", ] [[package]] @@ -3885,22 +2576,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "wasmer-types" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67f1f2839f4f61509550e4ddcd0e658e19f3af862b51c79fda15549d735d659b" -dependencies = [ - "bytecheck", - "enum-iterator", - "enumset", - "indexmap", - "more-asserts", - "rkyv", - "target-lexicon", - "thiserror", -] - [[package]] name = "wasmer-vm" version = "2.3.0" @@ -3925,34 +2600,7 @@ dependencies = [ "serde", "thiserror", "wasmer-artifact", - "wasmer-types 2.3.0", - "winapi", -] - -[[package]] -name = "wasmer-vm" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043118ec4f16d1714fed3aab758b502b864bd865e1d5188626c9ad290100563f" -dependencies = [ - "backtrace", - "cc", - "cfg-if", - "corosensei", - "dashmap", - "derivative", - "enum-iterator", - "fnv", - "indexmap", - "lazy_static", - "libc", - "mach", - "memoffset 0.8.0", - "more-asserts", - "region", - "scopeguard", - "thiserror", - "wasmer-types 3.3.0", + "wasmer-types", "winapi", ] @@ -3962,16 +2610,6 @@ version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" -[[package]] -name = "wasmparser" -version = "0.95.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" -dependencies = [ - "indexmap", - "url", -] - [[package]] name = "wast" version = "57.0.0" @@ -4220,15 +2858,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" -[[package]] -name = "winnow" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" -dependencies = [ - "memchr", -] - [[package]] name = "wyz" version = "0.5.1" @@ -4262,9 +2891,9 @@ dependencies = [ name = "zerokit_utils" version = "0.3.2" dependencies = [ - "ark-bn254 0.4.0", - "ark-ff 0.4.1", - "color-eyre 0.6.2", + "ark-bn254", + "ark-ff", + "color-eyre", "criterion 0.4.0", "hex-literal", "num-bigint", diff --git a/Cargo.toml b/Cargo.toml index d056920..cbafa6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,5 @@ [workspace] -members = [ - "multiplier", - "private-settlement", - "semaphore", - "rln", - "rln-cli", - "rln-wasm", - "utils", -] +members = ["rln", "rln-cli", "rln-wasm", "utils"] resolver = "2" # Compilation profile for any non-workspace member. @@ -19,6 +11,3 @@ opt-level = 3 [profile.release.package."rln-wasm"] # Tell `rustc` to optimize for small code size. opt-level = "s" - -[profile.release.package."semaphore"] -codegen-units = 1 diff --git a/multiplier/Cargo.toml b/multiplier/Cargo.toml deleted file mode 100644 index 1301aca..0000000 --- a/multiplier/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "multiplier" -version = "0.3.0" -edition = "2018" -license = "MIT OR Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] - -# WASM operations -# wasmer = { version = "2.0" } -# fnv = { version = "1.0.3", default-features = false } -# num = { version = "0.4.0" } -# num-traits = { version = "0.2.0", default-features = false } - -# ZKP Generation -# ark-ff = { version = "0.3.0", default-features = false, features = ["parallel", "asm"] } -ark-std = { version = "0.3.0", default-features = false, features = ["parallel"] } -ark-bn254 = { version = "0.3.0" } -ark-groth16 = { git = "https://github.com/arkworks-rs/groth16", rev = "765817f", features = ["parallel"] } -# ark-poly = { version = "^0.3.0", default-features = false, features = ["parallel"] } -ark-serialize = { version = "0.3.0", default-features = false } - -ark-circom = { git = "https://github.com/gakonst/ark-circom", features = ["circom-2"], rev = "35ce5a9" } - -# error handling -color-eyre = "0.6.1" - -# decoding of data -# hex = "0.4.3" -# byteorder = "1.4.3" diff --git a/multiplier/Makefile.toml b/multiplier/Makefile.toml deleted file mode 100644 index b4cce21..0000000 --- a/multiplier/Makefile.toml +++ /dev/null @@ -1,7 +0,0 @@ -[tasks.build] -command = "cargo" -args = ["build", "--release"] - -[tasks.test] -command = "cargo" -args = ["test", "--release"] diff --git a/multiplier/README.md b/multiplier/README.md deleted file mode 100644 index a2eff0d..0000000 --- a/multiplier/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Multiplier example - -Example wrapper around a basic Circom circuit to test Circom 2 integration -through ark-circom and FFI. - -## Build and Test - -To build and test, run the following commands within the module folder -```bash -cargo make build -cargo make test -``` - -## FFI - -To generate C or Nim bindings from Rust FFI, use `cbindgen` or `nbindgen`: - -``` -cbindgen . -o target/multiplier.h -nbindgen . -o target/multiplier.nim -``` diff --git a/multiplier/resources/circom2_multiplier2.r1cs b/multiplier/resources/circom2_multiplier2.r1cs deleted file mode 100644 index e61b9b091d3e08fab09d4639f9763e776451f221..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmXRiOfF_*U|?VdVkRK20AdgTiGlb)@L}@Tht3lVc2;`4FxH5TXl&f(8n8oif#Jg< zzZ3(QUJ#8BfaIZS2%6^rHAn%X2d{b-h#IgCkb6OV5P-Q$0n9@XFn2=z2KF~d7696s BEn)xw diff --git a/multiplier/resources/circom2_multiplier2.wasm b/multiplier/resources/circom2_multiplier2.wasm deleted file mode 100644 index 7ea487c35dda61de0272a262f576c463808a5ab4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 29071 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 diff --git a/multiplier/src/ffi.rs b/multiplier/src/ffi.rs deleted file mode 100644 index b865a90..0000000 --- a/multiplier/src/ffi.rs +++ /dev/null @@ -1,77 +0,0 @@ -use crate::public::Multiplier; -use std::slice; - -/// Buffer struct is taken from -/// https://github.com/celo-org/celo-threshold-bls-rs/blob/master/crates/threshold-bls-ffi/src/ffi.rs -/// -/// Also heavily inspired by https://github.com/kilic/rln/blob/master/src/ffi.rs - -#[repr(C)] -#[derive(Clone, Debug, PartialEq)] -pub struct Buffer { - pub ptr: *const u8, - pub len: usize, -} - -impl From<&[u8]> for Buffer { - fn from(src: &[u8]) -> Self { - Self { - ptr: &src[0] as *const u8, - len: src.len(), - } - } -} - -impl<'a> From<&Buffer> for &'a [u8] { - fn from(src: &Buffer) -> &'a [u8] { - unsafe { slice::from_raw_parts(src.ptr, src.len) } - } -} - -#[allow(clippy::not_unsafe_ptr_arg_deref)] -#[no_mangle] -pub extern "C" fn new_circuit(ctx: *mut *mut Multiplier) -> bool { - if let Ok(mul) = Multiplier::new() { - unsafe { *ctx = Box::into_raw(Box::new(mul)) }; - true - } else { - false - } -} - -#[allow(clippy::not_unsafe_ptr_arg_deref)] -#[no_mangle] -pub extern "C" fn prove(ctx: *const Multiplier, output_buffer: *mut Buffer) -> bool { - println!("multiplier ffi: prove"); - let mul = unsafe { &*ctx }; - let mut output_data: Vec = Vec::new(); - - match mul.prove(&mut output_data) { - Ok(proof_data) => proof_data, - Err(_) => return false, - }; - unsafe { *output_buffer = Buffer::from(&output_data[..]) }; - std::mem::forget(output_data); - true -} - -#[allow(clippy::not_unsafe_ptr_arg_deref)] -#[no_mangle] -pub extern "C" fn verify( - ctx: *const Multiplier, - proof_buffer: *const Buffer, - result_ptr: *mut u32, -) -> bool { - println!("multiplier ffi: verify"); - let mul = unsafe { &*ctx }; - let proof_data = <&[u8]>::from(unsafe { &*proof_buffer }); - if match mul.verify(proof_data) { - Ok(verified) => verified, - Err(_) => return false, - } { - unsafe { *result_ptr = 0 }; - } else { - unsafe { *result_ptr = 1 }; - }; - true -} diff --git a/multiplier/src/lib.rs b/multiplier/src/lib.rs deleted file mode 100644 index 767579a..0000000 --- a/multiplier/src/lib.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod ffi; -pub mod public; diff --git a/multiplier/src/main.rs b/multiplier/src/main.rs deleted file mode 100644 index 30c1657..0000000 --- a/multiplier/src/main.rs +++ /dev/null @@ -1,49 +0,0 @@ -use ark_circom::{CircomBuilder, CircomConfig}; -use ark_std::rand::thread_rng; -use color_eyre::{Report, Result}; - -use ark_bn254::Bn254; -use ark_groth16::{ - create_random_proof as prove, generate_random_parameters, prepare_verifying_key, verify_proof, -}; - -fn groth16_proof_example() -> Result<()> { - let cfg = CircomConfig::::new( - "./resources/circom2_multiplier2.wasm", - "./resources/circom2_multiplier2.r1cs", - )?; - - let mut builder = CircomBuilder::new(cfg); - builder.push_input("a", 3); - builder.push_input("b", 11); - - // create an empty instance for setting it up - let circom = builder.setup(); - - let mut rng = thread_rng(); - let params = generate_random_parameters::(circom, &mut rng)?; - - let circom = builder.build()?; - - let inputs = circom - .get_public_inputs() - .ok_or(Report::msg("no public inputs"))?; - - let proof = prove(circom, ¶ms, &mut rng)?; - - let pvk = prepare_verifying_key(¶ms.vk); - - match verify_proof(&pvk, &proof, &inputs) { - Ok(_) => Ok(()), - Err(_) => Err(Report::msg("not verified")), - } -} - -fn main() { - println!("Hello, world!"); - - match groth16_proof_example() { - Ok(_) => println!("Success"), - Err(_) => println!("Error"), - } -} diff --git a/multiplier/src/public.rs b/multiplier/src/public.rs deleted file mode 100644 index 4312e7a..0000000 --- a/multiplier/src/public.rs +++ /dev/null @@ -1,79 +0,0 @@ -use ark_circom::{CircomBuilder, CircomCircuit, CircomConfig}; -use ark_std::rand::thread_rng; - -use ark_bn254::Bn254; -use ark_groth16::{ - create_random_proof as prove, generate_random_parameters, prepare_verifying_key, verify_proof, - Proof, ProvingKey, -}; -use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; -use color_eyre::{Report, Result}; -use std::io::{Read, Write}; - -pub struct Multiplier { - circom: CircomCircuit, - params: ProvingKey, -} - -impl Multiplier { - // TODO Break this apart here - pub fn new() -> Result { - let cfg = CircomConfig::::new( - "./resources/circom2_multiplier2.wasm", - "./resources/circom2_multiplier2.r1cs", - )?; - - let mut builder = CircomBuilder::new(cfg); - builder.push_input("a", 3); - builder.push_input("b", 11); - - // create an empty instance for setting it up - let circom = builder.setup(); - - let mut rng = thread_rng(); - - let params = generate_random_parameters::(circom, &mut rng)?; - - let circom = builder.build()?; - - Ok(Multiplier { circom, params }) - } - - // TODO Input Read - pub fn prove(&self, result_data: W) -> Result<()> { - let mut rng = thread_rng(); - - // XXX: There's probably a better way to do this - let circom = self.circom.clone(); - let params = self.params.clone(); - - let proof = prove(circom, ¶ms, &mut rng)?; - - // XXX: Unclear if this is different from other serialization(s) - proof.serialize(result_data)?; - - Ok(()) - } - - pub fn verify(&self, input_data: R) -> Result { - let proof = Proof::deserialize(input_data)?; - - let pvk = prepare_verifying_key(&self.params.vk); - - // XXX Part of input data? - let inputs = self - .circom - .get_public_inputs() - .ok_or(Report::msg("no public inputs"))?; - - let verified = verify_proof(&pvk, &proof, &inputs)?; - - Ok(verified) - } -} - -impl Default for Multiplier { - fn default() -> Self { - Self::new().unwrap() - } -} diff --git a/multiplier/tests/public.rs b/multiplier/tests/public.rs deleted file mode 100644 index f955e71..0000000 --- a/multiplier/tests/public.rs +++ /dev/null @@ -1,21 +0,0 @@ -#[cfg(test)] -mod tests { - use multiplier::public::Multiplier; - - #[test] - fn multiplier_proof() { - let mul = Multiplier::new().unwrap(); - - let mut output_data: Vec = Vec::new(); - let _ = mul.prove(&mut output_data); - - let proof_data = &output_data[..]; - - // XXX Pass as arg? - //let pvk = prepare_verifying_key(&mul.params.vk); - - let verified = mul.verify(proof_data).unwrap(); - - assert!(verified); - } -} diff --git a/private-settlement/Cargo.toml b/private-settlement/Cargo.toml deleted file mode 100644 index 1bdc72a..0000000 --- a/private-settlement/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "private-settlement" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/private-settlement/Makefile.toml b/private-settlement/Makefile.toml deleted file mode 100644 index b4cce21..0000000 --- a/private-settlement/Makefile.toml +++ /dev/null @@ -1,7 +0,0 @@ -[tasks.build] -command = "cargo" -args = ["build", "--release"] - -[tasks.test] -command = "cargo" -args = ["test", "--release"] diff --git a/private-settlement/README.md b/private-settlement/README.md deleted file mode 100644 index b13cd2f..0000000 --- a/private-settlement/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Private Settlement Module - -This module is to provide APIs to manage, compute and verify [Private Settlement](https://rfc.vac.dev/spec/44/) zkSNARK proofs and primitives. - -## Build and Test - -To build and test, run the following commands within the module folder -```bash -cargo make build -cargo make test -``` diff --git a/private-settlement/src/lib.rs b/private-settlement/src/lib.rs deleted file mode 100644 index 8b13789..0000000 --- a/private-settlement/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/private-settlement/tests/private-settlement.rs b/private-settlement/tests/private-settlement.rs deleted file mode 100644 index a458940..0000000 --- a/private-settlement/tests/private-settlement.rs +++ /dev/null @@ -1,11 +0,0 @@ -#[cfg(test)] -mod tests { - #[cfg(test)] - mod tests { - #[test] - fn it_works() { - let result = 2 + 2; - assert_eq!(result, 4); - } - } -} diff --git a/semaphore/Cargo.toml b/semaphore/Cargo.toml deleted file mode 100644 index 13709ee..0000000 --- a/semaphore/Cargo.toml +++ /dev/null @@ -1,50 +0,0 @@ -[package] -name = "semaphore-wrapper" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[features] -default = [] -dylib = [ "wasmer/dylib", "wasmer-engine-dylib", "wasmer-compiler-cranelift" ] - -[dependencies] -ark-bn254 = { version = "0.3.0" } -ark-circom = { git = "https://github.com/gakonst/ark-circom", features=["circom-2"], rev = "35ce5a9" } -ark-ec = { version = "0.3.0", default-features = false, features = ["parallel"] } -ark-groth16 = { git = "https://github.com/arkworks-rs/groth16", rev = "765817f", features = ["parallel"] } -ark-relations = { version = "0.3.0", default-features = false } -ark-std = { version = "0.3.0", default-features = false, features = ["parallel"] } -color-eyre = "0.6.1" -once_cell = "1.8" -rand = "0.8.4" -semaphore = { git = "https://github.com/worldcoin/semaphore-rs", rev = "ee658c2"} -ethers-core = { version = "2.0.8", default-features = false } -ruint = { version = "1.2.0", features = [ "serde", "num-bigint", "ark-ff" ] } -serde = "1.0" -thiserror = "1.0.0" -wasmer = { version = "2.0" } - -[dev-dependencies] -rand_chacha = "0.3.1" -serde_json = "1.0.79" - -[build-dependencies] -color-eyre = "0.6.1" -wasmer = { version = "2.0" } -wasmer-engine-dylib = { version = "2.2.1", optional = true } -wasmer-compiler-cranelift = { version = "3.1.1", optional = true } - -[profile.release] -codegen-units = 1 -lto = true -panic = "abort" -opt-level = 3 - -# Compilation profile for any non-workspace member. -# Dependencies are optimized, even in a dev build. This improves dev performance -# while having neglible impact on incremental build times. -[profile.dev.package."*"] -opt-level = 3 diff --git a/semaphore/Makefile.toml b/semaphore/Makefile.toml deleted file mode 100644 index b4cce21..0000000 --- a/semaphore/Makefile.toml +++ /dev/null @@ -1,7 +0,0 @@ -[tasks.build] -command = "cargo" -args = ["build", "--release"] - -[tasks.test] -command = "cargo" -args = ["test", "--release"] diff --git a/semaphore/README.md b/semaphore/README.md deleted file mode 100644 index 40c2561..0000000 --- a/semaphore/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Semaphore example package - -This is basically a wrapper around/copy of -https://github.com/worldcoin/semaphore-rs to illustrate how e.g. RLN package -can be structured like. - -Goal is also to provide a basic FFI around protocol.rs, which is currently not -in scope for that project. - -See that project for more information. - -## Build and Test - -To build and test, run the following commands within the module folder -```bash -cargo make build -cargo make test -``` diff --git a/semaphore/build.rs b/semaphore/build.rs deleted file mode 100644 index fb469fd..0000000 --- a/semaphore/build.rs +++ /dev/null @@ -1,111 +0,0 @@ -// Adapted from semaphore-rs/build.rs -use color_eyre::eyre::{eyre, Result}; -use std::{ - path::{Component, Path, PathBuf}, - process::Command, -}; - -const ZKEY_FILE: &str = "./vendor/semaphore/build/snark/semaphore_final.zkey"; -const WASM_FILE: &str = "./vendor/semaphore/build/snark/semaphore.wasm"; - -// See -fn absolute(path: &str) -> Result { - let path = Path::new(path); - let mut absolute = if path.is_absolute() { - PathBuf::new() - } else { - std::env::current_dir()? - }; - for component in path.components() { - match component { - Component::CurDir => {} - Component::ParentDir => { - absolute.pop(); - } - component => absolute.push(component.as_os_str()), - } - } - Ok(absolute) -} - -fn build_circuit() -> Result<()> { - println!("cargo:rerun-if-changed=./vendor/semaphore"); - let run = |cmd: &[&str]| -> Result<()> { - // TODO: Use ExitCode::exit_ok() when stable. - Command::new(cmd[0]) - .args(cmd[1..].iter()) - .current_dir("./vendor/semaphore") - .status()? - .success() - .then_some(()) - .ok_or(eyre!("procees returned failure"))?; - Ok(()) - }; - - // Compute absolute paths - let zkey_file = absolute(ZKEY_FILE)?; - let wasm_file = absolute(WASM_FILE)?; - - // Build circuits if not exists - // TODO: This does not rebuild if the semaphore submodule is changed. - // NOTE: This requires npm / nodejs to be installed. - if !(zkey_file.exists() && wasm_file.exists()) { - run(&["npm", "install"])?; - run(&["npm", "exec", "ts-node", "./scripts/compile-circuits.ts"])?; - } - assert!(zkey_file.exists()); - assert!(wasm_file.exists()); - - // Export generated paths - println!("cargo:rustc-env=BUILD_RS_ZKEY_FILE={}", zkey_file.display()); - println!("cargo:rustc-env=BUILD_RS_WASM_FILE={}", wasm_file.display()); - - Ok(()) -} - -#[cfg(feature = "dylib")] -fn build_dylib() -> Result<()> { - use enumset::enum_set; - use std::{env, str::FromStr}; - use wasmer::{Module, Store, Target, Triple}; - use wasmer_compiler_cranelift::Cranelift; - use wasmer_engine_dylib::Dylib; - - let wasm_file = absolute(WASM_FILE)?; - assert!(wasm_file.exists()); - - let out_dir = env::var("OUT_DIR")?; - let out_dir = Path::new(&out_dir).to_path_buf(); - let dylib_file = out_dir.join("semaphore.dylib"); - println!( - "cargo:rustc-env=CIRCUIT_WASM_DYLIB={}", - dylib_file.display() - ); - - if dylib_file.exists() { - return Ok(()); - } - - // Create a WASM engine for the target that can compile - let triple = Triple::from_str(&env::var("TARGET")?).map_err(|e| eyre!(e))?; - let cpu_features = enum_set!(); - let target = Target::new(triple, cpu_features); - let compiler_config = Cranelift::default(); - let engine = Dylib::new(compiler_config).target(target).engine(); - - // Compile the WASM module - let store = Store::new(&engine); - let module = Module::from_file(&store, &wasm_file)?; - module.serialize_to_file(&dylib_file)?; - assert!(dylib_file.exists()); - println!("cargo:warning=Circuit dylib is in {}", dylib_file.display()); - - Ok(()) -} - -fn main() -> Result<()> { - build_circuit()?; - #[cfg(feature = "dylib")] - build_dylib()?; - Ok(()) -} diff --git a/semaphore/src/circuit.rs b/semaphore/src/circuit.rs deleted file mode 100644 index 58dfcf5..0000000 --- a/semaphore/src/circuit.rs +++ /dev/null @@ -1,79 +0,0 @@ -// Adapted from semaphore-rs/src/circuit.rs -use ark_bn254::{Bn254, Fr}; -use ark_circom::{read_zkey, WitnessCalculator}; -use ark_groth16::ProvingKey; -use ark_relations::r1cs::ConstraintMatrices; -use core::include_bytes; -use once_cell::sync::{Lazy, OnceCell}; -use std::{io::Cursor, sync::Mutex}; -use wasmer::{Module, Store}; - -#[cfg(feature = "dylib")] -use std::{env, path::Path}; -#[cfg(feature = "dylib")] -use wasmer::Dylib; - -const ZKEY_BYTES: &[u8] = include_bytes!(env!("BUILD_RS_ZKEY_FILE")); - -#[cfg(not(feature = "dylib"))] -const WASM: &[u8] = include_bytes!(env!("BUILD_RS_WASM_FILE")); - -static ZKEY: Lazy<(ProvingKey, ConstraintMatrices)> = Lazy::new(|| { - let mut reader = Cursor::new(ZKEY_BYTES); - read_zkey(&mut reader).expect("zkey should be valid") -}); - -static WITNESS_CALCULATOR: OnceCell> = OnceCell::new(); - -/// Initialize the library. -#[cfg(feature = "dylib")] -pub fn initialize(dylib_path: &Path) { - WITNESS_CALCULATOR - .set(from_dylib(dylib_path)) - .expect("Failed to initialize witness calculator"); - - // Force init of ZKEY - Lazy::force(&ZKEY); -} - -#[cfg(feature = "dylib")] -fn from_dylib(path: &Path) -> Mutex { - let store = Store::new(&Dylib::headless().engine()); - // The module must be exported using [`Module::serialize`]. - let module = unsafe { - Module::deserialize_from_file(&store, path).expect("Failed to load wasm dylib module") - }; - let result = - WitnessCalculator::from_module(module).expect("Failed to create witness calculator"); - Mutex::new(result) -} - -#[must_use] -pub fn zkey() -> &'static (ProvingKey, ConstraintMatrices) { - &ZKEY -} - -#[cfg(feature = "dylib")] -#[must_use] -pub fn witness_calculator() -> &'static Mutex { - WITNESS_CALCULATOR.get_or_init(|| { - let path = env::var("CIRCUIT_WASM_DYLIB").expect( - "Semaphore-rs is not initialized. The library needs to be initialized before use when \ - build with the `cdylib` feature. You can initialize by calling `initialize` or \ - seting the `CIRCUIT_WASM_DYLIB` environment variable.", - ); - from_dylib(Path::new(&path)) - }) -} - -#[cfg(not(feature = "dylib"))] -#[must_use] -pub fn witness_calculator() -> &'static Mutex { - WITNESS_CALCULATOR.get_or_init(|| { - let store = Store::default(); - let module = Module::from_binary(&store, WASM).expect("wasm should be valid"); - let result = - WitnessCalculator::from_module(module).expect("Failed to create witness calculator"); - Mutex::new(result) - }) -} diff --git a/semaphore/src/lib.rs b/semaphore/src/lib.rs deleted file mode 100644 index 134257a..0000000 --- a/semaphore/src/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![allow(clippy::multiple_crate_versions)] - -pub mod circuit; -pub mod protocol; - -#[cfg(feature = "dylib")] -pub use circuit::initialize; diff --git a/semaphore/src/protocol.rs b/semaphore/src/protocol.rs deleted file mode 100644 index 783e28b..0000000 --- a/semaphore/src/protocol.rs +++ /dev/null @@ -1,215 +0,0 @@ -// Adapted from semaphore-rs/src/protocol.rs -// For illustration purposes only as an example protocol - -// Private module -use crate::circuit::{witness_calculator, zkey}; - -use ark_bn254::{Bn254, Parameters}; -use ark_circom::CircomReduction; -use ark_ec::bn::Bn; -use ark_groth16::{ - create_proof_with_reduction_and_matrices, prepare_verifying_key, Proof as ArkProof, -}; -use ark_relations::r1cs::SynthesisError; -use ark_std::UniformRand; -use color_eyre::{Report, Result}; -use ethers_core::types::U256; -use rand::{thread_rng, Rng}; -use semaphore::{ - identity::Identity, - merkle_tree::{self, Branch}, - poseidon, - poseidon_tree::PoseidonHash, - Field, -}; -use serde::{Deserialize, Serialize}; -use std::time::Instant; -use thiserror::Error; - -// Matches the private G1Tup type in ark-circom. -pub type G1 = (U256, U256); - -// Matches the private G2Tup type in ark-circom. -pub type G2 = ([U256; 2], [U256; 2]); - -/// Wrap a proof object so we have serde support -#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] -pub struct Proof(G1, G2, G1); - -impl From>> for Proof { - fn from(proof: ArkProof>) -> Self { - let proof = ark_circom::ethereum::Proof::from(proof); - let (a, b, c) = proof.as_tuple(); - Self(a, b, c) - } -} - -impl From for ArkProof> { - fn from(proof: Proof) -> Self { - let eth_proof = ark_circom::ethereum::Proof { - a: ark_circom::ethereum::G1 { - x: proof.0 .0, - y: proof.0 .1, - }, - #[rustfmt::skip] // Rustfmt inserts some confusing spaces - b: ark_circom::ethereum::G2 { - // The order of coefficients is flipped. - x: [proof.1.0[1], proof.1.0[0]], - y: [proof.1.1[1], proof.1.1[0]], - }, - c: ark_circom::ethereum::G1 { - x: proof.2 .0, - y: proof.2 .1, - }, - }; - eth_proof.into() - } -} - -/// Helper to merkle proof into a bigint vector -/// TODO: we should create a From trait for this -fn merkle_proof_to_vec(proof: &merkle_tree::Proof) -> Vec { - proof - .0 - .iter() - .map(|x| match x { - Branch::Left(value) | Branch::Right(value) => *value, - }) - .collect() -} - -/// Generates the nullifier hash -#[must_use] -pub fn generate_nullifier_hash(identity: &Identity, external_nullifier: Field) -> Field { - poseidon::hash2(external_nullifier, identity.nullifier) -} - -#[derive(Error, Debug)] -pub enum ProofError { - #[error("Error reading circuit key: {0}")] - CircuitKeyError(#[from] std::io::Error), - #[error("Error producing witness: {0}")] - WitnessError(Report), - #[error("Error producing proof: {0}")] - SynthesisError(#[from] SynthesisError), - #[error("Error converting public input: {0}")] - ToFieldError(#[from] ruint::ToFieldError), -} - -/// Generates a semaphore proof -/// -/// # Errors -/// -/// Returns a [`ProofError`] if proving fails. -pub fn generate_proof( - identity: &Identity, - merkle_proof: &merkle_tree::Proof, - external_nullifier_hash: Field, - signal_hash: Field, -) -> Result { - generate_proof_rng( - identity, - merkle_proof, - external_nullifier_hash, - signal_hash, - &mut thread_rng(), - ) -} - -/// Generates a semaphore proof from entropy -/// -/// # Errors -/// -/// Returns a [`ProofError`] if proving fails. -pub fn generate_proof_rng( - identity: &Identity, - merkle_proof: &merkle_tree::Proof, - external_nullifier_hash: Field, - signal_hash: Field, - rng: &mut impl Rng, -) -> Result { - generate_proof_rs( - identity, - merkle_proof, - external_nullifier_hash, - signal_hash, - ark_bn254::Fr::rand(rng), - ark_bn254::Fr::rand(rng), - ) -} - -fn generate_proof_rs( - identity: &Identity, - merkle_proof: &merkle_tree::Proof, - external_nullifier_hash: Field, - signal_hash: Field, - r: ark_bn254::Fr, - s: ark_bn254::Fr, -) -> Result { - let inputs = [ - ("identityNullifier", vec![identity.nullifier]), - ("identityTrapdoor", vec![identity.trapdoor]), - ("treePathIndices", merkle_proof.path_index()), - ("treeSiblings", merkle_proof_to_vec(merkle_proof)), - ("externalNullifier", vec![external_nullifier_hash]), - ("signalHash", vec![signal_hash]), - ]; - let inputs = inputs.into_iter().map(|(name, values)| { - ( - name.to_string(), - values.iter().copied().map(Into::into).collect::>(), - ) - }); - - let now = Instant::now(); - - let full_assignment = witness_calculator() - .lock() - .expect("witness_calculator mutex should not get poisoned") - .calculate_witness_element::(inputs, false) - .map_err(ProofError::WitnessError)?; - - println!("witness generation took: {:.2?}", now.elapsed()); - - let now = Instant::now(); - let zkey = zkey(); - let ark_proof = create_proof_with_reduction_and_matrices::<_, CircomReduction>( - &zkey.0, - r, - s, - &zkey.1, - zkey.1.num_instance_variables, - zkey.1.num_constraints, - full_assignment.as_slice(), - )?; - let proof = ark_proof.into(); - println!("proof generation took: {:.2?}", now.elapsed()); - - Ok(proof) -} - -/// Verifies a given semaphore proof -/// -/// # Errors -/// -/// Returns a [`ProofError`] if verifying fails. Verification failure does not -/// necessarily mean the proof is incorrect. -pub fn verify_proof( - root: Field, - nullifier_hash: Field, - signal_hash: Field, - external_nullifier_hash: Field, - proof: &Proof, -) -> Result { - let zkey = zkey(); - let pvk = prepare_verifying_key(&zkey.0.vk); - - let public_inputs = [root, nullifier_hash, signal_hash, external_nullifier_hash] - .iter() - .map(ark_bn254::Fr::try_from) - .collect::, _>>()?; - - let ark_proof = (*proof).into(); - let result = ark_groth16::verify_proof(&pvk, &ark_proof, &public_inputs[..])?; - Ok(result) -} diff --git a/semaphore/tests/protocol.rs b/semaphore/tests/protocol.rs deleted file mode 100644 index ac432b8..0000000 --- a/semaphore/tests/protocol.rs +++ /dev/null @@ -1,115 +0,0 @@ -#[cfg(test)] -mod tests { - use ark_bn254::Parameters; - use ark_ec::bn::Bn; - use ark_groth16::Proof as ArkProof; - use rand::{Rng, SeedableRng as _}; - use rand_chacha::ChaChaRng; - use semaphore::{hash_to_field, identity::Identity, poseidon_tree::PoseidonTree, Field}; - use semaphore_wrapper::protocol::{ - generate_nullifier_hash, generate_proof, generate_proof_rng, verify_proof, Proof, - }; - use serde_json::json; - - #[test] - fn test_semaphore() { - // generate identity - let id = Identity::from_seed(b"secret"); - - // generate merkle tree - let leaf = Field::from(0); - let mut tree = PoseidonTree::new(21, leaf); - tree.set(0, id.commitment()); - - let merkle_proof = tree.proof(0).expect("proof should exist"); - let root = tree.root().into(); - - // change signal and external_nullifier here - let signal_hash = hash_to_field(b"xxx"); - let external_nullifier_hash = hash_to_field(b"appId"); - - let nullifier_hash = generate_nullifier_hash(&id, external_nullifier_hash); - - let proof = - generate_proof(&id, &merkle_proof, external_nullifier_hash, signal_hash).unwrap(); - - let success = verify_proof( - root, - nullifier_hash, - signal_hash, - external_nullifier_hash, - &proof, - ) - .unwrap(); - - assert!(success); - } - - fn arb_proof(seed: u64) -> Proof { - // Deterministic randomness for testing - let mut rng = ChaChaRng::seed_from_u64(seed); - - // generate identity - let seed: [u8; 16] = rng.gen(); - let id = Identity::from_seed(&seed); - - // generate merkle tree - let leaf = Field::from(0); - let mut tree = PoseidonTree::new(21, leaf); - tree.set(0, id.commitment()); - - let merkle_proof = tree.proof(0).expect("proof should exist"); - - let external_nullifier: [u8; 16] = rng.gen(); - let external_nullifier_hash = hash_to_field(&external_nullifier); - - let signal: [u8; 16] = rng.gen(); - let signal_hash = hash_to_field(&signal); - - generate_proof_rng( - &id, - &merkle_proof, - external_nullifier_hash, - signal_hash, - &mut rng, - ) - .unwrap() - } - - #[test] - fn test_proof_cast_roundtrip() { - let proof = arb_proof(123); - let ark_proof: ArkProof> = proof.into(); - let result: Proof = ark_proof.into(); - assert_eq!(proof, result); - } - - #[test] - fn test_proof_serialize() { - let proof = arb_proof(456); - let json = serde_json::to_value(&proof).unwrap(); - assert_eq!( - json, - json!([ - [ - "0x249ae469686987ee9368da60dd177a8c42891c02f5760e955e590c79d55cfab2", - "0xf22e25870f49388459d388afb24dcf6ec11bb2d4def1e2ec26d6e42f373aad8" - ], - [ - [ - "0x17bd25dbd7436c30ea5b8a3a47aadf11ed646c4b25cc14a84ff8cbe0252ff1f8", - "0x1c140668c56688367416534d57b4a14e5a825efdd5e121a6a2099f6dc4cd277b" - ], - [ - "0x26a8524759d969ea0682a092cf7a551697d81962d6c998f543f81e52d83e05e1", - "0x273eb3f796fd1807b9df9c6d769d983e3dabdc61677b75d48bb7691303b2c8dd" - ] - ], - [ - "0x62715c53a0eb4c46dbb5f73f1fd7449b9c63d37c1ece65debc39b472065a90f", - "0x114f7becc66f1cd7a8b01c89db8233622372fc0b6fc037c4313bca41e2377fd9" - ] - ]) - ); - } -} diff --git a/semaphore/vendor/semaphore b/semaphore/vendor/semaphore deleted file mode 160000 index 5186a94..0000000 --- a/semaphore/vendor/semaphore +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5186a940ff495ff163bd5779631a716d0bf96507