diff --git a/.gitignore b/.gitignore index c9df1dbc..a2570d8a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,5 +23,9 @@ solidity/build *.swp *.bin .DS_Store -solidity/artifacts/DKG.sol/DKG.json +*.json crates/dkg-cli/src/dkg_contract.rs + +keypair +dkg-output +*.env \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index d947e7f8..67321f9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,15 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -24,7 +33,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.6", + "generic-array", ] [[package]] @@ -36,7 +45,7 @@ dependencies = [ "cfg-if 1.0.0", "cipher 0.3.0", "cpufeatures", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -61,11 +70,23 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" -version = "0.7.19" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -91,9 +112,32 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc41c02c0d18a226947ee9ee023b1d957bdb6a68fc22ac296722935a9fef423c" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.3.0", + "ark-ff 0.3.0", + "ark-std 0.3.0", +] + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -102,12 +146,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff773c0ef8c655c98071d3026a63950798a66b2f45baef22d8334c1756f1bd18" dependencies = [ - "ark-ec", - "ark-ff", + "ark-ec 0.3.0", + "ark-ff 0.3.0", "ark-relations", - "ark-serialize", + "ark-serialize 0.3.0", "ark-snark", - "ark-std", + "ark-std 0.3.0", "blake2 0.9.2", "derivative", "digest 0.9.0", @@ -120,10 +164,28 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dea978406c4b1ca13c2db2373b05cc55429c3575b8b21f1b9ee859aa5b03dd42" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-traits", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", "num-traits", "rayon", "zeroize", @@ -144,10 +206,10 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f87b9cf6c4100b6625d0b90b9a1f029759dd35be70681abdbca57e2fd9bebe1" dependencies = [ - "ark-bls12-377", - "ark-ec", - "ark-ff", - "ark-std", + "ark-bls12-377 0.3.0", + "ark-ec 0.3.0", + "ark-ff 0.3.0", + "ark-std 0.3.0", ] [[package]] @@ -156,10 +218,10 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", "derivative", "num-bigint", "num-traits", @@ -169,6 +231,27 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rayon", + "rustc_version 0.4.0", + "zeroize", +] + [[package]] name = "ark-ff-asm" version = "0.3.0" @@ -176,7 +259,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" dependencies = [ "quote", - "syn", + "syn 1.0.103", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.103", ] [[package]] @@ -188,7 +281,33 @@ dependencies = [ "num-bigint", "num-traits", "quote", - "syn", + "syn 1.0.103", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.103", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", ] [[package]] @@ -197,8 +316,8 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cba4c1c99792a6834bd97f7fd76578ec2cd58d2afc5139a17e1d1bec65b38f6" dependencies = [ - "ark-ff", - "ark-std", + "ark-ff 0.3.0", + "ark-std 0.3.0", "tracing", "tracing-subscriber", ] @@ -209,11 +328,23 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" dependencies = [ - "ark-serialize-derive", - "ark-std", + "ark-serialize-derive 0.3.0", + "ark-std 0.3.0", "digest 0.9.0", ] +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + [[package]] name = "ark-serialize-derive" version = "0.3.0" @@ -222,7 +353,18 @@ checksum = "8dd4e5f0bf8285d5ed538d27fab7411f3e297908fd93c62195de8bee3f199e82" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.103", ] [[package]] @@ -231,9 +373,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc3dff1a5f67a9c0b34df32b079752d8dd17f1e9d06253da0453db6c1b7cc8a" dependencies = [ - "ark-ff", + "ark-ff 0.3.0", "ark-relations", - "ark-std", + "ark-std 0.3.0", ] [[package]] @@ -247,6 +389,17 @@ dependencies = [ "rayon", ] +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", + "rayon", +] + [[package]] name = "arrayref" version = "0.3.6" @@ -270,13 +423,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.58" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.58", ] [[package]] @@ -296,33 +449,20 @@ 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" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8c1df849285fbacd587de7818cc7d13be6cd2cbcd47a04fb1801b0e2706e33" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.58", ] [[package]] @@ -332,32 +472,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "base16ct" -version = "0.1.1" -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" +name = "backtrace" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee2fe4c9a0c84515f136aaae2466744a721af6d63339c18689d9e995d74d99b" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ - "base58", - "sha2 0.8.2", + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide 0.7.2", + "object", + "rustc-demangle", ] [[package]] -name = "base64" -version = "0.12.3" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -365,6 +498,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + [[package]] name = "base64ct" version = "1.5.3" @@ -373,9 +512,9 @@ checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "bech32" -version = "0.7.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dabbe35f96fb9507f7330793dc490461b2962659ac5d427181e451a623751d1" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "bincode" @@ -407,6 +546,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + [[package]] name = "bitvec" version = "0.17.4" @@ -436,9 +581,9 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -447,7 +592,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" dependencies = [ - "digest 0.10.5", + "digest 0.10.7", ] [[package]] @@ -461,43 +606,13 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array 0.14.6", -] - [[package]] name = "block-buffer" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" 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]] @@ -505,16 +620,16 @@ name = "bls-crypto" version = "0.3.0" source = "git+https://github.com/celo-org/bls-crypto#4cdc35b2320b26c6891021bf40e1b0f8a3156183" dependencies = [ - "ark-bls12-377", + "ark-bls12-377 0.3.0", "ark-crypto-primitives", - "ark-ec", + "ark-ec 0.3.0", "ark-ed-on-bw6-761", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", "blake2s_simd", "byteorder", - "clap 2.34.0", + "clap", "csv", "env_logger", "hex", @@ -528,9 +643,13 @@ dependencies = [ [[package]] name = "bs58" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] [[package]] name = "bstr" @@ -540,7 +659,7 @@ checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "lazy_static", "memchr", - "regex-automata", + "regex-automata 0.1.10", "serde", ] @@ -556,12 +675,6 @@ 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 = "byteorder" version = "1.4.3" @@ -570,9 +683,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.2.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" dependencies = [ "serde", ] @@ -618,9 +731,9 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.15.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406c859255d568f4f742b3146d51851f3bfd49f734a2c289d9107c4395ee0062" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", @@ -632,11 +745,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.74" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -692,7 +806,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.6", + "generic-array", ] [[package]] @@ -713,52 +827,13 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", - "strsim 0.8.0", - "textwrap 0.11.0", + "bitflags 1.3.2", + "strsim", + "textwrap", "unicode-width", "vec_map", ] -[[package]] -name = "clap" -version = "3.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" -dependencies = [ - "atty", - "bitflags", - "clap_derive", - "clap_lex", - "indexmap", - "once_cell", - "strsim 0.10.0", - "termcolor", - "textwrap 0.16.0", -] - -[[package]] -name = "clap_derive" -version = "3.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "clt" version = "0.0.6" @@ -772,104 +847,83 @@ dependencies = [ [[package]] name = "coins-bip32" -version = "0.7.0" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634c509653de24b439672164bbf56f5f582a2ab0e313d3b0f6af0b7345cf2560" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" dependencies = [ - "bincode", "bs58", "coins-core", - "digest 0.10.5", - "getrandom", - "hmac 0.12.1", + "digest 0.10.7", + "hmac", "k256", - "lazy_static", "serde", - "sha2 0.10.6", + "sha2", "thiserror", ] [[package]] name = "coins-bip39" -version = "0.7.0" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a11892bcac83b4c6e95ab84b5b06c76d9d70ad73548dd07418269c5c7977171" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" dependencies = [ - "bitvec 0.17.4", + "bitvec 1.0.1", "coins-bip32", - "getrandom", - "hex", - "hmac 0.12.1", - "pbkdf2", + "hmac", + "once_cell", + "pbkdf2 0.12.2", "rand 0.8.5", - "sha2 0.10.6", + "sha2", "thiserror", ] [[package]] name = "coins-core" -version = "0.7.0" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94090a6663f224feae66ab01e41a2555a8296ee07b5f20dab8888bdefc9f617" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "base58check", - "base64 0.12.3", + "base64 0.21.7", "bech32", - "blake2 0.10.4", - "digest 0.10.5", - "generic-array 0.14.6", + "bs58", + "digest 0.10.7", + "generic-array", "hex", "ripemd", "serde", "serde_derive", - "sha2 0.10.6", + "sha2", "sha3", "thiserror", ] [[package]] -name = "console" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "regex", - "terminal_size", - "unicode-width", - "winapi", -] - -[[package]] -name = "console" -version = "0.15.2" +name = "console_error_panic_hook" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "terminal_size", - "winapi", + "cfg-if 1.0.0", + "wasm-bindgen", ] [[package]] -name = "console_error_panic_hook" -version = "0.1.7" +name = "const-hex" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +checksum = "c37be52ef5e3b394db27a2341010685ad5103c72ac15ce2e9420a7e8f93f342c" dependencies = [ "cfg-if 1.0.0", - "wasm-bindgen", + "cpufeatures", + "hex", + "serde", ] [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" @@ -878,14 +932,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] -name = "convert_case" -version = "0.6.0" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ - "unicode-segmentation", + "core-foundation-sys", + "libc", ] +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + [[package]] name = "cpufeatures" version = "0.2.5" @@ -904,16 +965,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.2" @@ -955,13 +1006,13 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "generic-array 0.14.6", + "generic-array", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle", "zeroize", ] @@ -971,28 +1022,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.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -dependencies = [ - "generic-array 0.12.4", - "subtle 1.0.0", -] - [[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 2.4.1", + "generic-array", + "subtle", ] [[package]] @@ -1026,11 +1067,17 @@ dependencies = [ "cipher 0.4.3", ] +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + [[package]] name = "der" -version = "0.6.0" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -1044,7 +1091,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -1055,54 +1102,37 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "dialoguer" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9dd058f8b65922819fabb4a41e7d1964e56344042c26efbccd465202c23fa0c" -dependencies = [ - "console 0.14.1", - "lazy_static", - "tempfile", - "zeroize", + "syn 1.0.103", ] -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - [[package]] name = "digest" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.12.4", + "generic-array", ] [[package]] name = "digest" -version = "0.9.0" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "generic-array 0.14.6", + "block-buffer", + "const-oid", + "crypto-common", + "subtle", ] [[package]] -name = "digest" -version = "0.10.5" +name = "dirs" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "block-buffer 0.10.3", - "crypto-common", - "subtle 2.4.1", + "dirs-sys", ] [[package]] @@ -1115,6 +1145,18 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1174,14 +1216,16 @@ checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", + "digest 0.10.7", "elliptic-curve", "rfc6979", "signature", + "spki", ] [[package]] @@ -1192,21 +1236,20 @@ checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "der", - "digest 0.10.5", + "digest 0.10.7", "ff", - "generic-array 0.14.6", + "generic-array", "group", "pkcs8", "rand_core 0.6.4", "sec1", - "subtle 2.4.1", + "subtle", "zeroize", ] @@ -1219,12 +1262,6 @@ dependencies = [ "log", ] -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - [[package]] name = "encoding_rs" version = "0.8.31" @@ -1234,6 +1271,24 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3", + "zeroize", +] + [[package]] name = "env_logger" version = "0.9.1" @@ -1247,6 +1302,22 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "eth-keystore" version = "0.5.0" @@ -1255,15 +1326,15 @@ checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ "aes 0.8.2", "ctr", - "digest 0.10.5", + "digest 0.10.7", "hex", - "hmac 0.12.1", - "pbkdf2", + "hmac", + "pbkdf2 0.11.0", "rand 0.8.5", "scrypt", "serde", "serde_json", - "sha2 0.10.6", + "sha2", "sha3", "thiserror", "uuid", @@ -1271,9 +1342,9 @@ dependencies = [ [[package]] name = "ethabi" -version = "17.2.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4966fba78396ff92db3b817ee71143eccd98acf0f876b8d600e585a670c5d1b" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ "ethereum-types", "hex", @@ -1288,9 +1359,9 @@ dependencies = [ [[package]] name = "ethbloom" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", @@ -1303,9 +1374,9 @@ dependencies = [ [[package]] name = "ethereum-types" -version = "0.13.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", @@ -1319,9 +1390,9 @@ dependencies = [ [[package]] name = "ethers" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2f6be73d1978a881402f8ca28466199156b560ac36527224bbe632b14faa373" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -1330,13 +1401,14 @@ dependencies = [ "ethers-middleware", "ethers-providers", "ethers-signers", + "ethers-solc", ] [[package]] name = "ethers-addressbook" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b8c9da375d178d59a50f9a5d31ede4475a0f60cd5184c3db00f172b25f7e11" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" dependencies = [ "ethers-core", "once_cell", @@ -1346,16 +1418,16 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "002a0d58a7d921b496f5f19b5b9508d01d25fbe25078286b1fcb6f4e7562acf7" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" dependencies = [ + "const-hex", "ethers-contract-abigen", "ethers-contract-derive", "ethers-core", "ethers-providers", "futures-util", - "hex", "once_cell", "pin-project", "serde", @@ -1365,70 +1437,69 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f389525de61c1c4807fddc804a151ca3c5a5b6f2dc759689424777b7ba617" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" dependencies = [ "Inflector", - "cfg-if 1.0.0", + "const-hex", "dunce", "ethers-core", + "ethers-etherscan", "eyre", - "getrandom", - "hex", + "prettyplease", "proc-macro2", "quote", "regex", "reqwest", "serde", "serde_json", - "syn", - "url", + "syn 2.0.58", + "toml 0.8.12", "walkdir", ] [[package]] name = "ethers-contract-derive" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445276414690c97d88638d22dd5f89ba919d7dcea36de4825896d52280c704c7" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" dependencies = [ + "Inflector", + "const-hex", "ethers-contract-abigen", "ethers-core", - "hex", "proc-macro2", "quote", "serde_json", - "syn", + "syn 2.0.58", ] [[package]] name = "ethers-core" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06338c311c6a0a7ed04877d0fb0f0d627ed390aaa3429b4e041b8d17348a506d" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" dependencies = [ "arrayvec", "bytes", "cargo_metadata", "chrono", - "convert_case", + "const-hex", "elliptic-curve", "ethabi", - "generic-array 0.14.6", - "hex", + "generic-array", "k256", + "num_enum", "once_cell", "open-fastrlp", - "proc-macro2", "rand 0.8.5", "rlp", - "rlp-derive", - "rust_decimal", "serde", "serde_json", "strum", - "syn", + "syn 2.0.58", + "tempfile", "thiserror", "tiny-keccak", "unicode-xid", @@ -1436,16 +1507,15 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3acd2c48d240ae13a4ed3ac88dc15b31bc1ba9513a072e080d4a32fda1637b" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" dependencies = [ + "chrono", "ethers-core", - "getrandom", "reqwest", "semver 1.0.14", "serde", - "serde-aux", "serde_json", "thiserror", "tracing", @@ -1453,17 +1523,17 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51bc2555522673e8a890b79615e04dd9ef40f0ab0a73e745024fdda15710d69" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" dependencies = [ "async-trait", - "auto_impl 0.5.0", + "auto_impl", "ethers-contract", "ethers-core", - "ethers-etherscan", "ethers-providers", "ethers-signers", + "futures-channel", "futures-locks", "futures-util", "instant", @@ -1479,69 +1549,72 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cc65f79e2168aac5ca4a659bb6639c78164a6a5b18c954cc7699b6ce5ac6275" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" dependencies = [ "async-trait", - "auto_impl 1.0.1", - "base64 0.13.1", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", "ethers-core", "futures-core", "futures-timer", "futures-util", - "getrandom", "hashers", - "hex", "http", + "instant", + "jsonwebtoken", "once_cell", - "parking_lot 0.11.2", "pin-project", "reqwest", "serde", "serde_json", "thiserror", "tokio", + "tokio-tungstenite", "tracing", "tracing-futures", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-timer", "web-sys", "ws_stream_wasm", ] [[package]] name = "ethers-signers" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f97da069cd77dd91a0a7f0c979f063a4bf9d2533b277ff5ccb19b7ac348376" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", + "const-hex", "elliptic-curve", "eth-keystore", "ethers-core", - "hex", "rand 0.8.5", - "sha2 0.10.6", + "sha2", "thiserror", + "tracing", ] [[package]] name = "ethers-solc" -version = "1.0.0" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed856e3e0d07a0ffbc79157e3dd0ed10b45b6736eff6a878d40a1e57f224988" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" dependencies = [ "cfg-if 1.0.0", + "const-hex", + "dirs", "dunce", "ethers-core", - "getrandom", "glob", - "hex", "home", "md-5", "num_cpus", @@ -1572,36 +1645,27 @@ 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 = "fastrand" -version = "1.8.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[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 0.6.4", - "subtle 2.4.1", + "subtle", ] [[package]] name = "fixed-hash" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", "rand 0.8.5", @@ -1622,7 +1686,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.5.4", ] [[package]] @@ -1633,9 +1697,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1679,9 +1743,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1689,9 +1753,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" @@ -1706,55 +1770,58 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-locks" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb42d4fb72227be5778429f9ef5240a38a358925a49f05b5cf702ce7c7e558a" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" dependencies = [ "futures-channel", "futures-task", - "tokio", ] [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.58", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -1779,21 +1846,13 @@ dependencies = [ [[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" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -1807,9 +1866,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -1818,21 +1877,39 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] [[package]] name = "group" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle", ] [[package]] @@ -1852,7 +1929,7 @@ checksum = "729f9bd3449d77e7831a18abfb7ba2f99ee813dfd15b8c2167c9a54ba20aa99d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -1867,7 +1944,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.1", "slab", "tokio", "tokio-util", @@ -1880,9 +1957,24 @@ 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.6", ] +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "hashers" version = "1.0.1" @@ -1894,9 +1986,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -1907,6 +1999,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + [[package]] name = "hex" version = "0.4.3" @@ -1915,22 +2013,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa08a006102488bd9cd5b8013aabe84955cf5ae22e304c2caf655b633aefae3" -dependencies = [ - "digest 0.8.1", - "hmac 0.7.1", -] - -[[package]] -name = "hmac" -version = "0.7.1" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ - "crypto-mac 0.7.0", - "digest 0.8.1", + "hmac", ] [[package]] @@ -1939,16 +2026,16 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.5", + "digest 0.10.7", ] [[package]] name = "home" -version = "0.5.4" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747309b4b440c06d57b0b25f2aee03ee9b5e5397d288c60e21fc709bb98a7408" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -2008,7 +2095,7 @@ dependencies = [ "httpdate", "itoa 1.0.4", "pin-project-lite", - "socket2", + "socket2 0.4.7", "tokio", "tower-service", "tracing", @@ -2017,10 +2104,11 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", "rustls", @@ -2030,9 +2118,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2058,9 +2146,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ "serde", ] @@ -2073,7 +2161,7 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -2089,19 +2177,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] -name = "indicatif" -version = "0.16.2" +name = "indexmap" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "console 0.15.2", - "lazy_static", - "number_prefix", - "regex", + "equivalent", + "hashbrown 0.14.3", ] [[package]] @@ -2110,7 +2196,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]] @@ -2120,9 +2206,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -2140,6 +2223,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.8" @@ -2170,17 +2262,32 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "k256" -version = "0.11.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if 1.0.0", "ecdsa", "elliptic-curve", - "sha2 0.10.6", - "sha3", + "once_cell", + "sha2", + "signature", ] [[package]] @@ -2191,34 +2298,32 @@ checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] name = "lalrpop" -version = "0.19.8" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", - "atty", "bit-set", - "diff", "ena", - "itertools", + "itertools 0.11.0", "lalrpop-util", "petgraph", - "pico-args", "regex", - "regex-syntax", + "regex-syntax 0.8.3", "string_cache", "term", "tiny-keccak", "unicode-xid", + "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.19.8" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex", + "regex-automata 0.4.6", ] [[package]] @@ -2229,9 +2334,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -2258,7 +2369,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" dependencies = [ - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -2267,14 +2378,14 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" dependencies = [ - "digest 0.10.5", + "digest 0.10.7", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memoffset" @@ -2300,16 +2411,24 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + [[package]] name = "mio" -version = "0.8.5" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "log", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2350,40 +2469,58 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] -name = "num_threads" -version = "0.1.6" +name = "num_enum" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ - "libc", + "num_enum_derive", ] [[package]] -name = "number_prefix" -version = "0.4.0" +name = "num_enum_derive" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.58", +] [[package]] -name = "once_cell" -version = "1.16.0" +name = "num_threads" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] [[package]] -name = "opaque-debug" -version = "0.2.3" +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -2393,12 +2530,12 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "open-fastrlp" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131de184f045153e72c537ef4f1d57babddf2a897ca19e67bdff697aebba7f3d" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" dependencies = [ "arrayvec", - "auto_impl 1.0.1", + "auto_impl", "bytes", "ethereum-types", "open-fastrlp-derive", @@ -2413,14 +2550,14 @@ dependencies = [ "bytes", "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] -name = "os_str_bytes" -version = "6.3.1" +name = "option-ext" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3baf96e39c5359d2eb0dd6ccb42c62b91d9678aa68160d261b9e0ccbf9e9dea9" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "parity-scale-codec" @@ -2445,18 +2582,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.5", + "syn 1.0.103", ] [[package]] @@ -2466,21 +2592,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.4", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2493,7 +2605,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -2504,7 +2616,7 @@ checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle", ] [[package]] @@ -2525,17 +2637,36 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.5", - "hmac 0.12.1", + "digest 0.10.7", + "hmac", "password-hash", - "sha2 0.10.6", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", ] [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" @@ -2554,7 +2685,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.1", ] [[package]] @@ -2569,37 +2700,35 @@ dependencies = [ [[package]] name = "phf" -version = "0.10.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", - "phf_shared", - "proc-macro-hack", + "phf_shared 0.11.2", ] [[package]] name = "phf_generator" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared", + "phf_shared 0.11.2", "rand 0.8.5", ] [[package]] name = "phf_macros" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", - "phf_shared", - "proc-macro-hack", + "phf_shared 0.11.2", "proc-macro2", "quote", - "syn", + "syn 2.0.58", ] [[package]] @@ -2612,36 +2741,39 @@ dependencies = [ ] [[package]] -name = "pico-args" -version = "0.4.2" +name = "phf_shared" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.58", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2651,9 +2783,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der", "spki", @@ -2672,7 +2804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" dependencies = [ "cpufeatures", - "opaque-debug 0.3.0", + "opaque-debug", "universal-hash", ] @@ -2688,11 +2820,21 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "prettyplease" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" +dependencies = [ + "proc-macro2", + "syn 2.0.58", +] + [[package]] name = "primitive-types" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -2710,44 +2852,14 @@ checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" dependencies = [ "once_cell", "thiserror", - "toml", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml 0.5.9", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -2759,7 +2871,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "num-traits", @@ -2767,7 +2879,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha", "rand_xorshift", - "regex-syntax", + "regex-syntax 0.6.27", "rusty-fork", "tempfile", ] @@ -2786,9 +2898,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.21" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2874,26 +2986,22 @@ dependencies = [ [[package]] name = "rayon" -version = "1.5.3" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -2911,7 +3019,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2927,13 +3035,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -2942,12 +3051,29 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + [[package]] name = "regex-syntax" version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + [[package]] name = "remove_dir_all" version = "0.5.3" @@ -2959,11 +3085,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.12" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.13.1", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -2985,6 +3111,8 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", + "system-configuration", "tokio", "tokio-rustls", "tower-service", @@ -2998,13 +3126,12 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "crypto-bigint", - "hmac 0.12.1", - "zeroize", + "hmac", + "subtle", ] [[package]] @@ -3016,19 +3143,34 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if 1.0.0", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + [[package]] name = "ripemd" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.5", + "digest 0.10.7", ] [[package]] @@ -3038,6 +3180,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] @@ -3049,19 +3192,14 @@ checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] -name = "rust_decimal" -version = "1.26.1" +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee9164faf726e4f3ece4978b25ca877ddc6802fa77f38cdccb32c7f805ecd70c" -dependencies = [ - "arrayvec", - "num-traits", - "serde", -] +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hex" @@ -3087,16 +3225,29 @@ dependencies = [ "semver 1.0.14", ] +[[package]] +name = "rustix" +version = "0.38.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" -version = "0.20.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring", + "ring 0.17.8", + "rustls-webpki", "sct", - "webpki", ] [[package]] @@ -3108,6 +3259,16 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.9" @@ -3171,7 +3332,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -3186,10 +3347,10 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ - "hmac 0.12.1", - "pbkdf2", + "hmac", + "pbkdf2 0.11.0", "salsa20", - "sha2 0.10.6", + "sha2", ] [[package]] @@ -3198,21 +3359,21 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", - "generic-array 0.14.6", + "generic-array", "pkcs8", - "subtle 2.4.1", + "subtle", "zeroize", ] @@ -3243,6 +3404,12 @@ dependencies = [ "pest", ] +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "send_wrapper" version = "0.5.0" @@ -3258,16 +3425,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-aux" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79c1a5a310c28bf9f7a4b9bd848553051120d80a5952f993c7eb62f6ed6e4c5" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "serde_derive" version = "1.0.147" @@ -3276,7 +3433,7 @@ checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -3290,6 +3447,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3310,43 +3476,18 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.5", -] - -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.7", ] [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.5", + "digest 0.10.7", ] [[package]] @@ -3355,7 +3496,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ - "digest 0.10.5", + "digest 0.10.7", "keccak", ] @@ -3370,14 +3511,26 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.5", + "digest 0.10.7", "rand_core 0.6.4", ] +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror", + "time", +] + [[package]] name = "siphasher" version = "0.3.10" @@ -3409,16 +3562,27 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "solang-parser" -version = "0.1.18" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8ac4bfef383f368bd9bb045107a501cd9cd0b64ad1983e1b7e839d6a44ecad" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" dependencies = [ - "itertools", + "itertools 0.11.0", "lalrpop", "lalrpop-util", "phf", + "thiserror", "unicode-xid", ] @@ -3428,11 +3592,17 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -3452,8 +3622,8 @@ checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.1", - "phf_shared", + "parking_lot", + "phf_shared 0.10.0", "precomputed-hash", ] @@ -3463,40 +3633,28 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strum" -version = "0.24.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.24.3" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn", + "syn 2.0.58", ] -[[package]] -name = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - [[package]] name = "subtle" version = "2.4.1" @@ -3505,31 +3663,20 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "svm-rs" -version = "0.2.18" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4cdcf91153dc0e4e0637f26f042ada32a3b552bc8115935c7bf96f80132b0a" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" dependencies = [ - "anyhow", - "cfg-if 1.0.0", - "clap 3.2.23", - "console 0.14.1", - "dialoguer", + "dirs", "fs2", "hex", - "home", - "indicatif", - "itertools", "once_cell", - "rand 0.8.5", "reqwest", "semver 1.0.14", "serde", "serde_json", - "sha2 0.9.9", - "tempfile", + "sha2", "thiserror", - "tokio", - "tracing", "url", "zip", ] @@ -3545,6 +3692,23 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "synstructure" version = "0.12.6" @@ -3553,10 +3717,31 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", "unicode-xid", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tap" version = "1.0.1" @@ -3575,16 +3760,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if 1.0.0", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -3607,16 +3790,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "textwrap" version = "0.11.0" @@ -3626,12 +3799,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.37" @@ -3649,26 +3816,26 @@ checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] name = "threshold-bls" version = "0.3.0" dependencies = [ - "ark-bls12-377", - "ark-ec", - "ark-ff", - "ark-serialize", + "ark-bls12-377 0.4.0", + "ark-bls12-381", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "bincode", - "bls-crypto", "chacha20poly1305", "hkdf", "proptest", "rand 0.8.5", "rand_core 0.6.4", "serde", - "sha2 0.8.2", + "sha2", "static_assertions", "thiserror", ] @@ -3745,44 +3912,57 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.24.2" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.6", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.58", ] [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ + "futures-util", + "log", "rustls", "tokio", - "webpki", + "tokio-rustls", + "tungstenite", + "webpki-roots", ] [[package]] @@ -3808,6 +3988,40 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tower-service" version = "0.3.2" @@ -3834,7 +4048,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", ] [[package]] @@ -3872,6 +4086,26 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "typenum" version = "1.15.0" @@ -3886,9 +4120,9 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "uint" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45526d29728d135c2900b0d30573fe3ee79fceb12ef534c7bb30e810a91b601" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -3898,9 +4132,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -3917,12 +4151,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" - [[package]] name = "unicode-width" version = "0.1.10" @@ -3941,8 +4169,8 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.6", - "subtle 2.4.1", + "generic-array", + "subtle", ] [[package]] @@ -3951,17 +4179,29 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "uuid" version = "0.8.2" @@ -4001,12 +4241,11 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -4047,7 +4286,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.103", "wasm-bindgen-shared", ] @@ -4081,7 +4320,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4092,21 +4331,6 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.60" @@ -4117,24 +4341,11 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" -version = "0.22.5" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" -dependencies = [ - "webpki", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "winapi" @@ -4173,13 +4384,61 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.0", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm 0.42.0", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -4188,49 +4447,143 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + [[package]] name = "windows_aarch64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + [[package]] name = "windows_i686_gnu" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + [[package]] name = "windows_i686_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + [[package]] name = "windows_x86_64_gnu" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + [[package]] name = "windows_x86_64_msvc" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "winnow" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] @@ -4244,7 +4597,7 @@ dependencies = [ "js-sys", "pharos", "rustc_version 0.4.0", - "send_wrapper", + "send_wrapper 0.5.0", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -4266,11 +4619,31 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + [[package]] name = "zeroize" -version = "1.5.7" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -4283,7 +4656,7 @@ checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.103", "synstructure", ] @@ -4300,8 +4673,8 @@ dependencies = [ "crc32fast", "crossbeam-utils", "flate2", - "hmac 0.12.1", - "pbkdf2", + "hmac", + "pbkdf2 0.11.0", "sha1", "time", "zstd", diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..4809a785 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +-include .env + +build: + cargo build --profile release + +deploy: + ./target/release/dkg-cli deploy -n $(NODE_URL) -p $(PRIVATE_KEY) -t $(THRESHOLD) -P $(PHASE_DURATION) + +allow-self: + ./target/release/dkg-cli allow -n $(NODE_URL) -p $(PRIVATE_KEY) -c $(CONTRACT_ADDRESS) -a $(SELF_ADDRESS) + +run: + ./target/release/dkg-cli run -n $(NODE_URL) -p $(PRIVATE_KEY) -c $(CONTRACT_ADDRESS) -o dkg-output + +start: + ./target/release/dkg-cli start -n $(NODE_URL) -p $(PRIVATE_KEY) -c $(CONTRACT_ADDRESS) diff --git a/README.md b/README.md index 5e5e86dc..4ab3e3ac 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@

Threshold BLS Signatures and DKG

+Fork of the Celo [project](https://github.com/celo-org/celo-threshold-bls-rs). + ## Overview This crate provides libraries and command line interfaces for producing threshold BLS signatures. The signatures can also be [blind](https://en.wikipedia.org/wiki/Blind_signature) in order to preserve the privacy of the user asking for a signature from another set of parties. diff --git a/crates/dkg-cli/Cargo.toml b/crates/dkg-cli/Cargo.toml index b560bf1c..045e22cb 100644 --- a/crates/dkg-cli/Cargo.toml +++ b/crates/dkg-cli/Cargo.toml @@ -24,8 +24,8 @@ serde_json = "1.0.53" hex = "0.4.2" anyhow = "1.0.31" -ethers = { version = "1.0.0" , features = ["celo"] } -ethers-solc = "1.0.0" +ethers = { version = "2.0", features = ["legacy", "abigen", "rustls"], default-features = false } +ethers-solc = "2.0" futures = "0.3.5" async-trait = "0.1.35" tokio = { version = "1.24.2", features = ["macros", "time"] } @@ -33,7 +33,7 @@ rustc-hex = "2.1.0" clt = "0.0.6" [build-dependencies] -ethers = { version = "1.0.0" , features = ["celo", "abigen"] } -ethers-solc = "1.0.0" +ethers = { version = "2.0" , features = ["abigen"], default-features = false } +ethers-solc = "2.0" serde = "1.0.106" serde_json = "1.0.53" diff --git a/crates/dkg-cli/Dockerfile b/crates/dkg-cli/Dockerfile index a693c3ec..54c8b2d8 100644 --- a/crates/dkg-cli/Dockerfile +++ b/crates/dkg-cli/Dockerfile @@ -3,11 +3,11 @@ FROM cimg/rust:1.65.0 ENV HOME=/home/circleci ENV PATH=$HOME/bin:$PATH -RUN cd $HOME && git clone https://github.com/celo-org/celo-threshold-bls-rs +RUN cd $HOME && git clone https://github.com/m-kus/threshold-bls-rs RUN mkdir $HOME/bin && wget -q https://github.com/ethereum/solidity/releases/download/v0.6.6/solc-static-linux -O $HOME/bin/solc && chmod u+x $HOME/bin/solc && solc --version -RUN cd $HOME && cd celo-threshold-bls-rs/crates/dkg-cli && RUSTFLAGS="-C target-feature=-crt-static" cargo build --release +RUN cd $HOME && cd threshold-bls-rs/crates/dkg-cli && RUSTFLAGS="-C target-feature=-crt-static" cargo build --release FROM ubuntu:22.04 -COPY --from=0 /home/circleci/celo-threshold-bls-rs/target/release/dkg-cli /dkgbin +COPY --from=0 /home/circleci/threshold-bls-rs/target/release/dkg-cli /dkgbin WORKDIR /dkg ENTRYPOINT [ "/dkgbin" ] diff --git a/crates/dkg-cli/README.md b/crates/dkg-cli/README.md index 77ff0647..aa1719ba 100644 --- a/crates/dkg-cli/README.md +++ b/crates/dkg-cli/README.md @@ -2,7 +2,7 @@ This crate provides a CLI to the provided DKG. -As explained in [`dkg-core`](../dkg-core), there are a few phases. For each phase, users perform some computation which is then published to a "board". An authenticated channel is assumed for publishing to the board. In this CLI, the board is assumed to be a smart contract on the Celo Blockchain. Before advancing to each of the next phases, the board gathers all participants' contributions and combines them in a data structure which gets downloaded from the chain. These contributions are then used by each participant in the next round. +As explained in [`dkg-core`](../dkg-core), there are a few phases. For each phase, users perform some computation which is then published to a "board". An authenticated channel is assumed for publishing to the board. In this CLI, the board is assumed to be a smart contract on a EVM compatible chain. Before advancing to each of the next phases, the board gathers all participants' contributions and combines them in a data structure which gets downloaded from the chain. These contributions are then used by each participant in the next round. ## Participating in the DKG @@ -17,7 +17,7 @@ We will use the Alfajores testnet for this example, which you can access by usin 1. `dkg-cli keygen --path ./keypair` -This will generate your keypair. You should then fund the `address` with some CGLD +This will generate your keypair. You should then fund the `address` with some tokens to pay for transaction fees and send it to the DKG deployer, so that they allow you to participate in the DKG. @@ -52,9 +52,9 @@ Usage: dkg-cli run [OPTIONS] Optional arguments: -h, --help - -n, --node-url NODE-URL the celo node's endpoint + -n, --node-url NODE-URL the RPC node's endpoint -p, --private-key PRIVATE-KEY - path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one) + path to your private key (hint: use the `keygen` command to generate a new one if you don't have one) -c, --contract-address CONTRACT-ADDRESS the DKG contract's address -o, --output-path OUTPUT-PATH @@ -75,9 +75,9 @@ Usage: dkg-cli reshare [OPTIONS] Optional arguments: -h, --help - -n, --node-url NODE-URL the celo node's endpoint + -n, --node-url NODE-URL the RPC node's endpoint -p, --private-key PRIVATE-KEY - path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one) + path to your private key (hint: use the `keygen` command to generate a new one if you don't have one) -c, --contract-address CONTRACT-ADDRESS the DKG resharing contract's address -o, --output-path OUTPUT-PATH @@ -96,9 +96,9 @@ Usage: dkg-cli deploy [OPTIONS] Optional arguments: -h, --help - -n, --node-url NODE-URL the celo node's endpoint + -n, --node-url NODE-URL the RPC node's endpoint -p, --private-key PRIVATE-KEY - path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one) + path to your private key (hint: use the `keygen` command to generate a new one if you don't have one) -t, --threshold THRESHOLD the minimum number of DKG participants required -P, --phase-duration PHASE-DURATION the number of blocks per phase @@ -112,9 +112,9 @@ Usage: dkg-cli allow [OPTIONS] Optional arguments: -h, --help - -n, --node-url NODE-URL the celo node's endpoint + -n, --node-url NODE-URL the RPC node's endpoint -p, --private-key PRIVATE-KEY - path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one) + path to your private key (hint: use the `keygen` command to generate a new one if you don't have one) -a, --address ADDRESS the addresses to allow for the DKG -c, --contract-address CONTRACT-ADDRESS the DKG contract's address @@ -129,15 +129,15 @@ Usage: dkg-cli start [OPTIONS] Optional arguments: -h, --help - -n, --node-url NODE-URL the celo node's endpoint + -n, --node-url NODE-URL the RPC node's endpoint -p, --private-key PRIVATE-KEY - path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one) + path to your private key (hint: use the `keygen` command to generate a new one if you don't have one) -c, --contract-address CONTRACT-ADDRESS the DKG contract's address ``` ## Using Docker -A docker image of the CLI can be used instead via `docker run -ti kobigurk/celo-dkg` +A docker image of the CLI can be used instead via `docker run -ti ghcr.io/m-kus/dkg-cli` -NOTE: Docker is tricky to install on recent Fedora, but Podman works fine. The only changes needed are changing docker to podman, and adding a parameter to override SELinux for the mount: `podman run -ti --security-opt label=disable -v $PWD:/dkg kobigurk/celo-dkg`. +NOTE: Docker is tricky to install on recent Fedora, but Podman works fine. The only changes needed are changing docker to podman, and adding a parameter to override SELinux for the mount: `podman run -ti --security-opt label=disable -v $PWD:/dkg ghcr.io/m-kus/dkg-cli`. diff --git a/crates/dkg-cli/blockchain_test.sh b/crates/dkg-cli/blockchain_test.sh deleted file mode 100755 index abda72be..00000000 --- a/crates/dkg-cli/blockchain_test.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -NODE_URL="https://alfajores-forno.celo-testnet.org" - -# We have 4 pre-funded Celo accounts on Alfajores via the faucet -# https://celo.org/developers/faucet -ACC1='{"address":"0xb41998dc0db80898e691127ed06444ae90a0724b","privateKey":"0b9c5fa5b83e7b7625c7fee0f576cd2118786733e13c2a83bfe771d9d4fd0fb3"}' -ACC2='{"address":"0x48ad174c5b3863d9c129e8e700cd452a14b3c627","privateKey":"334dfa0dc5abeb2288f83374fb7b87c4dcc68ad4f3caffc961685f4011b9cb76"}' -ACC3='{"address":"0x5b8e00d725225bcd138062b187239893a8e99c27","privateKey":"7e7b2279508e0f7ad3b028773fa53bf11933ed716e6c55b95ef2073afcce4f4c"}' -ACC4='{"address":"0xc46ba6ba7604cccd16196878d98adbb610d7346a","privateKey":"ef0c8c2e816633fd336defe3f824bec141b2d2d01267d38344d55bb2fce05da6"}' - -# This example uses a threshold of 3 with each phase lasting 7 blocks (~45 sec) -THRESHOLD=3 -PHASE_DURATION=7 - -# Helper to get the private key from the account json -private_key() { - echo $1 | jq -r '.privateKey' -} - -# Helper to get the address key from the account json -address() { - ADDR=$(echo $1 | jq -r '.address') - # strip the 0x prefix - echo ${ADDR#"0x"} -} - -# First we deploy the contract and get its address -ADDR=$(cargo run --bin dkg-cli deploy \ - -n $NODE_URL \ - -p $(private_key $ACC1) \ - --threshold $THRESHOLD \ - --phase-duration $PHASE_DURATION) -# strip the unused info -ADDR=${ADDR#"Contract deployed at: 0x"} - -# The admin allows all addresses -cargo run --bin dkg-cli -- allow \ - -n $NODE_URL \ - -p $(private_key $ACC1) \ - -c $ADDR \ - -a $(address $ACC1) \ - -a $(address $ACC2) \ - -a $(address $ACC3) \ - -a $(address $ACC4) - -# helper to run the DKG command -run() { - yes | cargo run --bin dkg-cli -- run -n $NODE_URL -p $(private_key $1) -c $ADDR -o $2 -} - -# Each participant launches the job -run $ACC1 ./acc1_share & -run $ACC2 ./acc2_share & -run $ACC3 ./acc3_share & -run $ACC4 ./acc4_share & - -# sleep 10 seconds so that all participants register -sleep 10 - -# go! -cargo run --bin dkg-cli -- start \ - -n $NODE_URL \ - -p $(private_key $ACC1) \ - -c $ADDR diff --git a/crates/dkg-cli/build.rs b/crates/dkg-cli/build.rs index f4ea5ee7..31d4416a 100644 --- a/crates/dkg-cli/build.rs +++ b/crates/dkg-cli/build.rs @@ -1,4 +1,5 @@ use ethers::contract::Abigen; +use ethers::utils::hex::ToHex; use ethers_solc::{Project, ProjectPathsConfig}; use std::fs::File; use std::io::Write; @@ -25,9 +26,9 @@ fn main() { let contract = compiler_output.find(full_path, CONTRACT_NAME).unwrap(); let mut f = File::create("dkg.bin").expect("could not create DKG bytecode file"); - let bytecode_obj = contract.bytecode.clone().unwrap().object; - let s = serde_json::to_string(&bytecode_obj).unwrap(); - f.write_all(s.as_bytes()) + let bytecode: String = contract.bytecode.clone().unwrap().object.encode_hex(); + + f.write_all(bytecode.as_bytes()) .expect("could not write DKG bytecode to the file"); // generate type-safe bindings to it @@ -41,4 +42,16 @@ fn main() { bindings .write_to_file("./src/dkg_contract.rs") .expect("could not write bindings to file"); + + let verification_input = project + .standard_json_input(project.sources_path().join("DKG.sol")) + .unwrap(); + let mut j = File::create("dkg.json").expect("could not create DKG standard sol input file"); + + j.write_all( + serde_json::to_string(&verification_input) + .unwrap() + .as_bytes(), + ) + .expect("could not write DKG standard json input to the file"); } diff --git a/crates/dkg-cli/src/actions.rs b/crates/dkg-cli/src/actions.rs index dfa8730f..1bf3c4c8 100644 --- a/crates/dkg-cli/src/actions.rs +++ b/crates/dkg-cli/src/actions.rs @@ -3,7 +3,7 @@ use crate::{ opts::*, }; use rand::{CryptoRng, RngCore}; -use std::{fs::File, io::Write, sync::Arc}; +use std::{fs::File, io::Write, sync::Arc, time::Duration}; use dkg_core::{ primitives::{joint_feldman::*, resharing::RDKG, *}, @@ -24,8 +24,15 @@ use threshold_bls::{ sig::Share, }; +/// Target chain ID +/// TODO: move it to config +pub const CHAIN_ID: u32 = 128123; +/// Polling interval +/// TODO: move it to config +pub const INTERVAL_MS: u64 = 1000; + #[derive(Serialize, Deserialize, Debug)] -struct CeloKeypairJson { +struct KeypairJson { address: Address, #[serde(rename = "privateKey")] private_key: String, @@ -36,8 +43,8 @@ where R: CryptoRng + RngCore, { let wallet = Wallet::new(rng); - let output = CeloKeypairJson { - private_key: hex::encode(&wallet.signer().to_bytes()), + let output = KeypairJson { + private_key: hex::encode(wallet.signer().to_bytes()), address: wallet.address(), }; @@ -56,8 +63,12 @@ pub async fn deploy(opts: DeployOpts) -> Result<()> { let bytecode = include_str!["../dkg.bin"]; let bytecode = bytecode.from_hex::>()?; - let provider = Provider::::try_from(opts.node_url.as_str())?; - let wallet = opts.private_key.parse::()?; + let provider = Provider::::try_from(opts.node_url.as_str())? + .interval(Duration::from_millis(INTERVAL_MS)); + let wallet = opts + .private_key + .parse::()? + .with_chain_id(CHAIN_ID); let client = SignerMiddleware::new(provider, wallet); let client = Arc::new(client); @@ -74,8 +85,12 @@ pub async fn deploy(opts: DeployOpts) -> Result<()> { } pub async fn allow(opts: AllowlistOpts) -> Result<()> { - let provider = Provider::::try_from(opts.node_url.as_str())?; - let wallet = opts.private_key.parse::()?; + let provider = Provider::::try_from(opts.node_url.as_str())? + .interval(Duration::from_millis(INTERVAL_MS)); + let wallet = opts + .private_key + .parse::()? + .with_chain_id(CHAIN_ID); let client = SignerMiddleware::new(provider, wallet); let client = Arc::new(client); @@ -91,8 +106,12 @@ pub async fn allow(opts: AllowlistOpts) -> Result<()> { } pub async fn start(opts: StartOpts) -> Result<()> { - let provider = Provider::::try_from(opts.node_url.as_str())?; - let wallet = opts.private_key.parse::()?; + let provider = Provider::::try_from(opts.node_url.as_str())? + .interval(Duration::from_millis(INTERVAL_MS)); + let wallet = opts + .private_key + .parse::()? + .with_chain_id(CHAIN_ID); let client = SignerMiddleware::new(provider, wallet); let client = Arc::new(client); let contract = DKGContract::new(opts.contract_address, client); @@ -111,8 +130,12 @@ where M: Middleware, R: RngCore, { - let provider = Provider::::try_from(opts.node_url.as_str())?; - let wallet = opts.private_key.parse::()?; + let provider = Provider::::try_from(opts.node_url.as_str())? + .interval(Duration::from_millis(INTERVAL_MS)); + let wallet = opts + .private_key + .parse::()? + .with_chain_id(CHAIN_ID); let client = SignerMiddleware::new(provider, wallet); let client = Arc::new(client); @@ -156,8 +179,12 @@ where S: Scheme::Point, Private = ::Scalar>, R: RngCore, { - let provider = Provider::::try_from(opts.node_url.as_str())?; - let wallet = opts.private_key.parse::()?; + let provider = Provider::::try_from(opts.node_url.as_str())? + .interval(Duration::from_millis(INTERVAL_MS)); + let wallet = opts + .private_key + .parse::()? + .with_chain_id(CHAIN_ID); let client = SignerMiddleware::new(provider, wallet); let client = Arc::new(client); @@ -334,8 +361,7 @@ async fn wait_for_phase( break; } print!("."); - // 6s for 1 Celo block - tokio::time::sleep(std::time::Duration::from_millis(6000)).await; + tokio::time::sleep(std::time::Duration::from_millis(INTERVAL_MS)).await; } println!("\nIn Phase {}. Moving to the next step.", num); @@ -355,9 +381,9 @@ fn parse_bundle( fn write_output(writer: W, out: &DKGOutput) -> Result<()> { let output = OutputJson { - public_key: hex::encode(&bincode::serialize(&out.public.public_key())?), - public_polynomial: hex::encode(&bincode::serialize(&out.public)?), - share: hex::encode(&bincode::serialize(&out.share)?), + public_key: hex::encode(bincode::serialize(&out.public.public_key())?), + public_polynomial: hex::encode(bincode::serialize(&out.public)?), + share: hex::encode(bincode::serialize(&out.share)?), }; serde_json::to_writer(writer, &output)?; Ok(()) diff --git a/crates/dkg-cli/src/main.rs b/crates/dkg-cli/src/main.rs index 432fdbf0..5b1bb537 100644 --- a/crates/dkg-cli/src/main.rs +++ b/crates/dkg-cli/src/main.rs @@ -5,7 +5,7 @@ use ethers::providers::Provider; use gumdrop::Options; use std::process; -use threshold_bls::schemes::bls12_377::{G2Curve as Curve, G2Scheme as Scheme}; +use threshold_bls::schemes::bls12_381::{G1Curve as Curve, G1Scheme as Scheme}; #[tokio::main] async fn main() -> anyhow::Result<()> { diff --git a/crates/dkg-cli/src/opts.rs b/crates/dkg-cli/src/opts.rs index b85af8a7..974c9880 100644 --- a/crates/dkg-cli/src/opts.rs +++ b/crates/dkg-cli/src/opts.rs @@ -12,7 +12,7 @@ pub struct DKGOpts { // The supported commands #[derive(Debug, Options, Clone)] pub enum Command { - #[options(help = "creates a new Celo keypair which you must fund to participate in the DKG")] + #[options(help = "creates a new keypair which you must fund to participate in the DKG")] Keygen(KeygenOpts), #[options(help = "runs the DKG and produces your share")] @@ -43,11 +43,11 @@ pub struct KeygenOpts { pub struct DKGConfig { help: bool, - #[options(help = "the celo node's endpoint")] + #[options(help = "the RPC node's endpoint")] pub node_url: String, #[options( - help = "path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one)" + help = "path to your private key (hint: use the `keygen` command to generate a new one if you don't have one)" )] pub private_key: String, @@ -64,11 +64,11 @@ pub struct DKGConfig { pub struct ReshareConfig { help: bool, - #[options(help = "the celo node's endpoint")] + #[options(help = "the RPC node's endpoint")] pub node_url: String, #[options( - help = "path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one)" + help = "path to your private key (hint: use the `keygen` command to generate a new one if you don't have one)" )] pub private_key: String, @@ -98,11 +98,11 @@ pub struct ReshareConfig { pub struct DeployOpts { help: bool, - #[options(help = "the celo node's endpoint")] + #[options(help = "the RPC node's endpoint", default = "")] pub node_url: String, #[options( - help = "path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one)" + help = "path to your private key (hint: use the `keygen` command to generate a new one if you don't have one)" )] pub private_key: String, @@ -117,11 +117,11 @@ pub struct DeployOpts { pub struct StartOpts { help: bool, - #[options(help = "the celo node's endpoint")] + #[options(help = "node's RPC endpoint")] pub node_url: String, #[options( - help = "path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one)" + help = "path to your private key (hint: use the `keygen` command to generate a new one if you don't have one)" )] pub private_key: String, @@ -133,11 +133,11 @@ pub struct StartOpts { pub struct AllowlistOpts { help: bool, - #[options(help = "the celo node's endpoint")] + #[options(help = "the RPC node's endpoint")] pub node_url: String, #[options( - help = "path to your celo private key (hint: use the `keygen` command to generate a new one if you don't have one)" + help = "path to your private key (hint: use the `keygen` command to generate a new one if you don't have one)" )] pub private_key: String, diff --git a/crates/dkg-core/src/primitives/resharing.rs b/crates/dkg-core/src/primitives/resharing.rs index bc76eaa9..474f0e68 100644 --- a/crates/dkg-core/src/primitives/resharing.rs +++ b/crates/dkg-core/src/primitives/resharing.rs @@ -666,7 +666,7 @@ mod tests { return b; } let msg = vec![1, 9, 6, 9]; - b.shares[((b.dealer_idx + 1) as usize % group.len()) as usize].secret = + b.shares[(b.dealer_idx + 1) as usize % group.len()].secret = ecies::encrypt::( &G1::rand(&mut thread_rng()), &msg, diff --git a/crates/threshold-bls-ffi/src/ffi.rs b/crates/threshold-bls-ffi/src/ffi.rs index 847cff99..ae03d10f 100644 --- a/crates/threshold-bls-ffi/src/ffi.rs +++ b/crates/threshold-bls-ffi/src/ffi.rs @@ -536,7 +536,7 @@ pub unsafe extern "C" fn destroy_privkey(private_key: *mut PrivateKey) { /// /// The pointer must point to a valid instance of the data type pub unsafe extern "C" fn free_vector(bytes: *mut u8, len: usize) { - drop(unsafe { Vec::from_raw_parts(bytes, len as usize, len as usize) }); + drop(unsafe { Vec::from_raw_parts(bytes, len, len) }); } #[no_mangle] diff --git a/crates/threshold-bls/Cargo.toml b/crates/threshold-bls/Cargo.toml index 42f9d68a..ea4a1bb1 100644 --- a/crates/threshold-bls/Cargo.toml +++ b/crates/threshold-bls/Cargo.toml @@ -11,20 +11,20 @@ crate-type = ["lib"] rand_core = { version = "0.6.3", default-features = false } rand = "0.8.5" serde = {version = "1.0.106", features = ["derive"] } +thiserror = "1.0.15" +bincode = "1.2.1" # for ECIES chacha20poly1305 = "0.9" -hkdf = "0.8" -sha2 = "0.8" +hkdf = "0.12" +sha2 = "0.10" -# bls12_377 -ark-bls12-377 = { version = "0.3.0" } -ark-serialize = { version = "0.3.0", features = [ "derive" ] } -ark-ff = { version = "0.3.0", features = [ "std" ] } -ark-ec = { version = "0.3.0", features = [ "std" ] } -bls-crypto = { git = "https://github.com/celo-org/bls-crypto" } -thiserror = "1.0.15" -bincode = "1.2.1" +# Arkworks +ark-bls12-377 = { version = "0.4.0" } +ark-bls12-381 = { version = "0.4.0" } +ark-serialize = { version = "0.4.0", features = [ "derive" ] } +ark-ff = { version = "0.4.0", features = [ "std" ] } +ark-ec = { version = "0.4.0", features = [ "std" ] } [dev-dependencies] static_assertions = "1.1.0" @@ -32,4 +32,4 @@ proptest = "1.0.0" [features] # Enable parallel computation. Cannot be used with WASM. -parallel = ["ark-ec/parallel", "ark-ff/parallel", "bls-crypto/parallel"] +parallel = ["ark-ec/parallel", "ark-ff/parallel"] diff --git a/crates/threshold-bls/src/curve/bls12377.rs b/crates/threshold-bls/src/curve/bls12377.rs index 926070a3..91da3903 100644 --- a/crates/threshold-bls/src/curve/bls12377.rs +++ b/crates/threshold-bls/src/curve/bls12377.rs @@ -1,47 +1,40 @@ use crate::group::PrimeOrder; use crate::group::{self, Element, PairingCurve as PC, Point, Scalar as Sc}; use ark_bls12_377 as bls377; -use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; -use ark_ff::PrimeField; -use ark_ff::{Field, One, UniformRand, Zero}; -use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; -use bls_crypto::{ - hash_to_curve::{try_and_increment::TryAndIncrement, HashToCurve}, - hashers::DirectHasher, - BLSError, SIG_DOMAIN, -}; +use ark_ec::hashing::curve_maps::wb::WBMap; +use ark_ec::hashing::map_to_curve_hasher::MapToCurveBasedHasher; +use ark_ec::hashing::{HashToCurve, HashToCurveError}; +use ark_ec::pairing::Pairing; +use ark_ec::{AffineRepr, CurveGroup, Group}; +use ark_ff::field_hashers::DefaultFieldHasher; +use ark_ff::{Field, One, PrimeField, UniformRand, Zero}; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Compress}; use rand_core::RngCore; use serde::{ de::{Error as DeserializeError, SeqAccess, Visitor}, ser::{Error as SerializationError, SerializeTuple}, Deserialize, Deserializer, Serialize, Serializer, }; +use sha2::Sha256; use std::{ fmt, marker::PhantomData, ops::{AddAssign, MulAssign, Neg, SubAssign}, }; -use thiserror::Error; - -#[derive(Debug, Error)] -pub enum ZexeError { - #[error("{0}")] - SerializationError(#[from] ark_serialize::SerializationError), - #[error("{0}")] - BLSError(#[from] BLSError), -} +/// Domain separator for signing messages +pub const SIG_DOMAIN: &[u8] = b"ULforxof"; -// TODO(gakonst): Make this work with any PairingEngine. +// TODO(gakonst): Make this work with any Pairing. #[derive(Debug, Clone, Copy, Eq, PartialEq, Deserialize, Serialize)] pub struct Scalar( #[serde(deserialize_with = "deserialize_field")] #[serde(serialize_with = "serialize_field")] - ::Fr, + ::ScalarField, ); -type ZG1 = ::G1Projective; +type ZG1 = ::G1; #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] pub struct G1( @@ -50,7 +43,7 @@ pub struct G1( ZG1, ); -type ZG2 = ::G2Projective; +type ZG2 = ::G2; #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] pub struct G2( @@ -63,7 +56,7 @@ pub struct G2( pub struct GT( #[serde(deserialize_with = "deserialize_field")] #[serde(serialize_with = "serialize_field")] - ::Fqk, + ::TargetField, ); impl Element for Scalar { @@ -113,7 +106,7 @@ impl Sc for Scalar { } fn serialized_size(&self) -> usize { - self.0.serialized_size() + self.0.serialized_size(Compress::Yes) } } @@ -132,7 +125,7 @@ impl Element for G1 { } fn one() -> Self { - Self(ZG1::prime_subgroup_generator()) + Self(ZG1::generator()) } fn rand(rng: &mut R) -> Self { @@ -150,14 +143,18 @@ impl Element for G1 { /// Implementation of Point using G1 from BLS12-377 impl Point for G1 { - type Error = ZexeError; + type Error = HashToCurveError; - fn map(&mut self, data: &[u8]) -> Result<(), ZexeError> { - let hasher = TryAndIncrement::new(&DirectHasher); + fn map(&mut self, data: &[u8]) -> Result<(), Self::Error> { + let hasher = MapToCurveBasedHasher::< + ZG1, + DefaultFieldHasher, + WBMap, + >::new(SIG_DOMAIN)?; - let hash = hasher.hash(SIG_DOMAIN, data, &[])?; + let hash = hasher.hash(data)?; - *self = Self(hash); + *self = Self(hash.into()); Ok(()) } @@ -178,7 +175,7 @@ impl Element for G2 { } fn one() -> Self { - Self(ZG2::prime_subgroup_generator()) + Self(ZG2::generator()) } fn rand(mut rng: &mut R) -> Self { @@ -196,13 +193,17 @@ impl Element for G2 { /// Implementation of Point using G2 from BLS12-377 impl Point for G2 { - type Error = ZexeError; + type Error = HashToCurveError; - fn map(&mut self, data: &[u8]) -> Result<(), ZexeError> { - let hasher = TryAndIncrement::new(&DirectHasher); + fn map(&mut self, data: &[u8]) -> Result<(), Self::Error> { + let hasher = MapToCurveBasedHasher::< + ZG2, + DefaultFieldHasher, + WBMap, + >::new(SIG_DOMAIN)?; - let hash = hasher.hash(SIG_DOMAIN, data, &[])?; - *self = Self(hash); + let hash = hasher.hash(data)?; + *self = Self(hash.into()); Ok(()) } @@ -229,7 +230,7 @@ impl Element for GT { self.0.mul_assign(s2.0); } fn mul(&mut self, mul: &Scalar) { - let scalar = mul.0.into_repr(); + let scalar = mul.0.into_bigint(); let mut res = Self::one(); let mut temp = self.clone(); for b in ark_ff::BitIteratorLE::without_trailing_zeros(scalar) { @@ -249,7 +250,7 @@ impl Element for GT { impl PrimeOrder for GT { fn in_correct_subgroup(&self) -> bool { self.0 - .pow(::Fr::characteristic()) + .pow(::ScalarField::characteristic()) .is_one() } } @@ -273,7 +274,7 @@ impl PC for PairingCurve { type GT = GT; fn pair(a: &Self::G1, b: &Self::G2) -> Self::GT { - GT(::pairing(a.0, b.0)) + GT(::pairing(a.0, b.0).0) } } @@ -300,7 +301,7 @@ where where S: SeqAccess<'de>, { - let len = C::zero().serialized_size(); + let len = C::zero().serialized_size(Compress::Yes); let bytes: Vec = (0..len) .map(|_| { seq.next_element()? @@ -308,13 +309,14 @@ where }) .collect::, _>>()?; - let res = C::deserialize(&mut &bytes[..]).map_err(DeserializeError::custom)?; + let res = + C::deserialize_compressed(&mut &bytes[..]).map_err(DeserializeError::custom)?; Ok(res) } } let visitor = FieldVisitor(PhantomData); - deserializer.deserialize_tuple(C::zero().serialized_size(), visitor) + deserializer.deserialize_tuple(C::zero().serialized_size(Compress::Yes), visitor) } fn serialize_field(c: &C, s: S) -> Result @@ -322,9 +324,9 @@ where S: Serializer, C: Field, { - let len = c.serialized_size(); + let len = c.serialized_size(Compress::Yes); let mut bytes = Vec::with_capacity(len); - c.serialize(&mut bytes) + c.serialize_compressed(&mut bytes) .map_err(SerializationError::custom)?; let mut tup = s.serialize_tuple(len)?; @@ -337,14 +339,14 @@ where fn deserialize_group<'de, D, C>(deserializer: D) -> Result where D: Deserializer<'de>, - C: ProjectiveCurve, + C: CurveGroup, C::Affine: CanonicalDeserialize + CanonicalSerialize, { struct GroupVisitor(PhantomData); impl<'de, C> Visitor<'de> for GroupVisitor where - C: ProjectiveCurve, + C: CurveGroup, //C::Affine: CanonicalDeserialize + CanonicalSerialize, { type Value = C; @@ -357,7 +359,7 @@ where where S: SeqAccess<'de>, { - let len = C::Affine::zero().serialized_size(); //C::Affine::SERIALIZED_SIZE; + let len = C::Affine::zero().serialized_size(Compress::Yes); //C::Affine::SERIALIZED_SIZE; let bytes: Vec = (0..len) .map(|_| { seq.next_element()? @@ -365,27 +367,27 @@ where }) .collect::, _>>()?; - let affine = - C::Affine::deserialize(&mut &bytes[..]).map_err(DeserializeError::custom)?; - Ok(affine.into_projective()) + let affine = C::Affine::deserialize_compressed(&mut &bytes[..]) + .map_err(DeserializeError::custom)?; + Ok(affine.into()) } } let visitor = GroupVisitor(PhantomData); - deserializer.deserialize_tuple(C::Affine::zero().serialized_size(), visitor) + deserializer.deserialize_tuple(C::Affine::zero().serialized_size(Compress::Yes), visitor) } fn serialize_group(c: &C, s: S) -> Result where S: Serializer, - C: ProjectiveCurve, + C: CurveGroup, C::Affine: CanonicalSerialize, { let affine = c.into_affine(); - let len = affine.serialized_size(); + let len = affine.serialized_size(Compress::Yes); let mut bytes = Vec::with_capacity(len); affine - .serialize(&mut bytes) + .serialize_compressed(&mut bytes) .map_err(SerializationError::custom)?; let mut tup = s.serialize_tuple(len)?; diff --git a/crates/threshold-bls/src/curve/bls12381.rs b/crates/threshold-bls/src/curve/bls12381.rs new file mode 100644 index 00000000..189093a2 --- /dev/null +++ b/crates/threshold-bls/src/curve/bls12381.rs @@ -0,0 +1,461 @@ +use crate::group::PrimeOrder; +use crate::group::{self, Element, PairingCurve as PC, Point, Scalar as Sc}; +use ark_bls12_381 as bls381; +use ark_ec::hashing::curve_maps::wb::WBMap; +use ark_ec::hashing::map_to_curve_hasher::MapToCurveBasedHasher; +use ark_ec::hashing::{HashToCurve, HashToCurveError}; +use ark_ec::pairing::Pairing; +use ark_ec::{AffineRepr, CurveGroup, Group}; +use ark_ff::field_hashers::DefaultFieldHasher; +use ark_ff::{Field, One, PrimeField, UniformRand, Zero}; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Compress}; +use rand_core::RngCore; +use serde::{ + de::{Error as DeserializeError, SeqAccess, Visitor}, + ser::{Error as SerializationError, SerializeTuple}, + Deserialize, Deserializer, Serialize, Serializer, +}; +use sha2::Sha256; +use std::{ + fmt, + marker::PhantomData, + ops::{AddAssign, MulAssign, Neg, SubAssign}, +}; + +/// Domain separator for signing messages +pub const SIG_DOMAIN: &[u8] = b"ULforxof"; + +// TODO(gakonst): Make this work with any Pairing. + +#[derive(Debug, Clone, Copy, Eq, PartialEq, Deserialize, Serialize)] +pub struct Scalar( + #[serde(deserialize_with = "deserialize_field")] + #[serde(serialize_with = "serialize_field")] + ::ScalarField, +); + +type ZG1 = ::G1; + +#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] +pub struct G1( + #[serde(deserialize_with = "deserialize_group")] + #[serde(serialize_with = "serialize_group")] + ZG1, +); + +type ZG2 = ::G2; + +#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] +pub struct G2( + #[serde(deserialize_with = "deserialize_group")] + #[serde(serialize_with = "serialize_group")] + ZG2, +); + +#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] +pub struct GT( + #[serde(deserialize_with = "deserialize_field")] + #[serde(serialize_with = "serialize_field")] + ::TargetField, +); + +impl Element for Scalar { + type RHS = Scalar; + + fn new() -> Self { + Self(Zero::zero()) + } + + fn one() -> Self { + Self(One::one()) + } + + fn add(&mut self, s2: &Self) { + self.0.add_assign(s2.0); + } + + fn mul(&mut self, mul: &Scalar) { + self.0.mul_assign(mul.0) + } + + fn rand(rng: &mut R) -> Self { + Self(bls381::Fr::rand(rng)) + } +} + +impl Sc for Scalar { + fn set_int(&mut self, i: u64) { + *self = Self(bls381::Fr::from(i)) + } + + fn inverse(&self) -> Option { + Some(Self(Field::inverse(&self.0)?)) + } + + fn negate(&mut self) { + *self = Self(self.0.neg()) + } + + fn sub(&mut self, other: &Self) { + self.0.sub_assign(other.0); + } + + fn from_random_bytes(bytes: &[u8]) -> Option { + let fr = bls381::Fr::from_random_bytes(bytes)?; + Some(Self(fr)) + } + + fn serialized_size(&self) -> usize { + self.0.serialized_size(Compress::Yes) + } +} + +impl fmt::Display for Scalar { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{{{:?}}}", self.0) + } +} + +/// G1 points can be multiplied by Fr elements +impl Element for G1 { + type RHS = Scalar; + + fn new() -> Self { + Self(Zero::zero()) + } + + fn one() -> Self { + Self(ZG1::generator()) + } + + fn rand(rng: &mut R) -> Self { + Self(ZG1::rand(rng)) + } + + fn add(&mut self, s2: &Self) { + self.0.add_assign(s2.0); + } + + fn mul(&mut self, mul: &Scalar) { + self.0.mul_assign(mul.0); + } +} + +/// Implementation of Point using G1 from BLS12-377 +impl Point for G1 { + type Error = HashToCurveError; + + fn map(&mut self, data: &[u8]) -> Result<(), Self::Error> { + let hasher = MapToCurveBasedHasher::< + ZG1, + DefaultFieldHasher, + WBMap, + >::new(SIG_DOMAIN)?; + + let hash = hasher.hash(data)?; + + *self = Self(hash.into()); + + Ok(()) + } +} + +impl fmt::Display for G1 { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{{{:?}}}", self.0) + } +} + +/// G1 points can be multiplied by Fr elements +impl Element for G2 { + type RHS = Scalar; + + fn new() -> Self { + Self(Zero::zero()) + } + + fn one() -> Self { + Self(ZG2::generator()) + } + + fn rand(mut rng: &mut R) -> Self { + Self(ZG2::rand(&mut rng)) + } + + fn add(&mut self, s2: &Self) { + self.0.add_assign(s2.0); + } + + fn mul(&mut self, mul: &Scalar) { + self.0.mul_assign(mul.0) + } +} + +/// Implementation of Point using G2 from BLS12-377 +impl Point for G2 { + type Error = HashToCurveError; + + fn map(&mut self, data: &[u8]) -> Result<(), Self::Error> { + let hasher = MapToCurveBasedHasher::< + ZG2, + DefaultFieldHasher, + WBMap, + >::new(SIG_DOMAIN)?; + + let hash = hasher.hash(data)?; + *self = Self(hash.into()); + + Ok(()) + } +} + +impl fmt::Display for G2 { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{{{:?}}}", self.0) + } +} + +//TODO (michael) : This interface should be refactored, GT is multiplicative subgroup of extension field +// so using elliptic curve additive notation for it doesn't make sense +impl Element for GT { + type RHS = Scalar; + + fn new() -> Self { + Self(One::one()) + } + fn one() -> Self { + Self(One::one()) + } + fn add(&mut self, s2: &Self) { + self.0.mul_assign(s2.0); + } + fn mul(&mut self, mul: &Scalar) { + let scalar = mul.0.into_bigint(); + let mut res = Self::one(); + let mut temp = self.clone(); + for b in ark_ff::BitIteratorLE::without_trailing_zeros(scalar) { + if b { + res.0.mul_assign(temp.0); + } + temp.0.square_in_place(); + } + *self = res.clone(); + } + fn rand(rng: &mut R) -> Self { + Self(bls381::Fq12::rand(rng)) + } +} + +// TODO (michael): Write unit test for this +impl PrimeOrder for GT { + fn in_correct_subgroup(&self) -> bool { + self.0 + .pow(::ScalarField::characteristic()) + .is_one() + } +} + +impl fmt::Display for GT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{{{:?}}}", self.0) + } +} + +pub type G1Curve = group::G1Curve; +pub type G2Curve = group::G2Curve; + +#[derive(Clone, Debug)] +pub struct PairingCurve; + +impl PC for PairingCurve { + type Scalar = Scalar; + type G1 = G1; + type G2 = G2; + type GT = GT; + + fn pair(a: &Self::G1, b: &Self::G2) -> Self::GT { + GT(::pairing(a.0, b.0).0) + } +} + +// Serde implementations (ideally, these should be upstreamed to Zexe) + +fn deserialize_field<'de, D, C>(deserializer: D) -> Result +where + D: Deserializer<'de>, + C: Field, +{ + struct FieldVisitor(PhantomData); + + impl<'de, C> Visitor<'de> for FieldVisitor + where + C: Field, + { + type Value = C; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("a valid group element") + } + + fn visit_seq(self, mut seq: S) -> Result + where + S: SeqAccess<'de>, + { + let len = C::zero().serialized_size(Compress::Yes); + let bytes: Vec = (0..len) + .map(|_| { + seq.next_element()? + .ok_or_else(|| DeserializeError::custom("could not read bytes")) + }) + .collect::, _>>()?; + + let res = + C::deserialize_compressed(&mut &bytes[..]).map_err(DeserializeError::custom)?; + Ok(res) + } + } + + let visitor = FieldVisitor(PhantomData); + deserializer.deserialize_tuple(C::zero().serialized_size(Compress::Yes), visitor) +} + +fn serialize_field(c: &C, s: S) -> Result +where + S: Serializer, + C: Field, +{ + let len = c.serialized_size(Compress::Yes); + let mut bytes = Vec::with_capacity(len); + c.serialize_compressed(&mut bytes) + .map_err(SerializationError::custom)?; + + let mut tup = s.serialize_tuple(len)?; + for byte in &bytes { + tup.serialize_element(byte)?; + } + tup.end() +} + +fn deserialize_group<'de, D, C>(deserializer: D) -> Result +where + D: Deserializer<'de>, + C: CurveGroup, + C::Affine: CanonicalDeserialize + CanonicalSerialize, +{ + struct GroupVisitor(PhantomData); + + impl<'de, C> Visitor<'de> for GroupVisitor + where + C: CurveGroup, + //C::Affine: CanonicalDeserialize + CanonicalSerialize, + { + type Value = C; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("a valid group element") + } + + fn visit_seq(self, mut seq: S) -> Result + where + S: SeqAccess<'de>, + { + let len = C::Affine::zero().serialized_size(Compress::Yes); //C::Affine::SERIALIZED_SIZE; + let bytes: Vec = (0..len) + .map(|_| { + seq.next_element()? + .ok_or_else(|| DeserializeError::custom("could not read bytes")) + }) + .collect::, _>>()?; + + let affine = C::Affine::deserialize_compressed(&mut &bytes[..]) + .map_err(DeserializeError::custom)?; + Ok(affine.into()) + } + } + + let visitor = GroupVisitor(PhantomData); + deserializer.deserialize_tuple(C::Affine::zero().serialized_size(Compress::Yes), visitor) +} + +fn serialize_group(c: &C, s: S) -> Result +where + S: Serializer, + C: CurveGroup, + C::Affine: CanonicalSerialize, +{ + let affine = c.into_affine(); + let len = affine.serialized_size(Compress::Yes); + let mut bytes = Vec::with_capacity(len); + affine + .serialize_compressed(&mut bytes) + .map_err(SerializationError::custom)?; + + let mut tup = s.serialize_tuple(len)?; + for byte in &bytes { + tup.serialize_element(byte)?; + } + tup.end() +} + +#[cfg(test)] +mod tests { + use super::*; + use serde::{de::DeserializeOwned, Serialize}; + use static_assertions::assert_impl_all; + + assert_impl_all!(G1: Serialize, DeserializeOwned, Clone); + assert_impl_all!(G2: Serialize, DeserializeOwned, Clone); + assert_impl_all!(GT: Serialize, DeserializeOwned, Clone); + assert_impl_all!(Scalar: Serialize, DeserializeOwned, Clone); + + #[test] + fn serialize_group() { + serialize_group_test::(48); + serialize_group_test::(96); + } + + fn serialize_group_test(size: usize) { + let rng = &mut rand::thread_rng(); + let sig = E::rand(rng); + let ser = bincode::serialize(&sig).unwrap(); + assert_eq!(ser.len(), size); + + let de: E = bincode::deserialize(&ser).unwrap(); + assert_eq!(de, sig); + } + + #[test] + fn serialize_field() { + serialize_field_test::(576); + serialize_field_test::(32); + } + + fn serialize_field_test(size: usize) { + let rng = &mut rand::thread_rng(); + let sig = E::rand(rng); + let ser = bincode::serialize(&sig).unwrap(); + assert_eq!(ser.len(), size); + + let de: E = bincode::deserialize(&ser).unwrap(); + assert_eq!(de, sig); + } + + #[test] + fn gt_exp() { + let rng = &mut rand::thread_rng(); + let base = GT::rand(rng); + + let mut sc = Scalar::one(); + sc.add(&Scalar::one()); + sc.add(&Scalar::one()); + + let mut exp = base.clone(); + exp.mul(&sc); + + let mut res = base.clone(); + res.add(&base); + res.add(&base); + + assert_eq!(exp, res); + } +} diff --git a/crates/threshold-bls/src/curve/mod.rs b/crates/threshold-bls/src/curve/mod.rs index 1e11342a..eeadcf1d 100644 --- a/crates/threshold-bls/src/curve/mod.rs +++ b/crates/threshold-bls/src/curve/mod.rs @@ -1,11 +1,2 @@ -/// Wrappers around the BLS12-377 curve from [zexe](https://github.com/scipr-lab/zexe/tree/master/algebra/src/bls12_377) pub mod bls12377; - -use thiserror::Error; - -/// Error which unifies all curve specific errors from different libraries -#[derive(Debug, Error)] -pub enum CurveError { - #[error("Zexe Error: {0}")] - BLS12_377(bls12377::ZexeError), -} +pub mod bls12381; diff --git a/crates/threshold-bls/src/lib.rs b/crates/threshold-bls/src/lib.rs index a95cd588..8678e533 100644 --- a/crates/threshold-bls/src/lib.rs +++ b/crates/threshold-bls/src/lib.rs @@ -203,4 +203,15 @@ pub mod schemes { /// Public Keys on G2, Signatures on G1 pub type G2Scheme = super::G2Scheme; } + + /// BLS12-381 Schemes + pub mod bls12_381 { + use crate::curve::bls12381::PairingCurve; + pub use crate::curve::bls12381::{G1Curve, G2Curve}; + + /// Public Keys on G1, Signatures on G2 + pub type G1Scheme = super::G1Scheme; + /// Public Keys on G2, Signatures on G1 + pub type G2Scheme = super::G2Scheme; + } } diff --git a/crates/threshold-bls/src/poly.rs b/crates/threshold-bls/src/poly.rs index 8bba7514..1a6c4526 100644 --- a/crates/threshold-bls/src/poly.rs +++ b/crates/threshold-bls/src/poly.rs @@ -516,7 +516,7 @@ pub mod tests { .map(|i| poly.eval(i as Idx)) .collect::>>(); let now = SystemTime::now(); - Poly::::recover(threshold as usize, shares).unwrap(); + Poly::::recover(threshold, shares).unwrap(); match now.elapsed() { Ok(e) => println!("single recover: time elapsed {:?}", e), Err(e) => panic!("{}", e), @@ -526,7 +526,7 @@ pub mod tests { .collect::>>(); let now = SystemTime::now(); - Poly::::full_recover(threshold as usize, shares).unwrap(); + Poly::::full_recover(threshold, shares).unwrap(); match now.elapsed() { Ok(e) => println!("full_recover: time elapsed {:?}", e), Err(e) => panic!("{}", e), diff --git a/solidity/contracts/DKG.sol b/solidity/contracts/DKG.sol index 8d01ad1d..330eee77 100644 --- a/solidity/contracts/DKG.sol +++ b/solidity/contracts/DKG.sol @@ -1,7 +1,7 @@ // Using the ABIEncoderV2 poses little risk here because we only use it for fetching the byte arrays // of shares/responses/justifications pragma experimental ABIEncoderV2; -pragma solidity ^0.6.6; +pragma solidity ^0.8; contract DKG { enum UserState { diff --git a/solidity/foundry.toml b/solidity/foundry.toml new file mode 100644 index 00000000..5957f080 --- /dev/null +++ b/solidity/foundry.toml @@ -0,0 +1,3 @@ +[profile.default] +src = "contracts" +out = "artifacts" \ No newline at end of file