diff --git a/Cargo.lock b/Cargo.lock index 3989bed8..776525a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,19 +46,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] -name = "alloy-primitives" +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "derive_more", + "k256", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9db948902dfbae96a73c2fbf1f7abec62af034ab883e4c777c3fd29702bd6e2c" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", "derive_more", + "foldhash", + "hashbrown 0.15.2", "hex-literal", + "indexmap 2.7.0", "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand", "ruint", + "rustc-hash 2.1.0", + "serde", + "sha3 0.10.8", "tiny-keccak", ] @@ -248,6 +283,16 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "aurora-engine-modexp" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aef7712851e524f35fbbb74fa6599c5cd8692056a1c36f9ca0d2001b670e7e5" +dependencies = [ + "hex", + "num", +] + [[package]] name = "auto_impl" version = "1.2.0" @@ -308,28 +353,20 @@ dependencies = [ ] [[package]] -name = "bindgen" -version = "0.66.1" +name = "bit-set" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "bitflags 2.4.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.52", - "which", + "bit-vec", ] +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -338,9 +375,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -392,9 +429,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blst" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" dependencies = [ "cc", "glob", @@ -434,16 +471,16 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "c-kzg" -version = "0.1.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac926d808fb72fe09ebf471a091d6d72918876ccf0b4989766093d2d0d24a0ef" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" dependencies = [ - "bindgen", "blst", "cc", "glob", "hex", "libc", + "once_cell", "serde", ] @@ -465,15 +502,6 @@ version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -520,17 +548,6 @@ dependencies = [ "half", ] -[[package]] -name = "clang-sys" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "4.5.2" @@ -568,9 +585,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.11.3" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" dependencies = [ "cfg-if", "cpufeatures", @@ -591,12 +608,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "core-foundation-sys" version = "0.8.6" @@ -745,7 +756,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "crossterm_winapi", "libc", "mio", @@ -869,15 +880,23 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ - "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 1.0.109", + "syn 2.0.52", + "unicode-xid", ] [[package]] @@ -901,6 +920,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "ecdsa" version = "0.16.9" @@ -1048,6 +1073,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "funty" version = "2.0.0" @@ -1137,7 +1168,7 @@ dependencies = [ "pairing", "rand", "rand_core", - "rustc-hash", + "rustc-hash 1.1.0", "sha3 0.10.8", "tracing", ] @@ -1159,7 +1190,7 @@ dependencies = [ "poseidon-primitives", "rand_chacha", "rayon", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", ] @@ -1267,6 +1298,15 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "foldhash", +] + [[package]] name = "heck" version = "0.4.1" @@ -1303,15 +1343,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "iana-time-zone" version = "0.1.60" @@ -1374,12 +1405,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.2", ] [[package]] @@ -1395,7 +1426,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "321f0f839cd44a4686e9504b0a62b4d69a50b62072144c71c68f5873c167b8d9" dependencies = [ "ahash", - "indexmap 2.2.5", + "indexmap 2.7.0", "is-terminal", "itoa", "log", @@ -1492,6 +1523,16 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -1501,28 +1542,12 @@ dependencies = [ "spin", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" -[[package]] -name = "libloading" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" -dependencies = [ - "cfg-if", - "windows-targets 0.52.4", -] - [[package]] name = "libm" version = "0.2.8" @@ -1585,12 +1610,6 @@ dependencies = [ "libc", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.7.2" @@ -1623,16 +1642,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "num" version = "0.4.1" @@ -1844,12 +1853,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pest" version = "2.7.8" @@ -1954,16 +1957,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "prettyplease" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" -dependencies = [ - "proc-macro2", - "syn 2.0.52", -] - [[package]] name = "primitive-types" version = "0.12.2" @@ -2024,16 +2017,26 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ - "bitflags 2.4.2", + "bit-set", + "bit-vec", + "bitflags 2.6.0", "lazy_static", "num-traits", "rand", "rand_chacha", "rand_xorshift", "regex-syntax", + "rusty-fork", + "tempfile", "unarray", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quick-xml" version = "0.26.0" @@ -2103,7 +2106,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ebc917cfb527a566c37ecb94c7e3fd098353516fb4eb6bea17015ade0182425" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cassowary", "crossterm 0.27.0", "indoc", @@ -2175,33 +2178,40 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "revm" -version = "3.5.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f4ca8ae0345104523b4af1a8a7ea97cfa1865cdb7a7c25d23c1a18d9b48598" +checksum = "15689a3c6a8d14b647b4666f2e236ef47b5a5133cdfd423f545947986fff7013" dependencies = [ "auto_impl", + "cfg-if", + "dyn-clone", "revm-interpreter", "revm-precompile", + "serde", + "serde_json", ] [[package]] name = "revm-interpreter" -version = "1.3.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f959cafdf64a7f89b014fa73dc2325001cf654b3d9400260b212d19a2ebe3da0" +checksum = "74e3f11d0fed049a4a10f79820c59113a79b38aed4ebec786a79d5c667bfeb51" dependencies = [ "revm-primitives", + "serde", ] [[package]] name = "revm-precompile" -version = "2.2.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d360a88223d85709d2e95d4609eb1e19c649c47e28954bfabae5e92bb37e83e" +checksum = "e381060af24b750069a2b2d2c54bba273d84e8f5f9e8026fc9262298e26cc336" dependencies = [ + "aurora-engine-modexp", + "blst", "c-kzg", + "cfg-if", "k256", - "num", "once_cell", "revm-primitives", "ripemd", @@ -2212,20 +2222,22 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "1.3.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51187b852d9e458816a2e19c81f1dd6c924077e1a8fccd16e4f044f865f299d7" +checksum = "3702f132bb484f4f0d0ca4f6fbde3c82cfd745041abbedd6eda67730e1868ef0" dependencies = [ + "alloy-eip2930", + "alloy-eip7702", "alloy-primitives", - "alloy-rlp", "auto_impl", - "bitflags 2.4.2", + "bitflags 2.6.0", "bitvec", "c-kzg", + "cfg-if", + "dyn-clone", "enumn", - "hashbrown 0.14.3", "hex", - "once_cell", + "serde", ] [[package]] @@ -2268,9 +2280,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.1" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -2292,9 +2304,9 @@ dependencies = [ [[package]] name = "ruint-macro" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-demangle" @@ -2308,6 +2320,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -2338,7 +2356,7 @@ version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2351,6 +2369,18 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "ryu" version = "1.0.17" @@ -2388,18 +2418,19 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.27.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ + "rand", "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" dependencies = [ "cc", ] @@ -2463,6 +2494,7 @@ version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ + "indexmap 2.7.0", "itoa", "ryu", "serde", @@ -2530,10 +2562,14 @@ dependencies = [ ] [[package]] -name = "shlex" -version = "1.3.0" +name = "sha3-asm" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] [[package]] name = "signal-hook" @@ -2905,7 +2941,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.7.0", "toml_datetime", "winnow", ] @@ -2989,6 +3025,12 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "uuid" version = "1.7.0" @@ -3007,6 +3049,15 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.5.0" @@ -3087,18 +3138,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/rust-toolchain b/rust-toolchain index 36e57ce7..3f02ee57 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-02-08 +nightly-2024-10-30 diff --git a/snark-verifier-sdk/src/halo2/aggregation.rs b/snark-verifier-sdk/src/halo2/aggregation.rs index 60c4b3db..f447e0ce 100644 --- a/snark-verifier-sdk/src/halo2/aggregation.rs +++ b/snark-verifier-sdk/src/halo2/aggregation.rs @@ -21,8 +21,8 @@ use halo2_base::{ use itertools::Itertools; use rand::{rngs::StdRng, SeedableRng}; use serde::{Deserialize, Serialize}; -#[cfg(debug_assertions)] -use snark_verifier::util::arithmetic::fe_to_limbs; +// #[cfg(debug_assertions)] +// use snark_verifier::util::arithmetic::fe_to_limbs; use snark_verifier::{ loader::{ self, @@ -90,7 +90,7 @@ impl VerifierUniversality { #[allow(clippy::type_complexity)] /// Core function used in `synthesize` to aggregate multiple `snarks`. -/// +/// /// Returns the assigned instances of previous snarks and the new final pair that needs to be verified in a pairing check. /// For each previous snark, we concatenate all instances into a single vector. We return a vector of vectors, /// one vector per snark, for convenience. @@ -360,8 +360,7 @@ pub enum AssignedTranscriptObject { /// /// ## Notes /// - This function does _not_ expose any public instances. -/// - `svk` is the generator of the KZG trusted setup, usually gotten via `params.get_g()[0]` -/// (avoids having to pass `params` into function just to get generator) +/// - `svk` is the generator of the KZG trusted setup, usually gotten via `params.get_g()[0]` (avoids having to pass `params` into function just to get generator) /// /// ## Universality /// - If `universality` is not `None`, then the verifying keys of each snark in `snarks` is loaded as a witness in the circuit. @@ -461,15 +460,15 @@ where }) .collect(); - #[cfg(debug_assertions)] - { - let KzgAccumulator { lhs, rhs } = _accumulator; - let instances = - [lhs.x, lhs.y, rhs.x, rhs.y].map(fe_to_limbs::<_, Fr, LIMBS, BITS>).concat(); - for (lhs, rhs) in instances.iter().zip(accumulator.iter()) { - assert_eq!(lhs, rhs.value()); - } - } + // #[cfg(debug_assertions)] + // { + // let KzgAccumulator { lhs, rhs } = _accumulator; + // let instances = + // [lhs.x, lhs.y, rhs.x, rhs.y].map(fe_to_limbs::<_, Fr, LIMBS, BITS>).concat(); + // for (lhs, rhs) in instances.iter().zip(accumulator.iter()) { + // assert_eq!(lhs, rhs.value()); + // } + // } // put back `pool` into `builder` *pool = loader.take_ctx(); SnarkAggregationOutput { previous_instances, accumulator, preprocessed, proof_transcripts } diff --git a/snark-verifier-sdk/src/halo2/utils.rs b/snark-verifier-sdk/src/halo2/utils.rs index b2d99de7..41346d5e 100644 --- a/snark-verifier-sdk/src/halo2/utils.rs +++ b/snark-verifier-sdk/src/halo2/utils.rs @@ -31,7 +31,7 @@ pub struct AggregationDependencyIntentOwned { pub agg_vk_hash_data: Option<((usize, usize), Fr)>, } -impl<'a> AggregationDependencyIntent<'a> { +impl AggregationDependencyIntent<'_> { /// Converts `self` into `PlonkProtocol` pub fn compile(self, params: &ParamsKZG) -> PlonkProtocol { compile( diff --git a/snark-verifier-sdk/src/lib.rs b/snark-verifier-sdk/src/lib.rs index dbc94983..75863941 100644 --- a/snark-verifier-sdk/src/lib.rs +++ b/snark-verifier-sdk/src/lib.rs @@ -169,28 +169,3 @@ pub fn write_instances(instances: &[&[Fr]], path: impl AsRef) { let f = BufWriter::new(File::create(path).unwrap()); bincode::serialize_into(f, &instances).unwrap(); } - -#[cfg(feature = "zkevm")] -mod zkevm { - use super::CircuitExt; - use eth_types::Field; - use zkevm_circuits::{evm_circuit::EvmCircuit, state_circuit::StateCircuit}; - - impl CircuitExt for EvmCircuit { - fn instances(&self) -> Vec> { - vec![] - } - fn num_instance(&self) -> Vec { - vec![] - } - } - - impl CircuitExt for StateCircuit { - fn instances(&self) -> Vec> { - vec![] - } - fn num_instance(&self) -> Vec { - vec![] - } - } -} diff --git a/snark-verifier/Cargo.toml b/snark-verifier/Cargo.toml index 1c268e80..6a800e16 100644 --- a/snark-verifier/Cargo.toml +++ b/snark-verifier/Cargo.toml @@ -33,10 +33,10 @@ rayon = { version = "1.8", optional = true } # loader_evm sha3 = { version = "=0.10", optional = true } -ruint = { version = "=1.12.1", optional = true } +ruint = { version = "=1.12", optional = true } # revm only used for testing smart contract execution -revm = { version = "=3.5.0", optional = true } +revm = { version = "=18.0.0", optional = true } [dev-dependencies] ark-std = { version = "0.3.0", features = ["print-trace"] } @@ -46,7 +46,9 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" # loader_evm crossterm = { version = "0.25" } -ratatui = { version = "0.24", default-features = false, features = ["crossterm"] } +ratatui = { version = "0.24", default-features = false, features = [ + "crossterm", +] } [features] default = ["loader_evm", "loader_halo2", "halo2-axiom", "display"] diff --git a/snark-verifier/examples/evm-verifier-with-accumulator.rs b/snark-verifier/examples/evm-verifier-with-accumulator.rs index b18e992d..d65540f2 100644 --- a/snark-verifier/examples/evm-verifier-with-accumulator.rs +++ b/snark-verifier/examples/evm-verifier-with-accumulator.rs @@ -307,6 +307,7 @@ mod aggregation { #[derive(Clone, Debug)] pub struct AggregationCircuit { pub inner: BaseCircuitBuilder, + #[allow(dead_code)] pub as_proof: Vec, } diff --git a/snark-verifier/src/loader/evm/loader.rs b/snark-verifier/src/loader/evm/loader.rs index cad5ca45..181e23b1 100644 --- a/snark-verifier/src/loader/evm/loader.rs +++ b/snark-verifier/src/loader/evm/loader.rs @@ -430,7 +430,8 @@ impl EvmLoader { // unimplemented } - pub fn print_gas_metering(self: &Rc, _: Vec) { + #[allow(dead_code)] + fn print_gas_metering(self: &Rc, _: Vec) { // unimplemented } } diff --git a/snark-verifier/src/loader/evm/util/executor.rs b/snark-verifier/src/loader/evm/util/executor.rs index e2c5bb2c..f2e890c4 100644 --- a/snark-verifier/src/loader/evm/util/executor.rs +++ b/snark-verifier/src/loader/evm/util/executor.rs @@ -1,19 +1,18 @@ +use revm::primitives::TxKind; use revm::{ - primitives::{CreateScheme, ExecutionResult, Output, TransactTo, TxEnv}, - InMemoryDB, EVM, + primitives::{ExecutionResult, Output, TransactTo, TxEnv}, + Context, Evm, Handler, InMemoryDB, }; /// Deploy contract and then call with calldata. /// Returns gas_used of call to deployed contract if both transactions are successful. pub fn deploy_and_call(deployment_code: Vec, calldata: Vec) -> Result { - let mut evm = EVM { - env: Default::default(), - db: Some(InMemoryDB::default()), - }; + let mut evm = + Evm::new(Context::new_with_db(InMemoryDB::default()), Handler::new(Default::default())); - evm.env.tx = TxEnv { + *evm.tx_mut() = TxEnv { gas_limit: u64::MAX, - transact_to: TransactTo::Create(CreateScheme::Create), + transact_to: TxKind::Create, data: deployment_code.into(), ..Default::default() }; @@ -37,7 +36,7 @@ pub fn deploy_and_call(deployment_code: Vec, calldata: Vec) -> Result unreachable!(), }; - evm.env.tx = TxEnv { + *evm.tx_mut() = TxEnv { gas_limit: u64::MAX, transact_to: TransactTo::Call(contract), data: calldata.into(), diff --git a/snark-verifier/src/loader/halo2/shim.rs b/snark-verifier/src/loader/halo2/shim.rs index b79145f1..64723b14 100644 --- a/snark-verifier/src/loader/halo2/shim.rs +++ b/snark-verifier/src/loader/halo2/shim.rs @@ -256,7 +256,7 @@ mod halo2_lib { } } - impl<'chip, C: CurveAffineExt> EccInstructions for BaseFieldEccChip<'chip, C> + impl EccInstructions for BaseFieldEccChip<'_, C> where C::ScalarExt: BigPrimeField, C::Base: BigPrimeField, diff --git a/snark-verifier/src/pcs/ipa.rs b/snark-verifier/src/pcs/ipa.rs index 288745d7..a657556a 100644 --- a/snark-verifier/src/pcs/ipa.rs +++ b/snark-verifier/src/pcs/ipa.rs @@ -394,52 +394,52 @@ fn h_coeffs(xi: &[F], scalar: F) -> Vec { coeffs } -#[cfg(all(test, feature = "system_halo2"))] -mod test { - use crate::{ - pcs::{ - ipa::{self, IpaProvingKey}, - AccumulationDecider, - }, - util::{arithmetic::Field, msm::Msm, poly::Polynomial}, - }; - use halo2_curves::pasta::pallas; - use halo2_proofs::transcript::{ - Blake2bRead, Blake2bWrite, TranscriptReadBuffer, TranscriptWriterBuffer, - }; - use rand::rngs::OsRng; - - #[test] - fn test_ipa() { - type Ipa = ipa::Ipa; - type IpaAs = ipa::IpaAs; - - let k = 10; - let mut rng = OsRng; - - for zk in [false, true] { - let pk = IpaProvingKey::::rand(k, zk, &mut rng); - let (c, z, v, proof) = { - let p = Polynomial::::rand(pk.domain.n, &mut rng); - let omega = pk.zk().then(|| pallas::Scalar::random(&mut rng)); - let c = pk.commit(&p, omega); - let z = pallas::Scalar::random(&mut rng); - let v = p.evaluate(z); - let mut transcript = Blake2bWrite::init(Vec::new()); - Ipa::create_proof(&pk, &p[..], &z, omega.as_ref(), &mut transcript, &mut rng) - .unwrap(); - (c, z, v, transcript.finalize()) - }; - - let svk = pk.svk(); - let accumulator = { - let mut transcript = Blake2bRead::init(proof.as_slice()); - let proof = Ipa::read_proof(&svk, &mut transcript).unwrap(); - Ipa::succinct_verify(&svk, &Msm::base(&c), &z, &v, &proof).unwrap() - }; - - let dk = pk.dk(); - assert!(IpaAs::decide(&dk, accumulator).is_ok()); - } - } -} +// #[cfg(test)] +// mod test { +// use crate::{ +// pcs::{ +// ipa::{self, IpaProvingKey}, +// AccumulationDecider, +// }, +// util::{arithmetic::Field, msm::Msm, poly::Polynomial}, +// }; +// use halo2_curves::pasta::pallas; +// use halo2_proofs::transcript::{ +// Blake2bRead, Blake2bWrite, TranscriptReadBuffer, TranscriptWriterBuffer, +// }; +// use rand::rngs::OsRng; + +// #[test] +// fn test_ipa() { +// type Ipa = ipa::Ipa; +// type IpaAs = ipa::IpaAs; + +// let k = 10; +// let mut rng = OsRng; + +// for zk in [false, true] { +// let pk = IpaProvingKey::::rand(k, zk, &mut rng); +// let (c, z, v, proof) = { +// let p = Polynomial::::rand(pk.domain.n, &mut rng); +// let omega = pk.zk().then(|| pallas::Scalar::random(&mut rng)); +// let c = pk.commit(&p, omega); +// let z = pallas::Scalar::random(&mut rng); +// let v = p.evaluate(z); +// let mut transcript = Blake2bWrite::init(Vec::new()); +// Ipa::create_proof(&pk, &p[..], &z, omega.as_ref(), &mut transcript, &mut rng) +// .unwrap(); +// (c, z, v, transcript.finalize()) +// }; + +// let svk = pk.svk(); +// let accumulator = { +// let mut transcript = Blake2bRead::init(proof.as_slice()); +// let proof = Ipa::read_proof(&svk, &mut transcript).unwrap(); +// Ipa::succinct_verify(&svk, &Msm::base(&c), &z, &v, &proof).unwrap() +// }; + +// let dk = pk.dk(); +// assert!(IpaAs::decide(&dk, accumulator).is_ok()); +// } +// } +// } diff --git a/snark-verifier/src/pcs/ipa/accumulation.rs b/snark-verifier/src/pcs/ipa/accumulation.rs index 51434541..66d30f30 100644 --- a/snark-verifier/src/pcs/ipa/accumulation.rs +++ b/snark-verifier/src/pcs/ipa/accumulation.rs @@ -186,7 +186,7 @@ where let (u, h) = instances .iter() - .map(|IpaAccumulator { u, xi }| (*u, h_coeffs(xi, C::Scalar::ONE))) + .map(|IpaAccumulator { u, xi }| (*u, h_coeffs(&xi[..], C::Scalar::ONE))) .chain(a_b_u.map(|(a, b, u)| { ( u, diff --git a/snark-verifier/src/pcs/kzg/accumulator.rs b/snark-verifier/src/pcs/kzg/accumulator.rs index f5f1be29..cd0aac1e 100644 --- a/snark-verifier/src/pcs/kzg/accumulator.rs +++ b/snark-verifier/src/pcs/kzg/accumulator.rs @@ -205,8 +205,8 @@ mod halo2 { use halo2_base::utils::CurveAffineExt; use halo2_ecc::ecc::BaseFieldEccChip; - impl<'chip, C, const LIMBS: usize, const BITS: usize> - LimbsEncodingInstructions for BaseFieldEccChip<'chip, C> + impl + LimbsEncodingInstructions for BaseFieldEccChip<'_, C> where C: CurveAffineExt, C::ScalarExt: BigPrimeField, diff --git a/snark-verifier/src/system/halo2/transcript/halo2.rs b/snark-verifier/src/system/halo2/transcript/halo2.rs index eb5440dd..f2891e07 100644 --- a/snark-verifier/src/system/halo2/transcript/halo2.rs +++ b/snark-verifier/src/system/halo2/transcript/halo2.rs @@ -464,7 +464,7 @@ mod halo2_lib { use halo2_base::utils::{BigPrimeField, CurveAffineExt}; use halo2_ecc::ecc::BaseFieldEccChip; - impl<'chip, C: CurveAffineExt> NativeEncoding for BaseFieldEccChip<'chip, C> + impl NativeEncoding for BaseFieldEccChip<'_, C> where C::Scalar: BigPrimeField, C::Base: BigPrimeField, diff --git a/snark-verifier/src/util/msm.rs b/snark-verifier/src/util/msm.rs index fef53e59..570785e8 100644 --- a/snark-verifier/src/util/msm.rs +++ b/snark-verifier/src/util/msm.rs @@ -23,7 +23,7 @@ pub struct Msm<'a, C: CurveAffine, L: Loader> { bases: Vec<&'a L::LoadedEcPoint>, } -impl<'a, C, L> Default for Msm<'a, C, L> +impl Default for Msm<'_, C, L> where C: CurveAffine, L: Loader, @@ -169,7 +169,7 @@ where } } -impl<'a, C, L> MulAssign<&L::LoadedScalar> for Msm<'a, C, L> +impl MulAssign<&L::LoadedScalar> for Msm<'_, C, L> where C: CurveAffine, L: Loader, @@ -194,7 +194,7 @@ where } } -impl<'a, C, L> Sum for Msm<'a, C, L> +impl Sum for Msm<'_, C, L> where C: CurveAffine, L: Loader, diff --git a/snark-verifier/src/verifier/plonk/proof.rs b/snark-verifier/src/verifier/plonk/proof.rs index 459027ba..4888d270 100644 --- a/snark-verifier/src/verifier/plonk/proof.rs +++ b/snark-verifier/src/verifier/plonk/proof.rs @@ -13,10 +13,7 @@ use crate::{ }, Error, }; -use std::{ - collections::{BTreeMap, HashMap}, - iter, -}; +use std::{collections::BTreeMap, iter}; /// Proof of PLONK with [`PolynomialCommitmentScheme`] that has /// [`AccumulationScheme`]. @@ -164,7 +161,7 @@ where pub(super) fn queries( &self, protocol: &PlonkProtocol, - mut evaluations: HashMap, + mut evaluations: BTreeMap, ) -> Vec> { if protocol.queries.is_empty() { return vec![]; @@ -199,8 +196,8 @@ where &'a self, protocol: &'a PlonkProtocol, common_poly_eval: &CommonPolynomialEvaluation, - evaluations: &mut HashMap, - ) -> Result>, Error> { + evaluations: &mut BTreeMap, + ) -> Result>, Error> { let loader = common_poly_eval.zn().loader(); let mut commitments = iter::empty() .chain(protocol.preprocessed.iter().map(Msm::base)) @@ -304,7 +301,7 @@ where protocol: &PlonkProtocol, instances: &[Vec], common_poly_eval: &CommonPolynomialEvaluation, - ) -> Result, Error> { + ) -> Result, Error> { let loader = common_poly_eval.zn().loader(); let instance_evals = protocol.instance_committing_key.is_none().then(|| { let offset = protocol.preprocessed.len();