diff --git a/.github/workflows/build-push-deploy-circom.yml b/.github/workflows/build-push-deploy-circom.yml index 08ae117..1d6fe82 100644 --- a/.github/workflows/build-push-deploy-circom.yml +++ b/.github/workflows/build-push-deploy-circom.yml @@ -9,6 +9,16 @@ on: - 'circom/**' - 'sdk-utils/**' - 'Cargo.toml' + workflow_dispatch: + inputs: + branch: + description: 'Branch to build from' + required: false + default: 'dev' + type: choice + options: + - dev + - staging permissions: id-token: write diff --git a/.github/workflows/deploy-noir.yml b/.github/workflows/deploy-noir.yml index ff67f71..7fefbcf 100644 --- a/.github/workflows/deploy-noir.yml +++ b/.github/workflows/deploy-noir.yml @@ -7,7 +7,7 @@ on: description: 'Commit SHA to deploy (short form)' required: false workflow_run: - workflows: ["Build rnd Push Noir"] + workflows: ["Build and Push Noir"] branches: [main] types: - completed diff --git a/Cargo.lock b/Cargo.lock index 8233004..0f7a651 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,9 +23,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aes" @@ -66,12 +66,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -104,9 +98,9 @@ checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" @@ -129,9 +123,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "arrayref" @@ -151,18 +145,18 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" dependencies = [ - "term", + "term 0.7.0", ] [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -199,14 +193,14 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" @@ -221,7 +215,7 @@ dependencies = [ "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-util", "itoa", "matchit", @@ -303,9 +297,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.7.3" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "bech32" @@ -345,9 +339,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" dependencies = [ "serde", ] @@ -428,9 +422,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "byte-slice-cast" @@ -440,22 +434,22 @@ checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytemuck" -version = "1.23.0" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.9.3" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" +checksum = "4f154e572231cb6ba2bd1176980827e3d5dc04cc183a75dea38109fbdd672d29" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -495,9 +489,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +checksum = "dd0b03af37dad7a14518b7691d81acb0f8222604ad3d1b02f6b4bed5188c0cd5" dependencies = [ "serde", ] @@ -527,10 +521,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.22" +version = "1.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" +checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", @@ -539,7 +534,7 @@ dependencies = [ [[package]] name = "cfdkim" version = "0.3.3" -source = "git+https://github.com/zkemail/cfdkim.git#c5626778412202a78515c464a5617d3931a31c0a" +source = "git+https://github.com/zkemail/cfdkim.git#861f5e053711fdecbe70d68c6b51b48b55d21926" dependencies = [ "base64 0.21.7", "chrono", @@ -564,9 +559,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "charset" @@ -580,15 +575,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", + "js-sys", "num-traits", "serde", - "windows-link", + "wasm-bindgen", + "windows-link 0.2.0", ] [[package]] @@ -630,17 +626,21 @@ dependencies = [ "anyhow", "base64 0.22.1", "dotenv", - "rand", + "prost 0.13.5", + "prost-types 0.11.9", + "prost-wkt", + "prost-wkt-types", + "rand 0.8.5", "regex", - "relayer-utils 0.4.62-12 (git+https://github.com/zkemail/relayer-utils?rev=728b8f643a6c9a1e5b400be6407727851cc8c92c)", - "sdk-utils 0.1.0 (git+https://github.com/zkemail/sdk-images?branch=main)", + "relayer-utils", + "sdk-utils", "serde", "serde_json", "slog", "sqlx", "tera", "tokio", - "zk-regex-compiler 2.3.2 (git+https://github.com/zkemail/zk-regex?branch=main)", + "zk-regex-compiler 2.0.0-alpha.2 (git+https://github.com/zkemail/zk-regex?rev=35014c2bff69115bb92be2dc2c9b006fa69a6649)", ] [[package]] @@ -676,7 +676,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -712,7 +712,7 @@ dependencies = [ "hmac", "once_cell", "pbkdf2 0.12.2", - "rand", + "rand 0.8.5", "sha2", "thiserror 1.0.69", ] @@ -739,9 +739,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "comptime" @@ -793,9 +793,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" +checksum = "dccd746bf9b1038c0507b7cec21eb2b11222db96a2902c96e8c185d6d20fb9c4" dependencies = [ "cfg-if", "cpufeatures", @@ -884,9 +884,9 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -936,9 +936,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" @@ -947,7 +947,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -995,7 +995,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1017,9 +1017,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" dependencies = [ "powerfmt", ] @@ -1041,7 +1041,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1112,7 +1112,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1165,9 +1165,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek", "ed25519", @@ -1200,7 +1200,7 @@ dependencies = [ "group", "hkdf", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -1235,7 +1235,7 @@ dependencies = [ "hex", "k256", "log", - "rand", + "rand 0.8.5", "rlp", "serde", "sha3", @@ -1244,14 +1244,14 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.106", ] [[package]] @@ -1272,12 +1272,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.11" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -1303,7 +1303,7 @@ dependencies = [ "hex", "hmac", "pbkdf2 0.11.0", - "rand", + "rand 0.8.5", "scrypt", "serde", "serde_json", @@ -1427,7 +1427,7 @@ dependencies = [ "reqwest 0.11.27", "serde", "serde_json", - "syn 2.0.101", + "syn 2.0.106", "toml", "walkdir", ] @@ -1445,7 +1445,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1466,12 +1466,12 @@ dependencies = [ "num_enum", "once_cell", "open-fastrlp", - "rand", + "rand 0.8.5", "rlp", "serde", "serde_json", "strum", - "syn 2.0.101", + "syn 2.0.106", "tempfile", "thiserror 1.0.69", "tiny-keccak", @@ -1571,7 +1571,7 @@ dependencies = [ "elliptic-curve", "eth-keystore", "ethers-core", - "rand", + "rand 0.8.5", "sha2", "thiserror 1.0.69", "tracing", @@ -1611,9 +1611,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -1654,7 +1654,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ "bitvec", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -1674,6 +1674,12 @@ dependencies = [ "flate2", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" + [[package]] name = "fixed-hash" version = "0.8.0" @@ -1681,7 +1687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -1700,9 +1706,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", "miniz_oxide", @@ -1748,9 +1754,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -1854,7 +1860,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -1932,7 +1938,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -1945,7 +1951,7 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.5+wasi-0.2.4", ] [[package]] @@ -1956,9 +1962,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "globset" @@ -1979,7 +1985,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "ignore", "walkdir", ] @@ -2014,15 +2020,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] [[package]] name = "h2" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" dependencies = [ "bytes", "fnv", @@ -2030,7 +2036,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.9.0", + "indexmap 2.11.1", "slab", "tokio", "tokio-util", @@ -2039,9 +2045,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -2049,7 +2055,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.9.0", + "indexmap 2.11.1", "slab", "tokio", "tokio-util", @@ -2073,8 +2079,8 @@ dependencies = [ "pairing", "pasta_curves", "paste", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "rayon", "sha2", "static_assertions", @@ -2103,9 +2109,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -2127,7 +2133,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] @@ -2144,15 +2150,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hermit-abi" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -2279,14 +2279,14 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.26", + "h2 0.3.27", "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -2295,20 +2295,22 @@ dependencies = [ [[package]] name = "hyper" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", - "h2 0.4.10", + "futures-core", + "h2 0.4.12", "http 1.3.1", "http-body 1.0.1", "httparse", "httpdate", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -2330,15 +2332,14 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "futures-util", "http 1.3.1", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-util", - "rustls 0.23.27", + "rustls 0.23.31", "rustls-pki-types", "tokio", "tokio-rustls 0.26.2", @@ -2366,7 +2367,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-util", "native-tls", "tokio", @@ -2376,22 +2377,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.11" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ + "base64 0.22.1", "bytes", "futures-channel", + "futures-core", "futures-util", "http 1.3.1", "http-body 1.0.1", - "hyper 1.6.0", + "hyper 1.7.0", + "ipnet", "libc", + "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.0", + "system-configuration 0.6.1", "tokio", "tower-service", "tracing", + "windows-registry", ] [[package]] @@ -2467,9 +2474,9 @@ checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2549ca8c7241c82f59c80ba2a6f415d931c5b58d24fb8412caa1a1f02c49139a" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ "displaydoc", "icu_collections", @@ -2483,9 +2490,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8197e866e47b68f8f7d95249e172903bec06004b18b2937f1095d40a0c57de04" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] name = "icu_provider" @@ -2506,20 +2513,19 @@ dependencies = [ [[package]] name = "idna" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -2587,14 +2593,14 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "indenter" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "indexmap" @@ -2608,12 +2614,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.5", ] [[package]] @@ -2636,20 +2642,31 @@ dependencies = [ [[package]] name = "inventory" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab08d7cd2c5897f2c949e5383ea7c7db03fb19130ffcfbf7eda795137ae3cb83" +checksum = "bc61209c082fbeb19919bee74b176221b27223e27b65d781eb91af24eb1fb46e" dependencies = [ "rustversion", ] +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "libc", +] + [[package]] name = "ipconfig" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.10", "widestring", "windows-sys 0.48.0", "winreg", @@ -2661,13 +2678,23 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is-terminal" version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ - "hermit-abi 0.5.1", + "hermit-abi", "libc", "windows-sys 0.59.0", ] @@ -2725,9 +2752,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ "getrandom 0.3.3", "libc", @@ -2735,9 +2762,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" dependencies = [ "once_cell", "wasm-bindgen", @@ -2795,7 +2822,7 @@ dependencies = [ "regex", "regex-syntax", "string_cache", - "term", + "term 0.7.0", "tiny-keccak", "unicode-xid", "walkdir", @@ -2821,9 +2848,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.172" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libm" @@ -2833,12 +2860,13 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "libc", + "redox_syscall", ] [[package]] @@ -2859,9 +2887,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" @@ -2871,9 +2899,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -2881,9 +2909,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "lru-cache" @@ -2905,12 +2933,6 @@ dependencies = [ "quoted_printable", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.8.4" @@ -2929,9 +2951,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "mime" @@ -2957,22 +2979,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", ] [[package]] @@ -2999,7 +3021,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3044,15 +3066,15 @@ dependencies = [ "prost-wkt-build", "prost-wkt-types", "regex", - "relayer-utils 0.4.62-12 (git+https://github.com/zkemail/relayer-utils?rev=728b8f643a6c9a1e5b400be6407727851cc8c92c)", - "sdk-utils 0.1.0", + "relayer-utils", + "sdk-utils", "serde", "serde_json", "slog", "sqlx", "tera", "tokio", - "zk-regex-compiler 2.0.0-alpha.2", + "zk-regex-compiler 2.0.0-alpha.2 (git+https://github.com/zkemail/zk-regex?rev=47abcf15a11dab727d24d9f6f044f8e17b9498b5)", ] [[package]] @@ -3087,7 +3109,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand", + "rand 0.8.5", "serde", "smallvec", "zeroize", @@ -3131,33 +3153,34 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] [[package]] name = "num_enum" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" dependencies = [ "num_enum_derive", + "rustversion", ] [[package]] name = "num_enum_derive" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3202,11 +3225,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.72" +version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "cfg-if", "foreign-types", "libc", @@ -3223,7 +3246,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3234,9 +3257,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.108" +version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ "cc", "libc", @@ -3261,7 +3284,7 @@ dependencies = [ "p3-mds", "p3-poseidon2", "p3-symmetric", - "rand", + "rand 0.8.5", "serde", ] @@ -3288,7 +3311,7 @@ dependencies = [ "num-bigint", "num-traits", "p3-util", - "rand", + "rand 0.8.5", "serde", ] @@ -3302,7 +3325,7 @@ dependencies = [ "p3-field", "p3-maybe-rayon", "p3-util", - "rand", + "rand 0.8.5", "serde", "tracing", ] @@ -3325,7 +3348,7 @@ dependencies = [ "p3-matrix", "p3-symmetric", "p3-util", - "rand", + "rand 0.8.5", ] [[package]] @@ -3338,7 +3361,7 @@ dependencies = [ "p3-field", "p3-mds", "p3-symmetric", - "rand", + "rand 0.8.5", "serde", ] @@ -3373,9 +3396,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.7.4" +version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fde3d0718baf5bc92f577d652001da0f8d54cd03a7974e118d04fc888dc23d" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" dependencies = [ "arrayvec", "bitvec", @@ -3389,14 +3412,14 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.7.4" +version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581c837bb6b9541ce7faa9377c20616e4fb7650f6b0f68bc93c827ee504fb7b3" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3407,9 +3430,9 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -3417,9 +3440,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", @@ -3444,7 +3467,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -3458,7 +3481,7 @@ dependencies = [ "ff", "group", "lazy_static", - "rand", + "rand 0.8.5", "static_assertions", "subtle", ] @@ -3517,26 +3540,26 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" +checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", - "thiserror 2.0.12", + "thiserror 2.0.16", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d725d9cfd79e87dccc9341a2ef39d1b6f6353d68c4b33c177febbe1a402c97c5" +checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc" dependencies = [ "pest", "pest_generator", @@ -3544,24 +3567,23 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7d01726be8ab66ab32f9df467ae8b1148906685bbe75c82d1e65d7f5b3f841" +checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "pest_meta" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9f832470494906d1fca5329f8ab5791cc60beb230c74815dff541cbd2b5ca0" +checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5" dependencies = [ - "once_cell", "pest", "sha2", ] @@ -3573,7 +3595,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.9.0", + "indexmap 2.11.1", ] [[package]] @@ -3583,7 +3605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset 0.5.7", - "indexmap 2.9.0", + "indexmap 2.11.1", ] [[package]] @@ -3623,7 +3645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", - "rand", + "rand 0.8.5", ] [[package]] @@ -3636,7 +3658,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3665,7 +3687,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3721,9 +3743,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" dependencies = [ "zerovec", ] @@ -3740,7 +3762,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.25", + "zerocopy 0.8.27", ] [[package]] @@ -3755,7 +3777,7 @@ version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ - "anstyle 1.0.10", + "anstyle 1.0.11", "predicates-core", ] @@ -3777,12 +3799,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.32" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3810,24 +3832,24 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" +checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "lazy_static", "num-traits", - "rand", - "rand_chacha", + "rand 0.9.2", + "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax", "unarray", @@ -3869,7 +3891,7 @@ dependencies = [ "prost 0.13.5", "prost-types 0.13.5", "regex", - "syn 2.0.101", + "syn 2.0.106", "tempfile", ] @@ -3896,7 +3918,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -3986,9 +4008,9 @@ checksum = "640c9bd8497b02465aeef5375144c26062e0dcd5939dfcbb0f5db76cb8c17c73" [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "radium" @@ -4003,8 +4025,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", ] [[package]] @@ -4014,7 +4046,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -4026,20 +4068,29 @@ dependencies = [ "getrandom 0.2.16", ] +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", +] + [[package]] name = "rand_xorshift" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" dependencies = [ - "rand_core", + "rand_core 0.9.3", ] [[package]] name = "rayon" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -4047,9 +4098,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -4057,11 +4108,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", ] [[package]] @@ -4100,9 +4151,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "relayer-utils" @@ -4126,51 +4177,8 @@ dependencies = [ "mailparse", "num-bigint", "poseidon-rs", - "rand", - "rand_core", - "regex", - "reqwest 0.11.27", - "rsa", - "serde", - "serde-wasm-bindgen", - "serde_json", - "sha1", - "sha2", - "slog", - "slog-async", - "slog-json", - "slog-term", - "sp1-verifier", - "wasm-bindgen", - "wasm-bindgen-futures", - "zk-regex-apis", - "zk-regex-compiler 2.3.2 (git+https://github.com/zkemail/zk-regex.git)", -] - -[[package]] -name = "relayer-utils" -version = "0.4.62-12" -source = "git+https://github.com/zkemail/relayer-utils#728b8f643a6c9a1e5b400be6407727851cc8c92c" -dependencies = [ - "anyhow", - "base64 0.22.1", - "cfdkim", - "console_error_panic_hook", - "digest", - "ed25519-dalek", - "ethers", - "file-rotate", - "halo2curves", - "hex", - "hmac-sha256", - "itertools 0.10.5", - "js-sys", - "lazy_static", - "mailparse", - "num-bigint", - "poseidon-rs", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "regex", "reqwest 0.11.27", "rsa", @@ -4187,7 +4195,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "zk-regex-apis", - "zk-regex-compiler 2.3.2 (git+https://github.com/zkemail/zk-regex.git)", + "zk-regex-compiler 2.3.2", ] [[package]] @@ -4201,7 +4209,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.26", + "h2 0.3.27", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.32", @@ -4216,7 +4224,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", @@ -4236,53 +4244,49 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.15" +version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", "futures-core", - "futures-util", - "h2 0.4.10", + "h2 0.4.12", "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", - "hyper-rustls 0.27.5", + "hyper 1.7.0", + "hyper-rustls 0.27.7", "hyper-tls 0.6.0", "hyper-util", - "ipnet", "js-sys", "log", "mime", "native-tls", - "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile 2.2.0", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.2", - "system-configuration 0.6.1", "tokio", "tokio-native-tls", "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-registry", ] [[package]] name = "resolv-conf" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7c8f7f733062b66dc1c63f9db168ac0b97a9210e247fa90fdc9ad08f51b302" +checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" [[package]] name = "rfc6979" @@ -4367,7 +4371,7 @@ dependencies = [ "num-traits", "pkcs1", "pkcs8", - "rand_core", + "rand_core 0.6.4", "serde", "sha2", "signature", @@ -4378,9 +4382,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hex" @@ -4399,15 +4403,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -4424,14 +4428,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "once_cell", "ring 0.17.14", "rustls-pki-types", - "rustls-webpki 0.103.3", + "rustls-webpki 0.103.5", "subtle", "zeroize", ] @@ -4445,15 +4449,6 @@ dependencies = [ "base64 0.21.7", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.12.0" @@ -4475,9 +4470,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.3" +version = "0.103.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" +checksum = "b5a37813727b78798e53c2bec3f5e8fe12a6d6f8389bf9ca7802add4c9905ad8" dependencies = [ "ring 0.17.14", "rustls-pki-types", @@ -4486,9 +4481,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -4535,16 +4530,16 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "schannel" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -4586,24 +4581,11 @@ dependencies = [ "prost-wkt", "prost-wkt-build", "prost-wkt-types", - "relayer-utils 0.4.62-12 (git+https://github.com/zkemail/relayer-utils?rev=728b8f643a6c9a1e5b400be6407727851cc8c92c)", - "reqwest 0.12.15", + "relayer-utils", + "reqwest 0.12.23", "serde", "slog", - "uuid 1.16.0", -] - -[[package]] -name = "sdk-utils" -version = "0.1.0" -source = "git+https://github.com/zkemail/sdk-images?branch=main#fe1376de867474d1ad9185ab871ac2b04fed3de7" -dependencies = [ - "anyhow", - "relayer-utils 0.4.62-12 (git+https://github.com/zkemail/relayer-utils)", - "reqwest 0.12.15", - "serde", - "slog", - "uuid 1.16.0", + "uuid 1.18.1", ] [[package]] @@ -4626,7 +4608,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "core-foundation", "core-foundation-sys", "libc", @@ -4635,9 +4617,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -4692,14 +4674,14 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ "itoa", "memchr", @@ -4719,9 +4701,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] @@ -4789,9 +4771,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -4803,7 +4785,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -4814,7 +4796,7 @@ checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint", "num-traits", - "thiserror 2.0.12", + "thiserror 2.0.16", "time", ] @@ -4826,12 +4808,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slog" @@ -4865,13 +4844,14 @@ dependencies = [ [[package]] name = "slog-term" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e022d0b998abfe5c3782c1f03551a596269450ccd677ea51c56f8b214610e8" +checksum = "5cb1fc680b38eed6fad4c02b3871c09d2c81db8c96aa4e9c0a34904c830f09b5" dependencies = [ + "chrono", "is-terminal", "slog", - "term", + "term 1.2.0", "thread_local", "time", ] @@ -4888,23 +4868,33 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" dependencies = [ "serde", ] [[package]] name = "socket2" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "solang-parser" version = "0.3.3" @@ -4921,9 +4911,9 @@ dependencies = [ [[package]] name = "sp1-lib" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ef88f90458b6116da164e9c4c4596c49c8cca1944bfe02850b48b232a06b90" +checksum = "e166e94b13146c65de433cf29acc1030f021414fbebfc24cd4eeaeb787ba3443" dependencies = [ "bincode", "elliptic-curve", @@ -4933,9 +4923,9 @@ dependencies = [ [[package]] name = "sp1-primitives" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc282347d405f23fc8a7cfe93c82e772920bf2e0722cf828eaea69ed530e49" +checksum = "3a85ffe9606bd2cc93575ce608f063ca08521cee9bdebf611914c5b2d90d7412" dependencies = [ "bincode", "blake3", @@ -4963,7 +4953,7 @@ dependencies = [ "lazy_static", "sha2", "substrate-bn-succinct", - "thiserror 2.0.12", + "thiserror 2.0.16", ] [[package]] @@ -4993,9 +4983,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c3a85280daca669cfd3bcb68a337882a8bc57ec882f72c5d13a430613a738e" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" dependencies = [ "sqlx-core", "sqlx-macros", @@ -5006,9 +4996,9 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f743f2a3cea30a58cd479013f75550e879009e3a02f616f18ca699335aa248c3" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" dependencies = [ "base64 0.22.1", "bytes", @@ -5021,46 +5011,46 @@ dependencies = [ "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.15.3", + "hashbrown 0.15.5", "hashlink", - "indexmap 2.9.0", + "indexmap 2.11.1", "log", "memchr", "once_cell", "percent-encoding", - "rustls 0.23.27", + "rustls 0.23.31", "serde", "serde_json", "sha2", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.16", "time", "tokio", "tokio-stream", "tracing", "url", - "uuid 1.16.0", + "uuid 1.18.1", "webpki-roots 0.26.11", ] [[package]] name = "sqlx-macros" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4200e0fde19834956d4252347c12a083bdcb237d7a1a1446bffd8768417dce" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "sqlx-macros-core" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882ceaa29cade31beca7129b6beeb05737f44f82dbe2a9806ecea5a7093d00b7" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" dependencies = [ "dotenvy", "either", @@ -5076,21 +5066,20 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.101", - "tempfile", + "syn 2.0.106", "tokio", "url", ] [[package]] name = "sqlx-mysql" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0afdd3aa7a629683c2d750c2df343025545087081ab5942593a5288855b1b7a7" +checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.9.0", + "bitflags 2.9.4", "byteorder", "bytes", "chrono", @@ -5112,7 +5101,7 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rand", + "rand 0.8.5", "rsa", "serde", "sha1", @@ -5120,22 +5109,22 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.12", + "thiserror 2.0.16", "time", "tracing", - "uuid 1.16.0", + "uuid 1.18.1", "whoami", ] [[package]] name = "sqlx-postgres" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bedbe1bbb5e2615ef347a5e9d8cd7680fb63e77d9dafc0f29be15e53f1ebe6" +checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.9.0", + "bitflags 2.9.4", "byteorder", "chrono", "crc", @@ -5153,25 +5142,25 @@ dependencies = [ "md-5", "memchr", "once_cell", - "rand", + "rand 0.8.5", "serde", "serde_json", "sha2", "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.12", + "thiserror 2.0.16", "time", "tracing", - "uuid 1.16.0", + "uuid 1.18.1", "whoami", ] [[package]] name = "sqlx-sqlite" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c26083e9a520e8eb87a06b12347679b142dc2ea29e6e409f805644a7a979a5bc" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" dependencies = [ "atoi", "chrono", @@ -5187,11 +5176,11 @@ dependencies = [ "serde", "serde_urlencoded", "sqlx-core", - "thiserror 2.0.12", + "thiserror 2.0.16", "time", "tracing", "url", - "uuid 1.16.0", + "uuid 1.18.1", ] [[package]] @@ -5254,7 +5243,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -5269,7 +5258,7 @@ dependencies = [ "crunchy", "lazy_static", "num-bigint", - "rand", + "rand 0.8.5", "rustc-hex", "sp1-lib", ] @@ -5313,9 +5302,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -5345,7 +5334,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -5365,7 +5354,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "core-foundation", "system-configuration-sys 0.6.0", ] @@ -5404,15 +5393,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.20.0" +version = "3.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -5429,7 +5418,7 @@ dependencies = [ "percent-encoding", "pest", "pest_derive", - "rand", + "rand 0.8.5", "regex", "serde", "serde_json", @@ -5448,6 +5437,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "term" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2111ef44dae28680ae9752bb89409e7310ca33a8c621ebe7b106cf5c928b3ac0" +dependencies = [ + "windows-sys 0.61.0", +] + [[package]] name = "termtree" version = "0.5.1" @@ -5465,11 +5463,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.16", ] [[package]] @@ -5480,38 +5478,36 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] name = "time" -version = "0.3.41" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" dependencies = [ "deranged", - "itoa", "num-conv", "powerfmt", "serde", @@ -5521,15 +5517,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" dependencies = [ "num-conv", "time-core", @@ -5556,9 +5552,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -5571,20 +5567,22 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.0" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5595,7 +5593,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -5624,7 +5622,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.27", + "rustls 0.23.31", "tokio", ] @@ -5656,9 +5654,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -5669,9 +5667,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", @@ -5681,20 +5679,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.26" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.11.1", "serde", "serde_spanned", "toml_datetime", @@ -5704,9 +5702,9 @@ dependencies = [ [[package]] name = "toml_write" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "tower" @@ -5724,6 +5722,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags 2.9.4", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -5750,20 +5766,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", ] @@ -5780,9 +5796,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.22.0" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" +checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" dependencies = [ "async-trait", "cfg-if", @@ -5791,10 +5807,10 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 0.2.3", + "idna 0.4.0", "ipnet", - "lazy_static", - "rand", + "once_cell", + "rand 0.8.5", "smallvec", "thiserror 1.0.69", "tinyvec", @@ -5805,16 +5821,17 @@ dependencies = [ [[package]] name = "trust-dns-resolver" -version = "0.22.0" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" +checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6" dependencies = [ "cfg-if", "futures-util", "ipconfig", - "lazy_static", "lru-cache", + "once_cell", "parking_lot", + "rand 0.8.5", "resolv-conf", "smallvec", "thiserror 1.0.69", @@ -5841,7 +5858,7 @@ dependencies = [ "http 0.2.12", "httparse", "log", - "rand", + "rand 0.8.5", "rustls 0.21.12", "sha1", "thiserror 1.0.69", @@ -5882,7 +5899,7 @@ checksum = "35f5380909ffc31b4de4f4bdf96b877175a016aa2ca98cee39fcfd8c4d53d952" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -5967,9 +5984,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "unicode-normalization" @@ -6016,13 +6033,14 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", - "idna 1.0.3", + "idna 1.1.0", "percent-encoding", + "serde", ] [[package]] @@ -6055,11 +6073,13 @@ dependencies = [ [[package]] name = "uuid" -version = "1.16.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ + "js-sys", "serde", + "wasm-bindgen", ] [[package]] @@ -6095,17 +6115,26 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.5+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4" dependencies = [ - "wit-bindgen-rt", + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.0+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24" +dependencies = [ + "wit-bindgen", ] [[package]] @@ -6116,9 +6145,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" dependencies = [ "cfg-if", "once_cell", @@ -6126,27 +6155,28 @@ dependencies = [ "serde", "serde_json", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "0ca85039a9b469b38336411d6d6ced91f3fc87109a2a27b0c197663f5144dffe" dependencies = [ "cfg-if", "js-sys", @@ -6157,9 +6187,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6167,31 +6197,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" dependencies = [ "unicode-ident", ] [[package]] name = "wasm-bindgen-test" -version = "0.3.50" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c8d5e33ca3b6d9fa3b4676d774c5778031d27a578c2b007f905acf816152c3" +checksum = "80cc7f8a4114fdaa0c58383caf973fc126cf004eba25c9dc639bccd3880d55ad" dependencies = [ "js-sys", "minicov", @@ -6202,20 +6232,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.50" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d5042cc5fa009658f9a7333ef24291b1291a25b6382dd68862a7f3b969f69b" +checksum = "c5ada2ab788d46d4bda04c9d567702a79c8ced14f51f221646a16ed39d0e6a5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "77e4b637749ff0d92b8fad63aa1f7cff3cbe125fd49c175cd6345e7272638b12" dependencies = [ "js-sys", "wasm-bindgen", @@ -6233,25 +6263,25 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.0", + "webpki-roots 1.0.2", ] [[package]] name = "webpki-roots" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] [[package]] name = "whoami" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" dependencies = [ - "redox_syscall", + "libredox", "wasite", ] @@ -6279,11 +6309,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -6294,15 +6324,15 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.3", "windows-result", - "windows-strings 0.4.0", + "windows-strings", ] [[package]] @@ -6313,7 +6343,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -6324,51 +6354,48 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] -name = "windows-registry" -version = "0.4.0" +name = "windows-link" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" -dependencies = [ - "windows-result", - "windows-strings 0.3.1", - "windows-targets 0.53.0", -] +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" [[package]] -name = "windows-result" -version = "0.3.2" +name = "windows-registry" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ - "windows-link", + "windows-link 0.1.3", + "windows-result", + "windows-strings", ] [[package]] -name = "windows-strings" -version = "0.3.1" +name = "windows-result" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -6407,6 +6434,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" +dependencies = [ + "windows-link 0.2.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -6446,29 +6482,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -6487,12 +6507,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -6511,12 +6525,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -6535,24 +6543,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -6571,12 +6567,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -6595,12 +6585,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -6619,12 +6603,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -6643,17 +6621,11 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winnow" -version = "0.7.10" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -6669,13 +6641,10 @@ dependencies = [ ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.0", -] +checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36" [[package]] name = "writeable" @@ -6685,9 +6654,9 @@ checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "ws_stream_wasm" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +checksum = "6c173014acad22e83f16403ee360115b38846fe754e735c5d9d3803fe70c6abc" dependencies = [ "async_io_stream", "futures", @@ -6696,7 +6665,7 @@ dependencies = [ "pharos", "rustc_version", "send_wrapper 0.6.0", - "thiserror 1.0.69", + "thiserror 2.0.16", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -6737,7 +6706,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", "synstructure", ] @@ -6752,11 +6721,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ - "zerocopy-derive 0.8.25", + "zerocopy-derive 0.8.27", ] [[package]] @@ -6767,18 +6736,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -6798,7 +6767,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", "synstructure", ] @@ -6821,9 +6790,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", @@ -6838,7 +6807,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.106", ] [[package]] @@ -6864,7 +6833,7 @@ dependencies = [ [[package]] name = "zk-regex-apis" version = "2.3.2" -source = "git+https://github.com/zkemail/zk-regex.git#f2a19e4c2e726822ebb7381353b6213ca5b4f4ad" +source = "git+https://github.com/zkemail/zk-regex.git#4fb1bda1af71123f57f4877c29ebcb9004266fd8" dependencies = [ "console_error_panic_hook", "fancy-regex", @@ -6881,45 +6850,41 @@ dependencies = [ [[package]] name = "zk-regex-compiler" version = "2.0.0-alpha.2" -source = "git+https://github.com/zkemail/zk-regex?branch=feat%2Fnew-compiler#28d2d13ed8be589f8fd5b20120a8b64ed8feaab0" +source = "git+https://github.com/zkemail/zk-regex?rev=35014c2bff69115bb92be2dc2c9b006fa69a6649#35014c2bff69115bb92be2dc2c9b006fa69a6649" dependencies = [ "clap", "comptime", "heck 0.5.0", "regex-automata", + "regex-syntax", "serde", "serde-wasm-bindgen", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.16", "wasm-bindgen", ] [[package]] name = "zk-regex-compiler" -version = "2.3.2" -source = "git+https://github.com/zkemail/zk-regex?branch=main#f2a19e4c2e726822ebb7381353b6213ca5b4f4ad" +version = "2.0.0-alpha.2" +source = "git+https://github.com/zkemail/zk-regex?rev=47abcf15a11dab727d24d9f6f044f8e17b9498b5#47abcf15a11dab727d24d9f6f044f8e17b9498b5" dependencies = [ - "ahash", "clap", - "console_error_panic_hook", - "fancy-regex", - "getrandom 0.2.16", - "graph-cycles", - "itertools 0.13.0", - "petgraph 0.6.5", - "regex", + "comptime", + "heck 0.5.0", "regex-automata", + "regex-syntax", "serde", "serde-wasm-bindgen", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.16", "wasm-bindgen", ] [[package]] name = "zk-regex-compiler" version = "2.3.2" -source = "git+https://github.com/zkemail/zk-regex.git#f2a19e4c2e726822ebb7381353b6213ca5b4f4ad" +source = "git+https://github.com/zkemail/zk-regex.git#4fb1bda1af71123f57f4877c29ebcb9004266fd8" dependencies = [ "ahash", "clap", @@ -6959,9 +6924,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.15+zstd.1.5.7" +version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", diff --git a/circom/Cargo.toml b/circom/Cargo.toml index 937ee44..1ae20d9 100644 --- a/circom/Cargo.toml +++ b/circom/Cargo.toml @@ -8,13 +8,28 @@ anyhow = "1.0.90" dotenv = "0.15.0" tokio = { version = "1.40.0", features = ["full"] } relayer-utils = { git = "https://github.com/zkemail/relayer-utils", rev = "728b8f643a6c9a1e5b400be6407727851cc8c92c" } -slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_warn"] } -sdk-utils = { git = "https://github.com/zkemail/sdk-images", branch = "main" } +slog = { version = "2.7.0", features = [ + "max_level_trace", + "release_max_level_warn", +] } +sdk-utils = { workspace = true } serde = "1.0.215" base64 = "0.22.1" serde_json = "1.0.133" regex = "=1.10.6" -zk-regex-compiler = { git = "https://github.com/zkemail/zk-regex", branch = "main" } +zk-regex-compiler = { git = "https://github.com/zkemail/zk-regex", rev = "35014c2bff69115bb92be2dc2c9b006fa69a6649" } tera = "1.20.0" rand = "0.8.5" -sqlx = { version = "0.8.2", features = ["postgres", "runtime-tokio", "migrate", "uuid", "time", "chrono", "runtime-tokio-rustls"] } +sqlx = { version = "0.8.2", features = [ + "postgres", + "runtime-tokio", + "migrate", + "uuid", + "time", + "chrono", + "runtime-tokio-rustls", +] } +prost = "0.13" +prost-wkt = "0.6" +prost-wkt-types = "0.6" +prost-types = "0.11" diff --git a/circom/Deploy.s.sol b/circom/Deploy.s.sol index b0628b2..9e69369 100644 --- a/circom/Deploy.s.sol +++ b/circom/Deploy.s.sol @@ -39,8 +39,8 @@ contract Deploy is Script { Contract circuitContract = new Contract(dkimRegistry, clientProofVerifier, serverProofVerifier); vm.stopBroadcast(); - console.log("Deployed ClientProofVerifier at", address(cpv)); - console.log("Deployed ServerProofVerifier at", address(spv)); + console.log("Deployed ClientProofVerifier at", address(clientProofVerifier)); + console.log("Deployed ServerProofVerifier at", address(serverProofVerifier)); console.log("Deployed Contract at", address(circuitContract)); console.log("Deployed DKIMRegistry at", dkimRegistryAddr); return; diff --git a/circom/Dockerfile b/circom/Dockerfile index f764140..bb776cd 100644 --- a/circom/Dockerfile +++ b/circom/Dockerfile @@ -33,7 +33,8 @@ RUN apt update && \ gzip \ protobuf-compiler \ libprotobuf-dev \ - zip && \ + zip \ + unzip && \ rm -rf /var/lib/apt/lists/* # Install Python version using pyenv @@ -42,10 +43,12 @@ ENV HOME /root RUN CONFIGURE_OPTS=--enable-shared $HOME/.pyenv/bin/pyenv install ${PYTHON_VERSION} ENV PATH="${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${HOME}/bin:${PATH}" -# Install Bazelisk for building Circom dependencies -RUN wget https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 && \ - chmod +x bazelisk-linux-amd64 && \ - mv bazelisk-linux-amd64 /usr/local/bin/bazel +# Install Bazel 6.3.0 for building Circom dependencies (required by tachyon) +RUN wget https://github.com/bazelbuild/bazel/releases/download/6.3.0/bazel-6.3.0-installer-linux-x86_64.sh && \ + chmod +x bazel-6.3.0-installer-linux-x86_64.sh && \ + ./bazel-6.3.0-installer-linux-x86_64.sh --user && \ + cp /root/bin/bazel /usr/local/bin/bazel && \ + rm bazel-6.3.0-installer-linux-x86_64.sh # Clone and set up Tachyon WORKDIR /root @@ -89,6 +92,7 @@ ENV NODE_OPTIONS=--max_old_space_size=65536 RUN sysctl -w vm.max_map_count=262144 WORKDIR /root/circom/circom +RUN yarn install ENV LOG_LEVEL=info diff --git a/circom/foundry.toml b/circom/foundry.toml index 3d64858..8418603 100644 --- a/circom/foundry.toml +++ b/circom/foundry.toml @@ -4,6 +4,6 @@ out = "artifacts" libs = ["./node_modules", "lib"] optimizer = true optimizer_runs = 200 -evm_version = 'shanghai' +evm_version = 'prague' via-ir = true solc = "0.8.26" \ No newline at end of file diff --git a/circom/package.json b/circom/package.json index aea49e5..a80edf0 100644 --- a/circom/package.json +++ b/circom/package.json @@ -7,10 +7,11 @@ "deploy": "forge script Deploy.s.sol:Deploy --rpc-url $RPC_URL --broadcast --non-interactive" }, "dependencies": { - "@zk-email/circuits": "^6.3.3", "@openzeppelin/contracts": "^5.0.0", "@openzeppelin/contracts-upgradeable": "^5.0.0", + "@zk-email/circuits": "6.4.1-alpha.0", "@zk-email/contracts": "^6.1.3", + "@zk-email/zk-regex-circom": "2.2.2-alpha.0", "ds-test": "https://github.com/dapphub/ds-test", "forge-std": "https://github.com/foundry-rs/forge-std", "snarkjs_chunked": "git+https://github.com/nalinbhardwaj/snarkjs.git#d1c10a6373c02eaa214968da96e2514ddc8c8b92" diff --git a/circom/src/contract.rs b/circom/src/contract.rs index 4658100..b100562 100644 --- a/circom/src/contract.rs +++ b/circom/src/contract.rs @@ -59,57 +59,47 @@ pub fn prepare_contract_data(payload: &Payload) -> ContractData { let mut current_idx = 1; let mut values = Vec::new(); - if let Some(decomposed_regexes) = &payload.blueprint.decomposed_regexes { - for regex in decomposed_regexes { - let pack_size = ((regex.max_length as f64) / 31.0).ceil() as usize; - let field = Field { - name: regex.name.clone(), - max_length: regex.max_length, - pack_size, - start_idx: current_idx, - }; - for part in regex.parts.iter() { - if part.is_public { - if regex.is_hashed.unwrap_or(false) { - signal_size += 1; - current_idx += 1; - } else { - signal_size += pack_size; - current_idx += pack_size; - } + for regex in &payload.blueprint.decomposed_regexes { + let pack_size = ((regex.max_match_length as f64) / 31.0).ceil() as usize; + let field = Field { + name: regex.name.clone(), + max_length: regex.max_match_length as usize, + pack_size, + start_idx: current_idx, + }; + for part in regex.parts.iter() { + if part.is_public == Some(true) { + if regex.is_hashed.unwrap_or(false) { + signal_size += 1; + current_idx += 1; + } else { + signal_size += pack_size; + current_idx += pack_size; } } - values.push(field); } + values.push(field); } let prover_eth_address_idx = current_idx; current_idx += 1; // Add 1 prover ETH address let mut external_inputs = Vec::new(); - if let Some(inputs) = &payload.blueprint.external_inputs { - for input in inputs.iter() { - let pack_size = ((input.max_length as f64) / 31.0).ceil() as usize; - let field = Field { - name: input.name.clone(), - max_length: input.max_length, - pack_size, - start_idx: current_idx, - }; - signal_size += pack_size; - current_idx += pack_size; - external_inputs.push(field); - } + for input in &payload.blueprint.external_inputs { + let pack_size = ((input.max_length as f64) / 31.0).ceil() as usize; + let field = Field { + name: input.name.clone(), + max_length: input.max_length as usize, + pack_size, + start_idx: current_idx, + }; + signal_size += pack_size; + current_idx += pack_size; + external_inputs.push(field); } - let sender_domain = payload - .blueprint - .sender_domain - .clone() - .expect("Sender domain not found"); - ContractData { - sender_domain, + sender_domain: payload.blueprint.sender_domain.clone(), values, external_inputs, signal_size, @@ -190,8 +180,9 @@ pub async fn deploy_verifier_contract(payload: Payload) -> Result { let output = run_command_and_return_output("yarn", &["deploy"], None).await?; // Parse the output to extract addresses - let re = - Regex::new(r"Deployed (ClientProofVerifier|ServerProofVerifier|Contract|DKIMRegistry) at (0x[a-fA-F0-9]{40})").unwrap(); + let re = Regex::new( + r"Deployed (ClientProofVerifier|ServerProofVerifier|Contract|DKIMRegistry) at (0x[a-fA-F0-9]{40})" + ).unwrap(); let mut contract_addresses = HashMap::new(); for cap in re.captures_iter(&output) { let contract_name = &cap[1]; @@ -215,48 +206,123 @@ pub async fn deploy_verifier_contract(payload: Payload) -> Result { ) .await?; - if env::var("ETHERSCAN_API_KEY").is_ok() { + if let Ok(_) = env::var("ETHERSCAN_API_KEY") { info!(LOG, "Verify contracts"); - run_command( - "forge", - &[ - "verify-contract", - "--chain-id", - payload.chain_id.to_string().as_str(), - contract_addresses.get("ClientProofVerifier").unwrap(), - "tmp/ClientProofVerifier.sol:ClientProofVerifier", - ], - None, - ) - .await?; - - run_command( - "forge", - &[ - "verify-contract", - "--chain-id", - payload.chain_id.to_string().as_str(), - contract_addresses.get("ServerProofVerifier").unwrap(), - "tmp/ServerProofVerifier.sol:ServerProofVerifier", - ], - None, - ) - .await?; - - run_command( - "forge", - &[ - "verify-contract", - "--chain-id", - payload.chain_id.to_string().as_str(), - "--constructor-args", - &constructor_args, - contract_addresses.get("Contract").unwrap(), - "tmp/Contract.sol:Contract", - ], - None, - ) - .await?; + + // Verify ClientProofVerifier with retries + for attempt in 1..=3 { + info!( + LOG, + "Attempting to verify ClientProofVerifier (attempt {}/3)", attempt + ); + match run_command( + "forge", + &[ + "verify-contract", + "--chain-id", + payload.chain_id.to_string().as_str(), + contract_addresses.get("ClientProofVerifier").unwrap(), + "tmp/ClientProofVerifier.sol:ClientProofVerifier", + ], + None, + ) + .await + { + Ok(_) => { + info!(LOG, "Successfully verified ClientProofVerifier"); + break; + } + Err(e) => { + info!( + LOG, + "Attempt {}/3 failed to verify ClientProofVerifier: {}", attempt, e + ); + if attempt < 3 { + info!(LOG, "Waiting 10 seconds before retry..."); + tokio::time::sleep(tokio::time::Duration::from_secs(10)).await; + } + } + } + } + + // Delay between contract verifications + info!(LOG, "Waiting 5 seconds before next verification..."); + tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; + + // Verify ServerProofVerifier with retries + for attempt in 1..=3 { + info!( + LOG, + "Attempting to verify ServerProofVerifier (attempt {}/3)", attempt + ); + match run_command( + "forge", + &[ + "verify-contract", + "--chain-id", + payload.chain_id.to_string().as_str(), + contract_addresses.get("ServerProofVerifier").unwrap(), + "tmp/ServerProofVerifier.sol:ServerProofVerifier", + ], + None, + ) + .await + { + Ok(_) => { + info!(LOG, "Successfully verified ServerProofVerifier"); + break; + } + Err(e) => { + info!( + LOG, + "Attempt {}/3 failed to verify ServerProofVerifier: {}", attempt, e + ); + if attempt < 3 { + info!(LOG, "Waiting 10 seconds before retry..."); + tokio::time::sleep(tokio::time::Duration::from_secs(10)).await; + } + } + } + } + + // Delay between contract verifications + info!(LOG, "Waiting 5 seconds before next verification..."); + tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; + + // Verify Contract with retries + for attempt in 1..=3 { + info!(LOG, "Attempting to verify Contract (attempt {}/3)", attempt); + match run_command( + "forge", + &[ + "verify-contract", + "--chain-id", + payload.chain_id.to_string().as_str(), + "--constructor-args", + &constructor_args, + contract_addresses.get("Contract").unwrap(), + "tmp/Contract.sol:Contract", + ], + None, + ) + .await + { + Ok(_) => { + info!(LOG, "Successfully verified Contract"); + break; + } + Err(e) => { + info!( + LOG, + "Attempt {}/3 failed to verify Contract: {}", attempt, e + ); + if attempt < 3 { + info!(LOG, "Waiting 10 seconds before retry..."); + tokio::time::sleep(tokio::time::Duration::from_secs(10)).await; + } + } + } + } } Ok(contract_addresses.get("Contract").unwrap().to_string()) diff --git a/circom/src/db.rs b/circom/src/db.rs index 5c8258e..d5456d5 100644 --- a/circom/src/db.rs +++ b/circom/src/db.rs @@ -1,11 +1,13 @@ use anyhow::Result; -use sqlx::{types::Uuid, Pool, Postgres}; +use sqlx::types::Uuid; +use sqlx::{Pool, Postgres}; pub async fn update_verifier_contract_address( pool: &Pool, - id: Uuid, + id: &str, address: &str, ) -> Result<()> { + let uuid_id = Uuid::parse_str(id)?; let query = r#" UPDATE blueprints SET verifier_contract_address = $1 @@ -14,7 +16,7 @@ pub async fn update_verifier_contract_address( sqlx::query(query) .bind(address) - .bind(id) + .bind(uuid_id) .execute(pool) .await?; diff --git a/circom/src/main.rs b/circom/src/main.rs index eb57f5f..d00e33e 100644 --- a/circom/src/main.rs +++ b/circom/src/main.rs @@ -14,7 +14,8 @@ use payload::UploadUrls; use rand::Rng; use relayer_utils::LOG; use sdk_utils::{ - run_command, run_command_and_return_output, run_command_with_input, upload_to_url, + proto_types::proto_blueprint::Blueprint, run_command, run_command_and_return_output, + run_command_with_input, upload_to_url, }; use slog::info; use sqlx::postgres::PgPoolOptions; @@ -24,30 +25,16 @@ use template::{generate_circuit, generate_regex_circuits, CircuitTemplateInputs} async fn main() -> Result<()> { let payload = payload::load_payload()?; info!(LOG, "Loaded configuration: {:?}", payload); + println!("payload: {:?}", payload); let pool = PgPoolOptions::new() .max_connections(10) .connect(&payload.database_url) .await?; - println!("Database connection established"); let blueprint = payload.clone().blueprint; - setup().await?; - - generate_regex_circuits(blueprint.clone().decomposed_regexes)?; - - let circuit_template_inputs = CircuitTemplateInputs::from(blueprint.clone()); - - let circuit = generate_circuit(circuit_template_inputs)?; - - // Write the circuit to a file - let circuit_path = "./tmp/circuit.circom"; - std::fs::write(circuit_path, circuit)?; - - let ptau: usize = compile_circuit().await?; - - // update_ptau(&pool, blueprint.id.expect("No ID found"), ptau).await?; + let ptau: usize = process_circuit(blueprint.clone()).await?; println!("ptau: {}", ptau); @@ -64,7 +51,7 @@ async fn main() -> Result<()> { .await? .trim() .to_string(); - let chunked_snarkjs_path = "../node_modules/.bin/snarkjs"; + let chunked_snarkjs_path = "./node_modules/.bin/snarkjs"; // Generate verifier contract for client-side proofs using chunked zkey generate_verifier_contract( @@ -90,8 +77,7 @@ async fn main() -> Result<()> { cleanup().await?; - update_verifier_contract_address(&pool, blueprint.id.expect("No ID found"), &contract_address) - .await?; + update_verifier_contract_address(&pool, &blueprint.id, &contract_address).await?; upload_files(payload.upload_urls).await?; @@ -125,6 +111,7 @@ async fn setup() -> Result<()> { } fs::create_dir_all(®ex_path)?; + run_command("cp", &["package.json", "./tmp"], None).await?; Ok(()) } @@ -145,7 +132,7 @@ async fn compile_circuit() -> Result { "--c", "--wasm", "-l", - "../node_modules", + "./node_modules", ], Some("tmp"), ) @@ -176,7 +163,7 @@ async fn compile_circuit() -> Result { // Compute the minimal power k such that 2^k > max_value let mut k = 0u32; - while (1u64 << k) <= max_value { + while 1u64 << k <= max_value { k += 1; } @@ -186,33 +173,36 @@ async fn compile_circuit() -> Result { let current_dir = std::env::current_dir()?; let current_dir_str = current_dir.to_str().unwrap_or(""); - // Get Home directory - let tachyon_dir = std::env::var("TACHYON_DIR")?; - let tachyon_dir_str = tachyon_dir.as_str(); - - // Run make in the circuit_cpp folder - info!(LOG, "Compiling circuit binary"); - run_command( - "bazel-bin/circomlib/build/compile_witness_generator", - &[ - "--cpp", - &format!("{}/tmp/circuit_cpp/circuit.cpp", current_dir_str), - ], - Some(format!("{}/vendors/circom", tachyon_dir_str).as_str()), - ) - .await?; + // Get Home directory - skip binary compilation if TACHYON_DIR is not set (e.g., in tests) + if let Ok(tachyon_dir) = std::env::var("TACHYON_DIR") { + let tachyon_dir_str = tachyon_dir.as_str(); + + // Run make in the circuit_cpp folder + info!(LOG, "Compiling circuit binary"); + run_command( + "bazel-bin/circomlib/build/compile_witness_generator", + &[ + "--cpp", + &format!("{}/tmp/circuit_cpp/circuit.cpp", current_dir_str), + ], + Some(format!("{}/vendors/circom", tachyon_dir_str).as_str()), + ) + .await?; - // Move the binary - info!(LOG, "Copying binary"); - run_command( - "mv", - &[ - "witness_generator", - &format!("{}/tmp/circuit_cpp/circuit", current_dir_str), - ], - Some(format!("{}/vendors/circom", tachyon_dir_str).as_str()), - ) - .await?; + // Move the binary + info!(LOG, "Copying binary"); + run_command( + "mv", + &[ + "witness_generator", + &format!("{}/tmp/circuit_cpp/circuit", current_dir_str), + ], + Some(format!("{}/vendors/circom", tachyon_dir_str).as_str()), + ) + .await?; + } else { + info!(LOG, "Skipping binary compilation - TACHYON_DIR not set"); + } Ok(k as usize) } @@ -243,7 +233,7 @@ async fn generate_keys(tmp_dir: &str, ptau: usize) -> Result<()> { .await? .trim() .to_string(); - let chunked_snarkjs_path = "../node_modules/.bin/snarkjs"; + let chunked_snarkjs_path = "./node_modules/.bin/snarkjs"; println!("node_path: {}", node_path); println!("snarkjs_path: {}", snarkjs_path); @@ -411,6 +401,15 @@ async fn cleanup() -> Result<()> { run_command("mv", &["verification_key.json", "vk.json"], Some("tmp")).await?; + // Create regex circuit zip file + info!(LOG, "Creating regex graph zip file"); + run_command( + "zip", + &["-r", "circomRegexGraphs.zip", ".", "-i", "*_regex.json"], + Some("tmp/regex/"), + ) + .await?; + Ok(()) } @@ -485,5 +484,430 @@ async fn upload_files(upload_urls: UploadUrls) -> Result<()> { } } + let regex_json_path = "./tmp/regex/circomRegexGraphs.zip"; + if Path::new(regex_json_path).exists() { + upload_to_url( + &upload_urls.circom_regex_graphs, + regex_json_path, + "application/zip", + ) + .await?; + } else { + info!( + LOG, + "Skipping upload for missing regex JSON file: {}", regex_json_path + ); + } + Ok(()) } + +pub async fn process_circuit(blueprint: Blueprint) -> Result { + setup().await?; + + generate_regex_circuits(blueprint.clone().decomposed_regexes)?; + + let circuit_template_inputs = CircuitTemplateInputs::from(blueprint.clone()); + + let circuit = generate_circuit(circuit_template_inputs)?; + + // Write the circuit to a file + let circuit_path = "./tmp/circuit.circom"; + std::fs::write(circuit_path, circuit)?; + + // Run npm install in the tmp directory to ensure dependencies are available + info!(LOG, "Installing npm dependencies"); + run_command("npm", &["install"], Some("tmp")).await?; + + let ptau: usize = compile_circuit().await?; + + Ok(ptau) +} + +#[cfg(test)] +mod tests { + use super::*; + + use prost_wkt_types::Timestamp; + use sdk_utils::proto_types::proto_blueprint::{ + Blueprint, DecomposedRegex, DecomposedRegexPart, ExternalInput, + }; + + #[tokio::test] + async fn test_compile_circuit_x_export_data() { + let blueprint = Blueprint { + internal_version: "v2".to_string(), + id: "4478f3bc-9ba8-4906-ba87-09fc049cef46".to_string(), + title: "XAccountExportData".to_string(), + description: + "Prove you've asked to export your twitter/X data and reveal only the download link" + .to_string(), + slug: "DimiDumo/XAccountExportData".to_string(), + tags: vec![], + email_query: "from:x.com".to_string(), + circuit_name: "XAccountExportData".to_string(), + ignore_body_hash_check: false, + sha_precompute_selector: "".to_string(), + email_body_max_length: 6208, + sender_domain: "x.com".to_string(), + enable_header_masking: false, + enable_body_masking: false, + client_zk_framework: 1, // Circom + server_zk_framework: 0, // None + verifier_contract_chain: 84532, + verifier_contract_address: "0x6679b65c5CFCba507Bf105491A3b5B68764B1464".to_string(), + is_public: true, + created_at: Some(Timestamp { + seconds: 1746574183, + nanos: 310124000, + }), + updated_at: Some(Timestamp { + seconds: 1746574183, + nanos: 310124000, + }), + external_inputs: vec![], + decomposed_regexes: vec![DecomposedRegex { + name: "downloadDataLink".to_string(), + max_match_length: 128, + location: "body".to_string(), + is_hashed: Some(false), + parts: vec![ + DecomposedRegexPart { + is_public: Some(false), + regex_def: "ready for you to download ".to_string(), + max_length: None, + }, + DecomposedRegexPart { + is_public: Some(true), + regex_def: "[^ ]*".to_string(), + max_length: Some(20), + }, + ], + }], + client_status: 1, // InProgress + server_status: 3, // Done + version: 1, + github_username: "DimiDumo".to_string(), + email_header_max_length: 1024, + remove_soft_linebreaks: true, + stars: 0, + ptau: 0, + num_local_proofs: 0, + }; + + // Call the handler with the mock uploader + let result = process_circuit(blueprint).await; + + if let Err(ref e) = result { + println!("Error: {:?}", e); + } + + // Assert the result + assert!(result.is_ok()); + } + + #[tokio::test] + async fn test_compile_circuit_apple() { + let blueprint = Blueprint { + internal_version: "v2".to_string(), + id: "88802381-0501-4c4a-bcb5-03fdeacf453e".to_string(), + title: "AppleKYC".to_string(), + description: "Prove you have a valid Apple account".to_string(), + slug: "DimiDumo/AppleKYC".to_string(), + tags: vec![], + email_query: "from:email.apple.com".to_string(), + circuit_name: "AppleKYC".to_string(), + ignore_body_hash_check: true, + sha_precompute_selector: "".to_string(), + email_body_max_length: 0, + sender_domain: "email.apple.com".to_string(), + enable_header_masking: false, + enable_body_masking: false, + client_zk_framework: 1, // Circom + server_zk_framework: 0, // None + verifier_contract_chain: 84532, + verifier_contract_address: "0x1E8AbE8B8551E73d25239004EffccA2d077eF146".to_string(), + is_public: true, + created_at: Some(Timestamp { + seconds: 1746538605, + nanos: 86528000, + }), + updated_at: Some(Timestamp { + seconds: 1746538605, + nanos: 86528000, + }), + external_inputs: vec![ExternalInput { + name: "address".to_string(), + max_length: 44, + }], + decomposed_regexes: vec![ + DecomposedRegex { + name: "Subject".to_string(), + max_match_length: 256, + location: "header".to_string(), + is_hashed: Some(false), + parts: vec![ + DecomposedRegexPart { + is_public: Some(false), + regex_def: "(?:\r\n|^)subject:".to_string(), + max_length: None, + }, + DecomposedRegexPart { + is_public: Some(true), + regex_def: "[^\r\n]+".to_string(), + max_length: Some(20), + }, + DecomposedRegexPart { + is_public: Some(false), + regex_def: "\r\n".to_string(), + max_length: None, + }, + ], + }, // Other DecomposedRegex objects omitted for brevity - add them if needed + ], + client_status: 1, // InProgress + server_status: 3, // Done + version: 6, + github_username: "DimiDumo".to_string(), + email_header_max_length: 2048, + remove_soft_linebreaks: true, + stars: 0, + ptau: 0, + num_local_proofs: 0, + }; + + let result = process_circuit(blueprint).await; + + if let Err(ref e) = result { + println!("Error: {:?}", e); + } + + // Assert the result + assert!(result.is_ok()); + } + + #[tokio::test] + async fn test_compile_circuit_registry() { + let blueprint = Blueprint { + internal_version: "v2".to_string(), + id: "87ec6e2f-ca5a-4af8-ac85-2e2cc94602f0".to_string(), + title: "Sp1Residency".to_string(), + description: "Sp1Residency".to_string(), + slug: "DimiDumo/sp1_residency".to_string(), + tags: vec![], + email_query: "".to_string(), + circuit_name: "sp1_residency".to_string(), + ignore_body_hash_check: true, + sha_precompute_selector: "".to_string(), + email_body_max_length: 0, + sender_domain: "succinct.xyz".to_string(), + enable_header_masking: false, + enable_body_masking: false, + client_zk_framework: 1, // Circom + server_zk_framework: 0, // None + verifier_contract_chain: 0, + verifier_contract_address: "".to_string(), + is_public: true, + created_at: Some(Timestamp { + seconds: 1746543161, + nanos: 36149000, + }), + updated_at: Some(Timestamp { + seconds: 1746543161, + nanos: 36149000, + }), + external_inputs: vec![], + decomposed_regexes: vec![DecomposedRegex { + name: "Subject".to_string(), + max_match_length: 50, + location: "header".to_string(), + is_hashed: Some(false), + parts: vec![ + DecomposedRegexPart { + is_public: Some(false), + regex_def: "Welcome ".to_string(), + max_length: None, + }, + DecomposedRegexPart { + is_public: Some(true), + regex_def: "to the ".to_string(), + max_length: Some(20), + }, + DecomposedRegexPart { + is_public: Some(false), + regex_def: "Succinct ZK Residency!".to_string(), + max_length: None, + }, + ], + }], + client_status: 1, // InProgress + server_status: 3, // Done + version: 31, + github_username: "DimiDumo".to_string(), + email_header_max_length: 896, + remove_soft_linebreaks: false, + stars: 0, + ptau: 0, + num_local_proofs: 0, + }; + + let result = process_circuit(blueprint).await; + + if let Err(ref e) = result { + println!("Error: {:?}", e); + } + + // Assert the result + assert!(result.is_ok()); + } + + #[tokio::test] + async fn test_compile_circuit_kraken() { + let blueprint = Blueprint { + internal_version: "v2".to_string(), + id: "85255ee2-acfe-49ca-959c-edd009b53bb5".to_string(), + title: "Kraken KYC (Intermediate)".to_string(), + description: "Proof of Kraken Intermediate Account".to_string(), + slug: "Bisht13/krakenintermediate".to_string(), + tags: vec![], + email_query: "from:kraken.com".to_string(), + circuit_name: "krakenintermediate".to_string(), + ignore_body_hash_check: true, + sha_precompute_selector: "".to_string(), + email_body_max_length: 4096, + sender_domain: "kraken.com".to_string(), + enable_header_masking: false, + enable_body_masking: false, + client_zk_framework: 1, // Circom + server_zk_framework: 0, // None + verifier_contract_chain: 84532, + verifier_contract_address: "".to_string(), + is_public: true, + created_at: Some(Timestamp { + seconds: 1736325873, + nanos: 967251000, + }), + updated_at: Some(Timestamp { + seconds: 1736326473, + nanos: 627382000, + }), + external_inputs: vec![ExternalInput { + name: "test".to_string(), + max_length: 4096, + }], + decomposed_regexes: vec![DecomposedRegex { + name: "EmailSubject".to_string(), + max_match_length: 64, + location: "header".to_string(), + is_hashed: Some(true), + parts: vec![ + DecomposedRegexPart { + is_public: Some(true), + regex_def: "subject:".to_string(), + max_length: Some(20), + }, + DecomposedRegexPart { + is_public: Some(true), + regex_def: "Good news: your account is now Intermediate!".to_string(), + max_length: Some(20), + }, + ], + }], + client_status: 1, // InProgress + server_status: 3, // Done + version: 1, + github_username: "Bisht13".to_string(), + email_header_max_length: 1088, + remove_soft_linebreaks: false, + stars: 0, + ptau: 0, + num_local_proofs: 0, + }; + + // Call the handler with the mock uploader + let result = process_circuit(blueprint).await; + + if let Err(ref e) = result { + println!("Error: {:?}", e); + } + + // Assert the result + assert!(result.is_ok()); + } + + #[tokio::test] + async fn test_compile_circuit_subject_extract() { + let blueprint = Blueprint { + internal_version: "v2".to_string(), + id: "87ec6e2f-ca5a-4af8-ac85-2e2cc94602f0".to_string(), + title: "Sp1Residency".to_string(), + description: "Sp1Residency".to_string(), + slug: "DimiDumo/sp1_residency".to_string(), + tags: vec![], + email_query: "".to_string(), + circuit_name: "sp1_residency".to_string(), + ignore_body_hash_check: true, + sha_precompute_selector: "".to_string(), + email_body_max_length: 0, + sender_domain: "succinct.xyz".to_string(), + enable_header_masking: false, + enable_body_masking: false, + client_zk_framework: 1, // Circom + server_zk_framework: 0, // None + verifier_contract_chain: 0, + verifier_contract_address: "".to_string(), + is_public: true, + created_at: Some(Timestamp { + seconds: 1746543161, + nanos: 36149000, + }), + updated_at: Some(Timestamp { + seconds: 1746543161, + nanos: 36149000, + }), + external_inputs: vec![], + decomposed_regexes: vec![DecomposedRegex { + name: "Subject".to_string(), + max_match_length: 64, + location: "header".to_string(), + is_hashed: Some(false), + parts: vec![ + DecomposedRegexPart { + is_public: Some(false), + regex_def: "(?:\r\n|^)subject:".to_string(), + max_length: None, + }, + DecomposedRegexPart { + is_public: Some(true), + regex_def: "[a-z]+".to_string(), + max_length: Some(20), + }, + DecomposedRegexPart { + is_public: Some(false), + regex_def: "\r\n".to_string(), + max_length: None, + }, + ], + }], + client_status: 1, // InProgress + server_status: 3, // Done + version: 31, + github_username: "DimiDumo".to_string(), + email_header_max_length: 896, + remove_soft_linebreaks: false, + stars: 0, + ptau: 0, + num_local_proofs: 0, + }; + + // Call the handler with the mock uploader + let result = process_circuit(blueprint).await; + + if let Err(ref e) = result { + println!("Error: {:?}", e); + } + + // Assert the result + assert!(result.is_ok()); + } +} diff --git a/circom/src/payload.rs b/circom/src/payload.rs index f89f3b1..a643f8d 100644 --- a/circom/src/payload.rs +++ b/circom/src/payload.rs @@ -4,7 +4,7 @@ use anyhow::Result; use base64::Engine; use dotenv::dotenv; use relayer_utils::LOG; -use sdk_utils::Blueprint; +use sdk_utils::proto_types::proto_blueprint::Blueprint; use serde::Deserialize; use slog::info; @@ -42,6 +42,7 @@ pub struct UploadUrls { pub zkey_i: String, pub zkey_j: String, pub zkey_k: String, + pub circom_regex_graphs: String, } // Function to load the payload diff --git a/circom/src/template.rs b/circom/src/template.rs index 5dc9ac3..4aae943 100644 --- a/circom/src/template.rs +++ b/circom/src/template.rs @@ -1,11 +1,13 @@ -use std::collections::VecDeque; - use anyhow::Result; use regex::Regex; -use sdk_utils::{compute_signal_length, Blueprint, DecomposedRegex}; +use sdk_utils::{ + compute_signal_length, + proto_types::proto_blueprint::{Blueprint, DecomposedRegex}, +}; use serde::Serialize; +use std::fs; use tera::{Context, Tera}; -use zk_regex_compiler::{gen_circom_from_decomposed_regex, DecomposedRegexConfig, RegexPartConfig}; +use zk_regex_compiler::{gen_from_decomposed, DecomposedRegexConfig, ProvingFramework, RegexPart}; /// Represents a single decomposed regex, along with computed fields /// used for generating the circuit template. @@ -13,13 +15,14 @@ use zk_regex_compiler::{gen_circom_from_decomposed_regex, DecomposedRegexConfig, struct RegexEntry { name: String, uppercased_name: String, - max_length: usize, + max_match_length: usize, regex_circuit_name: String, location: String, max_length_of_location: usize, max_length_of_location_name: String, reveal_string: String, - has_public_parts: bool, + num_public_parts: usize, + public_parts_max_length: Vec, is_hashed: bool, regex_idx_name: String, num_reveal_signals: i32, @@ -43,7 +46,7 @@ pub struct CircuitTemplateInputs { ignore_body_hash_check: bool, enable_header_masking: bool, enable_body_masking: bool, - remove_soft_line_breaks: bool, + remove_soft_linebreaks: bool, regexes: Vec, external_inputs: Vec, public_args_string: String, @@ -51,116 +54,121 @@ pub struct CircuitTemplateInputs { impl From for CircuitTemplateInputs { fn from(value: Blueprint) -> Self { - let circuit_name = value.circuit_name.unwrap_or_else(|| "circuit".to_string()); - let email_header_max_length = value.email_header_max_length.unwrap_or(1024); - let email_body_max_length = value.email_body_max_length.unwrap_or(2048); - let ignore_body_hash_check = value.ignore_body_hash_check.unwrap_or(false); - let enable_header_masking = value.enable_header_masking.unwrap_or(false); - let enable_body_masking = value.enable_body_masking.unwrap_or(false); - let remove_soft_line_breaks = value - .remove_soft_line_breaks - .unwrap_or(!ignore_body_hash_check); + let circuit_name = value.circuit_name; + let email_header_max_length = value.email_header_max_length as usize; + let email_body_max_length = value.email_body_max_length as usize; + let ignore_body_hash_check = value.ignore_body_hash_check; + let enable_header_masking = value.enable_header_masking; + let enable_body_masking = value.enable_body_masking; + let remove_soft_linebreaks = value.remove_soft_linebreaks; // Process regexes let mut regexes = Vec::new(); - if let Some(decomposed_regexes) = value.decomposed_regexes { - for regex in decomposed_regexes { - let name = regex.name.clone(); - let uppercased_name = name.to_uppercase(); - let max_length = regex.max_length; - let regex_circuit_name = format!("{}Regex", regex.name); - // Determine location and its max length - let (location, max_length_of_location, max_length_of_location_name) = - if regex.location == "header" { - ( - "emailHeader".to_string(), - email_header_max_length, - "maxHeaderLength".to_string(), - ) - } else if remove_soft_line_breaks { - ( - "decodedEmailBodyIn".to_string(), - email_body_max_length, - "maxBodyLength".to_string(), - ) + for regex in value.decomposed_regexes { + let name = regex.name.clone(); + let uppercased_name = name.to_uppercase(); + let max_match_length = regex.max_match_length as usize; + let regex_circuit_name = format!("{}_regex", regex.name); + + // Determine location and its max length + let (location, max_length_of_location, max_length_of_location_name) = + if regex.location == "header" { + ( + "emailHeader".to_string(), + email_header_max_length as usize, + "maxHeaderLength".to_string(), + ) + } else if remove_soft_linebreaks { + ( + "decodedEmailBodyIn".to_string(), + email_body_max_length as usize, + "maxBodyLength".to_string(), + ) + } else { + ( + "emailBody".to_string(), + email_body_max_length as usize, + "maxBodyLength".to_string(), + ) + }; + + // Compute reveal and indexing strings + let mut reveal_string = String::new(); + let mut num_public_parts = 0; + let mut public_parts_max_length = Vec::new(); + let is_hashed = regex.is_hashed.unwrap_or(false); + let mut regex_idx_name = String::new(); + let mut num_reveal_signals: i32 = -1; + let mut signal_regex_out_string = String::new(); + + for part in ®ex.parts { + if part.is_public == Some(true) { + num_reveal_signals += 1; + if regex_idx_name.is_empty() { + regex_idx_name = format!("{}RegexIdx", name); } else { - ( - "emailBody".to_string(), - email_body_max_length, - "maxBodyLength".to_string(), - ) - }; + regex_idx_name + .push_str(&format!(", {}RegexIdx{}", name, num_reveal_signals)); + } - // Compute reveal and indexing strings - let mut reveal_string = String::new(); - let mut has_public_parts = false; - let is_hashed = regex.is_hashed; - let mut regex_idx_name = String::new(); - let mut num_reveal_signals: i32 = -1; - let mut signal_regex_out_string = String::new(); + num_public_parts += 1; + public_parts_max_length.push(part.max_length() as usize); - for part in ®ex.parts { - if part.is_public { - num_reveal_signals += 1; - if regex_idx_name.is_empty() { - regex_idx_name = format!("{}RegexIdx", name); - } else { - regex_idx_name - .push_str(&format!(", {}RegexIdx{}", name, num_reveal_signals)); - } + if num_reveal_signals == 0 { + signal_regex_out_string.push_str(&format!( + ", {}RegexReveal[{}]", + name, + part.max_length() + )); + } else { + signal_regex_out_string.push_str(&format!( + ", {}RegexReveal{}[{}]", + name, + num_reveal_signals, + part.max_length() + )); + } - has_public_parts = true; - if reveal_string.is_empty() { - reveal_string.push_str(&format!(", {}RegexReveal", name)); - } else { - reveal_string - .push_str(&format!(", {}RegexReveal{}", name, num_reveal_signals)); - } - if num_reveal_signals == 0 { - signal_regex_out_string.push_str(&format!( - ", {}RegexReveal[{}]", - name, max_length_of_location - )); - } else { - signal_regex_out_string.push_str(&format!( - ", {}RegexReveal{}[{}]", - name, num_reveal_signals, max_length_of_location - )); - } + if reveal_string.is_empty() { + reveal_string.push_str(&format!(", {}RegexReveal", name)); + } else { + reveal_string + .push_str(&format!(", {}RegexReveal{}", name, num_reveal_signals)); } } + } - // Increment once more to account for indexing - num_reveal_signals += 1; + // Increment once more to account for indexing + num_reveal_signals += 1; - regexes.push(RegexEntry { - name, - uppercased_name, - max_length, - regex_circuit_name, - location, - max_length_of_location, - max_length_of_location_name, - reveal_string, - has_public_parts, - is_hashed: is_hashed.unwrap_or(false), - regex_idx_name, - num_reveal_signals, - signal_regex_out_string, - }); - } + regexes.push(RegexEntry { + name, + uppercased_name, + max_match_length, + regex_circuit_name, + location, + max_length_of_location, + max_length_of_location_name, + reveal_string, + num_public_parts, + public_parts_max_length, + is_hashed, + regex_idx_name, + num_reveal_signals, + signal_regex_out_string, + }); } // Process external inputs - let external_inputs_data = value.external_inputs.unwrap_or_default(); - let external_inputs: Vec = external_inputs_data + let external_inputs: Vec = value + .external_inputs .iter() .map(|input| { - let signal_length = compute_signal_length(input.max_length); + let signal_length = compute_signal_length(input.max_length as usize); ExternalInputEntry { name: input.name.clone(), - max_length: input.max_length, + max_length: input.max_length as usize, signal_length, } }) @@ -180,7 +188,7 @@ impl From for CircuitTemplateInputs { ignore_body_hash_check, enable_header_masking, enable_body_masking, - remove_soft_line_breaks, + remove_soft_linebreaks, regexes, external_inputs, public_args_string, @@ -217,8 +225,8 @@ pub fn generate_circuit(circuit_template_input: CircuitTemplateInputs) -> Result &circuit_template_input.enable_body_masking, ); context.insert( - "remove_soft_line_breaks", - &circuit_template_input.remove_soft_line_breaks, + "remove_soft_linebreaks", + &circuit_template_input.remove_soft_linebreaks, ); context.insert("regexes", &circuit_template_input.regexes); context.insert("external_inputs", &circuit_template_input.external_inputs); @@ -234,32 +242,32 @@ pub fn generate_circuit(circuit_template_input: CircuitTemplateInputs) -> Result } /// Generates CIRCOM files for the provided decomposed regexes. -pub fn generate_regex_circuits(decomposed_regexes: Option>) -> Result<()> { - if let Some(decomposed_regexes) = decomposed_regexes { - for decomposed_regex in decomposed_regexes { - let mut decomposed_regex_config = VecDeque::new(); - for part in decomposed_regex.parts { - let part_config = RegexPartConfig { - is_public: part.is_public, - regex_def: part.regex_def.clone(), - }; - decomposed_regex_config.push_back(part_config); +pub fn generate_regex_circuits(decomposed_regexes: Vec) -> Result<()> { + for decomposed_regex in decomposed_regexes { + let mut decomposed_regex_config = Vec::new(); + for part in decomposed_regex.parts.clone() { + if part.is_public == Some(true) { + decomposed_regex_config.push(RegexPart::PublicPattern(( + part.regex_def, + part.max_length.unwrap() as usize, + ))); + } else { + decomposed_regex_config.push(RegexPart::Pattern(part.regex_def)); } + } - let config = DecomposedRegexConfig { - parts: decomposed_regex_config, - }; + let config = DecomposedRegexConfig { + parts: decomposed_regex_config, + }; - gen_circom_from_decomposed_regex( - &mut config.clone(), - Some(&format!( - "./tmp/regex/{}Regex.circom", - decomposed_regex.name - )), - Some(&format!("{}Regex", decomposed_regex.name)), - Some(true), - )?; - } + let (graph, code) = + gen_from_decomposed(config, &decomposed_regex.name, ProvingFramework::Circom)?; + + let file_path = format!("./tmp/regex/{}_regex.circom", decomposed_regex.name); + fs::write(file_path, code)?; + let graph_path = format!("./tmp/regex/{}_regex.json", decomposed_regex.name); + fs::write(graph_path, serde_json::to_string(&graph)?)?; } + Ok(()) } diff --git a/circom/templates/template.circom.tera b/circom/templates/template.circom.tera index 28f447d..faa6b5a 100644 --- a/circom/templates/template.circom.tera +++ b/circom/templates/template.circom.tera @@ -24,7 +24,7 @@ template {{ circuit_name }}(maxHeaderLength, maxBodyLength, n, k, packSize) { {% endfor %} // DKIM Verification - component EV = EmailVerifier(maxHeaderLength, maxBodyLength, n, k, {% if ignore_body_hash_check %}1{% else %}0{% endif %}, {% if enable_header_masking %}1{% else %}0{% endif %}, {% if enable_body_masking %}1{% else %}0{% endif %}, {% if remove_soft_line_breaks %}1{% else %}0{% endif %}); + component EV = EmailVerifier(maxHeaderLength, maxBodyLength, n, k, {% if ignore_body_hash_check %}1{% else %}0{% endif %}, {% if enable_header_masking %}1{% else %}0{% endif %}, {% if enable_body_masking %}1{% else %}0{% endif %}, {% if remove_soft_linebreaks %}1{% else %}0{% endif %}); EV.emailHeader <== emailHeader; EV.emailHeaderLength <== emailHeaderLength; EV.pubkey <== pubkey; @@ -32,16 +32,30 @@ template {{ circuit_name }}(maxHeaderLength, maxBodyLength, n, k, packSize) { {% if not ignore_body_hash_check %} signal input bodyHashIndex; + signal input bodyHashMatchStart; + signal input bodyHashMatchLength; + signal input bodyHashCurrStates[maxHeaderLength-1]; + signal input bodyHashNextStates[maxHeaderLength-1]; + signal input bodyHashCaptureGroup1Id[maxHeaderLength-1]; + signal input bodyHashCaptureGroup1Start[maxHeaderLength-1]; + signal input bodyHashCaptureGroupStartIndices[1]; signal input precomputedSHA[32]; signal input emailBody[maxBodyLength]; signal input emailBodyLength; EV.bodyHashIndex <== bodyHashIndex; + EV.bodyHashMatchStart <== bodyHashMatchStart; + EV.bodyHashMatchLength <== bodyHashMatchLength; + EV.bodyHashCurrStates <== bodyHashCurrStates; + EV.bodyHashNextStates <== bodyHashNextStates; + EV.bodyHashCaptureGroup1Id <== bodyHashCaptureGroup1Id; + EV.bodyHashCaptureGroup1Start <== bodyHashCaptureGroup1Start; + EV.bodyHashCaptureGroupStartIndices <== bodyHashCaptureGroupStartIndices; EV.precomputedSHA <== precomputedSHA; EV.emailBody <== emailBody; EV.emailBodyLength <== emailBodyLength; - {% if remove_soft_line_breaks %} + {% if remove_soft_linebreaks %} signal input decodedEmailBodyIn[maxBodyLength]; EV.decodedEmailBodyIn <== decodedEmailBodyIn; @@ -75,32 +89,43 @@ template {{ circuit_name }}(maxHeaderLength, maxBodyLength, n, k, packSize) { // Used for nullifier later signal output headerHashHi <== EV.shaHi; signal output headerHashLo <== EV.shaLo; + {% for regex in regexes %} // {{ regex.uppercased_name }} Extraction - {% if regex.has_public_parts %} - var {{ regex.name }}MaxLength = {{ regex.max_length }}; - signal input {{ regex.regex_idx_name }}; + signal input {{ regex.name }}MatchStart; + signal input {{ regex.name }}MatchLength; + signal input {{ regex.name }}CurrentStates[{{ regex.max_match_length }}]; + signal input {{ regex.name }}NextStates[{{ regex.max_match_length }}]; + {% if regex.num_public_parts > 0 %} + {% for i in range(end=regex.num_public_parts) %} + signal input {{ regex.name }}CaptureGroup{{ i }}Id[{{ regex.max_match_length }}]; + signal input {{ regex.name }}CaptureGroup{{ i }}Start[{{ regex.max_match_length }}]; + {% endfor %} + signal input {{ regex.name }}CaptureGroupStartIndices[{{ regex.num_public_parts }}]; {% endif %} + signal {{ regex.name }}RegexOut{{ regex.signal_regex_out_string }}; - ({{ regex.name }}RegexOut{{ regex.reveal_string }}) <== {{ regex.regex_circuit_name }}({{ regex.max_length_of_location_name }})({{ regex.location }}); + ({{ regex.name }}RegexOut{{ regex.reveal_string }}) <== {{ regex.name }}Regex({{ regex.max_length_of_location_name }}, {{ regex.max_match_length}})({{ regex.location }}, {{ regex.name }}MatchStart, {{ regex.name }}MatchLength, {{ regex.name }}CurrentStates, {{ regex.name }}NextStates{% if regex.num_public_parts > 0 %}, {{ regex.name }}CaptureGroup0Id, {{ regex.name }}CaptureGroup0Start, {{ regex.name }}CaptureGroupStartIndices{% endif %}); {{ regex.name }}RegexOut === 1; - {% if regex.has_public_parts %} + + {% if regex.num_public_parts > 0 %} + var {{ regex.name }}MaxLength = {{ regex.max_match_length }}; {% if regex.is_hashed %} var {{ regex.name }}TotalPackedLength = computeIntChunkLength({{ regex.name }}MaxLength) * {{ regex.num_reveal_signals }}; signal {{ regex.name }}AllPackedOut[{{ regex.name }}TotalPackedLength]; {% endif %} {% for i in range(end=regex.num_reveal_signals) %} {% if i == 0 %} - signal {% if not regex.is_hashed %}output {% endif %}{{ regex.name }}PackedOut[computeIntChunkLength({{ regex.name }}MaxLength)]; - {{ regex.name }}PackedOut <== PackRegexReveal({{ regex.max_length_of_location_name }}, {{ regex.name }}MaxLength)({{ regex.name }}RegexReveal, {{ regex.name }}RegexIdx); + signal {% if not regex.is_hashed %}output {% endif %}{{ regex.name }}PackedOut[computeIntChunkLength({{ regex.public_parts_max_length[i] }})]; + {{ regex.name }}PackedOut <== PackRegexReveal({{ regex.public_parts_max_length[i] }}, {{ regex.public_parts_max_length[i] }})({{ regex.name }}RegexReveal, 0); {% if regex.is_hashed %} for (var j = 0; j < computeIntChunkLength({{ regex.name }}MaxLength); j++) { {{ regex.name }}AllPackedOut[j] <== {{ regex.name }}PackedOut[j]; } {% endif %} {% else %} - signal {% if not regex.is_hashed %}output {% endif %}{{ regex.name }}PackedOut{{ i }}[computeIntChunkLength({{ regex.name }}MaxLength)]; - {{ regex.name }}PackedOut{{ i }} <== PackRegexReveal({{ regex.max_length_of_location_name }}, {{ regex.name }}MaxLength)({{ regex.name }}RegexReveal{{ i }}, {{ regex.name }}RegexIdx{{ i }}); + signal {% if not regex.is_hashed %}output {% endif %}{{ regex.name }}PackedOut{{ i }}[computeIntChunkLength({{ regex.public_parts_max_length[i] }})]; + {{ regex.name }}PackedOut{{ i }} <== PackRegexReveal({{ regex.public_parts_max_length[i] }}, {{ regex.public_parts_max_length[i] }})({{ regex.name }}RegexReveal{{ i }}, 0); {% if regex.is_hashed %} for (var j = 0; j < computeIntChunkLength({{ regex.name }}MaxLength); j++) { {{ regex.name }}AllPackedOut[j + ({{ i }} * computeIntChunkLength({{ regex.name }}MaxLength))] <== {{ regex.name }}PackedOut{{ i }}[j]; diff --git a/circom/yarn.lock b/circom/yarn.lock index 4bff23a..32662d4 100644 --- a/circom/yarn.lock +++ b/circom/yarn.lock @@ -24,21 +24,29 @@ ffjavascript "^0.3.0" "@openzeppelin/contracts-upgradeable@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.1.0.tgz#4d37648b7402929c53e2ff6e45749ecff91eb2b6" - integrity sha512-AIElwP5Ck+cslNE+Hkemf5SxjJoF4wBvvjxc27Rp+9jaPs/CLIaUBMYe1FNzhdiN0cYuwGRmYaRHmmntuiju4Q== + version "5.4.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.4.0.tgz#a325066da702d0a8be091eb17136d3e9c92cc76a" + integrity sha512-STJKyDzUcYuB35Zub1JpWW58JxvrFFVgQ+Ykdr8A9PGXgtq/obF5uoh07k2XmFyPxfnZdPdBdhkJ/n2YxJ87HQ== "@openzeppelin/contracts@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.1.0.tgz#4e61162f2a2bf414c4e10c45eca98ce5f1aadbd4" - integrity sha512-p1ULhl7BXzjjbha5aqst+QMLY+4/LCWADXOCsmLHRM77AqiPjnd9vvUN9sosUfhL9JGKpZ0TjEGxgvnizmWGSA== + version "5.4.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.4.0.tgz#177594bdb2d86c71f5d1052fe40cb4edb95fb20f" + integrity sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A== -"@zk-email/circuits@^6.3.3": - version "6.3.3" - resolved "https://registry.yarnpkg.com/@zk-email/circuits/-/circuits-6.3.3.tgz#82d40b4d57eefefaa64c408bff63ea4fc863a6ff" - integrity sha512-YwyeMhmyRNausmvIsNB/lLiRgj/qbWTD0ZpSsfW7goQQPkAhRieyImK8ik0g0YVFvPtGsEw2msd4Q+tSVRvKGw== +"@zk-email/circuits@6.3.4": + version "6.3.4" + resolved "https://registry.yarnpkg.com/@zk-email/circuits/-/circuits-6.3.4.tgz#3f3bc86e55dd6d974d3320feaa886f6527786561" + integrity sha512-owfgfUyjgMOZuinEIK1vDNgwDU7aQyJMeED+pjcEWHHoPYcuxKLBiBiI+kfN9Rwd2kjZgM50zJ3yRg+1N9hTHw== dependencies: - "@zk-email/zk-regex-circom" "^2.3.1" + "@zk-email/zk-regex-circom" "2.3.2" + circomlib "^2.0.5" + +"@zk-email/circuits@6.4.1-alpha.0": + version "6.4.1-alpha.0" + resolved "https://registry.yarnpkg.com/@zk-email/circuits/-/circuits-6.4.1-alpha.0.tgz#428bc44b8abc5a32668aa1e7316d01a854e9d146" + integrity sha512-Qjjz1b3tQUjzRmgaBrU//IqcGUUngxsRpnbt9fZ0A5bUt+EEnWDBq2iSKOuU5Cwlg1L6YxUVaCFUKkncVAWBaw== + dependencies: + "@zk-email/zk-regex-circom" "2.2.2-alpha.0" circomlib "^2.0.5" "@zk-email/contracts@^6.1.3": @@ -50,10 +58,19 @@ "@openzeppelin/contracts-upgradeable" "^5.0.0" dotenv "^16.3.1" -"@zk-email/zk-regex-circom@^2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@zk-email/zk-regex-circom/-/zk-regex-circom-2.3.1.tgz#032cdf12b5f587f828d6e872a235c0120d463bc8" - integrity sha512-FJNi4QL07teQPuXV4EZqosPpA4riOSeFX2xD+cd4CCuf5b1RmqGqXoBz7yxT0QXuwNqdgooY6v6/xhH1o4X7vg== +"@zk-email/zk-regex-circom@2.2.2-alpha.0": + version "2.2.2-alpha.0" + resolved "https://registry.yarnpkg.com/@zk-email/zk-regex-circom/-/zk-regex-circom-2.2.2-alpha.0.tgz#4190a451ad4bbfaa0d85092ad86a40f0d1469873" + integrity sha512-9ljwGXZYHfiumTlBvxH2VuvZUgs3K0vKK2JAfiyuqjLMKc/W8J95AGgrgbtLzQq7gNdhPfarSKmF/KpYmbzFJg== + dependencies: + "@zk-email/circuits" "6.3.4" + circomlib "^2.0.5" + prettier "" + +"@zk-email/zk-regex-circom@2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@zk-email/zk-regex-circom/-/zk-regex-circom-2.3.2.tgz#d3ad819ea0de3ce7612aa9ecde0497c3fac514fc" + integrity sha512-GXp4Z/93iF54hfJwlWl52HFiqpmLCeSHFc4HlYpxj5EWHQK6ibFQMLUWTJsdA3eh/erjO4UX+HlEIJ/gHhLg9g== dependencies: commander "^11.0.0" snarkjs "^0.7.5" @@ -115,17 +132,17 @@ bluebird@^3.7.2: integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + version "1.1.12" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" + integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + version "2.0.2" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" + integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== dependencies: balanced-match "^1.0.0" @@ -189,9 +206,9 @@ deep-is@~0.1.3: integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== dotenv@^16.3.1: - version "16.4.5" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" - integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + version "16.6.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.6.1.tgz#773f0e69527a8315c7285d5ee73c4459d20a8020" + integrity sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow== "ds-test@https://github.com/dapphub/ds-test": version "1.0.0" @@ -296,8 +313,8 @@ filelist@^1.0.4: minimatch "^5.0.1" "forge-std@https://github.com/foundry-rs/forge-std": - version "1.9.4" - resolved "https://github.com/foundry-rs/forge-std#2b59872eee0b8088ddcade39fe8c041e17bb79c0" + version "1.9.7" + resolved "https://github.com/foundry-rs/forge-std#60acb7aaadcce2d68e52986a0a66fe79f07d138f" has-flag@^4.0.0: version "4.0.0" @@ -382,6 +399,11 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== +prettier@: + version "3.6.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" + integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== + r1csfile@0.0.35: version "0.0.35" resolved "https://registry.yarnpkg.com/r1csfile/-/r1csfile-0.0.35.tgz#07e956108d28cf9d388562e9fcc068880c517ed8" @@ -507,9 +529,9 @@ web-worker@1.2.0: integrity sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA== web-worker@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.3.0.tgz#e5f2df5c7fe356755a5fb8f8410d4312627e6776" - integrity sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA== + version "1.5.0" + resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.5.0.tgz#71b2b0fbcc4293e8f0aa4f6b8a3ffebff733dcc5" + integrity sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw== word-wrap@~1.2.3: version "1.2.5" diff --git a/noir/Cargo.toml b/noir/Cargo.toml index 9206cf3..339aa3a 100644 --- a/noir/Cargo.toml +++ b/noir/Cargo.toml @@ -25,7 +25,7 @@ slog = { version = "2.7.0", features = [ "max_level_trace", "release_max_level_warn", ] } -zk-regex-compiler = { git = "https://github.com/zkemail/zk-regex", branch = "feat/new-compiler" } +zk-regex-compiler = { git = "https://github.com/zkemail/zk-regex", rev = "47abcf15a11dab727d24d9f6f044f8e17b9498b5" } base64 = "0.22.1" dotenv = "0.15.0" axum = "0.8.3" diff --git a/noir/Dockerfile b/noir/Dockerfile index 5201692..e97b0cc 100644 --- a/noir/Dockerfile +++ b/noir/Dockerfile @@ -23,12 +23,12 @@ RUN apt update && \ # Install Noir RUN curl -L https://raw.githubusercontent.com/noir-lang/noirup/refs/heads/main/install | bash ENV PATH="/root/.nargo/bin:$PATH" -RUN noirup --version 1.0.0-beta.4 +RUN noirup --version 1.0.0-beta.5 # Install Barrentenberg RUN curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash ENV PATH="/root/.bb:$PATH" -RUN bbup --version 0.82.2 +RUN bbup --version 0.84.0 # Install Rust RUN curl https://sh.rustup.rs -sSf | bash -s -- -y diff --git a/noir/src/circuit_generator.rs b/noir/src/circuit_generator.rs index 97f8902..276b364 100644 --- a/noir/src/circuit_generator.rs +++ b/noir/src/circuit_generator.rs @@ -24,8 +24,8 @@ pub fn generate_circuit(circuit_template_input: CircuitTemplateInputs) -> Result &circuit_template_input.ignore_body_hash_check, ); context.insert( - "remove_soft_line_breaks", - &circuit_template_input.remove_soft_line_breaks, + "remove_soft_linebreaks", + &circuit_template_input.remove_soft_linebreaks, ); context.insert("regexes", &circuit_template_input.regexes); context.insert("external_inputs", &circuit_template_input.external_inputs); diff --git a/noir/src/filesystem.rs b/noir/src/filesystem.rs index b6852ac..c0dc274 100644 --- a/noir/src/filesystem.rs +++ b/noir/src/filesystem.rs @@ -8,7 +8,7 @@ use crate::handlers::UploadUrls; #[cfg_attr(test, mockall::automock)] pub trait FileUploader { - async fn upload_files(&self, upload_urls: UploadUrls) -> Result<()>; + fn upload_files(&self, upload_urls: UploadUrls) -> impl Future> + Send; } pub struct ProductionFileUploader; diff --git a/noir/src/handlers.rs b/noir/src/handlers.rs index 6e985f6..cdcf294 100644 --- a/noir/src/handlers.rs +++ b/noir/src/handlers.rs @@ -1,7 +1,6 @@ use anyhow::Result; use axum::{extract::Json, http::StatusCode, response::IntoResponse}; use relayer_utils::LOG; -// use sdk_utils::Blueprint; use sdk_utils::proto_types::proto_blueprint::Blueprint; use serde::Deserialize; use slog::info; @@ -95,9 +94,10 @@ mod tests { mock_uploader .expect_upload_files() .times(1) - .returning(|_| Ok(())); + .returning(|_| Box::pin(async { Ok(()) })); let blueprint = Blueprint { + internal_version: "v2".to_string(), id: "4478f3bc-9ba8-4906-ba87-09fc049cef46".to_string(), title: "XAccountExportData".to_string(), description: @@ -106,7 +106,6 @@ mod tests { slug: "DimiDumo/XAccountExportData".to_string(), tags: vec![], email_query: "from:x.com".to_string(), - use_new_sdk: false, circuit_name: "XAccountExportData".to_string(), ignore_body_hash_check: false, sha_precompute_selector: "".to_string(), @@ -130,17 +129,19 @@ mod tests { external_inputs: vec![], decomposed_regexes: vec![DecomposedRegex { name: "download_data_link".to_string(), - max_length: 128, + max_match_length: 128, location: "body".to_string(), - is_hashed: false, + is_hashed: Some(false), parts: vec![ DecomposedRegexPart { is_public: Some(false), regex_def: "ready for you to download ".to_string(), + max_length: None, }, DecomposedRegexPart { is_public: Some(true), regex_def: "[^ ]*".to_string(), + max_length: Some(20), }, ], }], @@ -195,16 +196,16 @@ mod tests { mock_uploader .expect_upload_files() .times(1) - .returning(|_| Ok(())); + .returning(|_| Box::pin(async { Ok(()) })); let blueprint = Blueprint { + internal_version: "v2".to_string(), id: "88802381-0501-4c4a-bcb5-03fdeacf453e".to_string(), title: "AppleKYC".to_string(), description: "Prove you have a valid Apple account".to_string(), slug: "DimiDumo/AppleKYC".to_string(), tags: vec![], email_query: "from:email.apple.com".to_string(), - use_new_sdk: false, circuit_name: "AppleKYC".to_string(), ignore_body_hash_check: true, sha_precompute_selector: "".to_string(), @@ -232,25 +233,27 @@ mod tests { decomposed_regexes: vec![ DecomposedRegex { name: "subject".to_string(), - max_length: 256, + max_match_length: 256, location: "header".to_string(), - is_hashed: false, + is_hashed: Some(false), parts: vec![ DecomposedRegexPart { is_public: Some(false), regex_def: "(?:\r\n|^)subject:".to_string(), + max_length: None, }, DecomposedRegexPart { is_public: Some(true), regex_def: "[^\r\n]+".to_string(), + max_length: Some(20), }, DecomposedRegexPart { is_public: Some(false), regex_def: "\r\n".to_string(), + max_length: None, }, ], - }, - // Other DecomposedRegex objects omitted for brevity - add them if needed + }, // Other DecomposedRegex objects omitted for brevity - add them if needed ], client_status: 1, // InProgress server_status: 3, // Done @@ -302,16 +305,16 @@ mod tests { mock_uploader .expect_upload_files() .times(1) - .returning(|_| Ok(())); + .returning(|_| Box::pin(async { Ok(()) })); let blueprint = Blueprint { + internal_version: "v2".to_string(), id: "87ec6e2f-ca5a-4af8-ac85-2e2cc94602f0".to_string(), title: "Sp1Residency".to_string(), description: "Sp1Residency".to_string(), slug: "DimiDumo/sp1_residency".to_string(), tags: vec![], email_query: "".to_string(), - use_new_sdk: false, circuit_name: "sp1_residency".to_string(), ignore_body_hash_check: true, sha_precompute_selector: "".to_string(), @@ -335,21 +338,24 @@ mod tests { external_inputs: vec![], decomposed_regexes: vec![DecomposedRegex { name: "subject".to_string(), - max_length: 50, + max_match_length: 50, location: "header".to_string(), - is_hashed: false, + is_hashed: Some(false), parts: vec![ DecomposedRegexPart { is_public: Some(false), regex_def: "Welcome ".to_string(), + max_length: None, }, DecomposedRegexPart { is_public: Some(true), regex_def: "to the ".to_string(), + max_length: Some(20), }, DecomposedRegexPart { is_public: Some(false), regex_def: "Succinct ZK Residency!".to_string(), + max_length: None, }, ], }], @@ -399,16 +405,16 @@ mod tests { mock_uploader .expect_upload_files() .times(1) - .returning(|_| Ok(())); + .returning(|_| Box::pin(async { Ok(()) })); let blueprint = Blueprint { + internal_version: "v2".to_string(), id: "85255ee2-acfe-49ca-959c-edd009b53bb5".to_string(), title: "Kraken KYC (Intermediate)".to_string(), description: "Proof of Kraken Intermediate Account".to_string(), slug: "Bisht13/krakenintermediate".to_string(), tags: vec![], email_query: "from:kraken.com".to_string(), - use_new_sdk: false, circuit_name: "krakenintermediate".to_string(), ignore_body_hash_check: true, sha_precompute_selector: "".to_string(), @@ -435,17 +441,19 @@ mod tests { }], decomposed_regexes: vec![DecomposedRegex { name: "email_subject".to_string(), - max_length: 64, + max_match_length: 64, location: "header".to_string(), - is_hashed: true, + is_hashed: Some(true), parts: vec![ DecomposedRegexPart { is_public: Some(true), regex_def: "subject:".to_string(), + max_length: Some(20), }, DecomposedRegexPart { is_public: Some(true), regex_def: "Good news: your account is now Intermediate!".to_string(), + max_length: Some(20), }, ], }], @@ -495,16 +503,16 @@ mod tests { mock_uploader .expect_upload_files() .times(1) - .returning(|_| Ok(())); + .returning(|_| Box::pin(async { Ok(()) })); let blueprint = Blueprint { + internal_version: "v2".to_string(), id: "87ec6e2f-ca5a-4af8-ac85-2e2cc94602f0".to_string(), title: "Sp1Residency".to_string(), description: "Sp1Residency".to_string(), slug: "DimiDumo/sp1_residency".to_string(), tags: vec![], email_query: "".to_string(), - use_new_sdk: false, circuit_name: "sp1_residency".to_string(), ignore_body_hash_check: true, sha_precompute_selector: "".to_string(), @@ -528,21 +536,24 @@ mod tests { external_inputs: vec![], decomposed_regexes: vec![DecomposedRegex { name: "subject".to_string(), - max_length: 64, + max_match_length: 64, location: "header".to_string(), - is_hashed: false, + is_hashed: Some(false), parts: vec![ DecomposedRegexPart { is_public: Some(false), regex_def: "(?:\r\n|^)subject:".to_string(), + max_length: None, }, DecomposedRegexPart { is_public: Some(true), regex_def: "[a-z]+".to_string(), + max_length: Some(20), }, DecomposedRegexPart { is_public: Some(false), regex_def: "\r\n".to_string(), + max_length: None, }, ], }], diff --git a/noir/src/models.rs b/noir/src/models.rs index 76de9fa..82b0273 100644 --- a/noir/src/models.rs +++ b/noir/src/models.rs @@ -7,11 +7,12 @@ use serde::Serialize; #[derive(Serialize)] pub struct RegexEntry { pub name: String, - pub max_length: usize, + pub max_match_length: usize, pub regex_circuit_name: String, pub location: String, pub max_length_of_location: usize, pub num_public_parts: usize, + pub public_parts_max_length: Vec, pub is_hashed: bool, pub hash_packing_size: usize, pub hash_inputs: String, @@ -33,7 +34,7 @@ pub struct CircuitTemplateInputs { pub email_header_max_length: usize, pub email_body_max_length: usize, pub ignore_body_hash_check: bool, - pub remove_soft_line_breaks: bool, + pub remove_soft_linebreaks: bool, pub regexes: Vec, pub external_inputs: Vec, pub output_args: String, @@ -46,33 +47,35 @@ impl From for CircuitTemplateInputs { let email_header_max_length = value.email_header_max_length as usize; let email_body_max_length = value.email_body_max_length as usize; let ignore_body_hash_check = value.ignore_body_hash_check; - let remove_soft_line_breaks = value.remove_soft_linebreaks; + let remove_soft_linebreaks = value.remove_soft_linebreaks; // Process regexes let mut regexes = Vec::new(); for regex in value.decomposed_regexes { let name = regex.name.clone(); - let max_length = regex.max_length as usize; + let max_match_length = regex.max_match_length as usize; let regex_circuit_name = format!("{}_regex", regex.name); // Determine location and its max length let (location, max_length_of_location) = if regex.location == "header" { ("header".to_string(), email_header_max_length) - } else if remove_soft_line_breaks { + } else if remove_soft_linebreaks { ("decoded_body".to_string(), email_body_max_length) } else { ("body".to_string(), email_body_max_length) }; let mut num_public_parts = 0; - let is_hashed = regex.is_hashed; + let mut public_parts_max_length = Vec::::with_capacity(num_public_parts); + let is_hashed = regex.is_hashed.unwrap_or(false); let mut hash_inputs = Vec::new(); let mut capture_string = String::new(); - let hash_packing_size = (max_length as f64 / 31.0).ceil() as usize; + let hash_packing_size = ((max_match_length as f64) / 31.0).ceil() as usize; for part in ®ex.parts { if part.is_public == Some(true) { num_public_parts += 1; + public_parts_max_length.push(part.max_length() as usize); for i in 0..hash_packing_size { hash_inputs.push(format!( @@ -93,11 +96,12 @@ impl From for CircuitTemplateInputs { regexes.push(RegexEntry { name, - max_length, + max_match_length, regex_circuit_name, location, max_length_of_location, num_public_parts, + public_parts_max_length, is_hashed, hash_packing_size, hash_inputs: if is_hashed { @@ -137,12 +141,15 @@ impl From for CircuitTemplateInputs { } else { output_signals.push_str(&format!(", {}", regex.capture_string)); } - for _ in 0..regex.num_public_parts { + for i in 0..regex.num_public_parts { if regex.is_hashed { output_args.push_str(", Field"); break; } else { - output_args.push_str(&format!(", BoundedVec", regex.max_length)); + output_args.push_str(&format!( + ", BoundedVec", + regex.public_parts_max_length[i] + )); } } } @@ -153,7 +160,7 @@ impl From for CircuitTemplateInputs { email_header_max_length, email_body_max_length, ignore_body_hash_check, - remove_soft_line_breaks, + remove_soft_linebreaks, regexes, external_inputs, output_args, diff --git a/noir/src/regex_generator.rs b/noir/src/regex_generator.rs index d3de454..39ebde9 100644 --- a/noir/src/regex_generator.rs +++ b/noir/src/regex_generator.rs @@ -1,4 +1,4 @@ -use anyhow::Result; +use anyhow::{Result, anyhow}; use sdk_utils::proto_types::proto_blueprint::DecomposedRegex; use std::fs; use zk_regex_compiler::{DecomposedRegexConfig, ProvingFramework, RegexPart, gen_from_decomposed}; @@ -9,10 +9,15 @@ pub fn generate_regex_circuits(decomposed_regexes: &Vec) -> Res let mut decomposed_regex_config = Vec::new(); for part in decomposed_regex.parts.clone() { if part.is_public == Some(true) { - decomposed_regex_config.push(RegexPart::PublicPattern(( - part.regex_def, - decomposed_regex.max_length.try_into().unwrap(), - ))); + let max_length = part.max_length.ok_or_else(|| { + anyhow!( + "max_length is required for public regex part '{}' in regex '{}', but was not provided", + part.regex_def, + decomposed_regex.name + ) + })? as usize; + decomposed_regex_config + .push(RegexPart::PublicPattern((part.regex_def, max_length))); } else { decomposed_regex_config.push(RegexPart::Pattern(part.regex_def)); } diff --git a/noir/templates/template.nr.tera b/noir/templates/template.nr.tera index bf37fc9..2806344 100644 --- a/noir/templates/template.nr.tera +++ b/noir/templates/template.nr.tera @@ -16,7 +16,7 @@ fn main( body_hash_index: u32, partial_body_hash: [u32; 8], partial_body_real_length: u64, - {% if remove_soft_line_breaks %} + {% if remove_soft_linebreaks %} decoded_body: BoundedVec, {% endif %} {% endif %} @@ -26,14 +26,14 @@ fn main( {% for regex in regexes %} {{ regex.name }}_match_start: u32, {{ regex.name }}_match_length: u32, - {{ regex.name }}_current_states: [Field; {{ regex.max_length }}], - {{ regex.name }}_next_states: [Field; {{ regex.max_length }}], + {{ regex.name }}_current_states: [Field; {{ regex.max_match_length }}], + {{ regex.name }}_next_states: [Field; {{ regex.max_match_length }}], {% if regex.num_public_parts > 0 %} {% for i in range(start=1, end=regex.num_public_parts + 1) %} - {{ regex.name }}_capture_group_{{ i }}_id: [Field; {{ regex.max_length }}], + {{ regex.name }}_capture_group_{{ i }}_id: [Field; {{ regex.max_match_length }}], {% endfor %} {% for i in range(start=1, end=regex.num_public_parts + 1) %} - {{ regex.name }}_capture_group_{{ i }}_start: [Field; {{ regex.max_length }}], + {{ regex.name }}_capture_group_{{ i }}_start: [Field; {{ regex.max_match_length }}], {% endfor %} {{ regex.name }}_capture_group_start_indices: [Field; {{ regex.num_public_parts }}], {% endif %} @@ -57,7 +57,7 @@ fn main( signed_body_hash == computed_body_hash, "SHA256 hash computed over body does not match body hash found in DKIM-signed header", ); - {% if remove_soft_line_breaks %} + {% if remove_soft_linebreaks %} assert( remove_soft_line_breaks(body.storage(), decoded_body.storage()), "Decoded body does not properly remove soft line breaks", @@ -69,7 +69,7 @@ fn main( {% for regex in regexes %} {% if regex.num_public_parts > 0 %} - let {% if regex.num_public_parts > 1 %}({% endif %}{{ regex.capture_string }}{% if regex.num_public_parts > 1 %}){% endif %} = {{ regex.regex_circuit_name }}::regex_match::<{{ regex.max_length_of_location }}, {{ regex.max_length }}>( + let {% if regex.num_public_parts > 1 %}({% endif %}{{ regex.capture_string }}{% if regex.num_public_parts > 1 %}){% endif %} = {{ regex.regex_circuit_name }}::regex_match::<{{ regex.max_length_of_location }}, {{ regex.max_match_length }}>( {{ regex.location }}.storage(), {{ regex.name }}_match_start, {{ regex.name }}_match_length, @@ -84,11 +84,11 @@ fn main( , {{ regex.name }}_capture_group_start_indices ); {% else %} - regex_match::<{{ regex.max_length_of_location }}, {{ regex.max_length }}>({{ regex.location }}.storage(), {{ regex.name }}_match_start, {{ regex.name }}_match_length, {{ regex.name }}_current_states, {{ regex.name }}_next_states); + regex_match::<{{ regex.max_length_of_location }}, {{ regex.max_match_length }}>({{ regex.location }}.storage(), {{ regex.name }}_match_start, {{ regex.name }}_match_length, {{ regex.name }}_current_states, {{ regex.name }}_next_states); {% endif %} {% if regex.is_hashed %} {% for i in range(start=0, end=regex.num_public_parts) %} - let {{ regex.name }}_capture_{{ i + 1 }}_packed = pack_bytes::<{{ regex.max_length }}, 31>({{ regex.name }}_capture_{{ i + 1 }}.storage()); + let {{ regex.name }}_capture_{{ i + 1 }}_packed = pack_bytes::<{{ regex.public_parts_max_length[i] }}, 31>({{ regex.name }}_capture_{{ i + 1 }}.storage()); {% endfor %} let {{ regex.name }}_packed_hash = pedersen_hash([{{ regex.hash_inputs }}]); {% endif %} diff --git a/sdk-utils/proto/blueprint.proto b/sdk-utils/proto/blueprint.proto index 544c3cc..a845a0d 100644 --- a/sdk-utils/proto/blueprint.proto +++ b/sdk-utils/proto/blueprint.proto @@ -29,49 +29,49 @@ message Blueprint { string slug = 4; repeated string tags = 5; string email_query = 6; - bool use_new_sdk = 7; - string circuit_name = 8; - bool ignore_body_hash_check = 9; - string sha_precompute_selector = 10; - int32 email_body_max_length = 11; - string sender_domain = 12; - bool enable_header_masking = 13; - bool enable_body_masking = 14; - ZkFramework client_zk_framework = 15; - ZkFramework server_zk_framework = 16; - int32 verifier_contract_chain = 17; - string verifier_contract_address = 18; - bool is_public = 19; - google.protobuf.Timestamp created_at = 20; - google.protobuf.Timestamp updated_at = 21; - repeated ExternalInput external_inputs = 22; - repeated DecomposedRegex decomposed_regexes = 23; - BlueprintStatus client_status = 24; - BlueprintStatus server_status = 25; - int32 version = 26; - string github_username = 27; - int32 email_header_max_length = 28; - bool remove_soft_linebreaks = 29; - int32 stars = 30; - int32 ptau = 31; - int32 num_local_proofs = 32; + string circuit_name = 7; + bool ignore_body_hash_check = 8; + string sha_precompute_selector = 9; + int32 email_body_max_length = 10; + string sender_domain = 11; + bool enable_header_masking = 12; + bool enable_body_masking = 13; + ZkFramework client_zk_framework = 14; + ZkFramework server_zk_framework = 15; + int32 verifier_contract_chain = 16; + string verifier_contract_address = 17; + bool is_public = 18; + google.protobuf.Timestamp created_at = 19; + google.protobuf.Timestamp updated_at = 20; + repeated ExternalInput external_inputs = 21; + repeated DecomposedRegex decomposed_regexes = 22; + BlueprintStatus client_status = 23; + BlueprintStatus server_status = 24; + int32 version = 25; + string github_username = 26; + int32 email_header_max_length = 27; + bool remove_soft_linebreaks = 28; + int32 stars = 29; + int32 ptau = 30; + int32 num_local_proofs = 31; + string internal_version = 32; } - message ExternalInput { - string name = 3; - int32 max_length = 4; + string name = 1; + int32 max_length = 2; } message DecomposedRegex { - string name = 3; - int32 max_length = 4; - string location = 5; - bool is_hashed = 6; - repeated DecomposedRegexPart parts = 7; + string name = 1; + string location = 2; + int32 max_match_length = 3; + optional bool is_hashed = 4; + repeated DecomposedRegexPart parts = 5; } message DecomposedRegexPart { - optional bool is_public = 3; - string regex_def = 4; + optional bool is_public = 1; + string regex_def = 2; + optional int32 max_length = 3; }