diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 4dd38496..1ba15d57 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -31,7 +31,7 @@ jobs:
aws-region: us-west-2
- name: Wakeup runner
- run: .github/scripts/wakeup.sh
+ run: .github/scripts/wakeup.sh
build:
runs-on: [summa-solvency-runner]
@@ -46,7 +46,7 @@ jobs:
- name: Install solc
run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.20 && solc --version
- - name: Test KZG Prover
+ - name: Test Prover
run: |
cd prover
cargo test --release -- --nocapture
@@ -54,13 +54,13 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- - name: Test backend
- run: |
- cd backend
- cargo test --release -- --nocapture
+ # TODO restore workflow
+ # - name: Test backend
+ # run: |
+ # cd backend
+ # cargo test --release -- --nocapture
- - name: Test example
- run: |
- cd backend
- cargo run --release --example summa_solvency_flow
-
+ # - name: Test example
+ # run: |
+ # cd backend
+ # cargo run --release --example summa_solvency_flow
diff --git a/backend/Cargo.lock b/backend/Cargo.lock
index 08359b39..f6a50e97 100644
--- a/backend/Cargo.lock
+++ b/backend/Cargo.lock
@@ -66,11 +66,10 @@ checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "ark-std"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c"
+checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185"
dependencies = [
- "colored",
"num-traits",
"rand",
]
@@ -481,17 +480,6 @@ dependencies = [
"thiserror",
]
-[[package]]
-name = "colored"
-version = "2.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6"
-dependencies = [
- "is-terminal",
- "lazy_static",
- "windows-sys",
-]
-
[[package]]
name = "const-oid"
version = "0.9.4"
@@ -1336,6 +1324,7 @@ version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
+ "serde",
"typenum",
"version_check",
"zeroize",
@@ -1408,6 +1397,23 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "halo2_proofs"
+version = "0.2.0"
+source = "git+https://github.com/han0110/halo2.git?branch=feature/for-benchmark#4981b8d5bdaab04af9b56a5d2c482b6eec9f7fa4"
+dependencies = [
+ "ark-std",
+ "blake2b_simd",
+ "ff",
+ "group",
+ "halo2curves 0.3.3",
+ "rand_chacha",
+ "rand_core",
+ "rayon",
+ "sha3 0.9.1",
+ "tracing",
+]
+
[[package]]
name = "halo2_proofs"
version = "0.2.0"
@@ -1416,7 +1422,7 @@ dependencies = [
"blake2b_simd",
"ff",
"group",
- "halo2curves",
+ "halo2curves 0.1.0",
"maybe-rayon",
"rand_chacha",
"rand_core",
@@ -1431,7 +1437,7 @@ source = "git+https://github.com/summa-dev/halo2-solidity-verifier#d33972567f83f
dependencies = [
"askama",
"blake2b_simd",
- "halo2_proofs",
+ "halo2_proofs 0.2.0 (git+https://github.com/summa-dev/halo2)",
"hex",
"itertools 0.11.0",
"revm",
@@ -1459,6 +1465,43 @@ dependencies = [
"subtle",
]
+[[package]]
+name = "halo2curves"
+version = "0.3.2"
+source = "git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.2#9f5c50810bbefe779ee5cf1d852b2fe85dc35d5e"
+dependencies = [
+ "ff",
+ "group",
+ "lazy_static",
+ "num-bigint",
+ "num-traits",
+ "pasta_curves",
+ "paste",
+ "rand",
+ "rand_core",
+ "static_assertions",
+ "subtle",
+]
+
+[[package]]
+name = "halo2curves"
+version = "0.3.3"
+source = "git+https://github.com/privacy-scaling-explorations/halo2curves?tag=0.3.3#8e4cb9f0c66c864e8ca25da07f50ae95f664a5b7"
+dependencies = [
+ "ff",
+ "group",
+ "lazy_static",
+ "num-bigint",
+ "num-traits",
+ "pasta_curves",
+ "paste",
+ "rand",
+ "rand_core",
+ "serde",
+ "static_assertions",
+ "subtle",
+]
+
[[package]]
name = "hashbrown"
version = "0.12.3"
@@ -1506,6 +1549,9 @@ name = "hex"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+dependencies = [
+ "serde",
+]
[[package]]
name = "hex-literal"
@@ -2214,8 +2260,10 @@ dependencies = [
"blake2b_simd",
"ff",
"group",
+ "hex",
"lazy_static",
"rand",
+ "serde",
"static_assertions",
"subtle",
]
@@ -2376,6 +2424,36 @@ version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+[[package]]
+name = "plonkish_backend"
+version = "0.1.0"
+source = "git+https://github.com/han0110/plonkish#303cf244803ea56d1ac8c24829ec4c67e4e798ab"
+dependencies = [
+ "bincode",
+ "bitvec 1.0.1",
+ "generic-array",
+ "halo2_proofs 0.2.0 (git+https://github.com/han0110/halo2.git?branch=feature/for-benchmark)",
+ "halo2curves 0.3.3",
+ "itertools 0.10.5",
+ "num-bigint",
+ "num-integer",
+ "pasta_curves",
+ "poseidon",
+ "rand",
+ "rayon",
+ "serde",
+ "sha3 0.10.8",
+]
+
+[[package]]
+name = "poseidon"
+version = "0.2.0"
+source = "git+https://github.com/han0110/poseidon?branch=feature/with-spec#fa4c2544ed38666f1f72d1c4fd0956756a7112b3"
+dependencies = [
+ "halo2curves 0.3.2",
+ "subtle",
+]
+
[[package]]
name = "ppv-lite86"
version = "0.2.17"
@@ -3201,7 +3279,7 @@ dependencies = [
"csv",
"ethers",
"futures",
- "halo2_proofs",
+ "halo2_proofs 0.2.0 (git+https://github.com/han0110/halo2.git?branch=feature/for-benchmark)",
"halo2_solidity_verifier",
"num-bigint",
"num-traits",
@@ -3209,29 +3287,20 @@ dependencies = [
"reqwest",
"serde",
"serde_json",
- "summa-solvency",
+ "summa-hyperplonk",
"tokio",
]
[[package]]
-name = "summa-solvency"
-version = "0.2.0"
+name = "summa-hyperplonk"
+version = "0.3.0"
dependencies = [
- "ark-std",
"csv",
- "ethers",
- "halo2_proofs",
- "halo2_solidity_verifier",
- "hex",
- "itertools 0.10.5",
+ "halo2_proofs 0.2.0 (git+https://github.com/han0110/halo2.git?branch=feature/for-benchmark)",
"num-bigint",
- "num-traits",
- "num_cpus",
+ "plonkish_backend",
"rand",
"rayon",
- "regex",
- "serde",
- "serde_json",
]
[[package]]
diff --git a/backend/Cargo.toml b/backend/Cargo.toml
index b6b902e0..41afc304 100644
--- a/backend/Cargo.toml
+++ b/backend/Cargo.toml
@@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-summa-solvency = { path = "../prover" }
-halo2_proofs = { git = "https://github.com/summa-dev/halo2"}
+summa-hyperplonk = { path = "../prover" }
+halo2_proofs = { git = "https://github.com/han0110/halo2.git", branch = "feature/for-benchmark", optional = true }
csv = "1.2.2"
futures = "0.3.28"
num-bigint = "0.4.3"
diff --git a/prover/.gitignore b/prover/.gitignore
index d7c172bc..074070ee 100644
--- a/prover/.gitignore
+++ b/prover/.gitignore
@@ -1,5 +1,21 @@
# Generated by Cargo
# will have compiled files and executables
+debug/
+target/
+
+# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
+# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
+Cargo.lock
+
+# These are backup files generated by rustfmt
+**/*.rs.bk
+
+# MSVC Windows builds of rustc generate these, which store debugging information
+*.pdb
+
+# Added by cargo
+
/target
-/ptau
-/benches/csv
+
+#VSCode
+.vscode/
diff --git a/prover/Cargo.lock b/prover/Cargo.lock
index 84c8d67a..97fe6344 100644
--- a/prover/Cargo.lock
+++ b/prover/Cargo.lock
@@ -2,108 +2,21 @@
# It is not intended for manual editing.
version = 3
-[[package]]
-name = "Inflector"
-version = "0.11.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
-dependencies = [
- "lazy_static",
- "regex",
-]
-
-[[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 = "aes"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2"
-dependencies = [
- "cfg-if",
- "cipher",
- "cpufeatures",
-]
-
-[[package]]
-name = "ahash"
-version = "0.8.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01"
-dependencies = [
- "cfg-if",
- "once_cell",
- "version_check",
- "zerocopy",
-]
-
[[package]]
name = "aho-corasick"
-version = "1.1.2"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
-[[package]]
-name = "allocator-api2"
-version = "0.2.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
-
-[[package]]
-name = "alloy-primitives"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78"
-dependencies = [
- "alloy-rlp",
- "bytes",
- "cfg-if",
- "const-hex",
- "derive_more",
- "hex-literal",
- "itoa",
- "ruint",
- "tiny-keccak",
-]
-
-[[package]]
-name = "alloy-rlp"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac"
-dependencies = [
- "alloy-rlp-derive",
- "arrayvec",
- "bytes",
-]
-
-[[package]]
-name = "alloy-rlp-derive"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
-
[[package]]
name = "android-tzdata"
version = "0.1.1"
@@ -121,124 +34,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.75"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
-
-[[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",
- "rustc_version 0.3.3",
- "zeroize",
-]
-
-[[package]]
-name = "ark-ff"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba"
-dependencies = [
- "ark-ff-asm 0.4.2",
- "ark-ff-macros 0.4.2",
- "ark-serialize 0.4.2",
- "ark-std 0.4.0",
- "derivative",
- "digest 0.10.7",
- "itertools 0.10.5",
- "num-bigint",
- "num-traits",
- "paste",
- "rustc_version 0.4.0",
- "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"
-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.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"
-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-serialize"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671"
-dependencies = [
- "ark-std 0.3.0",
- "digest 0.9.0",
-]
-
-[[package]]
-name = "ark-serialize"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5"
-dependencies = [
- "ark-std 0.4.0",
- "digest 0.10.7",
- "num-bigint",
-]
-
-[[package]]
-name = "ark-std"
-version = "0.3.0"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c"
-dependencies = [
- "colored",
- "num-traits",
- "rand",
-]
+checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"
[[package]]
name = "ark-std"
@@ -262,199 +60,32 @@ version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
-[[package]]
-name = "ascii-canvas"
-version = "3.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6"
-dependencies = [
- "term",
-]
-
-[[package]]
-name = "askama"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28"
-dependencies = [
- "askama_derive",
- "askama_escape",
-]
-
-[[package]]
-name = "askama_derive"
-version = "0.12.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a0fc7dcf8bd4ead96b1d36b41df47c14beedf7b0301fc543d8f2384e66a2ec0"
-dependencies = [
- "askama_parser",
- "basic-toml",
- "mime",
- "mime_guess",
- "proc-macro2",
- "quote",
- "serde",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "askama_escape"
-version = "0.10.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341"
-
-[[package]]
-name = "askama_parser"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c268a96e01a4c47c8c5c2472aaa570707e006a875ea63e819f75474ceedaf7b4"
-dependencies = [
- "nom",
-]
-
-[[package]]
-name = "async-trait"
-version = "0.1.74"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "async_io_stream"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c"
-dependencies = [
- "futures",
- "pharos",
- "rustc_version 0.4.0",
-]
-
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
- "hermit-abi 0.1.19",
+ "hermit-abi",
"libc",
"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"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
-
-[[package]]
-name = "backtrace"
-version = "0.3.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
-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 = "base64"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
-
-[[package]]
-name = "base64"
-version = "0.21.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
-
-[[package]]
-name = "base64ct"
-version = "1.6.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
[[package]]
-name = "basic-toml"
-version = "0.1.7"
+name = "bincode"
+version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f2139706359229bfa8f19142ac1155b4b80beafb7a60471ac5dd109d4a19778"
+checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
-[[package]]
-name = "bech32"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445"
-
-[[package]]
-name = "bindgen"
-version = "0.66.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7"
-dependencies = [
- "bitflags 2.4.1",
- "cexpr",
- "clang-sys",
- "lazy_static",
- "lazycell",
- "log",
- "peeking_take_while",
- "prettyplease",
- "proc-macro2",
- "quote",
- "regex",
- "rustc-hash",
- "shlex",
- "syn 2.0.39",
- "which",
-]
-
-[[package]]
-name = "bit-set"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
-dependencies = [
- "bit-vec",
-]
-
-[[package]]
-name = "bit-vec"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
-
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -463,9 +94,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.4.1"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
+checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
[[package]]
name = "bitvec"
@@ -516,170 +147,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
-name = "blst"
-version = "0.3.11"
+name = "bumpalo"
+version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b"
-dependencies = [
- "cc",
- "glob",
- "threadpool",
- "zeroize",
-]
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
-name = "bs58"
-version = "0.5.0"
+name = "bytemuck"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896"
-dependencies = [
- "sha2",
- "tinyvec",
-]
+checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15"
[[package]]
-name = "bumpalo"
-version = "3.14.0"
+name = "byteorder"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
-name = "byte-slice-cast"
-version = "1.2.2"
+name = "cast"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
-name = "bytemuck"
-version = "1.14.0"
+name = "cc"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6"
+checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7"
[[package]]
-name = "byteorder"
-version = "1.5.0"
+name = "cfg-if"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
-name = "bytes"
-version = "1.5.0"
+name = "chrono"
+version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "c-kzg"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac926d808fb72fe09ebf471a091d6d72918876ccf0b4989766093d2d0d24a0ef"
-dependencies = [
- "bindgen",
- "blst",
- "cc",
- "glob",
- "hex",
- "libc",
- "serde",
-]
-
-[[package]]
-name = "camino"
-version = "1.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "cargo-platform"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "cargo_metadata"
-version = "0.18.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
-dependencies = [
- "camino",
- "cargo-platform",
- "semver 1.0.20",
- "serde",
- "serde_json",
- "thiserror",
-]
-
-[[package]]
-name = "cast"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
-
-[[package]]
-name = "cc"
-version = "1.0.83"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "cexpr"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
-dependencies = [
- "nom",
-]
-
-[[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.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
+checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
- "windows-targets 0.48.5",
-]
-
-[[package]]
-name = "cipher"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
-dependencies = [
- "crypto-common",
- "inout",
-]
-
-[[package]]
-name = "clang-sys"
-version = "1.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
-dependencies = [
- "glob",
- "libc",
- "libloading",
+ "windows-targets",
]
[[package]]
@@ -693,126 +207,29 @@ dependencies = [
"unicode-width",
]
-[[package]]
-name = "cmake"
-version = "0.1.50"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130"
-dependencies = [
- "cc",
-]
-
-[[package]]
-name = "coins-bip32"
-version = "0.8.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3"
-dependencies = [
- "bs58",
- "coins-core",
- "digest 0.10.7",
- "hmac",
- "k256",
- "serde",
- "sha2",
- "thiserror",
-]
-
-[[package]]
-name = "coins-bip39"
-version = "0.8.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528"
-dependencies = [
- "bitvec",
- "coins-bip32",
- "hmac",
- "once_cell",
- "pbkdf2 0.12.2",
- "rand",
- "sha2",
- "thiserror",
-]
-
-[[package]]
-name = "coins-core"
-version = "0.8.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979"
-dependencies = [
- "base64 0.21.5",
- "bech32",
- "bs58",
- "digest 0.10.7",
- "generic-array",
- "hex",
- "ripemd",
- "serde",
- "serde_derive",
- "sha2",
- "sha3 0.10.8",
- "thiserror",
-]
-
[[package]]
name = "color_quant"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
-[[package]]
-name = "colored"
-version = "2.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6"
-dependencies = [
- "is-terminal",
- "lazy_static",
- "windows-sys 0.48.0",
-]
-
[[package]]
name = "const-cstr"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed3d0b5ff30645a68f35ece8cea4556ca14ef8a1651455f789a099a0513532a6"
-[[package]]
-name = "const-hex"
-version = "1.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557"
-dependencies = [
- "cfg-if",
- "cpufeatures",
- "hex",
- "proptest",
- "serde",
-]
-
-[[package]]
-name = "const-oid"
-version = "0.9.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
-
[[package]]
name = "constant_time_eq"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2"
-[[package]]
-name = "convert_case"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
-
[[package]]
name = "core-foundation"
-version = "0.9.3"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
dependencies = [
"core-foundation-sys",
"libc",
@@ -820,9 +237,9 @@ dependencies = [
[[package]]
name = "core-foundation-sys"
-version = "0.8.4"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
[[package]]
name = "core-graphics"
@@ -839,9 +256,9 @@ dependencies = [
[[package]]
name = "core-graphics-types"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33"
+checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf"
dependencies = [
"bitflags 1.3.2",
"core-foundation",
@@ -862,18 +279,18 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.2.11"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0"
+checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
dependencies = [
"libc",
]
[[package]]
name = "crc32fast"
-version = "1.3.2"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"
dependencies = [
"cfg-if",
]
@@ -889,7 +306,7 @@ dependencies = [
"clap",
"criterion-plot",
"csv",
- "itertools 0.10.5",
+ "itertools",
"lazy_static",
"num-traits",
"oorandom",
@@ -911,59 +328,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
dependencies = [
"cast",
- "itertools 0.10.5",
+ "itertools",
]
[[package]]
name = "crossbeam-deque"
-version = "0.8.3"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
+checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
- "cfg-if",
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
-version = "0.9.15"
+version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
- "autocfg",
- "cfg-if",
"crossbeam-utils",
- "memoffset",
- "scopeguard",
]
[[package]]
name = "crossbeam-utils"
-version = "0.8.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "crunchy"
-version = "0.2.2"
+version = "0.8.19"
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",
-]
+checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
[[package]]
name = "crypto-common"
@@ -996,15 +387,6 @@ dependencies = [
"memchr",
]
-[[package]]
-name = "ctr"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
-dependencies = [
- "cipher",
-]
-
[[package]]
name = "darling"
version = "0.10.2"
@@ -1040,36 +422,6 @@ dependencies = [
"syn 1.0.109",
]
-[[package]]
-name = "der"
-version = "0.7.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c"
-dependencies = [
- "const-oid",
- "zeroize",
-]
-
-[[package]]
-name = "deranged"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
-dependencies = [
- "powerfmt",
-]
-
-[[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_builder"
version = "0.9.0"
@@ -1095,25 +447,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 = "diff"
-version = "0.1.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
-
[[package]]
name = "digest"
version = "0.9.0"
@@ -1130,18 +463,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer 0.10.4",
- "const-oid",
"crypto-common",
- "subtle",
-]
-
-[[package]]
-name = "dirs"
-version = "5.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
-dependencies = [
- "dirs-sys",
]
[[package]]
@@ -1154,18 +476,6 @@ dependencies = [
"dirs-sys-next",
]
-[[package]]
-name = "dirs-sys"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
-dependencies = [
- "libc",
- "option-ext",
- "redox_users",
- "windows-sys 0.48.0",
-]
-
[[package]]
name = "dirs-sys-next"
version = "0.1.2"
@@ -1186,12 +496,6 @@ dependencies = [
"libloading",
]
-[[package]]
-name = "dunce"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b"
-
[[package]]
name = "dwrote"
version = "0.11.0"
@@ -1204,512 +508,57 @@ dependencies = [
"wio",
]
-[[package]]
-name = "ecdsa"
-version = "0.16.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
-dependencies = [
- "der",
- "digest 0.10.7",
- "elliptic-curve",
- "rfc6979",
- "signature",
- "spki",
-]
-
[[package]]
name = "either"
-version = "1.9.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
+checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2"
[[package]]
-name = "elliptic-curve"
-version = "0.13.8"
+name = "fdeflate"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
+checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645"
dependencies = [
- "base16ct",
- "crypto-bigint",
- "digest 0.10.7",
- "ff",
- "generic-array",
- "group",
- "pkcs8",
- "rand_core",
- "sec1",
- "subtle",
- "zeroize",
+ "simd-adler32",
]
[[package]]
-name = "ena"
-version = "0.14.2"
+name = "ff"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1"
+checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
dependencies = [
- "log",
+ "bitvec",
+ "rand_core",
+ "subtle",
]
[[package]]
-name = "encoding_rs"
-version = "0.8.33"
+name = "flate2"
+version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
+checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
dependencies = [
- "cfg-if",
+ "crc32fast",
+ "miniz_oxide",
]
[[package]]
-name = "enr"
-version = "0.9.1"
+name = "float-ord"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b"
-dependencies = [
- "base64 0.21.5",
- "bytes",
- "hex",
- "k256",
- "log",
- "rand",
- "rlp",
- "serde",
- "sha3 0.10.8",
- "zeroize",
-]
+checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e"
[[package]]
-name = "enumn"
-version = "0.1.12"
+name = "fnv"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[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.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
-dependencies = [
- "libc",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "eth-keystore"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab"
-dependencies = [
- "aes",
- "ctr",
- "digest 0.10.7",
- "hex",
- "hmac",
- "pbkdf2 0.11.0",
- "rand",
- "scrypt",
- "serde",
- "serde_json",
- "sha2",
- "sha3 0.10.8",
- "thiserror",
- "uuid",
-]
-
-[[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 0.10.8",
- "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"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a5344eea9b20effb5efeaad29418215c4d27017639fd1f908260f59cbbd226e"
-dependencies = [
- "ethers-addressbook",
- "ethers-contract",
- "ethers-core",
- "ethers-etherscan",
- "ethers-middleware",
- "ethers-providers",
- "ethers-signers",
- "ethers-solc",
-]
-
-[[package]]
-name = "ethers-addressbook"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c405f24ea3a517899ba7985385c43dc4a7eb1209af3b1e0a1a32d7dcc7f8d09"
-dependencies = [
- "ethers-core",
- "once_cell",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "ethers-contract"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0111ead599d17a7bff6985fd5756f39ca7033edc79a31b23026a8d5d64fa95cd"
-dependencies = [
- "const-hex",
- "ethers-contract-abigen",
- "ethers-contract-derive",
- "ethers-core",
- "ethers-providers",
- "futures-util",
- "once_cell",
- "pin-project",
- "serde",
- "serde_json",
- "thiserror",
-]
-
-[[package]]
-name = "ethers-contract-abigen"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51258120c6b47ea9d9bec0d90f9e8af71c977fbefbef8213c91bfed385fe45eb"
-dependencies = [
- "Inflector",
- "const-hex",
- "dunce",
- "ethers-core",
- "eyre",
- "prettyplease",
- "proc-macro2",
- "quote",
- "regex",
- "serde",
- "serde_json",
- "syn 2.0.39",
- "toml",
- "walkdir",
-]
-
-[[package]]
-name = "ethers-contract-derive"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "936e7a0f1197cee2b62dc89f63eff3201dbf87c283ff7e18d86d38f83b845483"
-dependencies = [
- "Inflector",
- "const-hex",
- "ethers-contract-abigen",
- "ethers-core",
- "proc-macro2",
- "quote",
- "serde_json",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "ethers-core"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f03e0bdc216eeb9e355b90cf610ef6c5bb8aca631f97b5ae9980ce34ea7878d"
-dependencies = [
- "arrayvec",
- "bytes",
- "cargo_metadata",
- "chrono",
- "const-hex",
- "elliptic-curve",
- "ethabi",
- "generic-array",
- "k256",
- "num_enum",
- "once_cell",
- "open-fastrlp",
- "rand",
- "rlp",
- "serde",
- "serde_json",
- "strum",
- "syn 2.0.39",
- "tempfile",
- "thiserror",
- "tiny-keccak",
- "unicode-xid",
-]
-
-[[package]]
-name = "ethers-etherscan"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abbac2c890bdbe0f1b8e549a53b00e2c4c1de86bb077c1094d1f38cdf9381a56"
-dependencies = [
- "chrono",
- "ethers-core",
- "ethers-solc",
- "reqwest",
- "semver 1.0.20",
- "serde",
- "serde_json",
- "thiserror",
- "tracing",
-]
-
-[[package]]
-name = "ethers-middleware"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "681ece6eb1d10f7cf4f873059a77c04ff1de4f35c63dd7bccde8f438374fcb93"
-dependencies = [
- "async-trait",
- "auto_impl",
- "ethers-contract",
- "ethers-core",
- "ethers-providers",
- "ethers-signers",
- "futures-channel",
- "futures-locks",
- "futures-util",
- "instant",
- "reqwest",
- "serde",
- "serde_json",
- "thiserror",
- "tokio",
- "tracing",
- "tracing-futures",
- "url",
-]
-
-[[package]]
-name = "ethers-providers"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25d6c0c9455d93d4990c06e049abf9b30daf148cf461ee939c11d88907c60816"
-dependencies = [
- "async-trait",
- "auto_impl",
- "base64 0.21.5",
- "bytes",
- "const-hex",
- "enr",
- "ethers-core",
- "futures-core",
- "futures-timer",
- "futures-util",
- "hashers",
- "http",
- "instant",
- "jsonwebtoken",
- "once_cell",
- "pin-project",
- "reqwest",
- "serde",
- "serde_json",
- "thiserror",
- "tokio",
- "tracing",
- "tracing-futures",
- "url",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
- "ws_stream_wasm",
-]
-
-[[package]]
-name = "ethers-signers"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cb1b714e227bbd2d8c53528adb580b203009728b17d0d0e4119353aa9bc5532"
-dependencies = [
- "async-trait",
- "coins-bip32",
- "coins-bip39",
- "const-hex",
- "elliptic-curve",
- "eth-keystore",
- "ethers-core",
- "rand",
- "sha2",
- "thiserror",
- "tracing",
-]
-
-[[package]]
-name = "ethers-solc"
-version = "2.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a64f710586d147864cff66540a6d64518b9ff37d73ef827fee430538265b595f"
-dependencies = [
- "cfg-if",
- "const-hex",
- "dirs",
- "dunce",
- "ethers-core",
- "glob",
- "home",
- "md-5",
- "num_cpus",
- "once_cell",
- "path-slash",
- "rayon",
- "regex",
- "semver 1.0.20",
- "serde",
- "serde_json",
- "solang-parser",
- "thiserror",
- "tiny-keccak",
- "tokio",
- "tracing",
- "walkdir",
- "yansi",
-]
-
-[[package]]
-name = "eyre"
-version = "0.6.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80f656be11ddf91bd709454d15d5bd896fbaf4cc3314e69349e4d1569f5b46cd"
-dependencies = [
- "indenter",
- "once_cell",
-]
-
-[[package]]
-name = "fastrand"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
-
-[[package]]
-name = "fastrlp"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418"
-dependencies = [
- "arrayvec",
- "auto_impl",
- "bytes",
-]
-
-[[package]]
-name = "fdeflate"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868"
-dependencies = [
- "simd-adler32",
-]
-
-[[package]]
-name = "ff"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
-dependencies = [
- "bitvec",
- "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 = "fixedbitset"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
-
-[[package]]
-name = "flate2"
-version = "1.0.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
-dependencies = [
- "crc32fast",
- "miniz_oxide",
-]
-
-[[package]]
-name = "float-ord"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e"
-
-[[package]]
-name = "fnv"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
-
-[[package]]
-name = "font-kit"
-version = "0.11.0"
+name = "font-kit"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21fe28504d371085fae9ac7a3450f0b289ab71e07c8e57baa3fb68b9e57d6ce5"
dependencies = [
@@ -1747,20 +596,11 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
-[[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 = "freetype"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6"
+checksum = "efc8599a3078adf8edeb86c71e9f8fa7d88af5ca31e806a867756081f90f5d83"
dependencies = [
"freetype-sys",
"libc",
@@ -1768,11 +608,11 @@ dependencies = [
[[package]]
name = "freetype-sys"
-version = "0.13.1"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a"
+checksum = "66ee28c39a43d89fbed8b4798fb4ba56722cfd2b5af81f9326c27614ba88ecd5"
dependencies = [
- "cmake",
+ "cc",
"libc",
"pkg-config",
]
@@ -1784,2471 +624,792 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
[[package]]
-name = "futures"
-version = "0.3.29"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335"
-dependencies = [
- "futures-channel",
- "futures-core",
- "futures-executor",
- "futures-io",
- "futures-sink",
- "futures-task",
- "futures-util",
-]
-
-[[package]]
-name = "futures-channel"
-version = "0.3.29"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb"
-dependencies = [
- "futures-core",
- "futures-sink",
-]
-
-[[package]]
-name = "futures-core"
-version = "0.3.29"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c"
-
-[[package]]
-name = "futures-executor"
-version = "0.3.29"
+name = "generic-array"
+version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
- "futures-core",
- "futures-task",
- "futures-util",
+ "serde",
+ "typenum",
+ "version_check",
]
[[package]]
-name = "futures-io"
-version = "0.3.29"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa"
-
-[[package]]
-name = "futures-locks"
-version = "0.7.1"
+name = "getrandom"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06"
-dependencies = [
- "futures-channel",
- "futures-task",
-]
-
-[[package]]
-name = "futures-macro"
-version = "0.3.29"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "futures-sink"
-version = "0.3.29"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817"
-
-[[package]]
-name = "futures-task"
-version = "0.3.29"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2"
-
-[[package]]
-name = "futures-timer"
-version = "3.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
-dependencies = [
- "gloo-timers",
- "send_wrapper 0.4.0",
-]
-
-[[package]]
-name = "futures-util"
-version = "0.3.29"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104"
-dependencies = [
- "futures-channel",
- "futures-core",
- "futures-io",
- "futures-macro",
- "futures-sink",
- "futures-task",
- "memchr",
- "pin-project-lite",
- "pin-utils",
- "slab",
-]
-
-[[package]]
-name = "fxhash"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
-dependencies = [
- "byteorder",
-]
-
-[[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.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"
+checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
dependencies = [
"cfg-if",
"libc",
- "wasi",
-]
-
-[[package]]
-name = "gif"
-version = "0.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045"
-dependencies = [
- "color_quant",
- "weezl",
-]
-
-[[package]]
-name = "gimli"
-version = "0.28.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
-
-[[package]]
-name = "glob"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
-
-[[package]]
-name = "gloo-timers"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c"
-dependencies = [
- "futures-channel",
- "futures-core",
- "js-sys",
- "wasm-bindgen",
-]
-
-[[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 = "h2"
-version = "0.3.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178"
-dependencies = [
- "bytes",
- "fnv",
- "futures-core",
- "futures-sink",
- "futures-util",
- "http",
- "indexmap",
- "slab",
- "tokio",
- "tokio-util",
- "tracing",
-]
-
-[[package]]
-name = "half"
-version = "1.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
-
-[[package]]
-name = "halo2_proofs"
-version = "0.2.0"
-source = "git+https://github.com/summa-dev/halo2#8386d6e64fc33baccf626869123185890b8284dc"
-dependencies = [
- "blake2b_simd",
- "ff",
- "group",
- "halo2curves",
- "maybe-rayon",
- "plotters",
- "rand_chacha",
- "rand_core",
- "sha3 0.9.1",
- "tabbycat",
- "tracing",
-]
-
-[[package]]
-name = "halo2_solidity_verifier"
-version = "0.1.0"
-source = "git+https://github.com/summa-dev/halo2-solidity-verifier#d33972567f83f3218257b286b541ad97ba32928c"
-dependencies = [
- "askama",
- "blake2b_simd",
- "halo2_proofs",
- "hex",
- "itertools 0.11.0",
- "revm",
- "ruint",
- "sha3 0.10.8",
-]
-
-[[package]]
-name = "halo2curves"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6b1142bd1059aacde1b477e0c80c142910f1ceae67fc619311d6a17428007ab"
-dependencies = [
- "blake2b_simd",
- "ff",
- "group",
- "lazy_static",
- "num-bigint",
- "num-traits",
- "pasta_curves",
- "paste",
- "rand",
- "rand_core",
- "static_assertions",
- "subtle",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.14.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
-dependencies = [
- "ahash",
- "allocator-api2",
-]
-
-[[package]]
-name = "hashers"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30"
-dependencies = [
- "fxhash",
-]
-
-[[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 = "hermit-abi"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
-
-[[package]]
-name = "hex"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
-
-[[package]]
-name = "hex-literal"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
-
-[[package]]
-name = "hmac"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
-dependencies = [
- "digest 0.10.7",
-]
-
-[[package]]
-name = "home"
-version = "0.5.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
-dependencies = [
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "http"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
-dependencies = [
- "bytes",
- "fnv",
- "itoa",
-]
-
-[[package]]
-name = "http-body"
-version = "0.4.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
-dependencies = [
- "bytes",
- "http",
- "pin-project-lite",
-]
-
-[[package]]
-name = "httparse"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
-
-[[package]]
-name = "httpdate"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
-
-[[package]]
-name = "hyper"
-version = "0.14.27"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
-dependencies = [
- "bytes",
- "futures-channel",
- "futures-core",
- "futures-util",
- "h2",
- "http",
- "http-body",
- "httparse",
- "httpdate",
- "itoa",
- "pin-project-lite",
- "socket2 0.4.10",
- "tokio",
- "tower-service",
- "tracing",
- "want",
-]
-
-[[package]]
-name = "iana-time-zone"
-version = "0.1.58"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20"
-dependencies = [
- "android_system_properties",
- "core-foundation-sys",
- "iana-time-zone-haiku",
- "js-sys",
- "wasm-bindgen",
- "windows-core",
-]
-
-[[package]]
-name = "iana-time-zone-haiku"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
-dependencies = [
- "cc",
-]
-
-[[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.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
-dependencies = [
- "unicode-bidi",
- "unicode-normalization",
-]
-
-[[package]]
-name = "image"
-version = "0.24.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711"
-dependencies = [
- "bytemuck",
- "byteorder",
- "color_quant",
- "jpeg-decoder",
- "num-rational",
- "num-traits",
- "png",
-]
-
-[[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 = "indenter"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
-
-[[package]]
-name = "indexmap"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
-dependencies = [
- "equivalent",
- "hashbrown",
-]
-
-[[package]]
-name = "inout"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
-dependencies = [
- "generic-array",
-]
-
-[[package]]
-name = "instant"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "ipnet"
-version = "2.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
-
-[[package]]
-name = "is-terminal"
-version = "0.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
-dependencies = [
- "hermit-abi 0.3.3",
- "rustix",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "itertools"
-version = "0.10.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
-dependencies = [
- "either",
-]
-
-[[package]]
-name = "itertools"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
-dependencies = [
- "either",
-]
-
-[[package]]
-name = "itoa"
-version = "1.0.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
-
-[[package]]
-name = "jpeg-decoder"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e"
-
-[[package]]
-name = "js-sys"
-version = "0.3.66"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca"
-dependencies = [
- "wasm-bindgen",
-]
-
-[[package]]
-name = "jsonwebtoken"
-version = "8.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378"
-dependencies = [
- "base64 0.21.5",
- "pem",
- "ring",
- "serde",
- "serde_json",
- "simple_asn1",
-]
-
-[[package]]
-name = "k256"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b"
-dependencies = [
- "cfg-if",
- "ecdsa",
- "elliptic-curve",
- "once_cell",
- "sha2",
- "signature",
-]
-
-[[package]]
-name = "keccak"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940"
-dependencies = [
- "cpufeatures",
-]
-
-[[package]]
-name = "lalrpop"
-version = "0.20.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8"
-dependencies = [
- "ascii-canvas",
- "bit-set",
- "diff",
- "ena",
- "is-terminal",
- "itertools 0.10.5",
- "lalrpop-util",
- "petgraph",
- "regex",
- "regex-syntax 0.7.5",
- "string_cache",
- "term",
- "tiny-keccak",
- "unicode-xid",
-]
-
-[[package]]
-name = "lalrpop-util"
-version = "0.20.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d"
-
-[[package]]
-name = "lazy_static"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-dependencies = [
- "spin",
-]
-
-[[package]]
-name = "lazycell"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
-
-[[package]]
-name = "libc"
-version = "0.2.150"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
-
-[[package]]
-name = "libloading"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161"
-dependencies = [
- "cfg-if",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "libm"
-version = "0.2.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
-
-[[package]]
-name = "libredox"
-version = "0.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8"
-dependencies = [
- "bitflags 2.4.1",
- "libc",
- "redox_syscall",
-]
-
-[[package]]
-name = "linux-raw-sys"
-version = "0.4.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
-
-[[package]]
-name = "lock_api"
-version = "0.4.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
-dependencies = [
- "autocfg",
- "scopeguard",
-]
-
-[[package]]
-name = "log"
-version = "0.4.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
-
-[[package]]
-name = "maybe-rayon"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
-dependencies = [
- "cfg-if",
- "rayon",
-]
-
-[[package]]
-name = "md-5"
-version = "0.10.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
-dependencies = [
- "cfg-if",
- "digest 0.10.7",
-]
-
-[[package]]
-name = "memchr"
-version = "2.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
-
-[[package]]
-name = "memoffset"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
-name = "mime"
-version = "0.3.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
-
-[[package]]
-name = "mime_guess"
-version = "2.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"
-dependencies = [
- "mime",
- "unicase",
-]
-
-[[package]]
-name = "minimal-lexical"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
-
-[[package]]
-name = "miniz_oxide"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
-dependencies = [
- "adler",
- "simd-adler32",
-]
-
-[[package]]
-name = "mio"
-version = "0.8.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
-dependencies = [
- "libc",
- "wasi",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "new_debug_unreachable"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
-
-[[package]]
-name = "nom"
-version = "7.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
-dependencies = [
- "memchr",
- "minimal-lexical",
-]
-
-[[package]]
-name = "num"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af"
-dependencies = [
- "num-bigint",
- "num-complex",
- "num-integer",
- "num-iter",
- "num-rational",
- "num-traits",
-]
-
-[[package]]
-name = "num-bigint"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
-dependencies = [
- "autocfg",
- "num-integer",
- "num-traits",
-]
-
-[[package]]
-name = "num-complex"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214"
-dependencies = [
- "num-traits",
-]
-
-[[package]]
-name = "num-integer"
-version = "0.1.45"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
-dependencies = [
- "autocfg",
- "num-traits",
-]
-
-[[package]]
-name = "num-iter"
-version = "0.1.43"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
-dependencies = [
- "autocfg",
- "num-integer",
- "num-traits",
-]
-
-[[package]]
-name = "num-rational"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
-dependencies = [
- "autocfg",
- "num-bigint",
- "num-integer",
- "num-traits",
-]
-
-[[package]]
-name = "num-traits"
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
-dependencies = [
- "autocfg",
- "libm",
-]
-
-[[package]]
-name = "num_cpus"
-version = "1.16.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
-dependencies = [
- "hermit-abi 0.3.3",
- "libc",
-]
-
-[[package]]
-name = "num_enum"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0"
-dependencies = [
- "num_enum_derive",
-]
-
-[[package]]
-name = "num_enum_derive"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e"
-dependencies = [
- "proc-macro-crate 2.0.0",
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "object"
-version = "0.32.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "once_cell"
-version = "1.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
-
-[[package]]
-name = "oorandom"
-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 = "option-ext"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
-
-[[package]]
-name = "parity-scale-codec"
-version = "3.6.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb"
-dependencies = [
- "arrayvec",
- "bitvec",
- "byte-slice-cast",
- "impl-trait-for-tuples",
- "parity-scale-codec-derive",
- "serde",
-]
-
-[[package]]
-name = "parity-scale-codec-derive"
-version = "3.6.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260"
-dependencies = [
- "proc-macro-crate 1.3.1",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
-[[package]]
-name = "parking_lot"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
-dependencies = [
- "lock_api",
- "parking_lot_core",
-]
-
-[[package]]
-name = "parking_lot_core"
-version = "0.9.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
-dependencies = [
- "cfg-if",
- "libc",
- "redox_syscall",
- "smallvec",
- "windows-targets 0.48.5",
-]
-
-[[package]]
-name = "pasta_curves"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095"
-dependencies = [
- "blake2b_simd",
- "ff",
- "group",
- "lazy_static",
- "rand",
- "static_assertions",
- "subtle",
-]
-
-[[package]]
-name = "paste"
-version = "1.0.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
-
-[[package]]
-name = "path-slash"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42"
-
-[[package]]
-name = "pathfinder_geometry"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3"
-dependencies = [
- "log",
- "pathfinder_simd",
-]
-
-[[package]]
-name = "pathfinder_simd"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0444332826c70dc47be74a7c6a5fc44e23a7905ad6858d4162b658320455ef93"
-dependencies = [
- "rustc_version 0.4.0",
-]
-
-[[package]]
-name = "pbkdf2"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
-dependencies = [
- "digest 0.10.7",
-]
-
-[[package]]
-name = "pbkdf2"
-version = "0.12.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
-dependencies = [
- "digest 0.10.7",
- "hmac",
-]
-
-[[package]]
-name = "peeking_take_while"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
-
-[[package]]
-name = "pem"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8"
-dependencies = [
- "base64 0.13.1",
-]
-
-[[package]]
-name = "percent-encoding"
-version = "2.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
-
-[[package]]
-name = "pest"
-version = "2.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06"
-dependencies = [
- "memchr",
- "thiserror",
- "ucd-trie",
-]
-
-[[package]]
-name = "petgraph"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"
-dependencies = [
- "fixedbitset",
- "indexmap",
-]
-
-[[package]]
-name = "pharos"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414"
-dependencies = [
- "futures",
- "rustc_version 0.4.0",
-]
-
-[[package]]
-name = "phf"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
-dependencies = [
- "phf_macros",
- "phf_shared 0.11.2",
-]
-
-[[package]]
-name = "phf_generator"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
-dependencies = [
- "phf_shared 0.11.2",
- "rand",
-]
-
-[[package]]
-name = "phf_macros"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
-dependencies = [
- "phf_generator",
- "phf_shared 0.11.2",
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "phf_shared"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
-dependencies = [
- "siphasher",
-]
-
-[[package]]
-name = "phf_shared"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
-dependencies = [
- "siphasher",
-]
-
-[[package]]
-name = "pin-project"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
-dependencies = [
- "pin-project-internal",
-]
-
-[[package]]
-name = "pin-project-internal"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "pin-project-lite"
-version = "0.2.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
-
-[[package]]
-name = "pin-utils"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
-
-[[package]]
-name = "pkcs8"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
-dependencies = [
- "der",
- "spki",
-]
-
-[[package]]
-name = "pkg-config"
-version = "0.3.27"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
-
-[[package]]
-name = "plotters"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45"
-dependencies = [
- "chrono",
- "font-kit",
- "image",
- "lazy_static",
- "num-traits",
- "pathfinder_geometry",
- "plotters-backend",
- "plotters-bitmap",
- "plotters-svg",
- "ttf-parser",
- "wasm-bindgen",
- "web-sys",
-]
-
-[[package]]
-name = "plotters-backend"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609"
-
-[[package]]
-name = "plotters-bitmap"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cebbe1f70205299abc69e8b295035bb52a6a70ee35474ad10011f0a4efb8543"
-dependencies = [
- "gif",
- "image",
- "plotters-backend",
-]
-
-[[package]]
-name = "plotters-svg"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab"
-dependencies = [
- "plotters-backend",
-]
-
-[[package]]
-name = "png"
-version = "0.17.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64"
-dependencies = [
- "bitflags 1.3.2",
- "crc32fast",
- "fdeflate",
- "flate2",
- "miniz_oxide",
-]
-
-[[package]]
-name = "powerfmt"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
-
-[[package]]
-name = "ppv-lite86"
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
-
-[[package]]
-name = "precomputed-hash"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
-
-[[package]]
-name = "prettyplease"
-version = "0.2.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d"
-dependencies = [
- "proc-macro2",
- "syn 2.0.39",
-]
-
-[[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 = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"
-dependencies = [
- "toml_edit 0.20.7",
-]
-
-[[package]]
-name = "proc-macro-error"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
-dependencies = [
- "proc-macro-error-attr",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
- "version_check",
-]
-
-[[package]]
-name = "proc-macro-error-attr"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
-dependencies = [
- "proc-macro2",
- "quote",
- "version_check",
-]
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.70"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "proptest"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf"
-dependencies = [
- "bitflags 2.4.1",
- "lazy_static",
- "num-traits",
- "rand",
- "rand_chacha",
- "rand_xorshift",
- "regex-syntax 0.8.2",
- "unarray",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
-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 = "rand_xorshift"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
-dependencies = [
- "rand_core",
-]
-
-[[package]]
-name = "rayon"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1"
-dependencies = [
- "either",
- "rayon-core",
-]
-
-[[package]]
-name = "rayon-core"
-version = "1.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
-dependencies = [
- "crossbeam-deque",
- "crossbeam-utils",
-]
-
-[[package]]
-name = "redox_syscall"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
-dependencies = [
- "bitflags 1.3.2",
-]
-
-[[package]]
-name = "redox_users"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4"
-dependencies = [
- "getrandom",
- "libredox",
- "thiserror",
-]
-
-[[package]]
-name = "regex"
-version = "1.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax 0.8.2",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax 0.8.2",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
-
-[[package]]
-name = "reqwest"
-version = "0.11.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
-dependencies = [
- "base64 0.21.5",
- "bytes",
- "encoding_rs",
- "futures-core",
- "futures-util",
- "h2",
- "http",
- "http-body",
- "hyper",
- "ipnet",
- "js-sys",
- "log",
- "mime",
- "once_cell",
- "percent-encoding",
- "pin-project-lite",
- "serde",
- "serde_json",
- "serde_urlencoded",
- "system-configuration",
- "tokio",
- "tower-service",
- "url",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
- "winreg",
-]
-
-[[package]]
-name = "revm"
-version = "3.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68f4ca8ae0345104523b4af1a8a7ea97cfa1865cdb7a7c25d23c1a18d9b48598"
-dependencies = [
- "auto_impl",
- "revm-interpreter",
- "revm-precompile",
-]
-
-[[package]]
-name = "revm-interpreter"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f959cafdf64a7f89b014fa73dc2325001cf654b3d9400260b212d19a2ebe3da0"
-dependencies = [
- "revm-primitives",
-]
-
-[[package]]
-name = "revm-precompile"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d360a88223d85709d2e95d4609eb1e19c649c47e28954bfabae5e92bb37e83e"
-dependencies = [
- "c-kzg",
- "k256",
- "num",
- "once_cell",
- "revm-primitives",
- "ripemd",
- "secp256k1",
- "sha2",
- "substrate-bn",
-]
-
-[[package]]
-name = "revm-primitives"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51187b852d9e458816a2e19c81f1dd6c924077e1a8fccd16e4f044f865f299d7"
-dependencies = [
- "alloy-primitives",
- "alloy-rlp",
- "auto_impl",
- "bitflags 2.4.1",
- "bitvec",
- "c-kzg",
- "enumn",
- "hashbrown",
- "hex",
- "once_cell",
-]
-
-[[package]]
-name = "rfc6979"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
-dependencies = [
- "hmac",
- "subtle",
-]
-
-[[package]]
-name = "ring"
-version = "0.16.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
-dependencies = [
- "cc",
- "libc",
- "once_cell",
- "spin",
- "untrusted",
- "web-sys",
- "winapi",
+ "wasi",
]
[[package]]
-name = "ripemd"
-version = "0.1.3"
+name = "gif"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f"
+checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045"
dependencies = [
- "digest 0.10.7",
+ "color_quant",
+ "weezl",
]
[[package]]
-name = "rlp"
-version = "0.5.2"
+name = "group"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec"
+checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
dependencies = [
- "bytes",
- "rlp-derive",
- "rustc-hex",
+ "ff",
+ "rand_core",
+ "subtle",
]
[[package]]
-name = "rlp-derive"
-version = "0.1.0"
+name = "half"
+version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a"
+checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403"
+
+[[package]]
+name = "halo2_proofs"
+version = "0.2.0"
+source = "git+https://github.com/han0110/halo2.git?branch=feature/for-benchmark#4981b8d5bdaab04af9b56a5d2c482b6eec9f7fa4"
dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
+ "ark-std",
+ "blake2b_simd",
+ "ff",
+ "group",
+ "halo2curves 0.3.3",
+ "plotters",
+ "rand_chacha",
+ "rand_core",
+ "rayon",
+ "sha3 0.9.1",
+ "tabbycat",
+ "tracing",
]
[[package]]
-name = "ruint"
-version = "1.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825"
+name = "halo2curves"
+version = "0.3.2"
+source = "git+https://github.com/privacy-scaling-explorations/halo2curves.git?tag=0.3.2#9f5c50810bbefe779ee5cf1d852b2fe85dc35d5e"
dependencies = [
- "alloy-rlp",
- "ark-ff 0.3.0",
- "ark-ff 0.4.2",
- "bytes",
- "fastrlp",
+ "ff",
+ "group",
+ "lazy_static",
"num-bigint",
"num-traits",
- "parity-scale-codec",
- "primitive-types",
- "proptest",
+ "pasta_curves",
+ "paste",
"rand",
- "rlp",
- "ruint-macro",
- "serde",
- "valuable",
- "zeroize",
+ "rand_core",
+ "static_assertions",
+ "subtle",
]
[[package]]
-name = "ruint-macro"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09"
-
-[[package]]
-name = "rustc-demangle"
-version = "0.1.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
-
-[[package]]
-name = "rustc-hash"
-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"
+name = "halo2curves"
version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee"
+source = "git+https://github.com/privacy-scaling-explorations/halo2curves?tag=0.3.3#8e4cb9f0c66c864e8ca25da07f50ae95f664a5b7"
dependencies = [
- "semver 0.11.0",
+ "ff",
+ "group",
+ "lazy_static",
+ "num-bigint",
+ "num-traits",
+ "pasta_curves",
+ "paste",
+ "rand",
+ "rand_core",
+ "serde",
+ "static_assertions",
+ "subtle",
]
[[package]]
-name = "rustc_version"
-version = "0.4.0"
+name = "hermit-abi"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
- "semver 1.0.20",
+ "libc",
]
[[package]]
-name = "rustix"
-version = "0.38.25"
+name = "hex"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e"
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
dependencies = [
- "bitflags 2.4.1",
- "errno",
- "libc",
- "linux-raw-sys",
- "windows-sys 0.48.0",
+ "serde",
]
[[package]]
-name = "rustversion"
-version = "1.0.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
-
-[[package]]
-name = "ryu"
-version = "1.0.15"
+name = "iana-time-zone"
+version = "0.1.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
+checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core",
+]
[[package]]
-name = "salsa20"
-version = "0.10.2"
+name = "iana-time-zone-haiku"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
- "cipher",
+ "cc",
]
[[package]]
-name = "same-file"
-version = "1.0.6"
+name = "ident_case"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
-dependencies = [
- "winapi-util",
-]
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
-name = "scale-info"
-version = "2.10.0"
+name = "image"
+version = "0.24.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60"
+checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d"
dependencies = [
- "cfg-if",
- "derive_more",
- "parity-scale-codec",
- "scale-info-derive",
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "jpeg-decoder",
+ "num-traits",
+ "png",
]
[[package]]
-name = "scale-info-derive"
-version = "2.10.0"
+name = "itertools"
+version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
- "proc-macro-crate 1.3.1",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
+ "either",
]
[[package]]
-name = "scopeguard"
-version = "1.2.0"
+name = "itoa"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
-name = "scrypt"
-version = "0.10.0"
+name = "jpeg-decoder"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d"
-dependencies = [
- "hmac",
- "pbkdf2 0.11.0",
- "salsa20",
- "sha2",
-]
+checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
[[package]]
-name = "sec1"
-version = "0.7.3"
+name = "js-sys"
+version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
+checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
dependencies = [
- "base16ct",
- "der",
- "generic-array",
- "pkcs8",
- "subtle",
- "zeroize",
+ "wasm-bindgen",
]
[[package]]
-name = "secp256k1"
-version = "0.27.0"
+name = "keccak"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f"
+checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654"
dependencies = [
- "secp256k1-sys",
+ "cpufeatures",
]
[[package]]
-name = "secp256k1-sys"
-version = "0.8.1"
+name = "lazy_static"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
dependencies = [
- "cc",
+ "spin",
]
[[package]]
-name = "semver"
-version = "0.11.0"
+name = "libc"
+version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
-dependencies = [
- "semver-parser",
-]
+checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
-name = "semver"
-version = "1.0.20"
+name = "libloading"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
+checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19"
dependencies = [
- "serde",
+ "cfg-if",
+ "windows-targets",
]
[[package]]
-name = "semver-parser"
-version = "0.10.2"
+name = "libredox"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
+checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [
- "pest",
+ "bitflags 2.5.0",
+ "libc",
]
[[package]]
-name = "send_wrapper"
-version = "0.4.0"
+name = "log"
+version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
+checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
[[package]]
-name = "send_wrapper"
-version = "0.6.0"
+name = "memchr"
+version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
+checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
[[package]]
-name = "serde"
-version = "1.0.193"
+name = "miniz_oxide"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
+checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"
dependencies = [
- "serde_derive",
+ "adler",
+ "simd-adler32",
]
[[package]]
-name = "serde_cbor"
-version = "0.11.2"
+name = "num-bigint"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
+checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
dependencies = [
- "half",
- "serde",
+ "autocfg",
+ "num-integer",
+ "num-traits",
]
[[package]]
-name = "serde_derive"
-version = "1.0.193"
+name = "num-integer"
+version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
+checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
+ "num-traits",
]
[[package]]
-name = "serde_json"
-version = "1.0.108"
+name = "num-traits"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
+checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
dependencies = [
- "itoa",
- "ryu",
- "serde",
+ "autocfg",
]
[[package]]
-name = "serde_spanned"
-version = "0.6.4"
+name = "once_cell"
+version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80"
-dependencies = [
- "serde",
-]
+checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
-name = "serde_urlencoded"
-version = "0.7.1"
+name = "oorandom"
+version = "11.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
+
+[[package]]
+name = "pasta_curves"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095"
dependencies = [
- "form_urlencoded",
- "itoa",
- "ryu",
+ "blake2b_simd",
+ "ff",
+ "group",
+ "hex",
+ "lazy_static",
+ "rand",
"serde",
+ "static_assertions",
+ "subtle",
]
[[package]]
-name = "sha2"
-version = "0.10.8"
+name = "paste"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
-dependencies = [
- "cfg-if",
- "cpufeatures",
- "digest 0.10.7",
-]
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
[[package]]
-name = "sha3"
-version = "0.9.1"
+name = "pathfinder_geometry"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809"
+checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3"
dependencies = [
- "block-buffer 0.9.0",
- "digest 0.9.0",
- "keccak",
- "opaque-debug",
+ "log",
+ "pathfinder_simd",
]
[[package]]
-name = "sha3"
-version = "0.10.8"
+name = "pathfinder_simd"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
+checksum = "ebf45976c56919841273f2a0fc684c28437e2f304e264557d9c72be5d5a718be"
dependencies = [
- "digest 0.10.7",
- "keccak",
+ "rustc_version",
]
[[package]]
-name = "shlex"
-version = "1.2.0"
+name = "pin-project-lite"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380"
+checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
[[package]]
-name = "signature"
-version = "2.2.0"
+name = "pkg-config"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
-dependencies = [
- "digest 0.10.7",
- "rand_core",
-]
+checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]]
-name = "simd-adler32"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+name = "plonkish_backend"
+version = "0.1.0"
+source = "git+https://github.com/han0110/plonkish#303cf244803ea56d1ac8c24829ec4c67e4e798ab"
+dependencies = [
+ "bincode",
+ "bitvec",
+ "generic-array",
+ "halo2_proofs",
+ "halo2curves 0.3.3",
+ "itertools",
+ "num-bigint",
+ "num-integer",
+ "pasta_curves",
+ "poseidon",
+ "rand",
+ "rayon",
+ "serde",
+ "sha3 0.10.8",
+]
[[package]]
-name = "simple_asn1"
-version = "0.6.2"
+name = "plotters"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085"
+checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45"
dependencies = [
- "num-bigint",
+ "chrono",
+ "font-kit",
+ "image",
+ "lazy_static",
"num-traits",
- "thiserror",
- "time",
+ "pathfinder_geometry",
+ "plotters-backend",
+ "plotters-bitmap",
+ "plotters-svg",
+ "ttf-parser",
+ "wasm-bindgen",
+ "web-sys",
]
[[package]]
-name = "siphasher"
-version = "0.3.11"
+name = "plotters-backend"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609"
[[package]]
-name = "slab"
-version = "0.4.9"
+name = "plotters-bitmap"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+checksum = "0cebbe1f70205299abc69e8b295035bb52a6a70ee35474ad10011f0a4efb8543"
dependencies = [
- "autocfg",
+ "gif",
+ "image",
+ "plotters-backend",
]
[[package]]
-name = "smallvec"
-version = "1.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
-
-[[package]]
-name = "socket2"
-version = "0.4.10"
+name = "plotters-svg"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
+checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab"
dependencies = [
- "libc",
- "winapi",
+ "plotters-backend",
]
[[package]]
-name = "socket2"
-version = "0.5.5"
+name = "png"
+version = "0.17.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1"
dependencies = [
- "libc",
- "windows-sys 0.48.0",
+ "bitflags 1.3.2",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
]
[[package]]
-name = "solang-parser"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26"
+name = "poseidon"
+version = "0.2.0"
+source = "git+https://github.com/han0110/poseidon?branch=feature/with-spec#fa4c2544ed38666f1f72d1c4fd0956756a7112b3"
dependencies = [
- "itertools 0.11.0",
- "lalrpop",
- "lalrpop-util",
- "phf",
- "thiserror",
- "unicode-xid",
+ "halo2curves 0.3.2",
+ "subtle",
]
[[package]]
-name = "spin"
-version = "0.5.2"
+name = "ppv-lite86"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
-name = "spki"
-version = "0.7.2"
+name = "proc-macro2"
+version = "1.0.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a"
+checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e"
dependencies = [
- "base64ct",
- "der",
+ "unicode-ident",
]
[[package]]
-name = "static_assertions"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-
-[[package]]
-name = "string_cache"
-version = "0.8.7"
+name = "quote"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
+checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
dependencies = [
- "new_debug_unreachable",
- "once_cell",
- "parking_lot",
- "phf_shared 0.10.0",
- "precomputed-hash",
+ "proc-macro2",
]
[[package]]
-name = "strsim"
-version = "0.9.3"
+name = "radium"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
+checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
[[package]]
-name = "strum"
-version = "0.25.0"
+name = "rand"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
- "strum_macros",
+ "libc",
+ "rand_chacha",
+ "rand_core",
]
[[package]]
-name = "strum_macros"
-version = "0.25.3"
+name = "rand_chacha"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "rustversion",
- "syn 2.0.39",
+ "ppv-lite86",
+ "rand_core",
]
[[package]]
-name = "substrate-bn"
-version = "0.6.0"
+name = "rand_core"
+version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
- "byteorder",
- "crunchy",
- "lazy_static",
- "rand",
- "rustc-hex",
+ "getrandom",
]
[[package]]
-name = "subtle"
-version = "2.5.0"
+name = "rayon"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
-
-[[package]]
-name = "summa-solvency"
-version = "0.2.0"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
- "ark-std 0.3.0",
- "criterion",
- "csv",
- "ethers",
- "halo2_proofs",
- "halo2_solidity_verifier",
- "hex",
- "itertools 0.10.5",
- "num-bigint",
- "num-traits",
- "num_cpus",
- "plotters",
- "rand",
- "rayon",
- "regex",
- "serde",
- "serde_json",
- "tabbycat",
+ "either",
+ "rayon-core",
]
[[package]]
-name = "syn"
-version = "1.0.109"
+name = "rayon-core"
+version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
+ "crossbeam-deque",
+ "crossbeam-utils",
]
[[package]]
-name = "syn"
-version = "2.0.39"
+name = "redox_users"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
+checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
+ "getrandom",
+ "libredox",
+ "thiserror",
]
[[package]]
-name = "system-configuration"
-version = "0.5.1"
+name = "regex"
+version = "1.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
+checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
dependencies = [
- "bitflags 1.3.2",
- "core-foundation",
- "system-configuration-sys",
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
]
[[package]]
-name = "system-configuration-sys"
-version = "0.5.0"
+name = "regex-automata"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
+checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
dependencies = [
- "core-foundation-sys",
- "libc",
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
]
[[package]]
-name = "tabbycat"
-version = "0.1.2"
+name = "regex-syntax"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c45590f0f859197b4545be1b17b2bc3cc7bb075f7d1cc0ea1dc6521c0bf256a3"
+checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
- "anyhow",
- "derive_builder",
- "regex",
+ "semver",
]
[[package]]
-name = "tap"
-version = "1.0.1"
+name = "ryu"
+version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
+checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
[[package]]
-name = "tempfile"
-version = "3.8.1"
+name = "same-file"
+version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
dependencies = [
- "cfg-if",
- "fastrand",
- "redox_syscall",
- "rustix",
- "windows-sys 0.48.0",
+ "winapi-util",
]
[[package]]
-name = "term"
-version = "0.7.0"
+name = "semver"
+version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
-dependencies = [
- "dirs-next",
- "rustversion",
- "winapi",
-]
+checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
[[package]]
-name = "textwrap"
-version = "0.11.0"
+name = "serde"
+version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
dependencies = [
- "unicode-width",
+ "serde_derive",
]
[[package]]
-name = "thiserror"
-version = "1.0.50"
+name = "serde_cbor"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
+checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
dependencies = [
- "thiserror-impl",
+ "half",
+ "serde",
]
[[package]]
-name = "thiserror-impl"
-version = "1.0.50"
+name = "serde_derive"
+version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
+checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.59",
]
[[package]]
-name = "threadpool"
-version = "1.8.1"
+name = "serde_json"
+version = "1.0.116"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa"
+checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813"
dependencies = [
- "num_cpus",
+ "itoa",
+ "ryu",
+ "serde",
]
[[package]]
-name = "time"
-version = "0.3.30"
+name = "sha3"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
+checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809"
dependencies = [
- "deranged",
- "itoa",
- "powerfmt",
- "serde",
- "time-core",
- "time-macros",
+ "block-buffer 0.9.0",
+ "digest 0.9.0",
+ "keccak",
+ "opaque-debug",
]
[[package]]
-name = "time-core"
-version = "0.1.2"
+name = "sha3"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
+dependencies = [
+ "digest 0.10.7",
+ "keccak",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
-name = "time-macros"
-version = "0.2.15"
+name = "strsim"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
-dependencies = [
- "time-core",
-]
+checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
[[package]]
-name = "tiny-keccak"
-version = "2.0.2"
+name = "subtle"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
-dependencies = [
- "crunchy",
-]
+checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
[[package]]
-name = "tinytemplate"
-version = "1.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+name = "summa-hyperplonk"
+version = "0.3.0"
dependencies = [
- "serde",
- "serde_json",
+ "criterion",
+ "csv",
+ "halo2_proofs",
+ "num-bigint",
+ "plonkish_backend",
+ "plotters",
+ "rand",
+ "rayon",
]
[[package]]
-name = "tinyvec"
-version = "1.6.0"
+name = "syn"
+version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
- "tinyvec_macros",
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
]
[[package]]
-name = "tinyvec_macros"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
-
-[[package]]
-name = "tokio"
-version = "1.34.0"
+name = "syn"
+version = "2.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9"
+checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a"
dependencies = [
- "backtrace",
- "bytes",
- "libc",
- "mio",
- "num_cpus",
- "pin-project-lite",
- "socket2 0.5.5",
- "windows-sys 0.48.0",
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
]
[[package]]
-name = "tokio-util"
-version = "0.7.10"
+name = "tabbycat"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
+checksum = "c45590f0f859197b4545be1b17b2bc3cc7bb075f7d1cc0ea1dc6521c0bf256a3"
dependencies = [
- "bytes",
- "futures-core",
- "futures-sink",
- "pin-project-lite",
- "tokio",
- "tracing",
+ "anyhow",
+ "derive_builder",
+ "regex",
]
[[package]]
-name = "toml"
-version = "0.8.8"
+name = "tap"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
-dependencies = [
- "serde",
- "serde_spanned",
- "toml_datetime",
- "toml_edit 0.21.0",
-]
+checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
-name = "toml_datetime"
-version = "0.6.5"
+name = "textwrap"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
+checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
dependencies = [
- "serde",
+ "unicode-width",
]
[[package]]
-name = "toml_edit"
-version = "0.19.15"
+name = "thiserror"
+version = "1.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
+checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297"
dependencies = [
- "indexmap",
- "toml_datetime",
- "winnow",
+ "thiserror-impl",
]
[[package]]
-name = "toml_edit"
-version = "0.20.7"
+name = "thiserror-impl"
+version = "1.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
+checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
dependencies = [
- "indexmap",
- "toml_datetime",
- "winnow",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.59",
]
[[package]]
-name = "toml_edit"
-version = "0.21.0"
+name = "tinytemplate"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
dependencies = [
- "indexmap",
"serde",
- "serde_spanned",
- "toml_datetime",
- "winnow",
+ "serde_json",
]
-[[package]]
-name = "tower-service"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
-
[[package]]
name = "tracing"
version = "0.1.40"
@@ -4268,7 +1429,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.59",
]
[[package]]
@@ -4280,22 +1441,6 @@ dependencies = [
"once_cell",
]
-[[package]]
-name = "tracing-futures"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
-dependencies = [
- "pin-project",
- "tracing",
-]
-
-[[package]]
-name = "try-lock"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
-
[[package]]
name = "ttf-parser"
version = "0.17.1"
@@ -4308,105 +1453,18 @@ version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
-[[package]]
-name = "ucd-trie"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
-
-[[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 = "unarray"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
-
-[[package]]
-name = "unicase"
-version = "2.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
-dependencies = [
- "version_check",
-]
-
-[[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.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
-[[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.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
-[[package]]
-name = "unicode-xid"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
-
-[[package]]
-name = "untrusted"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
-
-[[package]]
-name = "url"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
-dependencies = [
- "form_urlencoded",
- "idna",
- "percent-encoding",
-]
-
-[[package]]
-name = "uuid"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
-dependencies = [
- "getrandom",
- "serde",
-]
-
-[[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.4"
@@ -4415,23 +1473,14 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "walkdir"
-version = "2.4.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
dependencies = [
"same-file",
"winapi-util",
]
-[[package]]
-name = "want"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
-dependencies = [
- "try-lock",
-]
-
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
@@ -4440,9 +1489,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.89"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e"
+checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -4450,36 +1499,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.89"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826"
+checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.59",
"wasm-bindgen-shared",
]
-[[package]]
-name = "wasm-bindgen-futures"
-version = "0.4.39"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12"
-dependencies = [
- "cfg-if",
- "js-sys",
- "wasm-bindgen",
- "web-sys",
-]
-
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.89"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2"
+checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -4487,28 +1524,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.89"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
+checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.59",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.89"
+version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f"
+checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
[[package]]
name = "web-sys"
-version = "0.3.65"
+version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85"
+checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -4516,21 +1553,9 @@ dependencies = [
[[package]]
name = "weezl"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
-
-[[package]]
-name = "which"
-version = "4.4.2"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
-dependencies = [
- "either",
- "home",
- "once_cell",
- "rustix",
-]
+checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
[[package]]
name = "winapi"
@@ -4565,163 +1590,76 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-core"
-version = "0.51.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"
-dependencies = [
- "windows-targets 0.48.5",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
-dependencies = [
- "windows-targets 0.48.5",
-]
-
-[[package]]
-name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
-dependencies = [
- "windows-targets 0.52.0",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
- "windows_aarch64_gnullvm 0.48.5",
- "windows_aarch64_msvc 0.48.5",
- "windows_i686_gnu 0.48.5",
- "windows_i686_msvc 0.48.5",
- "windows_x86_64_gnu 0.48.5",
- "windows_x86_64_gnullvm 0.48.5",
- "windows_x86_64_msvc 0.48.5",
+ "windows-targets",
]
[[package]]
name = "windows-targets"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
+checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
dependencies = [
- "windows_aarch64_gnullvm 0.52.0",
- "windows_aarch64_msvc 0.52.0",
- "windows_i686_gnu 0.52.0",
- "windows_i686_msvc 0.52.0",
- "windows_x86_64_gnu 0.52.0",
- "windows_x86_64_gnullvm 0.52.0",
- "windows_x86_64_msvc 0.52.0",
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.48.5"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.48.5"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
+checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
[[package]]
-name = "windows_i686_msvc"
-version = "0.48.5"
+name = "windows_i686_gnullvm"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.48.5"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.48.5"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.0"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
+checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
-
-[[package]]
-name = "winnow"
-version = "0.5.19"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "winreg"
-version = "0.50.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
-dependencies = [
- "cfg-if",
- "windows-sys 0.48.0",
-]
+checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
[[package]]
name = "wio"
@@ -4732,25 +1670,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "ws_stream_wasm"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5"
-dependencies = [
- "async_io_stream",
- "futures",
- "js-sys",
- "log",
- "pharos",
- "rustc_version 0.4.0",
- "send_wrapper 0.6.0",
- "thiserror",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
-]
-
[[package]]
name = "wyz"
version = "0.5.1"
@@ -4760,12 +1679,6 @@ dependencies = [
"tap",
]
-[[package]]
-name = "yansi"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
-
[[package]]
name = "yeslogic-fontconfig-sys"
version = "3.2.0"
@@ -4777,43 +1690,3 @@ dependencies = [
"once_cell",
"pkg-config",
]
-
-[[package]]
-name = "zerocopy"
-version = "0.7.32"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
-dependencies = [
- "zerocopy-derive",
-]
-
-[[package]]
-name = "zerocopy-derive"
-version = "0.7.32"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "zeroize"
-version = "1.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
-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.39",
-]
diff --git a/prover/Cargo.toml b/prover/Cargo.toml
index 435f5692..f469265c 100644
--- a/prover/Cargo.toml
+++ b/prover/Cargo.toml
@@ -1,46 +1,33 @@
[package]
-name = "summa-solvency"
-version = "0.2.0"
+name = "summa-hyperplonk"
+version = "0.3.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
dev-graph = ["halo2_proofs/dev-graph", "plotters"]
-profiling = []
-no_range_check = []
+default = ["parallel", "frontend-halo2"]
+parallel = ["dep:rayon"]
+frontend-halo2 = ["dep:halo2_proofs"]
[dependencies]
-halo2_proofs = { git = "https://github.com/summa-dev/halo2"}
+plonkish_backend = { git = "https://github.com/han0110/plonkish", package = "plonkish_backend", features= ["frontend-halo2", "benchmark"] }
plotters = { version = "0.3.4", optional = true }
rand = "0.8"
-ark-std = { version = "0.3.0", features = ["print-trace"] }
-tabbycat = { version = "0.1", features = ["attributes"], optional = true }
csv = "1.1"
-serde = { version = "1.0", features = ["derive"] }
-serde_json = "1.0"
-hex = "0.4.3"
num-bigint = "0.4"
-num_cpus = "1.15"
-itertools = "0.10.3"
-ethers = { version = "2.0.7", default-features = false, features = ["ethers-solc"] }
-regex-simple = { version = "1", package = "regex" }
-num-traits = "0.2.16"
-rayon = "1.8.0"
-halo2_solidity_verifier = { git = "https://github.com/summa-dev/halo2-solidity-verifier", version = "0.1.0", features = ["evm"] }
+
+# parallel
+rayon = { version = "1.5.3", optional = true }
+
+# frontend-halo2
+halo2_proofs = { git = "https://github.com/han0110/halo2.git", branch = "feature/for-benchmark", optional = true }
[dev-dependencies]
criterion= "0.3"
[[bench]]
-name = "kzg"
-harness = false
-
-[[bin]]
-name = "generate_verifier"
-path = "bin/gen_verifier.rs"
-
-[[bin]]
-name = "generate_commitment_and_proofs"
-path = "bin/gen_commit_and_proofs.rs"
+name = "proof_of_liabilities"
+harness = false
\ No newline at end of file
diff --git a/prover/README.md b/prover/README.md
index 31a3fc79..9cc6edcf 100644
--- a/prover/README.md
+++ b/prover/README.md
@@ -1,36 +1,7 @@
-# Summa V2: Polynomial Interpolation Approach
+# Summa V3: Hyperplonk Prover
## Motivation
-[Summa V1](https://github.com/summa-dev/summa-solvency/releases/tag/merkle_sum_tree_v1.1.1) was using a Merkle sum tree (MST) as the main data structure and a cryptographic commitment. MST that has $n$ leaves involves $2n-1$ hashing operations, making it computationally demanding. Additionally, the MST inclusion proofs in Summa V1 have to be wrapped into a ZK-SNARK, making it infeasible to generate all of them at once for the entire user base of the Custodian (~100M users).
-
-## Univariate Grand Sum Calculation
-
-The grand total of all the Custodian's $n$ user cryptocurrency balances is the Custodian's liabilities $S$. Summa V2 is using a property of the _sum of all roots of unity in a finite field_ being _equal to zero_ to find the liabilities. This property allows to efficiently calculate the grand sum of univariate polynomial evaluations. Summa V2 takes advantage of that by interpolating the user balances into a univariate polynomial in a special way. The resulting proof of solvency protocol has the following steps:
-
-1. construct a polynomial of degree $d = n - 1$ that interpolates the points $(\omega^i, b_i)$ where $i \in 0..n-1$ is the user index, $\omega^i$ is the power of an $n$-th primitive root of unity ($x$ value), and $b_i$ is the $i$-th user balance value ($y$ value);
-2. multiply the constant term $a_0$ of the polynomial by $n$ to obtain the grand sum:
- $\begin{equation}\boxed{S = a_0n= \sum_{i=0}^{n-1}b_i};\end{equation}$
-3. use a polynomial commitment scheme to provide opening proofs to the individual users and a public $a_0$ opening at $x=0$.
-
-Please refer to the [article](https://hackmd.io/@summa/BkglBWsDp) for the detailed description of the algorithm.
-
-## Algorithm Implementation
-
-Halo2 allows to efficiently implement the described algorithm for the following reasons:
-
-- the advice columns in Halo2 are interpolated as polynomials, and the $x$ values are the powers of a primitive root of unity;
-- Halo2 is internally using a KZG polynomial commitment scheme;
-- the use of a ZK-SNARK allows to additionally constrain the balance values, namely, perform the range check.
-
-The algorithm works as follows:
-
-1. Assign all the user balances to an unblinded advice column of the [circuit](../prover/src/circuits/univariate_grand_sum.rs). The unblinded advice column is a special kind of advice column without the random values (blinding factors) added at the bottom. The constant term of such polynomial correctly yields the grand total of user balances according to (1) because the polynomial only interpolates the user balances but not the blinding factors (as in the case with a normal advice column).
-2. Assign the user IDs (e.g., hashes of user emails) to another (normal) advice column.
-3. Generate the ZK-SNARK proof for the circuit, effectively interpolating the balance values into a polynomial and performing a KZG commitment to this polynomial.
-4. Perform a KZG opening proof of the polynomial at $x=0$ and publicly reveal the constant term $a_0$ of the polynomial. The public can then calculate the liabilities by multiplying the $a_0$ by $d + 1$ where $d$ is the polynomial degree.
-5. Privately provide to each user a KZG proof of the corresponding user opening (namely, the openings of the user ID and balance polynomials). Cross-checking the balance opening and the user ID opening $\omega^i$ value ensures that no malicious Custodian can provide the same balance opening to multiple users with the identical balance value.
-
## Usage
To build, test and print the circuits, execute
@@ -40,77 +11,13 @@ cargo build
cargo test --release --features dev-graph
```
-To generate the solidity verifier that can verify the SNARK proof, execute the following command:
-
-```
-cargo run --bin generate_verifier
-```
-
-This process will generate the verifier, `SnarkVerifier.sol`, which will be located in `../contracts/src`.
-
-To generate commitments and proofs with the sample data located in `entry_16.csv` at `../csv/`, execute:
-
-```
-cargo run --bin generate_commitment_and_proofs
-```
-
-This script will generate `commitment_solidity_calldata.json` and `inclusion_proof_solidity_calldata.json` in the `prover/bin`.
-These two JSON files will be used for testing in the `contracts`.
-
-## Documentation
-
-The documentation for the circuits can be generated by running
-
-```
-cargo doc --no-deps --open
-```
-
-## Powers of Tau Trusted Setup
-
-For testing purposes, it's not necessary to download the `ptau` file. The `generate_setup_artifacts` function can manage this by generating a new setup from a randomly generated value. This automated generation process is intended for testing and development convenience, and it should not be used in production.
-For real-world situations, you must provide the path of a specific `ptau` file to the `generate_setup_artifacts`. The circuit will use the randomness from the given file. You can find an example that initializes a `Snapshot` instance [here](https://github.com/summa-dev/summa-solvency/blob/11d4fce5d18f6175804aa792fc9fc5ac27bf5c00/backend/src/apis/snapshot.rs#L115-L116) in the backend.
-
## Benchmarks
The following benchmarks are available in the `kzg` module:
-- `range_check_proof`: the zk-SNARK proof generation time of the polynomial interpolation of user balances with range check;
-- `opening_grand_sum`: the time to generate the KZG opening proof of the grand sum of user balances;
-- `opening_user`: the time to generate the KZG opening proof of a single user inclusion;
-- `calculate_h`: the time to calculate the h(X) for the amortized KZG approach;
-- `amortized_opening_all`: the time to generate open proofs for all 2^K user inclusions using the amortized approach;
-- `amortized_opening_user`: the time to generate the KZG opening proof of a single user inclusion using the precomputed h(x) from the amortized approach;
-- `verifying_grand_sum`: the time to verify the KZG opening proof of the grand sum of user balances;
-- `verifying_user`: the time to verify the KZG opening proof of a single user inclusion.
-
-To run the benchmarks with the default full configuration of the circuit (range check enabled), use the following command:
+- `grand sum proof`: the time to generate a ZK-SNARK proof of the grand sum with a range check of every balance;
+ To run the benchmarks with the default full configuration of the circuit (range check enabled), use the following command:
```shell
cargo bench
```
-
-To run the quick benchmarks with the range check disabled (K=9..12), use the following command:
-
-```shell
-cargo bench --features "no_range_check"
-```
-
-## Chunked Univariate Grand Sum Example
-
-the following technique is proposed to further improve the performance of the univariate grand sum version of Summa:
-
-1. Split the user base into chunks;
-2. Generate the zkSNARK range proof for all the users of each chunk (one proof per chunk) alongside with the advice polynomials;
-3. Generate the proofs of inclusion of a user into a specific chunk;
-4. Prove the grand total across the chunks by performing the following:
- 1. Add together the chunk polynomials generated in step 2;
- 2. Add their corresponding KZG commitments together using the homomorphic property of the KZG commitment;
- 3. Generate the opening proof of the grand sum for the resulting polynomial from step 4.1 against the commitment from step 4.3
-
-Step 4 of the algorithm establishes the relation between the chunks containing individual user liabilities and the grand sum of all user liabilities. The proof of inclusion generation in step 3 should be carried out using the amortized KZG approach in the similar fashion as in the non-chunked version of Summa.
-
-The proof of concept implementation of the suggested approach can be found in the [example file](prover/examples/chunked_univariate_grand_sum.rs). To execute the example, use the command:
-
-```shell
-cargo run --release --example chunked_univariate_grand_sum
-```
diff --git a/prover/benches/kzg.rs b/prover/benches/kzg.rs
deleted file mode 100644
index 471bca8c..00000000
--- a/prover/benches/kzg.rs
+++ /dev/null
@@ -1,306 +0,0 @@
-#![feature(generic_const_exprs)]
-use criterion::{criterion_group, criterion_main, Criterion};
-use halo2_proofs::{arithmetic::Field, halo2curves::bn256::Fr as Fp};
-use num_bigint::BigUint;
-use rand::{rngs::OsRng, Rng};
-
-#[cfg(feature = "no_range_check")]
-use summa_solvency::circuits::univariate_grand_sum::NoRangeCheckConfig;
-#[cfg(not(feature = "no_range_check"))]
-use summa_solvency::circuits::univariate_grand_sum::UnivariateGrandSumConfig;
-use summa_solvency::{
- circuits::{
- univariate_grand_sum::{CircuitConfig, UnivariateGrandSum},
- utils::{
- compute_h_parallel, full_prover, generate_setup_artifacts,
- open_all_user_points_amortized, open_grand_sums, open_grand_sums_gwc,
- open_single_user_point_amortized, open_user_points, verify_grand_sum_openings,
- verify_user_inclusion,
- },
- },
- utils::{big_uint_to_fp, generate_dummy_entries},
-};
-
-fn bench_kzg<
- const K: u32,
- const N_USERS: usize,
- const N_CURRENCIES: usize,
- CONFIG: CircuitConfig,
->(
- name: &str,
-) where
- [(); N_CURRENCIES + 1]:,
-{
- let mut c = Criterion::default().sample_size(10);
-
- // Initialize an empty circuit
- let circuit = UnivariateGrandSum::::init_empty();
- let (params, pk, vk) = generate_setup_artifacts(K, None, &circuit).unwrap();
-
- let range_check_proof_bench_name = format!("<{}> range check", name);
- let opening_grand_sum_bench_name = format!("<{}> opening grand sum", name);
- let opening_user_bench_name = format!("<{}> opening single user inclusion", name);
- let calculate_h_bench_name =
- format!("<{}> calculating h(X) for the amortized KZG approach", name);
- let amortized_opening_all_bench_name = format!(
- "<{}> opening all 2^{} user inclusions using the amortized approach",
- name, K
- );
- let amortized_opening_user_bench_name = format!(
- "<{}> opening single user inclusion using the amortized approach",
- name
- );
- let verifying_grand_sum_bench_name = format!("<{}> verifying grand sum", name);
- let verifying_user_bench_name = format!("<{}> verifying user inclusion", name);
-
- let entries = generate_dummy_entries::().unwrap();
-
- // Calculate total for all entry columns
- let mut total_balances: Vec = vec![BigUint::from(0u32); N_CURRENCIES];
-
- for entry in &entries {
- for (i, balance) in entry.balances().iter().enumerate() {
- total_balances[i] += balance;
- }
- }
-
- let circuit = UnivariateGrandSum::::init(entries.to_vec());
-
- c.bench_function(&range_check_proof_bench_name, |b| {
- b.iter_batched(
- || circuit.clone(), // Setup function: clone the circuit for each iteration
- |circuit| {
- full_prover(¶ms, &pk, circuit, &[vec![Fp::zero()]]);
- },
- criterion::BatchSize::SmallInput, // Choose an appropriate batch size
- );
- });
-
- let (zk_snark_proof, advice_polys, omega) =
- full_prover(¶ms, &pk, circuit, &[vec![Fp::zero()]]);
-
- let poly_length = 1 << u64::from(K);
-
- c.bench_function(&opening_grand_sum_bench_name, |b| {
- b.iter_batched(
- || 1..N_CURRENCIES + 1,
- |balance_column_range| {
- open_grand_sums(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- balance_column_range,
- total_balances
- .iter()
- .map(|x| big_uint_to_fp(&(x)) * Fp::from(poly_length).invert().unwrap())
- .collect::>()
- .as_slice(),
- )
- },
- criterion::BatchSize::SmallInput,
- );
- });
-
- c.bench_function(&format!("{} gwc", opening_grand_sum_bench_name), |b| {
- b.iter_batched(
- || 1..N_CURRENCIES + 1,
- |balance_column_range| {
- open_grand_sums_gwc(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- balance_column_range,
- total_balances
- .iter()
- .map(|x| big_uint_to_fp(&(x)) * Fp::from(poly_length).invert().unwrap())
- .collect::>()
- .as_slice(),
- )
- },
- criterion::BatchSize::SmallInput,
- );
- });
-
- // Generate a random user index
- let get_random_user_index = || {
- let user_range: std::ops::Range = 0..N_USERS;
- OsRng.gen_range(user_range) as u16
- };
-
- c.bench_function(&opening_user_bench_name, |b| {
- b.iter_batched(
- || (get_random_user_index(), 0..N_CURRENCIES + 1),
- |(user_index, column_range)| {
- open_user_points(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- column_range,
- omega,
- user_index,
- &entries
- .get(user_index as usize)
- .map(|entry| {
- std::iter::once(big_uint_to_fp(&(entry.username_as_big_uint())))
- .chain(entry.balances().iter().map(|x| big_uint_to_fp(x)))
- .collect::>()
- })
- .unwrap(),
- )
- },
- criterion::BatchSize::SmallInput,
- );
- });
-
- c.bench_function(&calculate_h_bench_name, |b| {
- b.iter_batched(
- || (0..N_CURRENCIES + 1),
- |column_range| compute_h_parallel(&advice_polys.advice_polys, ¶ms, column_range),
- criterion::BatchSize::SmallInput,
- );
- });
-
- let h_vectors = compute_h_parallel(&advice_polys.advice_polys, ¶ms, 0..N_CURRENCIES + 1);
- let vec_of_slices = h_vectors.iter().map(|v| v.as_slice()).collect::>();
- let h_slices = vec_of_slices.as_slice();
-
- c.bench_function(&amortized_opening_all_bench_name, |b| {
- b.iter_batched(
- || {},
- |_| open_all_user_points_amortized(h_slices, omega),
- criterion::BatchSize::SmallInput,
- );
- });
-
- c.bench_function(&amortized_opening_user_bench_name, |b| {
- b.iter_batched(
- || {},
- |_| open_single_user_point_amortized(h_slices, ¶ms, omega),
- criterion::BatchSize::SmallInput,
- );
- });
-
- // Open grand sum for benchmark verifying grand sum
- let balance_column_range = 1..N_CURRENCIES + 1;
- let grand_sums_batch_proof = open_grand_sums(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- balance_column_range.clone(),
- total_balances
- .iter()
- .map(|x| big_uint_to_fp(&(x)) * Fp::from(poly_length).invert().unwrap())
- .collect::>()
- .as_slice(),
- );
-
- c.bench_function(&verifying_grand_sum_bench_name, |b| {
- b.iter_batched(
- || {
- (
- grand_sums_batch_proof.clone(),
- u64::try_from(advice_polys.advice_polys[0].len()).unwrap(),
- balance_column_range.clone(),
- )
- },
- |(grand_sums_batch_proof, poly_length, balance_column_range)| {
- verify_grand_sum_openings::(
- ¶ms,
- &zk_snark_proof,
- &grand_sums_batch_proof,
- poly_length,
- balance_column_range,
- )
- },
- criterion::BatchSize::SmallInput,
- );
- });
-
- // Open user inclusion for benchmark verifying user inclusion
- let column_range = 0..N_CURRENCIES + 1;
- let omega = vk.get_domain().get_omega();
- let user_index = get_random_user_index();
- let openings_batch_proof = open_user_points(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- column_range.clone(),
- omega,
- user_index,
- &entries
- .get(user_index as usize)
- .map(|entry| {
- std::iter::once(big_uint_to_fp(&(entry.username_as_big_uint())))
- .chain(entry.balances().iter().map(|x| big_uint_to_fp(x)))
- .collect::>()
- })
- .unwrap(),
- );
-
- c.bench_function(&verifying_user_bench_name, |b| {
- b.iter_batched(
- || (column_range.clone(), omega, user_index),
- |(column_range, omega, user_index)| {
- verify_user_inclusion(
- ¶ms,
- &zk_snark_proof,
- &openings_batch_proof,
- column_range,
- omega,
- user_index,
- );
- },
- criterion::BatchSize::SmallInput,
- );
- });
-}
-
-fn criterion_benchmark(_c: &mut Criterion) {
- const N_CURRENCIES: usize = 1;
-
- // Demonstrating that a higher value of K has a more significant impact on benchmark performance than the number of users
- #[cfg(not(feature = "no_range_check"))]
- {
- const K: u32 = 17;
- const N_USERS: usize = 2usize.pow(K) - 6;
- bench_kzg::>(
- format!("K = {K}, N_USERS = {N_USERS}, N_CURRENCIES = {N_CURRENCIES}").as_str(),
- );
- }
- //Use the following benchmarks for quick evaluation/prototyping (no range check)
- #[cfg(feature = "no_range_check")]
- {
- const K: u32 = 9;
- const N_USERS: usize = 2usize.pow(K) - 6;
- bench_kzg::>(
- format!("K = {K}, N_USERS = {N_USERS}, N_CURRENCIES = {N_CURRENCIES}").as_str(),
- );
- }
- #[cfg(feature = "no_range_check")]
- {
- const K: u32 = 10;
- const N_USERS: usize = 2usize.pow(K) - 6;
- bench_kzg::>(
- format!("K = {K}, N_USERS = {N_USERS}, N_CURRENCIES = {N_CURRENCIES}").as_str(),
- );
- }
- #[cfg(feature = "no_range_check")]
- {
- const K: u32 = 11;
- const N_USERS: usize = 2usize.pow(K) - 6;
- bench_kzg::>(
- format!("K = {K}, N_USERS = {N_USERS}, N_CURRENCIES = {N_CURRENCIES}").as_str(),
- );
- }
- #[cfg(feature = "no_range_check")]
- {
- const K: u32 = 12;
- const N_USERS: usize = 2usize.pow(K) - 6;
- bench_kzg::>(
- format!("K = {K}, N_USERS = {N_USERS}, N_CURRENCIES = {N_CURRENCIES}").as_str(),
- );
- }
-}
-
-criterion_group!(benches, criterion_benchmark);
-criterion_main!(benches);
diff --git a/prover/benches/proof_of_liabilities.rs b/prover/benches/proof_of_liabilities.rs
new file mode 100644
index 00000000..b47d2075
--- /dev/null
+++ b/prover/benches/proof_of_liabilities.rs
@@ -0,0 +1,87 @@
+use criterion::{criterion_group, criterion_main, Criterion};
+use plonkish_backend::{
+ backend::{hyperplonk::HyperPlonk, PlonkishBackend, PlonkishCircuit, PlonkishCircuitInfo},
+ frontend::halo2::Halo2Circuit,
+ halo2_curves::bn256::{Bn256, Fr as Fp},
+ pcs::multilinear::MultilinearKzg,
+ util::{
+ test::std_rng,
+ transcript::{InMemoryTranscript, Keccak256Transcript},
+ },
+};
+use rand::{
+ rngs::{OsRng, StdRng},
+ CryptoRng, RngCore, SeedableRng,
+};
+use summa_hyperplonk::{
+ circuits::summa_circuit::summa_hyperplonk::SummaHyperplonk, utils::generate_dummy_entries,
+};
+
+fn bench_summa() {
+ let name = format!("K = {K}, N_USERS = {N_USERS}, N_CURRENCIES = {N_CURRENCIES}");
+ let mut c = Criterion::default().sample_size(10);
+
+ let grand_sum_proof_bench_name = format!("<{}> grand sum proof", name);
+
+ type Pb = HyperPlonk>;
+ let entries = generate_dummy_entries::().unwrap();
+ let halo2_circuit = SummaHyperplonk::::init(entries.to_vec());
+
+ let circuit = Halo2Circuit::>::new::(
+ K as usize,
+ halo2_circuit.clone(),
+ );
+
+ let circuit_info: PlonkishCircuitInfo<_> = circuit.circuit_info().unwrap();
+ let instances = circuit.instances();
+ let param = Pb::setup(&circuit_info, seeded_std_rng()).unwrap();
+
+ let (pp, vp) = Pb::preprocess(¶m, &circuit_info).unwrap();
+
+ let mut transcript = Keccak256Transcript::default();
+ let proof = {
+ Pb::prove(&pp, &circuit, &mut transcript, std_rng()).unwrap();
+ transcript.into_proof()
+ };
+
+ let accept = {
+ let mut transcript = Keccak256Transcript::from_proof((), proof.as_slice());
+ Pb::verify(&vp, instances, &mut transcript, std_rng()).is_ok()
+ };
+ assert!(accept);
+
+ c.bench_function(&grand_sum_proof_bench_name, |b| {
+ b.iter_batched(
+ || {
+ Halo2Circuit::>::new::(
+ K as usize,
+ halo2_circuit.clone(),
+ )
+ },
+ |circuit| {
+ let mut transcript = Keccak256Transcript::default();
+
+ Pb::prove(&pp, &circuit, &mut transcript, std_rng()).unwrap();
+ transcript.into_proof();
+ },
+ criterion::BatchSize::SmallInput, // Choose an appropriate batch size
+ )
+ });
+}
+
+fn criterion_benchmark(_c: &mut Criterion) {
+ const N_CURRENCIES: usize = 2;
+
+ {
+ const K: u32 = 17;
+ const N_USERS: usize = 1 << 16 as usize;
+ bench_summa::();
+ }
+}
+
+pub fn seeded_std_rng() -> impl RngCore + CryptoRng {
+ StdRng::seed_from_u64(OsRng.next_u64())
+}
+
+criterion_group!(benches, criterion_benchmark);
+criterion_main!(benches);
diff --git a/prover/bin/gen_commit_and_proofs.rs b/prover/bin/gen_commit_and_proofs.rs
deleted file mode 100644
index 4d65d74e..00000000
--- a/prover/bin/gen_commit_and_proofs.rs
+++ /dev/null
@@ -1,246 +0,0 @@
-#![feature(generic_const_exprs)]
-use ethers::types::U256;
-use halo2_proofs::{
- arithmetic::Field,
- halo2curves::{
- bn256::{Bn256, Fr as Fp, G1Affine, G2Affine},
- group::{cofactor::CofactorCurveAffine, Curve},
- },
- poly::kzg::commitment::KZGCommitmentScheme,
- transcript::TranscriptRead,
-};
-use halo2_solidity_verifier::Keccak256Transcript;
-use num_bigint::BigUint;
-use serde::{Deserialize, Serialize};
-use serde_json::to_string_pretty;
-use std::{fs::File, io::Write};
-use summa_solvency::{
- circuits::{
- univariate_grand_sum::{UnivariateGrandSum, UnivariateGrandSumConfig},
- utils::{full_prover, full_verifier, generate_setup_artifacts},
- },
- cryptocurrency::Cryptocurrency,
- entry::Entry,
- utils::{
- amortized_kzg::{create_naive_kzg_proof, verify_kzg_proof},
- big_uint_to_fp, parse_csv_to_entries,
- },
-};
-
-const K: u32 = 17;
-const N_CURRENCIES: usize = 2;
-const N_USERS: usize = 16;
-
-#[derive(Serialize, Deserialize)]
-struct CommitmentSolidityCallData {
- range_check_snark_proof: String,
- grand_sums_batch_proof: String,
- total_balances: Vec,
-}
-
-#[derive(Serialize, Deserialize)]
-struct InclusionProofCallData {
- proof: String,
- challenges: Vec,
- user_id: String,
- user_values: Vec,
-}
-
-fn main() {
- // Initialize with entries
- let mut entries: Vec> = vec![Entry::init_empty(); N_USERS];
- let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
-
- // Parse CSV to update entries and cryptos arrays
- parse_csv_to_entries::<&str, N_CURRENCIES>("../csv/entry_16.csv", &mut entries, &mut cryptos)
- .unwrap();
-
- let univariate_grand_sum_circuit = UnivariateGrandSum::<
- N_USERS,
- N_CURRENCIES,
- UnivariateGrandSumConfig,
- >::init(entries.to_vec());
-
- let (params, pk, _) = generate_setup_artifacts(
- K,
- Some("../backend/ptau/hermez-raw-17"),
- &univariate_grand_sum_circuit,
- )
- .unwrap();
-
- // Create a proof
- let instances = vec![Fp::zero(); 1]; // This instance is necessary to verify proof on solidity verifier.
- let (zk_snark_proof, advice_polys, omega) = full_prover(
- ¶ms,
- &pk,
- univariate_grand_sum_circuit.clone(),
- &[instances.clone()],
- );
-
- // Verify the proof to ensure validity
- assert!(full_verifier(
- ¶ms,
- pk.get_vk(),
- &zk_snark_proof,
- &[instances]
- ));
-
- let challenge = Fp::zero();
- let mut csv_total: Vec = vec![BigUint::from(0u32); N_CURRENCIES];
- for entry in &entries {
- for (i, balance) in entry.balances().iter().enumerate() {
- csv_total[i] += balance;
- }
- }
-
- // Evaluate the commitments from the snark proof
- let mut kzg_commitments = Vec::with_capacity(N_CURRENCIES);
- let mut transcript = Keccak256Transcript::new(zk_snark_proof.as_slice());
- for _ in 0..(N_CURRENCIES + 1) {
- let point: G1Affine = transcript.read_point().unwrap();
- kzg_commitments.push(point.to_curve());
- }
-
- let poly_length = 1 << u64::from(K);
- let total_balances = csv_total
- .iter()
- .map(|x| big_uint_to_fp(x) * Fp::from(poly_length).invert().unwrap())
- .collect::>();
-
- let mut grand_sums_kzg_proof = Vec::new();
- for balance_column in 1..(N_CURRENCIES + 1) {
- let f_poly = advice_polys.advice_polys.get(balance_column).unwrap();
-
- let currency_index = balance_column - 1;
- let kzg_proof = create_naive_kzg_proof::>(
- ¶ms,
- pk.get_vk().get_domain(),
- f_poly,
- challenge,
- total_balances[currency_index],
- );
-
- // Ensure the KZG proof is valid
- assert!(verify_kzg_proof(
- ¶ms,
- kzg_commitments[balance_column],
- kzg_proof,
- &challenge,
- &total_balances[currency_index],
- ));
-
- // Convert to affine point and serialize to bytes
- let kzg_proof_affine = kzg_proof.to_affine();
- let mut kzg_proof_affine_x = kzg_proof_affine.x.to_bytes();
- let mut kzg_proof_affine_y = kzg_proof_affine.y.to_bytes();
- kzg_proof_affine_x.reverse();
- kzg_proof_affine_y.reverse();
-
- // Concatenate x and y of the KZG proof
- grand_sums_kzg_proof.push([kzg_proof_affine_x, kzg_proof_affine_y].concat());
- }
-
- let commitment = CommitmentSolidityCallData {
- range_check_snark_proof: format!("0x{}", hex::encode(zk_snark_proof)),
- grand_sums_batch_proof: format!("0x{}", hex::encode(grand_sums_kzg_proof.concat())),
- total_balances: csv_total
- .iter()
- .map(|x| U256::from_little_endian(big_uint_to_fp(x).to_bytes().as_slice()))
- .collect::>(),
- };
-
- // Serialize the data for solidity
- let serialized_data = to_string_pretty(&commitment).expect("Failed to serialize data");
-
- // Save the serialized data to a JSON file
- let mut file =
- File::create("./bin/commitment_solidity_calldata.json").expect("Unable to create file");
- file.write_all(serialized_data.as_bytes())
- .expect("Unable to write data to file");
-
- // For testing, open user balances and generate a proof for a specific user index
- let user_index = 1_u16; // Example user index for proof generation
- let challenge = omega.pow_vartime([user_index as u64]);
-
- let user_values = &entries
- .get(user_index as usize)
- .map(|entry| {
- std::iter::once(big_uint_to_fp(entry.username_as_big_uint()))
- .chain(entry.balances().iter().map(big_uint_to_fp))
- .collect::>()
- })
- .unwrap();
-
- let column_range = 0..N_CURRENCIES + 1;
- let mut inclusion_proof: Vec> = Vec::new();
- for column_index in column_range {
- let f_poly = advice_polys.advice_polys.get(column_index).unwrap();
-
- let z = if column_index == 0 {
- big_uint_to_fp(entries[user_index as usize].username_as_big_uint())
- } else {
- big_uint_to_fp(&entries[user_index as usize].balances()[column_index - 1])
- };
-
- let kzg_proof = create_naive_kzg_proof::>(
- ¶ms,
- pk.get_vk().get_domain(),
- f_poly,
- challenge,
- z,
- );
-
- assert!(
- verify_kzg_proof(
- ¶ms,
- kzg_commitments[column_index],
- kzg_proof,
- &challenge,
- &z,
- ),
- "KZG proof verification failed for user {}",
- user_index
- );
-
- // Convert to affine point and serialize to bytes
- let kzg_proof_affine = kzg_proof.to_affine();
- let mut kzg_proof_affine_x = kzg_proof_affine.x.to_bytes();
- let mut kzg_proof_affine_y = kzg_proof_affine.y.to_bytes();
- kzg_proof_affine_x.reverse();
- kzg_proof_affine_y.reverse();
-
- // Concat x, y of kzg_proof
- inclusion_proof.push([kzg_proof_affine_x, kzg_proof_affine_y].concat());
- }
-
- let user_values = user_values
- .iter()
- .map(|x| U256::from_little_endian(x.to_bytes().as_slice()))
- .collect::>();
-
- // Evaluate S_G2 points with challenge for verifying proof on the KZG solidity verifier
- let s_g2 = -params.s_g2() + (G2Affine::generator() * challenge);
- let s_g2_affine = s_g2.to_affine();
-
- let challenges = vec![
- U256::from_little_endian(s_g2_affine.x.c1.to_bytes().as_slice()),
- U256::from_little_endian(s_g2_affine.x.c0.to_bytes().as_slice()),
- U256::from_little_endian(s_g2_affine.y.c1.to_bytes().as_slice()),
- U256::from_little_endian(s_g2_affine.y.c0.to_bytes().as_slice()),
- ];
-
- let data = InclusionProofCallData {
- proof: format!("0x{}", hex::encode(inclusion_proof.concat())),
- user_id: entries[user_index as usize].username().to_string(),
- challenges,
- user_values,
- };
-
- let serialized_data = to_string_pretty(&data).expect("Failed to serialize data");
-
- // Save the serialized data to a JSON file
- let mut file = File::create("./bin/inclusion_proof_solidity_calldata.json")
- .expect("Unable to create file");
- file.write_all(serialized_data.as_bytes())
- .expect("Unable to write data to file");
-}
diff --git a/prover/bin/gen_verifier.rs b/prover/bin/gen_verifier.rs
deleted file mode 100644
index ea0c5810..00000000
--- a/prover/bin/gen_verifier.rs
+++ /dev/null
@@ -1,147 +0,0 @@
-#![feature(generic_const_exprs)]
-use halo2_proofs::{
- halo2curves::bn256::Fr as Fp,
- poly::kzg::{
- multiopen::{ProverSHPLONK, VerifierSHPLONK},
- strategy::SingleStrategy,
- },
- transcript::TranscriptWriterBuffer,
-};
-use halo2_solidity_verifier::{
- compile_solidity, encode_calldata, BatchOpenScheme::Bdfg21, Evm, Keccak256Transcript,
- SolidityGenerator,
-};
-use prelude::*;
-use rand::rngs::OsRng;
-use summa_solvency::{
- circuits::{
- univariate_grand_sum::{UnivariateGrandSum, UnivariateGrandSumConfig},
- utils::generate_setup_artifacts,
- },
- cryptocurrency::Cryptocurrency,
- entry::Entry,
- utils::parse_csv_to_entries,
-};
-
-const K: u32 = 17;
-const N_CURRENCIES: usize = 2;
-const N_USERS: usize = 16;
-
-fn main() {
- // In order to generate the verifier we create the circuit using the init_empty() method, which means that the circuit is not initialized with any data.
- let circuit = UnivariateGrandSum::<
- N_USERS,
- N_CURRENCIES,
- UnivariateGrandSumConfig,
- >::init_empty();
-
- let (params, pk, _) =
- generate_setup_artifacts(K, Some("../backend/ptau/hermez-raw-17"), &circuit).unwrap();
-
- // Only now we can instantiate the circuit with the actual inputs
- let mut entries: Vec> = vec![Entry::init_empty(); N_USERS];
- let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
-
- parse_csv_to_entries::<&str, N_CURRENCIES>("../csv/entry_16.csv", &mut entries, &mut cryptos)
- .unwrap();
-
- let univariate_grand_sum_circuit = UnivariateGrandSum::<
- N_USERS,
- N_CURRENCIES,
- UnivariateGrandSumConfig,
- >::init(entries.to_vec());
-
- // 1. Generate Snark Verifier Contract and Verification Key
- //
- // the instance value is not used in proving, but it is necessary to SolidityGenerator and it should at least 1.
- let num_instance = 1_usize;
- let generator: SolidityGenerator<'_> =
- SolidityGenerator::new(¶ms, pk.get_vk(), Bdfg21, num_instance);
- let (verifier_solidity, vk_verifier) = generator.render_separately().unwrap();
-
- let verifier_solidity_fixed = verifier_solidity
- .replace("Halo2Verifier", "Verifier")
- .replace(") public returns (bool)", ") public view returns (bool)");
-
- let verifier_code = compile_solidity(&verifier_solidity_fixed);
- let vk_code = compile_solidity(&vk_verifier);
-
- // 2. Generate Snark Proof for range check
- //
- // the instance values has to be at least more than one due to verifier contract that generated from SolidityGenerator.
- let instances: Vec = vec![Fp::zero(); 1];
- let mut transcript = Keccak256Transcript::new(Vec::new());
-
- let result = create_proof::<_, ProverSHPLONK<_>, _, _, _, _>(
- ¶ms,
- &pk,
- &[univariate_grand_sum_circuit],
- &[&[&instances]],
- &mut OsRng,
- &mut transcript,
- );
- assert!(result.is_ok());
-
- let result_unwrapped = result.unwrap();
- result_unwrapped.0.expect("prover should not fail");
-
- let zk_snark_proof = transcript.finalize();
-
- // Check verification on verifier function
- let verified = {
- let mut transcript = Keccak256Transcript::new(zk_snark_proof.as_slice());
- verify_proof::<_, VerifierSHPLONK<_>, _, _, _>(
- ¶ms,
- pk.get_vk(),
- SingleStrategy::new(¶ms),
- &[&[&instances]],
- &mut transcript,
- )
- };
- assert!(verified.is_ok());
-
- // 3. Deploy Snark Verifier Contract and verify snark proof
- let mut evm = Evm::default();
-
- // Calldata for verifying proof on evm
- let vk_address = evm.create(vk_code);
- let proof_calldata = encode_calldata(Some(vk_address.into()), &zk_snark_proof, &instances);
-
- // Initiate verifier contract
- let verifier_address = evm.create(verifier_code);
- let (_, output) = evm.call(verifier_address, proof_calldata);
-
- // If successfuly verified, the verifier contract will return 1.
- assert_eq!(output, [vec![0; 31], vec![1]].concat());
- save_solidity("SnarkVerifier.sol", &verifier_solidity_fixed);
- save_solidity("VerifyingKey.sol", &vk_verifier);
-}
-
-fn save_solidity(name: impl AsRef, solidity: &str) {
- File::create(format!("../contracts/src/{}", name.as_ref()))
- .unwrap()
- .write_all(solidity.as_bytes())
- .unwrap();
-}
-
-mod prelude {
- pub use halo2_proofs::{
- circuit::{Layouter, SimpleFloorPlanner, Value},
- halo2curves::{
- bn256::{Bn256, Fr, G1Affine},
- ff::PrimeField,
- },
- plonk::*,
- poly::{commitment::Params, kzg::commitment::ParamsKZG, Rotation},
- };
- pub use rand::{
- rngs::{OsRng, StdRng},
- RngCore, SeedableRng,
- };
- pub use std::{
- collections::HashMap,
- fs::{create_dir_all, File},
- io::Write,
- ops::Range,
- };
-}
diff --git a/prover/examples/chunked_univariate_grand_sum.rs b/prover/examples/chunked_univariate_grand_sum.rs
deleted file mode 100644
index 4ca6dc99..00000000
--- a/prover/examples/chunked_univariate_grand_sum.rs
+++ /dev/null
@@ -1,178 +0,0 @@
-#![feature(generic_const_exprs)]
-use std::error::Error;
-
-use halo2_proofs::halo2curves::bn256::{Fr as Fp, G1Affine};
-use halo2_proofs::halo2curves::group::Curve;
-use halo2_proofs::transcript::TranscriptRead;
-use halo2_proofs::{
- arithmetic::Field, halo2curves::bn256::Bn256, poly::kzg::commitment::KZGCommitmentScheme,
-};
-use halo2_solidity_verifier::Keccak256Transcript;
-use num_bigint::BigUint;
-
-use summa_solvency::circuits::utils::generate_setup_artifacts;
-use summa_solvency::{
- circuits::{
- univariate_grand_sum::{NoRangeCheckConfig, UnivariateGrandSum},
- utils::full_prover,
- },
- cryptocurrency::Cryptocurrency,
- entry::Entry,
- utils::{
- amortized_kzg::{commit_kzg, create_naive_kzg_proof, verify_kzg_proof},
- big_uint_to_fp, parse_csv_to_entries,
- },
-};
-
-const K: u32 = 9;
-const N_CURRENCIES: usize = 2;
-const N_USERS_TOTAL: usize = 64;
-const N_USERS_CHUNK: usize = N_USERS_TOTAL / 2;
-
-fn main() -> Result<(), Box> {
- let path = "../csv/entry_64.csv";
-
- let mut entries: Vec> = vec![Entry::init_empty(); N_USERS_TOTAL];
- let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
-
- parse_csv_to_entries::<&str, N_CURRENCIES>(path, &mut entries, &mut cryptos).unwrap();
-
- // Calculate total for all balance entries
- let mut csv_total: Vec = vec![BigUint::from(0u32); N_CURRENCIES];
-
- for entry in &entries {
- for (i, balance) in entry.balances().iter().enumerate() {
- csv_total[i] += balance;
- }
- }
-
- // Split the user base into two equal chunks of N_USERS_TOTAL/2 each
- let entries_first_chunk = entries[0..N_USERS_CHUNK].to_vec();
- // Calculate the total for the first chunk
- let mut csv_total_1: Vec = vec![BigUint::from(0u32); N_CURRENCIES];
- for entry in &entries_first_chunk {
- for (i, balance) in entry.balances().iter().enumerate() {
- csv_total_1[i] += balance;
- }
- }
- let entries_second_chunk = entries[N_USERS_CHUNK..].to_vec();
- // Calculate the total for the second chunk
- let mut csv_total_2: Vec = vec![BigUint::from(0u32); N_CURRENCIES];
- for entry in &entries_second_chunk {
- for (i, balance) in entry.balances().iter().enumerate() {
- csv_total_2[i] += balance;
- }
- }
- // Index of the advice polynomial to be used for the subsequent examples
- const BALANCES_INDEX: usize = 1;
- assert!(
- &csv_total_1[BALANCES_INDEX - 1] + &csv_total_2[BALANCES_INDEX - 1]
- == csv_total[BALANCES_INDEX - 1],
- "The sum of the chunks' total should be equal to the grand total"
- );
-
- type CONFIG = NoRangeCheckConfig;
-
- let circuit_1 = UnivariateGrandSum::::init_empty();
- // Generate the setup artifacts using an empty circuit
- let (params, pk, vk) = generate_setup_artifacts(K, None, &circuit_1).unwrap();
-
- // Instantiate the actual circuits for the first and second chunk
- let circuit_1 =
- UnivariateGrandSum::::init(entries_first_chunk);
- let circuit_2 =
- UnivariateGrandSum::::init(entries_second_chunk);
-
- // The zkSNARK proofs encode the balances of the first chunk and the second chunk
- // in the corresponding advice polynomials
- let (proof_1, advice_polys_1, _) = full_prover(¶ms, &pk, circuit_1.clone(), &[vec![]]);
- let (proof_2, advice_polys_2, _) = full_prover(¶ms, &pk, circuit_2.clone(), &[vec![]]);
-
- // Get the BALANCES_INDEX advice polynomial from each chunk
- let f_poly_1 = advice_polys_1.advice_polys.get(BALANCES_INDEX).unwrap();
- let f_poly_2 = advice_polys_2.advice_polys.get(BALANCES_INDEX).unwrap();
-
- // These advice polynomials can then be used to independently produce the user inclusion KZG proofs.
- // This allows to significantly speed up the inclusion proof by using smaller `N_USERS_CHUNK` size
- // and parallelizing the proof generation.
-
- // Take the KZG commitment of each chunk from the zkSNARK proof transcript
- let mut transcript_1 = Keccak256Transcript::new(proof_1.as_slice());
- let mut advice_commitments_1 = Vec::new();
- (0..N_CURRENCIES + 1).for_each(|_| {
- let point: G1Affine = transcript_1.read_point().unwrap();
- advice_commitments_1.push(point);
- });
- let kzg_commitment_1 = advice_commitments_1[BALANCES_INDEX];
- let mut transcript_2 = Keccak256Transcript::new(proof_2.as_slice());
- let mut advice_commitments_2 = Vec::new();
- (0..N_CURRENCIES + 1).for_each(|_| {
- let point: G1Affine = transcript_2.read_point().unwrap();
- advice_commitments_2.push(point);
- });
- let kzg_commitment_2 = advice_commitments_2[BALANCES_INDEX];
- assert!(
- kzg_commitment_1 != kzg_commitment_2,
- "Commitments should be different"
- );
-
- // The homomorphic property of KZG commitments allows us to sum the individual chunk commitments
- // to produce the KZG opening proof for the grand total
- let kzg_commitment_sum = kzg_commitment_1 + kzg_commitment_2;
-
- // First, add the polynomials together coefficient-wise
- let domain = vk.get_domain();
- let mut f_poly_total = domain.empty_coeff();
-
- for (poly, value) in f_poly_total
- .iter_mut()
- .zip(f_poly_1.iter().zip(f_poly_2.iter()))
- {
- *poly = *value.0 + *value.1;
- }
-
- // Demonstrating the homomorphic property of KZG commitments. The sum of the KZG commitments
- // to the chunk polynomials should be the same as the KZG commitment to the total polynomial
- // that is a sum of the chunk polynomials
- let kzg_commitment_total = commit_kzg(¶ms, &f_poly_total);
- assert!(
- kzg_commitment_sum.to_affine() == kzg_commitment_total.to_affine(),
- "Commitments should be equal"
- );
-
- let poly_length = 1 << u64::from(K);
-
- // We're opening the resulting polynomial at x = 0 and expect the constant coefficient
- // to be equal to the grand total divided by the size of the polynomial
- // thanks to the univariate grand sum property.
- let challenge = Fp::ZERO;
- // The expected evaluation of the polynomial at x = 0 is the grand total divided by the size of the polynomial
- let eval =
- big_uint_to_fp(&(csv_total[BALANCES_INDEX - 1])) * Fp::from(poly_length).invert().unwrap();
- let kzg_proof = create_naive_kzg_proof::>(
- ¶ms,
- &domain,
- &f_poly_total,
- challenge,
- eval,
- );
-
- // KZG proof verification demonstrates that we can successfully verify the grand total
- // after building the total KZG commitment from the chunk commitments
- assert!(
- verify_kzg_proof(¶ms, kzg_commitment_sum, kzg_proof, &challenge, &eval),
- "KZG proof verification failed"
- );
- assert!(
- !verify_kzg_proof(
- ¶ms,
- kzg_commitment_sum,
- kzg_proof,
- &challenge,
- &big_uint_to_fp(&BigUint::from(123u32)),
- ),
- "Invalid proof verification should fail"
- );
-
- Ok(())
-}
diff --git a/prover/prints/range-check-layout.png b/prover/prints/range-check-layout.png
index 736e963f..579656ef 100644
Binary files a/prover/prints/range-check-layout.png and b/prover/prints/range-check-layout.png differ
diff --git a/prover/prints/univariate-grand-sum-layout.png b/prover/prints/summa-hyperplonk-layout.png
similarity index 96%
rename from prover/prints/univariate-grand-sum-layout.png
rename to prover/prints/summa-hyperplonk-layout.png
index e9541d1e..497b11f3 100644
Binary files a/prover/prints/univariate-grand-sum-layout.png and b/prover/prints/summa-hyperplonk-layout.png differ
diff --git a/prover/rust-toolchain b/prover/rust-toolchain
deleted file mode 100644
index 4524b7cb..00000000
--- a/prover/rust-toolchain
+++ /dev/null
@@ -1 +0,0 @@
-nightly-2023-07-11
\ No newline at end of file
diff --git a/prover/src/chips/range/range_check.rs b/prover/src/chips/range/range_check.rs
index fffb2aa4..c814f211 100644
--- a/prover/src/chips/range/range_check.rs
+++ b/prover/src/chips/range/range_check.rs
@@ -40,7 +40,7 @@ pub struct RangeCheckU64Config {
zs: [Column; 4],
}
-/// Helper chip that verfiies that the element witnessed in a given cell lies within the u64 range.
+/// Helper chip that verifies that the element witnessed in a given cell lies within the u64 range.
/// For example, Let's say we want to constraint 0x1f2f3f4f5f6f7f8f to be a u64.
/// Note that the lookup table `range` is by default loaded with values from 0 to 2^16 - 1.
/// `z` is the advice column that contains the element to be checked.
@@ -140,7 +140,7 @@ impl RangeCheckU64Chip {
.map(|x| decompose_fp_to_byte_pairs(x, 4))
.transpose_vec(4);
- // Initalize an empty vector of cells for the truncated right-shifted values of the element to be checked.
+ // Initialize an empty vector of cells for the truncated right-shifted values of the element to be checked.
let mut z = element.clone();
// Calculate 1 / 2^16
diff --git a/prover/src/chips/range/tests.rs b/prover/src/chips/range/tests.rs
index 9b826100..f9425443 100644
--- a/prover/src/chips/range/tests.rs
+++ b/prover/src/chips/range/tests.rs
@@ -153,14 +153,14 @@ impl Circuit for TestCircuit {
config: Self::Config,
mut layouter: impl Layouter,
) -> Result<(), Error> {
- // Initiate the range check chip
+ // Initialize the range check chip
let range_chip = RangeCheckU64Chip::construct(config.range_check_config);
// Load the lookup table
let range = 1 << 16;
layouter.assign_region(
- || format!("load range check table of 64 bits"),
+ || "load range check table of 64 bits".to_string(),
|mut region| {
for i in 0..range {
region.assign_fixed(
@@ -174,7 +174,7 @@ impl Circuit for TestCircuit {
},
)?;
- // Initiate the add chip
+ // Initialize the add chip
let addchip = AddChip::construct(config.addchip_config);
let (_, _, c) = addchip.assign(self.a, self.b, layouter.namespace(|| "add chip"))?;
@@ -220,7 +220,8 @@ mod testing {
let b = Fp::from(1);
let circuit = TestCircuit { a, b };
- let prover = MockProver::run(k, &circuit, vec![vec![Fp::zero()]]).unwrap();
+ let prover =
+ MockProver::run::(k, &circuit, vec![vec![Fp::zero()]]).unwrap();
prover.assert_satisfied();
}
@@ -238,7 +239,8 @@ mod testing {
let b = Fp::from(2);
let circuit = TestCircuit { a, b };
- let invalid_prover = MockProver::run(k, &circuit, vec![vec![Fp::zero()]]).unwrap();
+ let invalid_prover =
+ MockProver::run::(k, &circuit, vec![vec![Fp::zero()]]).unwrap();
assert_eq!(
invalid_prover.verify(),
Err(vec![
@@ -274,7 +276,7 @@ mod testing {
b: Fp::from(1),
};
halo2_proofs::dev::CircuitLayout::default()
- .render(9, &circuit, &root)
+ .render::(9, &circuit, &root)
.unwrap();
}
}
diff --git a/prover/src/circuits/mod.rs b/prover/src/circuits/mod.rs
index bbd1096b..1f44e02c 100644
--- a/prover/src/circuits/mod.rs
+++ b/prover/src/circuits/mod.rs
@@ -1,3 +1,3 @@
+pub mod summa_circuit;
+#[cfg(test)]
mod tests;
-pub mod univariate_grand_sum;
-pub mod utils;
diff --git a/prover/src/circuits/summa_circuit.rs b/prover/src/circuits/summa_circuit.rs
new file mode 100644
index 00000000..2e2dfd0d
--- /dev/null
+++ b/prover/src/circuits/summa_circuit.rs
@@ -0,0 +1,273 @@
+pub mod summa_hyperplonk {
+
+ use crate::chips::range::range_check::{RangeCheckU64Chip, RangeCheckU64Config};
+ use crate::entry::Entry;
+ use crate::utils::big_uint_to_fp;
+ use halo2_proofs::arithmetic::Field;
+ use halo2_proofs::halo2curves::bn256::Fr as Fp;
+ use halo2_proofs::plonk::{Expression, Selector};
+ use halo2_proofs::poly::Rotation;
+ use halo2_proofs::{
+ circuit::{Layouter, SimpleFloorPlanner, Value},
+ plonk::{Advice, Circuit, Column, ConstraintSystem, Error, Fixed, Instance},
+ };
+ use num_bigint::BigUint;
+ use plonkish_backend::frontend::halo2::CircuitExt;
+ use rand::RngCore;
+
+ #[derive(Clone)]
+ pub struct SummaConfig {
+ username: Column,
+ balances: [Column; N_CURRENCIES],
+ running_sums: [Column; N_CURRENCIES],
+ range_check_configs: [RangeCheckU64Config; N_CURRENCIES],
+ range_u16: Column,
+ instance: Column,
+ selector: Selector,
+ }
+
+ impl SummaConfig {
+ fn configure(meta: &mut ConstraintSystem, running_sum_selector: &Selector) -> Self {
+ let username = meta.advice_column();
+
+ let balances = [(); N_CURRENCIES].map(|_| meta.advice_column());
+ let running_sums = [(); N_CURRENCIES].map(|_| meta.advice_column());
+
+ for column in &running_sums {
+ meta.enable_equality(*column);
+ }
+
+ let range_u16 = meta.fixed_column();
+
+ meta.enable_constant(range_u16);
+
+ meta.annotate_lookup_any_column(range_u16, || "LOOKUP_MAXBITS_RANGE");
+
+ // Create an empty array of range check configs
+ let mut range_check_configs = Vec::with_capacity(N_CURRENCIES);
+
+ let instance = meta.instance_column();
+ meta.enable_equality(instance);
+
+ for item in balances.iter().take(N_CURRENCIES) {
+ let z = *item;
+ // Create 4 advice columns for each range check chip
+ let zs = [(); 4].map(|_| meta.advice_column());
+
+ for column in &zs {
+ meta.enable_equality(*column);
+ }
+
+ let range_check_config = RangeCheckU64Chip::configure(meta, z, zs, range_u16);
+
+ range_check_configs.push(range_check_config);
+ }
+
+ meta.create_gate("Running sum gate", |meta| {
+ let mut running_sum_constraint = vec![];
+ let s = meta.query_selector(*running_sum_selector);
+ for j in 0..N_CURRENCIES {
+ let prev_running_sum = meta.query_advice(running_sums[j], Rotation::prev());
+ let curr_running_sum = meta.query_advice(running_sums[j], Rotation::cur());
+ let curr_balance = meta.query_advice(balances[j], Rotation::cur());
+ running_sum_constraint.push(
+ s.clone()
+ * (curr_running_sum.clone() - prev_running_sum - curr_balance.clone())
+ + (Expression::Constant(Fp::ONE) - s.clone())
+ * (curr_running_sum - curr_balance),
+ )
+ }
+ running_sum_constraint
+ });
+
+ Self {
+ username,
+ balances,
+ running_sums,
+ range_check_configs: range_check_configs.try_into().unwrap(),
+ range_u16,
+ instance,
+ selector: *running_sum_selector,
+ }
+ }
+ }
+
+ #[derive(Clone, Default)]
+ pub struct SummaHyperplonk {
+ pub entries: Vec>,
+ pub grand_total: Vec,
+ }
+
+ impl SummaHyperplonk {
+ pub fn init(user_entries: Vec>) -> Self {
+ let mut grand_total = vec![BigUint::from(0u64); N_CURRENCIES];
+ for entry in user_entries.iter() {
+ for (i, balance) in entry.balances().iter().enumerate() {
+ grand_total[i] += balance;
+ }
+ }
+
+ Self {
+ entries: user_entries,
+ grand_total,
+ }
+ }
+ }
+
+ impl Circuit
+ for SummaHyperplonk
+ {
+ type Config = SummaConfig;
+ type FloorPlanner = SimpleFloorPlanner;
+
+ fn without_witnesses(&self) -> Self {
+ unimplemented!()
+ }
+
+ fn configure(meta: &mut ConstraintSystem) -> Self::Config {
+ meta.set_minimum_degree(4);
+ let running_sum_selector = &meta.complex_selector();
+ SummaConfig::configure(meta, running_sum_selector)
+ }
+
+ fn synthesize(
+ &self,
+ config: Self::Config,
+ mut layouter: impl Layouter,
+ ) -> Result<(), Error> {
+ // Assign entries
+ let (assigned_balances, last_running_sums) = layouter
+ .assign_region(
+ || "assign user entries",
+ |mut region| {
+ // create a bidimensional vector to store the assigned balances. The first dimension is N_USERS, the second dimension is N_CURRENCIES
+ let mut assigned_balances = vec![];
+
+ let mut running_sum_values = vec![vec![]];
+ let mut last_assigned_running_sums = vec![];
+
+ for i in 0..N_USERS {
+ running_sum_values.push(vec![]);
+
+ region.assign_advice(
+ || "username",
+ config.username,
+ i,
+ || {
+ Value::known(big_uint_to_fp(
+ self.entries[i].username_as_big_uint(),
+ ))
+ },
+ )?;
+
+ let mut assigned_balances_row = vec![];
+
+ for (j, balance) in self.entries[i].balances().iter().enumerate() {
+ let balance_value = Value::known(big_uint_to_fp(balance));
+
+ let assigned_balance = region.assign_advice(
+ || format!("balance {}", j),
+ config.balances[j],
+ i,
+ || balance_value,
+ )?;
+
+ assigned_balances_row.push(assigned_balance);
+
+ let prev_running_sum_value = if i == 0 {
+ Value::known(Fp::ZERO)
+ } else {
+ running_sum_values[i - 1][j]
+ };
+
+ running_sum_values[i].push(prev_running_sum_value + balance_value);
+
+ let assigned_running_sum = region.assign_advice(
+ || format!("running sum {}", j),
+ config.running_sums[j],
+ i,
+ || running_sum_values[i][j],
+ )?;
+
+ if i == N_USERS - 1 {
+ last_assigned_running_sums.push(assigned_running_sum);
+ }
+ }
+
+ if i > 0 {
+ config.selector.enable(&mut region, i)?;
+ }
+
+ assigned_balances.push(assigned_balances_row);
+ }
+
+ Ok((assigned_balances, last_assigned_running_sums))
+ },
+ )
+ .unwrap();
+
+ // Initialize the range check chips
+ let range_check_chips = config
+ .range_check_configs
+ .iter()
+ .map(|config| RangeCheckU64Chip::construct(*config))
+ .collect::>();
+
+ // Load lookup table for range check u64 chip
+ let range = 1 << 16;
+
+ layouter.assign_region(
+ || "load range check table of 16 bits".to_string(),
+ |mut region| {
+ for i in 0..range {
+ region.assign_fixed(
+ || "assign cell in fixed column",
+ config.range_u16,
+ i,
+ || Value::known(Fp::from(i as u64)),
+ )?;
+ }
+ Ok(())
+ },
+ )?;
+
+ // Perform range check on the assigned balances
+ for (i, user_balances) in assigned_balances.iter().enumerate().take(N_USERS) {
+ for (j, balance) in user_balances.iter().enumerate() {
+ let mut zs = Vec::with_capacity(4);
+
+ layouter.assign_region(
+ || format!("Perform range check on balance {} of user {}", j, i),
+ |mut region| {
+ range_check_chips[j].assign(&mut region, &mut zs, balance)?;
+ Ok(())
+ },
+ )?;
+
+ layouter.constrain_instance(zs[3].cell(), config.instance, 0)?;
+ }
+ }
+
+ for (i, last_running_sum) in last_running_sums.iter().enumerate().take(N_CURRENCIES) {
+ layouter.constrain_instance(last_running_sum.cell(), config.instance, 1 + i)?;
+ }
+
+ Ok(())
+ }
+ }
+
+ impl CircuitExt
+ for SummaHyperplonk
+ {
+ fn rand(_: usize, _: impl RngCore) -> Self {
+ unimplemented!()
+ }
+
+ fn instances(&self) -> Vec> {
+ // The last decomposition of each range check chip should be zero
+ let mut instances = vec![Fp::ZERO];
+ instances.extend(self.grand_total.iter().map(big_uint_to_fp));
+ vec![instances]
+ }
+ }
+}
diff --git a/prover/src/circuits/tests.rs b/prover/src/circuits/tests.rs
index a2a8867a..ba9c2f24 100644
--- a/prover/src/circuits/tests.rs
+++ b/prover/src/circuits/tests.rs
@@ -1,556 +1,119 @@
-#[cfg(test)]
-mod test {
+use plonkish_backend::{
+ backend::{hyperplonk::HyperPlonk, PlonkishBackend, PlonkishCircuit, PlonkishCircuitInfo},
+ frontend::halo2::Halo2Circuit,
+ halo2_curves::bn256::{Bn256, Fr as Fp},
+ pcs::{multilinear::MultilinearKzg, PolynomialCommitmentScheme},
+ util::{
+ arithmetic::PrimeField,
+ transcript::{InMemoryTranscript, Keccak256Transcript, TranscriptRead, TranscriptWrite},
+ DeserializeOwned, Serialize,
+ },
+ Error::InvalidSumcheck,
+};
+use std::hash::Hash;
+
+use rand::{
+ rngs::{OsRng, StdRng},
+ CryptoRng, RngCore, SeedableRng,
+};
+
+use crate::{
+ circuits::summa_circuit::summa_hyperplonk::SummaHyperplonk, utils::generate_dummy_entries,
+};
+const K: u32 = 17;
+const N_CURRENCIES: usize = 2;
+const N_USERS: usize = 1 << 16;
+
+pub fn run_plonkish_backend(
+ num_vars: usize,
+ circuit_fn: impl Fn(usize) -> (PlonkishCircuitInfo, C),
+) where
+ F: PrimeField + Hash + Serialize + DeserializeOwned,
+ Pb: PlonkishBackend,
+ T: TranscriptRead<>::CommitmentChunk, F>
+ + TranscriptWrite<>::CommitmentChunk, F>
+ + InMemoryTranscript,
+ C: PlonkishCircuit,
+{
+ let (circuit_info, circuit) = circuit_fn(num_vars);
+ let instances = circuit.instances();
+
+ let param = Pb::setup(&circuit_info, seeded_std_rng()).unwrap();
+
+ let (pp, vp) = Pb::preprocess(¶m, &circuit_info).unwrap();
+
+ let proof = {
+ let mut transcript = T::new(());
+ Pb::prove(&pp, &circuit, &mut transcript, seeded_std_rng()).unwrap();
+ transcript.into_proof()
+ };
- use crate::circuits::univariate_grand_sum::{
- CircuitConfig, NoRangeCheckConfig, UnivariateGrandSum, UnivariateGrandSumConfig,
+ let result = {
+ let mut transcript = T::from_proof((), proof.as_slice());
+ Pb::verify(&vp, instances, &mut transcript, seeded_std_rng())
};
- use crate::circuits::utils::{
- compute_h_parallel, full_prover, full_verifier, generate_setup_artifacts,
- open_all_user_points_amortized, open_grand_sums, open_single_user_point_amortized,
- open_user_points, verify_grand_sum_openings, verify_user_inclusion,
+ assert_eq!(result, Ok(()));
+
+ let wrong_instances = instances[0]
+ .iter()
+ .map(|instance| *instance + F::ONE)
+ .collect::>();
+ let wrong_result = {
+ let mut transcript = T::from_proof((), proof.as_slice());
+ Pb::verify(
+ &vp,
+ &vec![wrong_instances],
+ &mut transcript,
+ seeded_std_rng(),
+ )
};
- use crate::cryptocurrency::Cryptocurrency;
- use crate::entry::Entry;
- use crate::utils::amortized_kzg::{commit_kzg, create_naive_kzg_proof, verify_kzg_proof};
- use crate::utils::{big_uint_to_fp, parse_csv_to_entries};
- use ark_std::{end_timer, start_timer};
- use halo2_proofs::arithmetic::Field;
- use halo2_proofs::dev::{FailureLocation, MockProver, VerifyFailure};
- use halo2_proofs::halo2curves::bn256::{Bn256, Fr as Fp, G1Affine};
- use halo2_proofs::plonk::{Any, ProvingKey, VerifyingKey};
- use halo2_proofs::poly::kzg::commitment::{KZGCommitmentScheme, ParamsKZG};
- use num_bigint::BigUint;
- use rand::rngs::OsRng;
- use rand::Rng;
-
- const K: u32 = 17;
- const N_CURRENCIES: usize = 2;
- const N_USERS: usize = 16;
-
- #[test]
- fn test_amortized_kzg() {
- let path = "../csv/entry_16.csv";
-
- let (entries, circuit, pk, _, params) =
- set_up::<9, N_USERS, N_CURRENCIES, NoRangeCheckConfig>(path);
-
- let (_, advice_polys, omega) =
- full_prover(¶ms, &pk, circuit.clone(), &[vec![Fp::zero()]]);
-
- // Select the first user balance polynomial for the example
- let f_poly = advice_polys.advice_polys.get(1).unwrap();
-
- let kzg_commitment = commit_kzg(¶ms, &f_poly);
-
- // Generate a random user index
- let get_random_user_index = || {
- let user_range: std::ops::Range = 0..N_USERS;
- OsRng.gen_range(user_range) as usize
- };
-
- // Open the polynomial at the user index (challenge) using the naive KZG
- let random_user_index = get_random_user_index();
- let challenge = omega.pow_vartime(&[random_user_index as u64]);
-
- let kzg_proof = create_naive_kzg_proof::>(
- ¶ms,
- pk.get_vk().get_domain(),
- f_poly,
- challenge,
- big_uint_to_fp(&entries[random_user_index].balances()[0]),
- );
- assert!(
- verify_kzg_proof(
- ¶ms,
- kzg_commitment,
- kzg_proof,
- &challenge,
- &big_uint_to_fp(&entries[random_user_index].balances()[0]),
- ),
- "KZG proof verification failed for user {}",
- random_user_index
- );
- assert!(
- !verify_kzg_proof(
- ¶ms,
- kzg_commitment,
- kzg_proof,
- &challenge,
- &big_uint_to_fp(&BigUint::from(123u32)),
- ),
- "Invalid proof verification should fail"
- );
-
- // Open the polynomial at the user index (challenge) using the amortized KZG
-
- // Compute the h vector
- let timer = start_timer!(|| "Computing h");
- let h = &compute_h_parallel(&[f_poly.clone()], ¶ms, 0..1)[0];
- end_timer!(timer);
-
- // Demonstrate a single-challenge opening using the calculated h (FK23, eq. 13)
- let timer = start_timer!(|| "Computing single amortized proof");
- let single_amortized_proof = &open_single_user_point_amortized(&[h], ¶ms, challenge)[0];
- end_timer!(timer);
-
- assert!(
- *single_amortized_proof == kzg_proof,
- "Single challenge amortized KZG proof is not the same as the naive KZG proof"
- );
-
- // Compute all openings to the polynomial at once using the amortized KZG approach ("CT" in FK23)
- let timer = start_timer!(|| "Computing all amortized proofs");
- let amortized_openings = &open_all_user_points_amortized(&[h], omega)[0];
- end_timer!(timer);
-
- // Check that the amortized opening proof for the user is the same as the naive KZG opening proof
- assert!(
- amortized_openings[random_user_index] == kzg_proof,
- "Amortized KZG proof for user {} is not the same as the naive KZG proof",
- random_user_index
- );
-
- // Verify the amortized KZG opening proof for the user using the same verifier as for the naive KZG proof
- assert!(
- verify_kzg_proof(
- ¶ms,
- kzg_commitment,
- amortized_openings[random_user_index],
- &challenge,
- &big_uint_to_fp(&entries[random_user_index].balances()[0]),
- ),
- "KZG proof verification failed for user {}",
- random_user_index
- );
- }
-
- #[test]
- fn test_valid_univariate_grand_sum_prover() {
- let path = "../csv/entry_16.csv";
-
- let mut entries: Vec> = vec![Entry::init_empty(); N_USERS];
- let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
- parse_csv_to_entries::<&str, N_CURRENCIES>(path, &mut entries, &mut cryptos).unwrap();
-
- let circuit = UnivariateGrandSum::<
- N_USERS,
- N_CURRENCIES,
- UnivariateGrandSumConfig,
- >::init(entries.to_vec());
-
- let valid_prover = MockProver::run(K, &circuit, vec![vec![Fp::zero()]]).unwrap();
-
- assert_eq!(valid_prover.verify_par(), Ok(()))
- }
-
- #[test]
- fn test_invalid_instance_value_univariate_grand_sum_prover() {
- let path = "../csv/entry_16.csv";
-
- let mut entries: Vec> = vec![Entry::init_empty(); N_USERS];
- let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
- parse_csv_to_entries::<&str, N_CURRENCIES>(path, &mut entries, &mut cryptos).unwrap();
-
- let circuit = UnivariateGrandSum::<
- N_USERS,
- N_CURRENCIES,
- UnivariateGrandSumConfig,
- >::init(entries.to_vec());
-
- let valid_prover = MockProver::run(K, &circuit, vec![vec![Fp::one()]]).unwrap();
-
- let invalid_result = valid_prover.verify_par().unwrap_err()[0].to_string();
- assert!(invalid_result.contains("Equality constraint not satisfied"));
- }
-
- #[test]
- fn test_valid_univariate_grand_sum_full_prover() {
- let path = "../csv/entry_16.csv";
-
- let (entries, circuit, pk, vk, params) =
- set_up::>(
- path,
- );
-
- // Calculate total for all entry columns
- let mut csv_total: Vec = vec![BigUint::from(0u32); N_CURRENCIES];
-
- for entry in &entries {
- for (i, balance) in entry.balances().iter().enumerate() {
- csv_total[i] += balance;
- }
- }
-
- // 1. Proving phase
- // The Custodian generates the ZK-SNARK Halo2 proof that commits to the user entry values in advice polynomials
- // and also range-checks the user balance values
- let (zk_snark_proof, advice_polys, omega) =
- full_prover(¶ms, &pk, circuit.clone(), &[vec![Fp::zero()]]);
-
- // Both the Custodian and the Verifier know what column range are the balance columns
- // (The first column is the user IDs)
- let balance_column_range = 1..N_CURRENCIES + 1;
-
- // The Custodian communicates the polynomial length to the Verifier
- let poly_length = 1 << u64::from(K);
-
- // The Custodian makes a batch opening proof of all user balance polynomials at x = 0 for the Verifier
- let grand_sums_batch_proof = open_grand_sums(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- balance_column_range,
- csv_total
- .iter()
- // The inversion represents the division by the polynomial length (grand total is equal to the constant coefficient times the number of points)
- .map(|x| big_uint_to_fp(&(x)) * Fp::from(poly_length).invert().unwrap())
- .collect::>()
- .as_slice(),
- );
-
- // The Custodian creates a KZG batch proof of the 4th user ID & balances inclusion
- let user_index = 3_u16;
-
- let column_range = 0..N_CURRENCIES + 1;
- let openings_batch_proof = open_user_points(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- column_range,
- omega,
- user_index,
- &entries
- .get(user_index as usize)
- .map(|entry| {
- std::iter::once(big_uint_to_fp(&(entry.username_as_big_uint())))
- .chain(entry.balances().iter().map(|x| big_uint_to_fp(x)))
- .collect::>()
- })
- .unwrap(),
- );
-
- // 2. Verification phase
- // The Verifier verifies the ZK proof
- assert!(full_verifier(
- ¶ms,
- &vk,
- &zk_snark_proof,
- &[vec![Fp::zero()]]
- ));
-
- // The Verifier is able to independently extract the omega from the verification key
- let omega = pk.get_vk().get_domain().get_omega();
-
- // The Custodian communicates the polynomial length to the Verifier
- let poly_length = 1 << u64::from(K);
-
- // Both the Custodian and the Verifier know what column range are the balance columns
- let balance_column_range = 1..N_CURRENCIES + 1;
-
- // The Custodian communicates the KZG batch opening transcript to the Verifier
- // The Verifier verifies the KZG batch opening and calculates the grand sums
- let (verified, grand_sum) = verify_grand_sum_openings::(
- ¶ms,
- &zk_snark_proof,
- &grand_sums_batch_proof,
- poly_length,
- balance_column_range,
- );
-
- assert!(verified);
- for i in 0..N_CURRENCIES {
- assert_eq!(csv_total[i], grand_sum[i]);
- }
-
- let column_range = 0..N_CURRENCIES + 1;
- // The Verifier verifies the inclusion of the 4th user entry
- let (inclusion_verified, id_and_balance_values) = verify_user_inclusion(
- ¶ms,
- &zk_snark_proof,
- &openings_batch_proof,
- column_range,
- omega,
- user_index,
- );
-
- assert!(inclusion_verified);
- let fourth_user_csv_entry = entries.get(user_index as usize).unwrap();
- for i in 0..N_CURRENCIES + 1 {
- if i == 0 {
- assert_eq!(
- *fourth_user_csv_entry.username_as_big_uint(),
- id_and_balance_values[i]
- );
- } else {
- assert_eq!(
- *fourth_user_csv_entry.balances().get(i - 1).unwrap(),
- id_and_balance_values[i]
- );
- }
- }
- }
-
- // The prover communicates an invalid omega to the verifier, therefore the opening proof of user inclusion should fail
- #[test]
- fn test_invalid_omega_univariate_grand_sum_proof() {
- let path = "../csv/entry_16.csv";
-
- let (entries, circuit, pk, vk, params) =
- set_up::>(
- path,
- );
-
- // 1. Proving phase
- // The Custodian generates the ZK proof
- let (zk_snark_proof, advice_polys, omega) =
- full_prover(¶ms, &pk, circuit.clone(), &[vec![Fp::zero()]]);
-
- // The Custodian creates a KZG batch proof of the 4th user ID & balances inclusion
- let user_index = 3_u16;
-
- let column_range = 0..N_CURRENCIES + 1;
- let openings_batch_proof = open_user_points(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- column_range,
- omega,
- user_index,
- &entries
- .get(user_index as usize)
- .map(|entry| {
- std::iter::once(big_uint_to_fp(&(entry.username_as_big_uint())))
- .chain(entry.balances().iter().map(|x| big_uint_to_fp(x)))
- .collect::>()
- })
- .unwrap(),
- );
-
- // 2. Verification phase
- // The Verifier verifies the ZK proof
- assert!(full_verifier(
- ¶ms,
- &vk,
- &zk_snark_proof,
- &[vec![Fp::zero()]]
- ));
-
- // The Verifier is able to independently extract the omega from the verification key
- let omega = pk.get_vk().get_domain().get_omega();
-
- // Both the Custodian and the Verifier know what column range are the balance columns
- let balance_column_range = 1..N_CURRENCIES + 1;
-
- // Test failure case with the wrong group generator
- // Slightly modify the generator
- let bad_omega = omega.sub(&Fp::one());
- let (balances_verified, _) = verify_user_inclusion(
- ¶ms,
- &zk_snark_proof,
- &openings_batch_proof,
- balance_column_range,
- bad_omega,
- user_index,
- );
- //The verification should fail
- assert!(!balances_verified);
- }
+ assert_eq!(
+ wrong_result,
+ Err(InvalidSumcheck(
+ "Consistency failure at round 1".to_string()
+ ))
+ );
+}
- // The prover communicates an invalid polynomial length to the verifier (smaller than the actual length). This will result in a different grand sum
- #[test]
- fn test_invalid_poly_length_univariate_grand_sum_full_prover() {
- let path = "../csv/entry_16.csv";
+pub fn seeded_std_rng() -> impl RngCore + CryptoRng {
+ StdRng::seed_from_u64(OsRng.next_u64())
+}
- let (entries, circuit, pk, vk, params) =
- set_up::>(
- path,
+#[test]
+fn test_summa_hyperplonk() {
+ type Pb = HyperPlonk>;
+ let entries = generate_dummy_entries::().unwrap();
+ let circuit = SummaHyperplonk::::init(entries.to_vec());
+ let num_vars = K;
+ run_plonkish_backend::, _>(
+ num_vars.try_into().unwrap(),
+ |num_vars| {
+ let circuit = Halo2Circuit::>::new::(
+ num_vars,
+ circuit.clone(),
);
+ (circuit.circuit_info().unwrap(), circuit)
+ },
+ );
+}
- // Calculate total for all entry columns
- let mut csv_total: Vec = vec![BigUint::from(0u32); N_CURRENCIES];
-
- for entry in &entries {
- for (i, balance) in entry.balances().iter().enumerate() {
- csv_total[i] += balance;
- }
- }
-
- // 1. Proving phase
- // The Custodian generates the ZK-SNARK Halo2 proof that commits to the user entry values in advice polynomials
- // and also range-checks the user balance values
- let (zk_snark_proof, advice_polys, _) =
- full_prover(¶ms, &pk, circuit.clone(), &[vec![Fp::zero()]]);
-
- // Both the Custodian and the Verifier know what column range are the balance columns
- // (The first column is the user IDs)
- let balance_column_range = 1..N_CURRENCIES + 1;
-
- // The Custodian communicates the polynomial length to the Verifier
- let poly_length = 1 << u64::from(K);
-
- // The Custodian makes a batch opening proof of all user balance polynomials at x = 0 for the Verifier
- let grand_sums_batch_proof = open_grand_sums(
- &advice_polys.advice_polys,
- &advice_polys.advice_blinds,
- ¶ms,
- balance_column_range,
- csv_total
- .iter()
- .map(|x| big_uint_to_fp(&(x)) * Fp::from(poly_length).invert().unwrap())
- .collect::>()
- .as_slice(),
- );
-
- // 2. Verification phase
- // The Verifier verifies the ZK proof
- assert!(full_verifier(
- ¶ms,
- &vk,
- &zk_snark_proof,
- &[vec![Fp::zero()]]
- ));
-
- // The Custodian communicates the (invalid) polynomial length to the Verifier
- let invalid_poly_length = 2 ^ u64::from(K) - 1;
-
- // Both the Custodian and the Verifier know what column range are the balance columns
- let balance_column_range = 1..N_CURRENCIES + 1;
-
- // The Custodian communicates the KZG batch opening transcript to the Verifier
- // The Verifier verifies the KZG batch opening and calculates the grand sums
- let (verified, grand_sum) = verify_grand_sum_openings::(
- ¶ms,
- &zk_snark_proof,
- &grand_sums_batch_proof,
- invalid_poly_length,
- balance_column_range,
- );
-
- // The opened grand sum is not equal to the actual sum of balances extracted from the csv file
- assert!(verified);
- for i in 0..N_CURRENCIES {
- assert_ne!(csv_total[i], grand_sum[i]);
- }
- }
-
- // Building a proof using as input a csv file with an entry that is not in range [0, 2^64 - 1] should fail the range check constraint on the leaf balance
- #[test]
- fn test_balance_not_in_range() {
- let path = "../csv/entry_16_overflow.csv";
-
- let mut entries: Vec> = vec![Entry::init_empty(); N_USERS];
- let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
- parse_csv_to_entries::<&str, N_CURRENCIES>(path, &mut entries, &mut cryptos).unwrap();
-
- let circuit = UnivariateGrandSum::<
- N_USERS,
- N_CURRENCIES,
- UnivariateGrandSumConfig,
- >::init(entries.to_vec());
-
- let invalid_prover = MockProver::run(K, &circuit, vec![vec![Fp::zero()]]).unwrap();
-
- assert_eq!(
- invalid_prover.verify(),
- Err(vec![
- VerifyFailure::Permutation {
- column: (Any::advice(), 6).into(),
- location: FailureLocation::InRegion {
- region: (2, "Perform range check on balance 0 of user 0").into(),
- offset: 0
- }
- },
- VerifyFailure::Permutation {
- column: (Any::advice(), 6).into(),
- location: FailureLocation::InRegion {
- region: (6, "Perform range check on balance 0 of user 2").into(),
- offset: 0
- }
- },
- VerifyFailure::Permutation {
- column: (Any::advice(), 10).into(),
- location: FailureLocation::InRegion {
- region: (3, "Perform range check on balance 1 of user 0").into(),
- offset: 0
- }
- },
- VerifyFailure::Permutation {
- column: (Any::advice(), 10).into(),
- location: FailureLocation::InRegion {
- region: (5, "Perform range check on balance 1 of user 1").into(),
- offset: 0
- }
- },
- ])
- );
- }
-
- #[cfg(feature = "dev-graph")]
- #[test]
- fn print_univariate_grand_sum_circuit() {
- use plotters::prelude::*;
-
- let path = "../csv/entry_16.csv";
-
- let mut entries: Vec> = vec![Entry::init_empty(); N_USERS];
- let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
- let _ =
- parse_csv_to_entries::<&str, N_CURRENCIES>(path, &mut entries, &mut cryptos).unwrap();
-
- let circuit = UnivariateGrandSum::<
- N_USERS,
- N_CURRENCIES,
- UnivariateGrandSumConfig,
- >::init(entries);
-
- let root = BitMapBackend::new("prints/univariate-grand-sum-layout.png", (2048, 32768))
- .into_drawing_area();
- root.fill(&WHITE).unwrap();
- let root = root
- .titled("Univariate Grand Sum Layout", ("sans-serif", 60))
- .unwrap();
-
- halo2_proofs::dev::CircuitLayout::default()
- .render(K, &circuit, &root)
- .unwrap();
- }
-
- fn set_up<
- const K: u32,
- const N_USERS: usize,
- const N_CURRENCIES: usize,
- CONFIG: CircuitConfig,
- >(
- path: &str,
- ) -> (
- Vec>,
- UnivariateGrandSum,
- ProvingKey,
- VerifyingKey,
- ParamsKZG,
- )
- where
- [(); N_CURRENCIES + 1]:,
- {
- // Initialize an empty circuit
- let circuit = UnivariateGrandSum::::init_empty();
-
- // Generate a universal trusted setup for testing purposes.
- //
- // The verification key (vk) and the proving key (pk) are then generated.
- // An empty circuit is used here to emphasize that the circuit inputs are not relevant when generating the keys.
- // Important: The dimensions of the circuit used to generate the keys must match those of the circuit used to generate the proof.
- // In this case, the dimensions are represented by the number fo users.
- let (params, pk, vk) = generate_setup_artifacts(K, None, &circuit).unwrap();
+#[cfg(feature = "dev-graph")]
+#[test]
+fn print_univariate_grand_sum_circuit() {
+ use plotters::prelude::*;
- // Only now we can instantiate the circuit with the actual inputs
- let mut entries: Vec> = vec![Entry::init_empty(); N_USERS];
- let mut cryptos = vec![Cryptocurrency::init_empty(); N_CURRENCIES];
+ let entries = generate_dummy_entries::().unwrap();
- parse_csv_to_entries::<&str, N_CURRENCIES>(path, &mut entries, &mut cryptos).unwrap();
+ let circuit = SummaHyperplonk::::init(entries.to_vec());
- let circuit = UnivariateGrandSum::::init(entries.to_vec());
+ let root =
+ BitMapBackend::new("prints/summa-hyperplonk-layout.png", (2048, 32768)).into_drawing_area();
+ root.fill(&WHITE).unwrap();
+ let root = root
+ .titled("Summa Hyperplonk Layout", ("sans-serif", 60))
+ .unwrap();
- (entries, circuit, pk, vk, params)
- }
+ halo2_proofs::dev::CircuitLayout::default()
+ .render::, _, true>(K, &circuit, &root)
+ .unwrap();
}
diff --git a/prover/src/circuits/univariate_grand_sum.rs b/prover/src/circuits/univariate_grand_sum.rs
deleted file mode 100644
index 75f60b41..00000000
--- a/prover/src/circuits/univariate_grand_sum.rs
+++ /dev/null
@@ -1,325 +0,0 @@
-use std::marker::PhantomData;
-
-use crate::chips::range::range_check::{RangeCheckU64Chip, RangeCheckU64Config};
-use crate::entry::Entry;
-use crate::utils::big_uint_to_fp;
-use halo2_proofs::circuit::{AssignedCell, Layouter, SimpleFloorPlanner, Value};
-use halo2_proofs::halo2curves::bn256::Fr as Fp;
-use halo2_proofs::plonk::{Advice, Circuit, Column, ConstraintSystem, Error, Fixed, Instance};
-
-#[derive(Clone)]
-pub struct UnivariateGrandSum<
- const N_USERS: usize,
- const N_CURRENCIES: usize,
- CONFIG: CircuitConfig,
-> {
- pub entries: Vec>,
- _marker: PhantomData,
-}
-
-impl<
- const N_USERS: usize,
- const N_CURRENCIES: usize,
- CONFIG: CircuitConfig,
- > UnivariateGrandSum
-{
- pub fn init_empty() -> Self
- where
- [(); N_CURRENCIES + 1]:,
- {
- Self {
- entries: vec![Entry::init_empty(); N_USERS],
- _marker: PhantomData,
- }
- }
-
- /// Initializes the circuit with the user entries that are part of the solvency proof
- pub fn init(user_entries: Vec>) -> Self {
- Self {
- entries: user_entries,
- _marker: PhantomData,
- }
- }
-}
-
-/// Configuration for the univariate grand sum circuit
-/// # Type Parameters
-///
-/// * `N_CURRENCIES`: The number of currencies for which the solvency is verified.
-/// * `N_USERS`: The number of users for which the solvency is verified.
-///
-/// # Fields
-///
-/// * `username`: Advice column used to store the usernames of the users
-/// * `balances`: Advice columns used to store the balances of the users
-/// * `range_check_configs`: Configurations for the range check chip
-/// * `range_u16`: Fixed column used to store the lookup table [0, 2^16 - 1] for the range check chip
-#[derive(Debug, Clone)]
-pub struct UnivariateGrandSumConfig
-where
- [(); N_CURRENCIES + 1]:,
-{
- username: Column,
- balances: [Column; N_CURRENCIES],
- range_check_configs: [RangeCheckU64Config; N_CURRENCIES],
- range_u16: Column,
- instance: Column,
-}
-
-impl CircuitConfig
- for UnivariateGrandSumConfig
-where
- [(); N_CURRENCIES + 1]:,
-{
- fn configure(meta: &mut ConstraintSystem) -> Self {
- let username = meta.advice_column();
-
- let balances = [(); N_CURRENCIES].map(|_| meta.unblinded_advice_column());
-
- let range_u16 = meta.fixed_column();
-
- meta.enable_constant(range_u16);
-
- meta.annotate_lookup_any_column(range_u16, || "LOOKUP_MAXBITS_RANGE");
-
- // Create an empty array of range check configs
- let mut range_check_configs = Vec::with_capacity(N_CURRENCIES);
-
- let instance = meta.instance_column();
- meta.enable_equality(instance);
-
- for item in balances.iter().take(N_CURRENCIES) {
- let z = *item;
- // Create 4 advice columns for each range check chip
- let zs = [(); 4].map(|_| meta.advice_column());
-
- for column in &zs {
- meta.enable_equality(*column);
- }
-
- let range_check_config = RangeCheckU64Chip::configure(meta, z, zs, range_u16);
-
- range_check_configs.push(range_check_config);
- }
-
- Self {
- username,
- balances,
- range_check_configs: range_check_configs.try_into().unwrap(),
- range_u16,
- instance,
- }
- }
-
- fn synthesize(
- &self,
- mut layouter: impl Layouter,
- assigned_balances: Vec>>,
- ) -> Result<(), Error>
- where
- [(); N_CURRENCIES + 1]:,
- [(); N_CURRENCIES + 1]:,
- {
- // Initiate the range check chips
- let range_check_chips = self
- .range_check_configs
- .iter()
- .map(|config| RangeCheckU64Chip::construct(*config))
- .collect::>();
-
- // Load lookup table for range check u64 chip
- let range = 1 << 16;
-
- layouter.assign_region(
- || format!("load range check table of 16 bits"),
- |mut region| {
- for i in 0..range {
- region.assign_fixed(
- || "assign cell in fixed column",
- self.range_u16,
- i,
- || Value::known(Fp::from(i as u64)),
- )?;
- }
- Ok(())
- },
- )?;
-
- // Perform range check on the assigned balances
- for i in 0..N_USERS {
- for j in 0..N_CURRENCIES {
- let mut zs = Vec::with_capacity(4);
-
- layouter.assign_region(
- || format!("Perform range check on balance {} of user {}", j, i),
- |mut region| {
- range_check_chips[j].assign(
- &mut region,
- &mut zs,
- &assigned_balances[i][j],
- )?;
- Ok(())
- },
- )?;
-
- layouter.constrain_instance(zs[3].cell(), self.instance, 0)?;
- }
- }
-
- Ok(())
- }
-
- fn get_username(&self) -> Column {
- self.username
- }
-
- fn get_balances(&self) -> [Column; N_CURRENCIES] {
- self.balances
- }
-}
-
-pub trait CircuitConfig: Clone {
- fn configure(meta: &mut ConstraintSystem) -> Self;
-
- fn get_username(&self) -> Column;
-
- fn get_balances(&self) -> [Column; N_CURRENCIES];
-
- fn synthesize(
- &self,
- layouter: impl Layouter,
- assigned_balances: Vec>>,
- ) -> Result<(), Error>;
-
- /// Assigns the entries to the circuit
- /// At row i, the username is set to the username of the i-th entry, the balance is set to the balance of the i-th entry
- /// Returns a bidimensional vector of the assigned balances to the circuit.
- fn assign_entries(
- &self,
- mut layouter: impl Layouter,
- entries: &[Entry],
- ) -> Result>>, Error>
- where
- [(); N_CURRENCIES + 1]:,
- {
- layouter.assign_region(
- || "assign entries to the table",
- |mut region| {
- // create a bidimensional vector to store the assigned balances. The first dimension is N_USERS, the second dimension is N_CURRENCIES
- let mut assigned_balances = vec![];
-
- for i in 0..N_USERS {
- region.assign_advice(
- || "username",
- self.get_username(),
- i,
- || Value::known(big_uint_to_fp(entries[i].username_as_big_uint())),
- )?;
-
- let mut assigned_balances_row = vec![];
-
- for (j, balance) in entries[i].balances().iter().enumerate() {
- let assigned_balance = region.assign_advice(
- || format!("balance {}", j),
- self.get_balances()[j],
- i,
- || Value::known(big_uint_to_fp(balance)),
- )?;
-
- assigned_balances_row.push(assigned_balance);
- }
-
- assigned_balances.push(assigned_balances_row);
- }
-
- Ok(assigned_balances)
- },
- )
- }
-}
-
-impl<
- const N_USERS: usize,
- const N_CURRENCIES: usize,
- CONFIG: CircuitConfig,
- > Circuit for UnivariateGrandSum
-where
- [(); N_CURRENCIES + 1]:,
-{
- type Config = CONFIG;
- type FloorPlanner = SimpleFloorPlanner;
-
- fn without_witnesses(&self) -> Self {
- Self::init_empty()
- }
-
- fn configure(meta: &mut ConstraintSystem) -> Self::Config
- where
- [(); N_CURRENCIES + 1]:,
- {
- CONFIG::configure(meta)
- }
-
- fn synthesize(
- &self,
- config: Self::Config,
- mut layouter: impl Layouter,
- ) -> Result<(), Error> {
- // Assign entries
- let assigned_balances =
- config.assign_entries(layouter.namespace(|| "assign entries"), &self.entries)?;
-
- config.synthesize(layouter, assigned_balances)
- }
-}
-
-/// Configuration that does not perform range checks. Warning: not for use in production!
-/// The circuit without range checks can use a lower K value than the full circuit (convenient for prototyping and testing).
-///
-/// # Type Parameters
-///
-/// * `N_CURRENCIES`: The number of currencies for which the solvency is verified.
-/// * `N_USERS`: The number of users for which the solvency is verified.
-///
-/// # Fields
-///
-/// * `username`: Advice column used to store the usernames of the users
-/// * `balances`: Advice columns used to store the balances of the users
-#[derive(Clone)]
-pub struct NoRangeCheckConfig {
- username: Column,
- balances: [Column; N_CURRENCIES],
-}
-
-impl CircuitConfig
- for NoRangeCheckConfig
-where
- [(); N_CURRENCIES + 1]:,
-{
- fn configure(meta: &mut ConstraintSystem) -> NoRangeCheckConfig {
- let username = meta.advice_column();
-
- let balances = [(); N_CURRENCIES].map(|_| meta.unblinded_advice_column());
-
- let instance = meta.instance_column();
- meta.enable_equality(instance);
-
- Self { username, balances }
- }
-
- fn synthesize(
- &self,
- _: impl Layouter,
- _: Vec>>,
- ) -> Result<(), Error> {
- Ok(())
- }
-
- fn get_username(&self) -> Column {
- self.username
- }
-
- fn get_balances(&self) -> [Column; N_CURRENCIES] {
- self.balances
- }
-}
diff --git a/prover/src/circuits/utils.rs b/prover/src/circuits/utils.rs
deleted file mode 100644
index eefb06ef..00000000
--- a/prover/src/circuits/utils.rs
+++ /dev/null
@@ -1,561 +0,0 @@
-use std::{fs::File, ops::Range};
-
-use ark_std::{end_timer, start_timer};
-use ethers::types::U256;
-use halo2_proofs::{
- arithmetic::{best_fft, best_multiexp, parallelize, Field},
- halo2curves::{
- bn256::{Bn256, Fr as Fp, G1Affine, G1},
- ff::{PrimeField, WithSmallOrderMulGroup},
- group::Curve,
- },
- plonk::{
- create_proof, keygen_pk, keygen_vk, verify_proof, AdviceSingle, Circuit, Error, ProvingKey,
- VerifyingKey,
- },
- poly::{
- commitment::{Blind, CommitmentScheme, Params, Prover, Verifier},
- kzg::{
- commitment::{KZGCommitmentScheme, ParamsKZG},
- multiopen::{ProverGWC, ProverSHPLONK, VerifierSHPLONK},
- strategy::SingleStrategy,
- },
- Coeff, Polynomial, ProverQuery, VerificationStrategy, VerifierQuery,
- },
- transcript::{EncodedChallenge, TranscriptRead, TranscriptWriterBuffer},
-};
-use halo2_solidity_verifier::Keccak256Transcript;
-use num_bigint::BigUint;
-use rand::rngs::OsRng;
-use rayon::prelude::*;
-
-use crate::utils::{amortized_kzg::compute_h, fp_to_big_uint};
-
-/// Generate setup artifacts for a circuit of size `k`, where 2^k represents the number of rows in the circuit.
-///
-/// If the trusted setup parameters are not found, the function performs an unsafe trusted setup to generate the necessary parameters
-/// If the provided `k` value is larger than the `k` value of the loaded parameters, an error is returned, as the provided `k` is too large.
-/// Otherwise, if the `k` value is smaller than the `k` value of the loaded parameters, the parameters are downsized to fit the requested `k`.
-pub fn generate_setup_artifacts>(
- k: u32,
- params_path: Option<&str>,
- circuit: &C,
-) -> Result<
- (
- ParamsKZG,
- ProvingKey,
- VerifyingKey,
- ),
- &'static str,
-> {
- let mut params: ParamsKZG;
-
- match params_path {
- Some(path) => {
- let timer = start_timer!(|| "Creating params");
- let mut params_fs = File::open(path).expect("couldn't load params");
- params = ParamsKZG::::read(&mut params_fs).expect("Failed to read params");
- end_timer!(timer);
-
- if params.k() < k {
- return Err("k is too large for the given params");
- }
-
- if params.k() > k {
- let timer = start_timer!(|| "Downsizing params");
- params.downsize(k);
- end_timer!(timer);
- }
- }
- None => {
- let timer = start_timer!(|| "None Creating params");
- params = ParamsKZG::::setup(k, OsRng);
- end_timer!(timer);
- }
- }
-
- let vk = keygen_vk(¶ms, circuit).expect("vk generation should not fail");
- let pk = keygen_pk(¶ms, vk.clone(), circuit).expect("pk generation should not fail");
-
- Ok((params, pk, vk))
-}
-
-/// Generates a proof given the public setup, the proving key, the initialized circuit and its public inputs.
-pub fn full_prover>(
- params: &ParamsKZG,
- pk: &ProvingKey,
- circuit: C,
- public_inputs: &[Vec],
-) -> (
- Vec,
- AdviceSingle,
- Fp,
-) {
- #[cfg(feature = "profiling")]
- let pf_time = start_timer!(|| "Creating proof");
-
- let instance: Vec<&[Fp]> = public_inputs.iter().map(|input| &input[..]).collect();
- let instances = &[&instance[..]];
-
- let mut transcript: Keccak256Transcript> = Keccak256Transcript::new(vec![]);
- let result = create_proof::<
- KZGCommitmentScheme,
- ProverSHPLONK<'_, Bn256>,
- _,
- _,
- Keccak256Transcript>,
- _,
- >(params, pk, &[circuit], instances, OsRng, &mut transcript);
-
- let result_unwrapped = result.unwrap();
- result_unwrapped.0.expect("prover should not fail");
- let advice_polys = result_unwrapped.1.clone();
- let proof = transcript.finalize();
-
- #[cfg(feature = "profiling")]
- end_timer!(pf_time);
- let advice_polys = advice_polys[0].clone();
-
- let omega = pk.get_vk().get_domain().get_omega();
-
- (proof, advice_polys, omega)
-}
-
-/// Creates the univariate polynomial grand sum openings.
-/// The polynomials are evaluated at X = 0 to obtain their constant term.
-///
-/// # Arguments
-///
-/// * `advice_polys` - the advice polynomials
-/// * `advice_blinds` - the advice polynomials blinds
-/// * `params` - the KZG parameters
-/// * `balance_column_range` - the range of the balance columns used to calculate the grand sums
-/// * `constant_terms` - the evaluations of the polynomials at X = 0
-///
-/// # Returns
-///
-/// * `Vec` - the KZG batch proof containing the quotient polynomial commitments
-/// and the evaluations of the polynomials at X = 0
-pub fn open_grand_sums(
- advice_polys: &[Polynomial],
- advice_blinds: &[Blind],
- params: &ParamsKZG,
- balance_column_range: Range,
- constant_terms: &[Fp],
-) -> Vec {
- let challenge = Fp::zero();
- create_opening_proof_at_challenge::<
- _,
- ProverSHPLONK<'_, Bn256>,
- _,
- Keccak256Transcript>,
- >(
- params,
- &advice_polys[balance_column_range],
- advice_blinds,
- challenge,
- constant_terms,
- )
-}
-
-// This function is for comparison with open_grand_sums and is using GWC instead of ProverSHPLONK
-pub fn open_grand_sums_gwc(
- advice_polys: &[Polynomial],
- advice_blinds: &[Blind],
- params: &ParamsKZG,
- balance_column_range: Range,
- constant_terms: &[Fp],
-) -> Vec {
- let challenge = Fp::zero();
- create_opening_proof_at_challenge::<
- _,
- ProverGWC<'_, Bn256>,
- _,
- Keccak256Transcript>,
- >(
- params,
- &advice_polys[balance_column_range],
- advice_blinds,
- challenge,
- constant_terms,
- )
-}
-
-/// Creates a KZG batch proof for the `advice_polys` polynomial openings
-/// at a point corresponding to the `user_index`
-///
-/// # Arguments
-///
-/// * `advice_polys` - the advice polynomials
-/// * `advice_blinds` - the advice polynomials blinds
-/// * `params` - the KZG parameters
-/// * `column_range` - the advice column range to be used for the proof
-/// * `omega` - $\omega$, the generator of the $2^k$ order multiplicative subgroup used to interpolate the polynomials.
-/// * `user_index` - the index of the user whose entry is being proven
-/// * `user_balances` - the evaluations of the polynomials at the point corresponding to the `user_index`
-///
-/// # Returns
-///
-/// * `Vec` - the KZG batch proof containing the quotient polynomial commitments
-/// and the evaluations of the polynomials at the point corresponding to the `user_index`
-pub fn open_user_points(
- advice_polys: &[Polynomial],
- advice_blinds: &[Blind],
- params: &ParamsKZG,
- column_range: Range,
- omega: Fp,
- user_index: u16,
- user_balances: &[Fp],
-) -> Vec {
- let omega_raised = omega.pow_vartime([u64::from(user_index)]);
- create_opening_proof_at_challenge::<
- _,
- ProverSHPLONK<'_, Bn256>,
- _,
- Keccak256Transcript>,
- >(
- params,
- &advice_polys[column_range],
- advice_blinds,
- omega_raised,
- user_balances,
- )
-}
-
-/// Calculate h(x) for the amortized KZG algorithm as per FK23 for all advice polynomials in the range in parallel
-///
-/// # Arguments
-///
-/// * `advice_polys` - the advice polynomials
-/// * `params` - the KZG parameters
-/// * `column_range` - the range of the advice columns of interest
-///
-/// # Returns
-///
-/// * `Vec>` - h(x) vectors corresponding to the polynomials
-pub fn compute_h_parallel(
- advice_polys: &[Polynomial],
- params: &ParamsKZG,
- column_range: Range,
-) -> Vec> {
- advice_polys[column_range]
- // Parallelize the independent amortized openings of the user ID and balance polynomials
- .par_iter()
- .map(|poly| compute_h(params, poly))
- .collect()
-}
-
-/// Calculate all opening proofs at once for the polynomials using the amortized KZG approach
-///
-/// # Arguments
-///
-/// * `h_vectors` - the h(X) vectors calculated for the polynomials using the amortized KZG approach
-/// * `omega` - $\omega$, the generator of the multiplicative subgroup used to interpolate the polynomials.
-///
-/// # Returns
-///
-/// * `Vec>` - all KZG opening proofs for the polynomials in the range
-pub fn open_all_user_points_amortized(h_vectors: &[&[G1]], omega: Fp) -> Vec> {
- h_vectors
- // Parallelize the independent amortized openings of the user ID and balance polynomials
- .par_iter()
- .map(|h_vector| {
- let mut h: Vec = (*h_vector).to_vec();
- best_fft(&mut h, omega, h_vector.len().trailing_zeros());
- h
- })
- .collect()
-}
-
-/// Calculate a single-user opening proofs using the amortized KZG approach
-///
-/// # Arguments
-///
-/// * `h_vectors` - the h(X) vectors calculated for the polynomials using the amortized KZG approach
-/// * `params` - the KZG parameters
-/// * `challenge` - the challenge at which the openings are evaluated
-///
-/// # Returns
-///
-/// * `Vec` - the KZG opening proofs for the polynomials at `challenge`
-pub fn open_single_user_point_amortized(
- h_vectors: &[&[G1]],
- params: &ParamsKZG,
- challenge: Fp,
-) -> Vec {
- let mut challenge_powers = vec![Fp::one(); params.n() as usize];
- {
- parallelize(&mut challenge_powers, |o, start| {
- let mut cur = challenge.pow_vartime([start as u64]);
- for v in o.iter_mut() {
- *v = cur;
- cur *= &challenge;
- }
- })
- }
- // Convert the h vectors to affine form and calculate the opening proofs
- h_vectors
- .par_iter()
- .map(|h_vector| {
- let h_affine = (*h_vector)
- .par_iter()
- .map(G1::to_affine)
- .collect::>();
- best_multiexp(&challenge_powers, &h_affine)
- })
- .collect::>()
-}
-
-/// Verifies the univariate polynomial grand sum openings
-/// and calculates the grand sums
-///
-/// * `N_CURRENCIES` - the number of cryptocurrency balances
-///
-/// # Arguments
-///
-/// * `params` - the KZG parameters
-/// * `zk_snark_proof` - the ZK-SNARK proof of the circuit whose advice columns contain the user balance polynomials
-/// * `grand_sum_opening_batch_proof` - the KZG batch proof of the grand sum polynomials
-/// * `polynomial_length` - the length of the polynomials
-/// * `balance_column_range` - the range of the advice columns that represent user balances
-///
-/// # Returns
-///
-/// * `bool` - whether the grand sum openings are verified correctly
-/// * `Vec` - the grand sums
-pub fn verify_grand_sum_openings(
- params: &ParamsKZG,
- zk_snark_proof: &[u8],
- grand_sum_opening_batch_proof: &[u8],
- polynomial_length: u64,
- balance_column_range: Range,
-) -> (bool, Vec) {
- let mut transcript = Keccak256Transcript::new(zk_snark_proof);
-
- //Read the commitment points for all the advice polynomials from the proof transcript and put them into a vector
- let mut advice_commitments = Vec::new();
- for i in 0..N_CURRENCIES + balance_column_range.start {
- let point = transcript.read_point().unwrap();
- // Skip the advice commitments before the desired range
- if i >= balance_column_range.start {
- advice_commitments.push(point);
- }
- }
-
- let opening_result =
- verify_opening::, VerifierSHPLONK, SingleStrategy<_>>(
- params,
- grand_sum_opening_batch_proof,
- Fp::zero(),
- &advice_commitments,
- );
-
- match opening_result {
- Ok((verified, evaluations)) => (
- verified,
- evaluations
- .iter()
- .map(|eval| fp_to_big_uint(*eval * Fp::from(polynomial_length)))
- .collect(),
- ),
- Err(_) => (false, vec![]),
- }
-}
-
-/// Verifies the KZG batch proof of the polynomial openings being the evaluations
-/// of the advice polynomials at the point corresponding to the user index
-///
-/// # Arguments
-/// * `params` - the KZG parameters
-/// * `zk_snark_proof` - the ZK-SNARK proof of the circuit whose advice columns contain the user entry polynomials
-/// * `balance_opening_batch_proof` - the KZG batch proof of the user entry polynomials
-/// * `column_range` - the range of the advice columns that represent user entry
-/// * `omega` - $\omega$, the generator of the $2^k$ order multiplicative subgroup used to interpolate the polynomials.
-/// * `user_index` - the index of the user whose entry is being proven
-///
-/// # Returns
-/// * `bool` - whether the user entry openings are verified correctly
-/// * `Vec` - the evaluations of the advice polynomials at the point corresponding to the user index
-pub fn verify_user_inclusion(
- params: &ParamsKZG,
- zk_snark_proof: &[u8],
- balance_opening_batch_proof: &[u8],
- column_range: Range,
- omega: Fp,
- user_index: u16,
-) -> (bool, Vec) {
- let mut transcript = Keccak256Transcript::new(zk_snark_proof);
-
- //Read the commitment points for all the advice polynomials from the proof transcript and put them into a vector
- let mut advice_commitments = Vec::new();
- for i in 0..column_range.end {
- let point = transcript.read_point().unwrap();
- //Skip advice polynomial commitments before the desired range
- if i >= column_range.start {
- advice_commitments.push(point);
- }
- }
-
- let opening_result =
- verify_opening::, VerifierSHPLONK, SingleStrategy<_>>(
- params,
- balance_opening_batch_proof,
- omega.pow_vartime([user_index as u64]),
- &advice_commitments,
- );
-
- // return result error if it exists
- match opening_result {
- Ok((verified, evaluations)) => (
- verified,
- evaluations
- .iter()
- .map(|eval| fp_to_big_uint(*eval))
- .collect(),
- ),
- Err(_) => (false, vec![]),
- }
-}
-
-/// Creates a KZG batch proof for the polynomial evaluations at a challenge
-///
-/// # Arguments
-///
-/// * `params` - the KZG parameters
-/// * `polynomials` - the polynomials to be opened
-/// * `blinds` - the polynomials blinds
-/// * `challenge` - the challenge at which the polynomials are evaluated
-/// * `polynomial_evaluations` - the evaluations of the polynomials at the challenge
-///
-/// # Returns
-///
-/// * `Vec` containing the quotient polynomial commitments
-/// and the evaluations of the polynomials at the challenge
-fn create_opening_proof_at_challenge<
- 'params,
- Scheme: CommitmentScheme,
- P: Prover<'params, Scheme>,
- E: EncodedChallenge,
- T: TranscriptWriterBuffer, Scheme::Curve, E>,
->(
- params: &'params Scheme::ParamsProver,
- polynomials: &[Polynomial<::Scalar, Coeff>],
- blinds: &[Blind],
- challenge: Fp,
- polynomial_evaluations: &[Fp],
-) -> Vec
-where
- Scheme::Scalar: WithSmallOrderMulGroup<3>,
-{
- let mut transcript = T::init(vec![]);
-
- // Write evaluations to the transcript
- polynomial_evaluations
- .iter()
- .for_each(|eval| transcript.write_scalar(*eval).unwrap());
-
- // Prepare prover queries for the polynomial
- let queries = polynomials
- .iter()
- .enumerate()
- .map(|(i, polynomial)| ProverQuery::new(challenge, polynomial, blinds[i]))
- .collect::>();
-
- // Create proof
- let prover = P::new(params);
- prover
- .create_proof(&mut OsRng, &mut transcript, queries)
- .unwrap();
-
- // Finalize transcript and return the proof
- transcript.finalize()
-}
-
-/// Verifies a KZG batch proof for a polynomial evaluation at a challenge
-/// and returns the evaluations of the polynomials at the challenge
-/// as well as the verification result
-///
-/// # Arguments
-///
-/// * `params` - the KZG parameters
-/// * `proof` - the KZG batch proof
-/// * `challenge` - the challenge at which the polynomials are evaluated
-/// * `commitment_points` - the commitment points of the polynomials
-///
-/// # Returns
-///
-/// * `bool` - whether the proof is verified correctly
-/// * `Vec` - the evaluations of the polynomials at the challenge
-pub fn verify_opening<
- 'a,
- 'params,
- Scheme: CommitmentScheme,
- V: Verifier<'params, Scheme>,
- Strategy: VerificationStrategy<'params, Scheme, V>,
->(
- params: &'params Scheme::ParamsVerifier,
- proof: &'a [u8],
- challenge: Fp,
- commitment_points: &[G1Affine],
-) -> Result<(bool, Vec), Box