From b892c62597687c23341cda1e8e89d58bb6428f36 Mon Sep 17 00:00:00 2001 From: Deepak Maram Date: Thu, 16 Mar 2023 17:42:33 -0400 Subject: [PATCH] Update ark-circom for arkworks 0.4.0 (#43) --- Cargo.lock | 1133 ++++++++++++++--------------- Cargo.toml | 19 +- README.md | 8 +- benches/groth16.rs | 15 +- src/circom/builder.rs | 12 +- src/circom/circuit.rs | 29 +- src/circom/mod.rs | 4 +- src/circom/qap.rs | 4 +- src/circom/r1cs_reader.rs | 61 +- src/ethereum.rs | 34 +- src/witness/memory.rs | 10 +- src/witness/witness_calculator.rs | 18 +- src/zkey.rs | 69 +- tests/groth16.rs | 27 +- tests/solidity.rs | 7 +- 15 files changed, 718 insertions(+), 732 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0bf4c60..e12ab47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,11 +14,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.2", ] [[package]] @@ -49,6 +49,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -60,9 +71,9 @@ dependencies = [ [[package]] name = "ark-bn254" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea691771ebbb28aea556c044e2e5c5227398d840cee0c34d4d20fa8eb2689e8c" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" dependencies = [ "ark-ec", "ark-ff", @@ -74,6 +85,7 @@ name = "ark-circom" version = "0.1.0" dependencies = [ "ark-bn254", + "ark-crypto-primitives", "ark-ec", "ark-ff", "ark-groth16", @@ -101,9 +113,9 @@ dependencies = [ [[package]] name = "ark-crypto-primitives" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff773c0ef8c655c98071d3026a63950798a66b2f45baef22d8334c1756f1bd18" +checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" dependencies = [ "ark-ec", "ark-ff", @@ -111,22 +123,26 @@ dependencies = [ "ark-serialize", "ark-snark", "ark-std", - "blake2 0.9.2", + "blake2", "derivative", - "digest 0.9.0", + "digest 0.10.6", "rayon", + "sha2 0.10.6", ] [[package]] name = "ark-ec" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea978406c4b1ca13c2db2373b05cc55429c3575b8b21f1b9ee859aa5b03dd42" +checksum = "3c60370a92f8e1a5f053cad73a862e1b99bc642333cd676fa11c0c39f80f4ac2" dependencies = [ "ark-ff", + "ark-poly", "ark-serialize", "ark-std", "derivative", + "hashbrown 0.13.2", + "itertools", "num-traits", "rayon", "zeroize", @@ -134,28 +150,30 @@ dependencies = [ [[package]] name = "ark-ff" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +checksum = "4c2d42532524bee1da5a4f6f733eb4907301baa480829557adcff5dfaeee1d9a" dependencies = [ "ark-ff-asm", "ark-ff-macros", "ark-serialize", "ark-std", "derivative", + "digest 0.10.6", + "itertools", "num-bigint", "num-traits", "paste", "rayon", - "rustc_version 0.3.3", + "rustc_version", "zeroize", ] [[package]] name = "ark-ff-asm" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +checksum = "9d6873aaba7959593d89babed381d33e2329453368f1bf3c67e07686a1c1056f" dependencies = [ "quote", "syn", @@ -163,20 +181,22 @@ dependencies = [ [[package]] name = "ark-ff-macros" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +checksum = "f3c2e7d0f2d67cc7fc925355c74d36e7eda19073639be4a0a233d4611b8c959d" dependencies = [ "num-bigint", "num-traits", + "proc-macro2", "quote", "syn", ] [[package]] name = "ark-groth16" -version = "0.3.0" -source = "git+https://github.com/arkworks-rs/groth16?rev=765817f#765817f77a6e14964c6f264d565b18676b11bd59" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" dependencies = [ "ark-crypto-primitives", "ark-ec", @@ -190,23 +210,23 @@ dependencies = [ [[package]] name = "ark-poly" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0f78f47537c2f15706db7e98fe64cc1711dbf9def81218194e17239e53e5aa" +checksum = "8f6ec811462cabe265cfe1b102fcfe3df79d7d2929c2425673648ee9abfd0272" dependencies = [ "ark-ff", "ark-serialize", "ark-std", "derivative", - "hashbrown 0.11.2", + "hashbrown 0.13.2", "rayon", ] [[package]] name = "ark-relations" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cba4c1c99792a6834bd97f7fd76578ec2cd58d2afc5139a17e1d1bec65b38f6" +checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" dependencies = [ "ark-ff", "ark-std", @@ -216,20 +236,21 @@ dependencies = [ [[package]] name = "ark-serialize" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +checksum = "e7e735959bc173ea4baf13327b19c22d452b8e9e8e8f7b7fc34e6bf0e316c33e" dependencies = [ "ark-serialize-derive", "ark-std", - "digest 0.9.0", + "digest 0.10.6", + "num-bigint", ] [[package]] name = "ark-serialize-derive" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd4e5f0bf8285d5ed538d27fab7411f3e297908fd93c62195de8bee3f199e82" +checksum = "fd34f0920d995d2c932f38861c416f70de89a6de9875876b012557079603e6cc" dependencies = [ "proc-macro2", "quote", @@ -238,20 +259,21 @@ dependencies = [ [[package]] name = "ark-snark" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc3dff1a5f67a9c0b34df32b079752d8dd17f1e9d06253da0453db6c1b7cc8a" +checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" dependencies = [ "ark-ff", "ark-relations", + "ark-serialize", "ark-std", ] [[package]] name = "ark-std" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", "rand", @@ -266,9 +288,9 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" dependencies = [ "proc-macro2", "quote", @@ -283,7 +305,7 @@ checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ "futures", "pharos", - "rustc_version 0.4.0", + "rustc_version", ] [[package]] @@ -292,23 +314,11 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] -[[package]] -name = "auto_impl" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "auto_impl" version = "1.0.1" @@ -329,46 +339,24 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.29.0", + "object 0.30.3", "rustc-demangle", ] [[package]] name = "base16ct" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base58" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" - -[[package]] -name = "base58check" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee2fe4c9a0c84515f136aaae2466744a721af6d63339c18689d9e995d74d99b" -dependencies = [ - "base58", - "sha2 0.8.2", -] - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -384,9 +372,9 @@ checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "base64ct" -version = "1.5.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bech32" @@ -431,17 +419,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "blake2" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" -dependencies = [ - "crypto-mac", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - [[package]] name = "blake2" version = "0.10.6" @@ -453,32 +430,20 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.7.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array 0.12.4", + "generic-array", ] [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", + "generic-array", ] [[package]] @@ -486,24 +451,15 @@ name = "bs58" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", + "sha2 0.9.9", ] [[package]] name = "bumpalo" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byte-slice-cast" @@ -511,27 +467,22 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - [[package]] name = "bytecheck" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" +checksum = "13fe11640a23eb24562225322cd3e452b93a3d4091d62fab69c70542fcd17d1f" dependencies = [ "bytecheck_derive", "ptr_meta", + "simdutf8", ] [[package]] name = "bytecheck_derive" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" +checksum = "e31225543cb46f81a7e224762764f4a6a0f097b1db0b175f69e8065efaa42de5" dependencies = [ "proc-macro2", "quote", @@ -555,9 +506,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" dependencies = [ "serde", ] @@ -579,7 +530,7 @@ checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07" dependencies = [ "camino", "cargo-platform", - "semver 1.0.16", + "semver", "serde", "serde_json", "thiserror", @@ -593,9 +544,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-if" @@ -605,9 +556,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "num-integer", "num-traits", @@ -615,9 +566,9 @@ dependencies = [ [[package]] name = "cipher" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", @@ -636,9 +587,9 @@ dependencies = [ [[package]] name = "coins-bip32" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634c509653de24b439672164bbf56f5f582a2ab0e313d3b0f6af0b7345cf2560" +checksum = "b30a84aab436fcb256a2ab3c80663d8aec686e6bae12827bb05fef3e1e439c9f" dependencies = [ "bincode", "bs58", @@ -655,33 +606,34 @@ dependencies = [ [[package]] name = "coins-bip39" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a11892bcac83b4c6e95ab84b5b06c76d9d70ad73548dd07418269c5c7977171" +checksum = "efb68f3b6c3fee83828ecd8d463f360a397c32aaeb35bd931c01e5ddf5631c69" dependencies = [ "bitvec 0.17.4", "coins-bip32", "getrandom", "hex", "hmac", - "pbkdf2", + "once_cell", + "pbkdf2 0.12.1", "rand", "sha2 0.10.6", "thiserror", + "tracing", ] [[package]] name = "coins-core" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94090a6663f224feae66ab01e41a2555a8296ee07b5f20dab8888bdefc9f617" +checksum = "9b949a1c63fb7eb591eb7ba438746326aedf0ae843e51ec92ba6bec5bb382c4f" dependencies = [ - "base58check", - "base64 0.12.3", + "base64 0.21.0", "bech32", - "blake2 0.10.6", + "bs58", "digest 0.10.6", - "generic-array 0.14.6", + "generic-array", "hex", "ripemd", "serde", @@ -720,9 +672,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" +checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "convert_case" @@ -774,7 +726,7 @@ dependencies = [ "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -861,9 +813,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -871,9 +823,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -882,26 +834,24 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.10" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset", - "once_cell", + "memoffset 0.8.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.11" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -912,11 +862,11 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" dependencies = [ - "generic-array 0.14.6", + "generic-array", "rand_core", "subtle", "zeroize", @@ -928,29 +878,18 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array", "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array 0.14.6", - "subtle", -] - [[package]] name = "csv" -version = "1.1.6" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" dependencies = [ - "bstr", "csv-core", - "itoa 0.4.8", + "itoa", "ryu", "serde", ] @@ -975,9 +914,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.13.4" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -985,9 +924,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.4" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", @@ -998,9 +937,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", @@ -1009,9 +948,9 @@ dependencies = [ [[package]] name = "der" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +checksum = "bc906908ea6458456e5eaa160a9c08543ec3d1e6f71e2235cedd660cb65f9df0" dependencies = [ "const-oid", "zeroize", @@ -1039,22 +978,13 @@ dependencies = [ "syn", ] -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array", ] [[package]] @@ -1063,7 +993,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer 0.10.4", "crypto-common", "subtle", ] @@ -1076,9 +1006,9 @@ checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "d1b0a1222f8072619e8a6b667a854020a03d363738303203c09468b3424a420a" dependencies = [ "der", "elliptic-curve", @@ -1088,22 +1018,21 @@ dependencies = [ [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "6ea5a92946e8614bb585254898bb7dd1ddad241ace60c52149e3765e34cc039d" dependencies = [ "base16ct", "crypto-bigint", - "der", "digest 0.10.6", "ff", - "generic-array 0.14.6", + "generic-array", "group", "pkcs8", "rand_core", @@ -1123,12 +1052,11 @@ dependencies = [ [[package]] name = "enr" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "492a7e5fc2504d5fdce8e124d3e263b244a68b283cac67a69eda0cd43e0aebad" +checksum = "eb4d5fbf6f56acecd38f5988eb2e4ae412008a2a30268c748c701ec6322f39d4" dependencies = [ "base64 0.13.1", - "bs58", "bytes", "hex", "k256", @@ -1162,18 +1090,18 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4799cdb24d48f1f8a7a98d06b7fde65a85a2d1e42b25a889f5406aa1fbefe074" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea83a3fbdc1d999ccfbcbee717eab36f8edf2d71693a23ce0d7cca19e085304c" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ "darling", "proc-macro2", @@ -1181,6 +1109,27 @@ dependencies = [ "syn", ] +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "eth-keystore" version = "0.5.0" @@ -1192,7 +1141,7 @@ dependencies = [ "digest 0.10.6", "hex", "hmac", - "pbkdf2", + "pbkdf2 0.11.0", "rand", "scrypt", "serde", @@ -1253,8 +1202,8 @@ dependencies = [ [[package]] name = "ethers" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -1267,8 +1216,8 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "ethers-core", "once_cell", @@ -1278,8 +1227,8 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "ethers-contract-abigen", "ethers-contract-derive", @@ -1296,13 +1245,14 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "Inflector", "cfg-if", "dunce", "ethers-core", + "ethers-etherscan", "eyre", "getrandom", "hex", @@ -1314,28 +1264,29 @@ dependencies = [ "serde", "serde_json", "syn", + "tokio", "toml", + "url", "walkdir", ] [[package]] name = "ethers-contract-derive" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "ethers-contract-abigen", "ethers-core", "hex", "proc-macro2", "quote", - "serde_json", "syn", ] [[package]] name = "ethers-core" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "arrayvec", "bytes", @@ -1344,7 +1295,7 @@ dependencies = [ "convert_case", "elliptic-curve", "ethabi", - "generic-array 0.14.6", + "generic-array", "getrandom", "hex", "k256", @@ -1367,13 +1318,13 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "ethers-core", "getrandom", "reqwest", - "semver 1.0.16", + "semver", "serde", "serde-aux", "serde_json", @@ -1383,11 +1334,11 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "async-trait", - "auto_impl 0.5.0", + "auto_impl", "ethers-contract", "ethers-core", "ethers-etherscan", @@ -1408,11 +1359,11 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "async-trait", - "auto_impl 1.0.1", + "auto_impl", "base64 0.21.0", "enr", "ethers-core", @@ -1443,8 +1394,8 @@ dependencies = [ [[package]] name = "ethers-signers" -version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#e20bb715699280402c155a0abbfc82656582242e" +version = "2.0.0" +source = "git+https://github.com/gakonst/ethers-rs#304fe0988d23302694a63da47ce683af19305357" dependencies = [ "async-trait", "coins-bip32", @@ -1456,6 +1407,7 @@ dependencies = [ "rand", "sha2 0.10.6", "thiserror", + "tracing", ] [[package]] @@ -1468,12 +1420,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -1482,18 +1428,18 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] [[package]] name = "ff" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core", "subtle", @@ -1534,9 +1480,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" dependencies = [ "futures-channel", "futures-core", @@ -1549,9 +1495,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" dependencies = [ "futures-core", "futures-sink", @@ -1559,15 +1505,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" dependencies = [ "futures-core", "futures-task", @@ -1576,9 +1522,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" [[package]] name = "futures-locks" @@ -1592,9 +1538,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" dependencies = [ "proc-macro2", "quote", @@ -1603,15 +1549,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" [[package]] name = "futures-timer" @@ -1621,9 +1567,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" dependencies = [ "futures-channel", "futures-core", @@ -1646,15 +1592,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.6" @@ -1663,13 +1600,14 @@ checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "js-sys", @@ -1690,10 +1628,16 @@ dependencies = [ ] [[package]] -name = "group" -version = "0.12.1" +name = "gimli" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core", @@ -1702,9 +1646,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" dependencies = [ "bytes", "fnv", @@ -1731,7 +1675,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -1740,7 +1684,16 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", ] [[package]] @@ -1767,6 +1720,15 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "hex" version = "0.4.3" @@ -1803,13 +1765,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", - "itoa 1.0.3", + "itoa", ] [[package]] @@ -1837,9 +1799,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -1850,7 +1812,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.3", + "itoa", "pin-project-lite", "socket2", "tokio", @@ -1934,9 +1896,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -1949,7 +1911,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.6", + "generic-array", ] [[package]] @@ -1964,6 +1926,16 @@ dependencies = [ "web-sys", ] +[[package]] +name = "io-lifetimes" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" +dependencies = [ + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "ipnet" version = "2.7.1" @@ -1972,45 +1944,40 @@ checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "itertools" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.8" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.6" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "955890845095ccf31ef83ad41a05aabb4d8cc23dc3cac5a9f5c89cf26dd0da75" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", + "once_cell", "sha2 0.10.6", - "sha3", + "signature", ] [[package]] @@ -2036,20 +2003,26 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.132" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "libloading" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", "winapi", ] +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "lock_api" version = "0.4.9" @@ -2107,9 +2080,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ "libc", ] @@ -2123,6 +2096,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.16" @@ -2131,23 +2113,23 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", "wasi", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2156,15 +2138,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" -[[package]] -name = "nom8" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" -dependencies = [ - "memchr", -] - [[package]] name = "num" version = "0.4.0" @@ -2193,9 +2166,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" dependencies = [ "num-traits", ] @@ -2244,28 +2217,28 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] [[package]] name = "num_enum" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2287,18 +2260,18 @@ dependencies = [ [[package]] name = "object" -version = "0.29.0" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "oorandom" @@ -2306,12 +2279,6 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - [[package]] name = "opaque-debug" version = "0.3.0" @@ -2325,7 +2292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" dependencies = [ "arrayvec", - "auto_impl 1.0.1", + "auto_impl", "bytes", "ethereum-types", "open-fastrlp-derive", @@ -2351,9 +2318,9 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "parity-scale-codec" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3840933452adf7b3b9145e27086a5a3376c619dca1a21b1e5a5af0d54979bed" +checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac" dependencies = [ "arrayvec", "bitvec 1.0.1", @@ -2400,33 +2367,29 @@ dependencies = [ "winapi", ] -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - [[package]] name = "paste" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9423e2b32f7a043629287a536f21951e8c6a82482d0acb1eeebfc90bc2225b22" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pbkdf2" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.6", +] + +[[package]] +name = "pbkdf2" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" dependencies = [ "digest 0.10.6", "hmac", - "password-hash", - "sha2 0.10.6", ] [[package]] @@ -2435,16 +2398,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" -[[package]] -name = "pest" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0560d531d1febc25a3c9398a62a71256c0178f2e3443baedd9ad4bb8c9deb4" -dependencies = [ - "thiserror", - "ucd-trie", -] - [[package]] name = "pharos" version = "0.5.3" @@ -2452,7 +2405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ "futures", - "rustc_version 0.4.0", + "rustc_version", ] [[package]] @@ -2489,9 +2442,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "3d2820d87d2b008616e5c27212dd9e0e694fb4c6b522de06094106813328cb49" dependencies = [ "der", "spki", @@ -2499,9 +2452,9 @@ dependencies = [ [[package]] name = "plotters" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "716b4eeb6c4a1d3ecc956f75b43ec2e8e8ba80026413e70a3f41fd3313d3492b" +checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" dependencies = [ "num-traits", "plotters-backend", @@ -2527,15 +2480,15 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", "syn", @@ -2557,9 +2510,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", "toml_edit", @@ -2591,15 +2544,15 @@ dependencies = [ [[package]] name = "proc-macro-hack" -version = "0.5.19" +version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" dependencies = [ "unicode-ident", ] @@ -2626,9 +2579,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.21" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -2668,30 +2621,28 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] [[package]] name = "rayon" -version = "1.5.3" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -2721,26 +2672,20 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - [[package]] name = "regex-syntax" -version = "0.6.27" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "region" @@ -2754,20 +2699,11 @@ dependencies = [ "winapi", ] -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - [[package]] name = "rend" -version = "0.3.6" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" +checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" dependencies = [ "bytecheck", ] @@ -2813,13 +2749,12 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "crypto-bigint", "hmac", - "zeroize", + "subtle", ] [[package]] @@ -2848,9 +2783,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.39" +version = "0.7.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" +checksum = "c30f1d45d9aa61cbc8cd1eb87705470892289bb2d01943e7803b873a57404dc3" dependencies = [ "bytecheck", "hashbrown 0.12.3", @@ -2862,9 +2797,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.39" +version = "0.7.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" +checksum = "ff26ed6c7c4dfc2aa9480b86a60e3c7233543a270a680e10758a507c5a4ce476" dependencies = [ "proc-macro2", "quote", @@ -2910,22 +2845,27 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.16", + "semver", +] + +[[package]] +name = "rustix" +version = "0.36.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.45.0", ] [[package]] @@ -2951,15 +2891,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "salsa20" @@ -3016,7 +2956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ "hmac", - "pbkdf2", + "pbkdf2 0.11.0", "salsa20", "sha2 0.10.6", ] @@ -3039,13 +2979,13 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e" dependencies = [ "base16ct", "der", - "generic-array 0.14.6", + "generic-array", "pkcs8", "subtle", "zeroize", @@ -3053,31 +2993,13 @@ dependencies = [ [[package]] name = "semver" -version = "0.11.0" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ "serde", ] -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "send_wrapper" version = "0.6.0" @@ -3086,9 +3008,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.144" +version = "1.0.156" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4" dependencies = [ "serde_derive", ] @@ -3105,9 +3027,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.7" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" dependencies = [ "serde", ] @@ -3124,9 +3046,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.144" +version = "1.0.156" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d" dependencies = [ "proc-macro2", "quote", @@ -3135,11 +3057,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.85" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ - "itoa 1.0.3", + "itoa", "ryu", "serde", ] @@ -3151,21 +3073,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.3", + "itoa", "ryu", "serde", ] [[package]] name = "sha2" -version = "0.8.2" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", ] [[package]] @@ -3200,34 +3123,40 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.4" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "8fe458c98333f9c8152221191a77e2a44e8325d0193484af2e9421a53019e57d" dependencies = [ "digest 0.10.6", "rand_core", ] [[package]] -name = "slab" -version = "0.4.7" +name = "simdutf8" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -3241,9 +3170,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "c0445c905640145c7ea8c1993555957f65e7c46d0535b91ba501bc9bfc85522f" dependencies = [ "base64ct", "der", @@ -3291,9 +3220,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -3320,22 +3249,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" +checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "tempfile" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" dependencies = [ "cfg-if", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi", + "rustix", + "windows-sys 0.42.0", ] [[package]] @@ -3349,18 +3277,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" dependencies = [ "proc-macro2", "quote", @@ -3369,10 +3297,11 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.4" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ + "cfg-if", "once_cell", ] @@ -3412,9 +3341,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", "bytes", @@ -3425,14 +3354,14 @@ dependencies = [ "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "tokio-macros" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", @@ -3452,9 +3381,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ "bytes", "futures-core", @@ -3475,19 +3404,19 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" [[package]] name = "toml_edit" -version = "0.18.1" +version = "0.19.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" +checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" dependencies = [ "indexmap", - "nom8", "toml_datetime", + "winnow", ] [[package]] @@ -3578,15 +3507,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "ucd-trie" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "uint" @@ -3602,15 +3525,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" [[package]] name = "unicode-ident" -version = "1.0.3" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -3629,9 +3552,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unicode-xid" @@ -3680,12 +3603,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -3707,9 +3629,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.82" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3717,9 +3639,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.82" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", @@ -3732,9 +3654,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.32" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ "cfg-if", "js-sys", @@ -3744,9 +3666,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.82" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3754,9 +3676,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.82" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", @@ -3767,15 +3689,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.82" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-encoder" -version = "0.16.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d443c5a7daae71697d97ec12ad70b4fe8766d3a0f4db16158ac8b781365892f7" +checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" dependencies = [ "leb128", ] @@ -3862,7 +3784,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -4014,7 +3936,7 @@ dependencies = [ "libc", "loupe", "mach", - "memoffset", + "memoffset 0.6.5", "more-asserts", "region", "rkyv", @@ -4034,9 +3956,9 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "wast" -version = "46.0.0" +version = "55.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0ab19660e3ea6891bba69167b9be40fad00fb1fe3dd39c5eebcee15607131b" +checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" dependencies = [ "leb128", "memchr", @@ -4046,18 +3968,18 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.48" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f775282def4d5bffd94d60d6ecd57bfe6faa46171cdbf8d32bd5458842b1e3e" +checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.59" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -4084,13 +4006,13 @@ dependencies = [ [[package]] name = "which" -version = "4.2.5" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", - "lazy_static", "libc", + "once_cell", ] [[package]] @@ -4144,19 +4066,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" @@ -4166,9 +4112,9 @@ checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" @@ -4178,9 +4124,9 @@ checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" @@ -4190,9 +4136,9 @@ checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" @@ -4202,15 +4148,15 @@ checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" @@ -4220,9 +4166,18 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "winnow" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" +dependencies = [ + "memchr", +] [[package]] name = "winreg" @@ -4244,7 +4199,7 @@ dependencies = [ "js-sys", "log", "pharos", - "rustc_version 0.4.0", + "rustc_version", "send_wrapper", "thiserror", "wasm-bindgen", @@ -4272,9 +4227,9 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 45fa6c7..3ac7839 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,14 +12,15 @@ num-traits = { version = "0.2.0", default-features = false } num-bigint = { version = "0.4", default-features = false, features = ["rand"] } # ZKP Generation -ark-ec = { version = "0.3.0", default-features = false, features = ["parallel"] } -ark-ff = { version = "0.3.0", default-features = false, features = ["parallel", "asm"] } -ark-std = { version = "0.3.0", default-features = false, features = ["parallel"] } -ark-bn254 = { version = "0.3.0" } -ark-groth16 = { git = "https://github.com/arkworks-rs/groth16", rev = "765817f", features = ["parallel"] } -ark-poly = { version = "^0.3.0", default-features = false, features = ["parallel"] } -ark-relations = { version = "0.3.0", default-features = false } -ark-serialize = { version = "0.3.0", default-features = false } +ark-crypto-primitives = { version = "0.4.0" } +ark-ec = { version = "0.4.1", default-features = false, features = ["parallel"] } +ark-ff = { version = "0.4.1", default-features = false, features = ["parallel", "asm"] } +ark-std = { version = "0.4.0", default-features = false, features = ["parallel"] } +ark-bn254 = { version = "0.4.0" } +ark-groth16 = { version = "0.4.0", features = ["parallel"] } +ark-poly = { version = "0.4.1", default-features = false, features = ["parallel"] } +ark-relations = { version = "0.4.0", default-features = false } +ark-serialize = { version = "0.4.1", default-features = false } # decoding of data hex = "0.4.3" @@ -49,4 +50,4 @@ harness = false bench-complex-all = [] circom-2 = [] ethereum = ["ethers-core"] -default = ["ethereum"] +default = ["circom-2", "ethereum"] \ No newline at end of file diff --git a/README.md b/README.md index 49d0f3b..ec7cfa4 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ let circom = builder.setup(); // Run a trusted setup let mut rng = thread_rng(); -let params = generate_random_parameters::(circom, &mut rng)?; +let params = generate_random_parameters_with_reduction(circom, &mut rng)?; // Get the populated instance of the circuit with the witness let circom = builder.build()?; @@ -43,11 +43,11 @@ let circom = builder.build()?; let inputs = circom.get_public_inputs().unwrap(); // Generate the proof -let proof = prove(circom, ¶ms, &mut rng)?; +let proof = prove(¶ms, circom, &mut rng)?; // Check that the proof is valid -let pvk = prepare_verifying_key(¶ms.vk); -let verified = verify_proof(&pvk, &proof, &inputs)?; +let pvk = process_vk(¶ms.vk)?; +let verified = verify_with_processed_vk(&pvk, &inputs, &proof)?; assert!(verified); ``` diff --git a/benches/groth16.rs b/benches/groth16.rs index f43974d..2063d7f 100644 --- a/benches/groth16.rs +++ b/benches/groth16.rs @@ -1,10 +1,11 @@ +use ark_crypto_primitives::snark::SNARK; use criterion::{black_box, criterion_group, criterion_main, Criterion}; use ark_circom::{read_zkey, CircomReduction, WitnessCalculator}; use ark_std::rand::thread_rng; use ark_bn254::Bn254; -use ark_groth16::{create_proof_with_reduction_and_matrices, prepare_verifying_key, verify_proof}; +use ark_groth16::Groth16; use std::{collections::HashMap, fs::File}; @@ -15,7 +16,7 @@ fn bench_groth(c: &mut Criterion, num_validators: u32, num_constraints: u32) { "./test-vectors/complex-circuit/complex-circuit-{}-{}.zkey", i, j ); - let mut file = File::open(&path).unwrap(); + let mut file = File::open(path).unwrap(); let (params, matrices) = read_zkey(&mut file).unwrap(); let num_inputs = matrices.num_instance_variables; let num_constraints = matrices.num_constraints; @@ -28,7 +29,7 @@ fn bench_groth(c: &mut Criterion, num_validators: u32, num_constraints: u32) { inputs }; - let mut wtns = WitnessCalculator::new(&format!( + let mut wtns = WitnessCalculator::new(format!( "./test-vectors/complex-circuit/complex-circuit-{}-{}.wasm", i, j )) @@ -44,7 +45,7 @@ fn bench_groth(c: &mut Criterion, num_validators: u32, num_constraints: u32) { let r = ark_bn254::Fr::rand(rng); let s = ark_bn254::Fr::rand(rng); - let proof = create_proof_with_reduction_and_matrices::<_, CircomReduction>( + let proof = Groth16::::create_proof_with_reduction_and_matrices( ¶ms, r, s, @@ -55,16 +56,16 @@ fn bench_groth(c: &mut Criterion, num_validators: u32, num_constraints: u32) { ) .unwrap(); - let pvk = prepare_verifying_key(¶ms.vk); + let pvk = Groth16::::process_vk(¶ms.vk).unwrap(); let inputs = &full_assignment[1..num_inputs]; - let verified = verify_proof(&pvk, &proof, inputs).unwrap(); + let verified = Groth16::::verify_with_processed_vk(&pvk, inputs, &proof).unwrap(); assert!(verified); c.bench_function(&format!("groth proof {} {}", i, j), |b| { b.iter(|| { black_box( - create_proof_with_reduction_and_matrices::<_, CircomReduction>( + Groth16::::create_proof_with_reduction_and_matrices( ¶ms, r, s, diff --git a/src/circom/builder.rs b/src/circom/builder.rs index 3cd2ac9..670e22b 100644 --- a/src/circom/builder.rs +++ b/src/circom/builder.rs @@ -1,4 +1,4 @@ -use ark_ec::PairingEngine; +use ark_ec::pairing::Pairing; use std::{fs::File, path::Path}; use super::{CircomCircuit, R1CS}; @@ -10,20 +10,20 @@ use crate::{circom::R1CSFile, witness::WitnessCalculator}; use color_eyre::Result; #[derive(Clone, Debug)] -pub struct CircomBuilder { +pub struct CircomBuilder { pub cfg: CircomConfig, pub inputs: HashMap>, } // Add utils for creating this from files / directly from bytes #[derive(Clone, Debug)] -pub struct CircomConfig { +pub struct CircomConfig { pub r1cs: R1CS, pub wtns: WitnessCalculator, pub sanity_check: bool, } -impl CircomConfig { +impl CircomConfig { pub fn new(wtns: impl AsRef, r1cs: impl AsRef) -> Result { let wtns = WitnessCalculator::new(wtns).unwrap(); let reader = File::open(r1cs)?; @@ -36,7 +36,7 @@ impl CircomConfig { } } -impl CircomBuilder { +impl CircomBuilder { /// Instantiates a new builder using the provided WitnessGenerator and R1CS files /// for your circuit pub fn new(cfg: CircomConfig) -> Self { @@ -81,7 +81,7 @@ impl CircomBuilder { // sanity check debug_assert!({ use ark_relations::r1cs::{ConstraintSynthesizer, ConstraintSystem}; - let cs = ConstraintSystem::::new_ref(); + let cs = ConstraintSystem::::new_ref(); circom.clone().generate_constraints(cs.clone()).unwrap(); let is_satisfied = cs.is_satisfied().unwrap(); if !is_satisfied { diff --git a/src/circom/circuit.rs b/src/circom/circuit.rs index e371965..12540e9 100644 --- a/src/circom/circuit.rs +++ b/src/circom/circuit.rs @@ -1,4 +1,4 @@ -use ark_ec::PairingEngine; +use ark_ec::pairing::Pairing; use ark_relations::r1cs::{ ConstraintSynthesizer, ConstraintSystemRef, LinearCombination, SynthesisError, Variable, }; @@ -8,13 +8,13 @@ use super::R1CS; use color_eyre::Result; #[derive(Clone, Debug)] -pub struct CircomCircuit { +pub struct CircomCircuit { pub r1cs: R1CS, - pub witness: Option>, + pub witness: Option>, } -impl CircomCircuit { - pub fn get_public_inputs(&self) -> Option> { +impl CircomCircuit { + pub fn get_public_inputs(&self) -> Option> { match &self.witness { None => None, Some(w) => match &self.r1cs.wire_mapping { @@ -25,8 +25,11 @@ impl CircomCircuit { } } -impl ConstraintSynthesizer for CircomCircuit { - fn generate_constraints(self, cs: ConstraintSystemRef) -> Result<(), SynthesisError> { +impl ConstraintSynthesizer for CircomCircuit { + fn generate_constraints( + self, + cs: ConstraintSystemRef, + ) -> Result<(), SynthesisError> { let witness = &self.witness; let wire_mapping = &self.r1cs.wire_mapping; @@ -34,7 +37,7 @@ impl ConstraintSynthesizer for CircomCircuit { for i in 1..self.r1cs.num_inputs { cs.new_input_variable(|| { Ok(match witness { - None => E::Fr::from(1u32), + None => E::ScalarField::from(1u32), Some(w) => match wire_mapping { Some(m) => w[m[i]], None => w[i], @@ -46,7 +49,7 @@ impl ConstraintSynthesizer for CircomCircuit { for i in 0..self.r1cs.num_aux { cs.new_witness_variable(|| { Ok(match witness { - None => E::Fr::from(1u32), + None => E::ScalarField::from(1u32), Some(w) => match wire_mapping { Some(m) => w[m[i + self.r1cs.num_inputs]], None => w[i + self.r1cs.num_inputs], @@ -62,10 +65,12 @@ impl ConstraintSynthesizer for CircomCircuit { Variable::Witness(index - self.r1cs.num_inputs) } }; - let make_lc = |lc_data: &[(usize, E::Fr)]| { + let make_lc = |lc_data: &[(usize, E::ScalarField)]| { lc_data.iter().fold( - LinearCombination::::zero(), - |lc: LinearCombination, (index, coeff)| lc + (*coeff, make_index(*index)), + LinearCombination::::zero(), + |lc: LinearCombination, (index, coeff)| { + lc + (*coeff, make_index(*index)) + }, ) }; diff --git a/src/circom/mod.rs b/src/circom/mod.rs index ebaf0a5..6ad7fd0 100644 --- a/src/circom/mod.rs +++ b/src/circom/mod.rs @@ -1,4 +1,4 @@ -use ark_ec::PairingEngine; +use ark_ec::pairing::Pairing; pub mod r1cs_reader; pub use r1cs_reader::{R1CSFile, R1CS}; @@ -13,4 +13,4 @@ mod qap; pub use qap::CircomReduction; pub type Constraints = (ConstraintVec, ConstraintVec, ConstraintVec); -pub type ConstraintVec = Vec<(usize, ::Fr)>; +pub type ConstraintVec = Vec<(usize, ::ScalarField)>; diff --git a/src/circom/qap.rs b/src/circom/qap.rs index 130d1a4..a0c5bfc 100644 --- a/src/circom/qap.rs +++ b/src/circom/qap.rs @@ -1,5 +1,5 @@ use ark_ff::PrimeField; -use ark_groth16::r1cs_to_qap::{evaluate_constraint, LibsnarkReduction, R1CStoQAP}; +use ark_groth16::r1cs_to_qap::{evaluate_constraint, LibsnarkReduction, R1CSToQAP}; use ark_poly::EvaluationDomain; use ark_relations::r1cs::{ConstraintMatrices, ConstraintSystemRef, SynthesisError}; use ark_std::{cfg_into_iter, cfg_iter, cfg_iter_mut, vec}; @@ -11,7 +11,7 @@ use ark_std::{cfg_into_iter, cfg_iter, cfg_iter_mut, vec}; /// in that domain. This serves as HZ when computing the C proof element. pub struct CircomReduction; -impl R1CStoQAP for CircomReduction { +impl R1CSToQAP for CircomReduction { #[allow(clippy::type_complexity)] fn instance_map_with_evaluation>( cs: ConstraintSystemRef, diff --git a/src/circom/r1cs_reader.rs b/src/circom/r1cs_reader.rs index e7b06b3..b5db104 100644 --- a/src/circom/r1cs_reader.rs +++ b/src/circom/r1cs_reader.rs @@ -2,18 +2,20 @@ //! Copied from //! Spec: use byteorder::{LittleEndian, ReadBytesExt}; -use std::io::{Error, ErrorKind, Result}; +use std::io::{Error, ErrorKind}; -use ark_ec::PairingEngine; -use ark_ff::FromBytes; +use ark_ec::pairing::Pairing; +use ark_serialize::{CanonicalDeserialize, SerializationError, SerializationError::IoError}; use ark_std::io::{Read, Seek, SeekFrom}; use std::collections::HashMap; +type IoResult = Result; + use super::{ConstraintVec, Constraints}; #[derive(Clone, Debug)] -pub struct R1CS { +pub struct R1CS { pub num_inputs: usize, pub num_aux: usize, pub num_variables: usize, @@ -21,7 +23,7 @@ pub struct R1CS { pub wire_mapping: Option>, } -impl From> for R1CS { +impl From> for R1CS { fn from(file: R1CSFile) -> Self { let num_inputs = (1 + file.header.n_pub_in + file.header.n_pub_out) as usize; let num_variables = file.header.n_wires as usize; @@ -36,30 +38,35 @@ impl From> for R1CS { } } -pub struct R1CSFile { +pub struct R1CSFile { pub version: u32, pub header: Header, pub constraints: Vec>, pub wire_mapping: Vec, } -impl R1CSFile { +impl R1CSFile { /// reader must implement the Seek trait, for example with a Cursor /// /// ```rust,ignore /// let reader = BufReader::new(Cursor::new(&data[..])); /// ``` - pub fn new(mut reader: R) -> Result> { + pub fn new(mut reader: R) -> IoResult> { let mut magic = [0u8; 4]; reader.read_exact(&mut magic)?; if magic != [0x72, 0x31, 0x63, 0x73] { - // magic = "r1cs" - return Err(Error::new(ErrorKind::InvalidData, "Invalid magic number")); + return Err(IoError(Error::new( + ErrorKind::InvalidData, + "Invalid magic number", + ))); } let version = reader.read_u32::()?; if version != 1 { - return Err(Error::new(ErrorKind::InvalidData, "Unsupported version")); + return Err(IoError(Error::new( + ErrorKind::InvalidData, + "Unsupported version", + ))); } let num_sections = reader.read_u32::()?; @@ -151,20 +158,20 @@ pub struct Header { } impl Header { - fn new(mut reader: R, size: u64) -> Result
{ + fn new(mut reader: R, size: u64) -> IoResult
{ let field_size = reader.read_u32::()?; if field_size != 32 { - return Err(Error::new( + return Err(IoError(Error::new( ErrorKind::InvalidData, "This parser only supports 32-byte fields", - )); + ))); } if size != 32 + field_size as u64 { - return Err(Error::new( + return Err(IoError(Error::new( ErrorKind::InvalidData, "Invalid header section size", - )); + ))); } let mut prime_size = vec![0u8; field_size as usize]; @@ -174,10 +181,10 @@ impl Header { != hex::decode("010000f093f5e1439170b97948e833285d588181b64550b829a031e1724e6430") .unwrap() { - return Err(Error::new( + return Err(IoError(Error::new( ErrorKind::InvalidData, "This parser only supports bn256", - )); + ))); } Ok(Header { @@ -193,22 +200,22 @@ impl Header { } } -fn read_constraint_vec(mut reader: R) -> Result> { +fn read_constraint_vec(mut reader: R) -> IoResult> { let n_vec = reader.read_u32::()? as usize; let mut vec = Vec::with_capacity(n_vec); for _ in 0..n_vec { vec.push(( reader.read_u32::()? as usize, - E::Fr::read(&mut reader)?, + E::ScalarField::deserialize_uncompressed(&mut reader)?, )); } Ok(vec) } -fn read_constraints( +fn read_constraints( mut reader: R, header: &Header, -) -> Result>> { +) -> IoResult>> { // todo check section size let mut vec = Vec::with_capacity(header.n_constraints as usize); for _ in 0..header.n_constraints { @@ -221,22 +228,22 @@ fn read_constraints( Ok(vec) } -fn read_map(mut reader: R, size: u64, header: &Header) -> Result> { +fn read_map(mut reader: R, size: u64, header: &Header) -> IoResult> { if size != header.n_wires as u64 * 8 { - return Err(Error::new( + return Err(IoError(Error::new( ErrorKind::InvalidData, "Invalid map section size", - )); + ))); } let mut vec = Vec::with_capacity(header.n_wires as usize); for _ in 0..header.n_wires { vec.push(reader.read_u64::()?); } if vec[0] != 0 { - return Err(Error::new( + return Err(IoError(Error::new( ErrorKind::InvalidData, "Wire 0 should always be mapped to 0", - )); + ))); } Ok(vec) } diff --git a/src/ethereum.rs b/src/ethereum.rs index de644cc..9d8908a 100644 --- a/src/ethereum.rs +++ b/src/ethereum.rs @@ -1,10 +1,11 @@ //! Helpers for converting Arkworks types to U256-tuples as expected by the //! Solidity Groth16 Verifier smart contracts -use ark_ff::{BigInteger, FromBytes, PrimeField}; +use ark_ff::{BigInteger, PrimeField}; use ethers_core::types::U256; use num_traits::Zero; use ark_bn254::{Bn254, Fq, Fq2, Fr, G1Affine, G2Affine}; +use ark_serialize::CanonicalDeserialize; pub struct Inputs(pub Vec); @@ -26,8 +27,11 @@ impl From for G1Affine { fn from(src: G1) -> G1Affine { let x: Fq = u256_to_point(src.x); let y: Fq = u256_to_point(src.y); - let inf = x.is_zero() && y.is_zero(); - G1Affine::new(x, y, inf) + if x.is_zero() && y.is_zero() { + G1Affine::identity() + } else { + G1Affine::new(x, y) + } } } @@ -64,8 +68,11 @@ impl From for G2Affine { let c1 = u256_to_point(src.y[1]); let y = Fq2::new(c0, c1); - let inf = x.is_zero() && y.is_zero(); - G2Affine::new(x, y, inf) + if x.is_zero() && y.is_zero() { + G2Affine::identity() + } else { + G2Affine::new(x, y) + } } } @@ -169,14 +176,14 @@ impl From for ark_groth16::VerifyingKey { fn u256_to_point(point: U256) -> F { let mut buf = [0; 32]; point.to_little_endian(&mut buf); - let bigint = F::BigInt::read(&buf[..]).expect("always works"); - F::from_repr(bigint).expect("alwasy works") + let bigint = F::BigInt::deserialize_uncompressed(&buf[..]).expect("always works"); + F::from_bigint(bigint).expect("always works") } // Helper for converting a PrimeField to its U256 representation for Ethereum compatibility // (U256 reads data as big endian) fn point_to_u256(point: F) -> U256 { - let point = point.into_repr(); + let point = point.into_bigint(); let point_bytes = point.to_bytes_be(); U256::from(&point_bytes[..]) } @@ -185,25 +192,24 @@ fn point_to_u256(point: F) -> U256 { mod tests { use super::*; use ark_bn254::Fq; + use ark_std::UniformRand; fn fq() -> Fq { Fq::from(2) } - fn fq2() -> Fq2 { - Fq2::from(2) - } - fn fr() -> Fr { Fr::from(2) } fn g1() -> G1Affine { - G1Affine::new(fq(), fq(), false) + let rng = &mut ark_std::test_rng(); + G1Affine::rand(rng) } fn g2() -> G2Affine { - G2Affine::new(fq2(), fq2(), false) + let rng = &mut ark_std::test_rng(); + G2Affine::rand(rng) } #[test] diff --git a/src/witness/memory.rs b/src/witness/memory.rs index 1ef7fcb..1298b41 100644 --- a/src/witness/memory.rs +++ b/src/witness/memory.rs @@ -1,10 +1,12 @@ //! Safe-ish interface for reading and writing specific types to the WASM runtime's memory +use ark_serialize::CanonicalDeserialize; use num_traits::ToPrimitive; use wasmer::{Memory, MemoryView}; // TODO: Decide whether we want Ark here or if it should use a generic BigInt package -use ark_bn254::FrParameters; -use ark_ff::{BigInteger, BigInteger256, FpParameters, FromBytes, Zero}; +use ark_bn254::FrConfig; +use ark_ff::MontConfig; +use ark_ff::{BigInteger, BigInteger256, Zero}; use num_bigint::{BigInt, BigUint}; @@ -38,7 +40,7 @@ impl SafeMemory { let short_max = BigInt::from(0x8000_0000u64); let short_min = BigInt::from_biguint( num_bigint::Sign::NoSign, - BigUint::try_from(FrParameters::MODULUS).unwrap(), + BigUint::try_from(FrConfig::MODULUS).unwrap(), ) - &short_max; let r_inv = BigInt::from_str( "9915499612839321149637521777990102151350674507940716049588462388200839649614", @@ -188,7 +190,7 @@ impl SafeMemory { let buf = &buf[ptr..ptr + num_bytes * 32]; // TODO: Is there a better way to read big integers? - let big = BigInteger256::read(buf).unwrap(); + let big = BigInteger256::deserialize_uncompressed(buf).unwrap(); let big = BigUint::try_from(big).unwrap(); Ok(big.into()) } diff --git a/src/witness/witness_calculator.rs b/src/witness/witness_calculator.rs index c6a576e..49582b9 100644 --- a/src/witness/witness_calculator.rs +++ b/src/witness/witness_calculator.rs @@ -255,16 +255,16 @@ impl WitnessCalculator { } pub fn calculate_witness_element< - E: ark_ec::PairingEngine, + E: ark_ec::pairing::Pairing, I: IntoIterator)>, >( &mut self, inputs: I, sanity_check: bool, - ) -> Result> { - use ark_ff::{FpParameters, PrimeField}; + ) -> Result> { + use ark_ff::PrimeField; let witness = self.calculate_witness(inputs, sanity_check)?; - let modulus = <::Params as FpParameters>::MODULUS; + let modulus = ::MODULUS; // convert it to field elements use num_traits::Signed; @@ -277,7 +277,7 @@ impl WitnessCalculator { } else { w.to_biguint().unwrap() }; - E::Fr::from(w) + E::ScalarField::from(w) }) .collect::>(); @@ -421,7 +421,7 @@ mod tests { #[test] fn safe_multipler() { let witness = - std::fs::read_to_string(&root_path("test-vectors/safe-circuit-witness.json")).unwrap(); + std::fs::read_to_string(root_path("test-vectors/safe-circuit-witness.json")).unwrap(); let witness: Vec = serde_json::from_str(&witness).unwrap(); let witness = &witness.iter().map(|x| x.as_ref()).collect::>(); run_test(TestCase { @@ -436,7 +436,7 @@ mod tests { #[test] fn smt_verifier() { let witness = - std::fs::read_to_string(&root_path("test-vectors/smtverifier10-witness.json")).unwrap(); + std::fs::read_to_string(root_path("test-vectors/smtverifier10-witness.json")).unwrap(); let witness: Vec = serde_json::from_str(&witness).unwrap(); let witness = &witness.iter().map(|x| x.as_ref()).collect::>(); @@ -466,8 +466,8 @@ mod tests { wtns.memory.prime.to_str_radix(16), "30644E72E131A029B85045B68181585D2833E84879B9709143E1F593F0000001".to_lowercase() ); - assert_eq!(wtns.instance.get_n_vars().unwrap() as u32, case.n_vars); - assert_eq!(wtns.n64 as u32, case.n64); + assert_eq!({ wtns.instance.get_n_vars().unwrap() }, case.n_vars); + assert_eq!({ wtns.n64 }, case.n64); let inputs_str = std::fs::read_to_string(case.inputs_path).unwrap(); let inputs: std::collections::HashMap = diff --git a/src/zkey.rs b/src/zkey.rs index b5db8c1..10125ea 100644 --- a/src/zkey.rs +++ b/src/zkey.rs @@ -25,7 +25,7 @@ //! PointsC(8) //! PointsH(9) //! Contributions(10) -use ark_ff::{BigInteger256, FromBytes, PrimeField}; +use ark_ff::{BigInteger256, PrimeField}; use ark_relations::r1cs::ConstraintMatrices; use ark_serialize::{CanonicalDeserialize, SerializationError}; use ark_std::log2; @@ -33,13 +33,15 @@ use byteorder::{LittleEndian, ReadBytesExt}; use std::{ collections::HashMap, - io::{Read, Result as IoResult, Seek, SeekFrom}, + io::{Read, Seek, SeekFrom}, }; use ark_bn254::{Bn254, Fq, Fq2, Fr, G1Affine, G2Affine}; use ark_groth16::{ProvingKey, VerifyingKey}; use num_traits::Zero; +type IoResult = Result; + #[derive(Clone, Debug)] struct Section { position: u64, @@ -285,18 +287,18 @@ impl HeaderGroth { fn read(mut reader: &mut R) -> IoResult { // TODO: Impl From in Arkworks - let n8q: u32 = FromBytes::read(&mut reader)?; + let n8q: u32 = u32::deserialize_uncompressed(&mut reader)?; // group order r of Bn254 - let q = BigInteger256::read(&mut reader)?; + let q = BigInteger256::deserialize_uncompressed(&mut reader)?; - let n8r: u32 = FromBytes::read(&mut reader)?; + let n8r: u32 = u32::deserialize_uncompressed(&mut reader)?; // Prime field modulus - let r = BigInteger256::read(&mut reader)?; + let r = BigInteger256::deserialize_uncompressed(&mut reader)?; - let n_vars = u32::read(&mut reader)? as usize; - let n_public = u32::read(&mut reader)? as usize; + let n_vars = u32::deserialize_uncompressed(&mut reader)? as usize; + let n_public = u32::deserialize_uncompressed(&mut reader)? as usize; - let domain_size: u32 = FromBytes::read(&mut reader)?; + let domain_size: u32 = u32::deserialize_uncompressed(&mut reader)?; let power = log2(domain_size as usize); let verifying_key = ZVerifyingKey::new(&mut reader)?; @@ -318,15 +320,15 @@ impl HeaderGroth { // need to divide by R, since snarkjs outputs the zkey with coefficients // multiplieid by R^2 fn deserialize_field_fr(reader: &mut R) -> IoResult { - let bigint = BigInteger256::read(reader)?; - Ok(Fr::new(Fr::new(bigint).into_repr())) + let bigint = BigInteger256::deserialize_uncompressed(reader)?; + Ok(Fr::new_unchecked(Fr::new_unchecked(bigint).into_bigint())) } // skips the multiplication by R because Circom points are already in Montgomery form fn deserialize_field(reader: &mut R) -> IoResult { - let bigint = BigInteger256::read(reader)?; - // if you use ark_ff::PrimeField::from_repr it multiplies by R - Ok(Fq::new(bigint)) + let bigint = BigInteger256::deserialize_uncompressed(reader)?; + // if you use Fq::new it multiplies by R + Ok(Fq::new_unchecked(bigint)) } pub fn deserialize_field2(reader: &mut R) -> IoResult { @@ -339,14 +341,22 @@ fn deserialize_g1(reader: &mut R) -> IoResult { let x = deserialize_field(reader)?; let y = deserialize_field(reader)?; let infinity = x.is_zero() && y.is_zero(); - Ok(G1Affine::new(x, y, infinity)) + if infinity { + Ok(G1Affine::identity()) + } else { + Ok(G1Affine::new(x, y)) + } } fn deserialize_g2(reader: &mut R) -> IoResult { let f1 = deserialize_field2(reader)?; let f2 = deserialize_field2(reader)?; let infinity = f1.is_zero() && f2.is_zero(); - Ok(G2Affine::new(f1, f2, infinity)) + if infinity { + Ok(G2Affine::identity()) + } else { + Ok(G2Affine::new(f1, f2)) + } } fn deserialize_g1_vec(reader: &mut R, n_vars: u32) -> IoResult> { @@ -361,16 +371,15 @@ fn deserialize_g2_vec(reader: &mut R, n_vars: u32) -> IoResult>(); let expected = vec![g1_one(); n_vars]; @@ -497,8 +505,7 @@ mod tests { let n_vars = 10; let buf = vec![g2_buf(); n_vars] .iter() - .cloned() - .flatten() + .flatten().cloned() .collect::>(); let expected = vec![g2_one(); n_vars]; @@ -853,11 +860,11 @@ mod tests { let inputs = circom.get_public_inputs().unwrap(); let mut rng = thread_rng(); - let proof = prove::<_, _, _, CircomReduction>(circom, ¶ms, &mut rng).unwrap(); + let proof = Groth16::::prove(¶ms, circom, &mut rng).unwrap(); - let pvk = prepare_verifying_key(¶ms.vk); + let pvk = Groth16::::process_vk(¶ms.vk).unwrap(); - let verified = verify_proof(&pvk, &proof, &inputs).unwrap(); + let verified = Groth16::::verify_with_processed_vk(&pvk, &inputs, &proof).unwrap(); assert!(verified); } @@ -888,7 +895,7 @@ mod tests { let full_assignment = wtns .calculate_witness_element::(inputs, false) .unwrap(); - let proof = create_proof_with_reduction_and_matrices::<_, CircomReduction>( + let proof = Groth16::::create_proof_with_reduction_and_matrices( ¶ms, r, s, @@ -899,9 +906,9 @@ mod tests { ) .unwrap(); - let pvk = prepare_verifying_key(¶ms.vk); + let pvk = Groth16::::process_vk(¶ms.vk).unwrap(); let inputs = &full_assignment[1..num_inputs]; - let verified = verify_proof(&pvk, &proof, inputs).unwrap(); + let verified = Groth16::::verify_with_processed_vk(&pvk, inputs, &proof).unwrap(); assert!(verified); } diff --git a/tests/groth16.rs b/tests/groth16.rs index 23f8695..8b29ba3 100644 --- a/tests/groth16.rs +++ b/tests/groth16.rs @@ -3,9 +3,10 @@ use ark_std::rand::thread_rng; use color_eyre::Result; use ark_bn254::Bn254; -use ark_groth16::{ - create_random_proof as prove, generate_random_parameters, prepare_verifying_key, verify_proof, -}; +use ark_crypto_primitives::snark::SNARK; +use ark_groth16::Groth16; + +type GrothBn = Groth16; #[test] fn groth16_proof() -> Result<()> { @@ -21,17 +22,17 @@ fn groth16_proof() -> Result<()> { let circom = builder.setup(); let mut rng = thread_rng(); - let params = generate_random_parameters::(circom, &mut rng)?; + let params = GrothBn::generate_random_parameters_with_reduction(circom, &mut rng)?; let circom = builder.build()?; let inputs = circom.get_public_inputs().unwrap(); - let proof = prove(circom, ¶ms, &mut rng)?; + let proof = GrothBn::prove(¶ms, circom, &mut rng)?; - let pvk = prepare_verifying_key(¶ms.vk); + let pvk = GrothBn::process_vk(¶ms.vk).unwrap(); - let verified = verify_proof(&pvk, &proof, &inputs)?; + let verified = GrothBn::verify_with_processed_vk(&pvk, &inputs, &proof)?; assert!(verified); @@ -47,14 +48,14 @@ fn groth16_proof_wrong_input() { .unwrap(); let mut builder = CircomBuilder::new(cfg); builder.push_input("a", 3); - // This isn't a public input to the circuit, should faild + // This isn't a public input to the circuit, should fail builder.push_input("foo", 11); // create an empty instance for setting it up let circom = builder.setup(); let mut rng = thread_rng(); - let _params = generate_random_parameters::(circom, &mut rng).unwrap(); + let _params = GrothBn::generate_random_parameters_with_reduction(circom, &mut rng).unwrap(); let _ = builder.build().unwrap_err(); } @@ -74,17 +75,17 @@ fn groth16_proof_circom2() -> Result<()> { let circom = builder.setup(); let mut rng = thread_rng(); - let params = generate_random_parameters::(circom, &mut rng)?; + let params = GrothBn::generate_random_parameters_with_reduction(circom, &mut rng)?; let circom = builder.build()?; let inputs = circom.get_public_inputs().unwrap(); - let proof = prove(circom, ¶ms, &mut rng)?; + let proof = GrothBn::prove(¶ms, circom, &mut rng)?; - let pvk = prepare_verifying_key(¶ms.vk); + let pvk = GrothBn::process_vk(¶ms.vk).unwrap(); - let verified = verify_proof(&pvk, &proof, &inputs)?; + let verified = GrothBn::verify_with_processed_vk(&pvk, &inputs, &proof)?; assert!(verified); diff --git a/tests/solidity.rs b/tests/solidity.rs index 3fc79c1..c183709 100644 --- a/tests/solidity.rs +++ b/tests/solidity.rs @@ -3,7 +3,8 @@ use ark_std::rand::thread_rng; use color_eyre::Result; use ark_bn254::Bn254; -use ark_groth16::{create_random_proof as prove, generate_random_parameters}; +use ark_crypto_primitives::snark::SNARK; +use ark_groth16::Groth16; use ethers::{ contract::ContractError, @@ -27,12 +28,12 @@ async fn solidity_verifier() -> Result<()> { let circom = builder.setup(); let mut rng = thread_rng(); - let params = generate_random_parameters::(circom, &mut rng)?; + let params = Groth16::::generate_random_parameters_with_reduction(circom, &mut rng)?; let circom = builder.build()?; let inputs = circom.get_public_inputs().unwrap(); - let proof = prove(circom, ¶ms, &mut rng)?; + let proof = Groth16::::prove(¶ms, circom, &mut rng)?; // launch the network & compile the verifier let anvil = Anvil::new().spawn();