From 4f658dcd21bf8764cae4c599ce4d7a5743960826 Mon Sep 17 00:00:00 2001 From: lightsing Date: Thu, 31 Oct 2024 12:31:19 +0800 Subject: [PATCH] upgrade revm --- Cargo.lock | 454 +++++++++++++++-------------------------- integration/Cargo.toml | 2 +- integration/src/evm.rs | 28 +-- 3 files changed, 184 insertions(+), 300 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 597bb987..20b6149b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,7 +35,7 @@ source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=v0.13#6ac dependencies = [ "ark-std 0.3.0", "bitstream-io", - "c-kzg 1.0.2", + "c-kzg", "ctor", "encoder", "env_logger", @@ -89,42 +89,77 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ffc577390ce50234e02d841214b3dc0bea6aaaae8e04bbf3cb82e9a45da9eb" +dependencies = [ + "alloy-primitives 0.8.10", + "alloy-rlp", + "derive_more 1.0.0", + "k256", + "serde", +] + [[package]] name = "alloy-primitives" -version = "0.4.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" dependencies = [ "alloy-rlp", "bytes", "cfg-if 1.0.0", "const-hex", - "derive_more", + "derive_more 0.99.17", "hex-literal", "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", "ruint", + "serde", "tiny-keccak", ] [[package]] name = "alloy-primitives" -version = "0.7.7" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" +checksum = "8edae627382349b56cd6a7a2106f4fd69b243a9233e560c55c2e03cabb7e1d3c" dependencies = [ "alloy-rlp", "bytes", "cfg-if 1.0.0", "const-hex", - "derive_more", + "derive_more 1.0.0", + "foldhash", + "hashbrown 0.15.0", "hex-literal", + "indexmap 2.6.0", "itoa", "k256", "keccak-asm", + "paste", "proptest", "rand", "ruint", + "rustc-hash 2.0.0", "serde", + "sha3 0.10.8", "tiny-keccak", ] @@ -448,29 +483,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.66.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" -dependencies = [ - "bitflags 2.6.0", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.66", - "which", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -650,30 +662,16 @@ dependencies = [ [[package]] name = "c-kzg" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac926d808fb72fe09ebf471a091d6d72918876ccf0b4989766093d2d0d24a0ef" -dependencies = [ - "bindgen", - "blst", - "cc", - "glob", - "hex", - "libc", - "serde", -] - -[[package]] -name = "c-kzg" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" dependencies = [ "blst", "cc", "glob", "hex", "libc", + "once_cell", "serde", ] @@ -687,15 +685,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "0.1.10" @@ -733,17 +722,6 @@ dependencies = [ "inout", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "3.2.23" @@ -754,7 +732,7 @@ dependencies = [ "bitflags 1.3.2", "clap_derive", "clap_lex", - "indexmap", + "indexmap 1.9.3", "once_cell", "strsim", "termcolor", @@ -841,7 +819,7 @@ dependencies = [ "serde", "serde_derive", "sha2", - "sha3 0.10.6", + "sha3 0.10.8", "thiserror", ] @@ -1124,6 +1102,27 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_more" +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 = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "unicode-xid", +] + [[package]] name = "digest" version = "0.9.0" @@ -1227,7 +1226,7 @@ dependencies = [ "rand", "rlp", "serde", - "sha3 0.10.6", + "sha3 0.10.8", "zeroize", ] @@ -1255,6 +1254,12 @@ 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.3" @@ -1293,7 +1298,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "sha3 0.10.6", + "sha3 0.10.8", "thiserror", "uuid", ] @@ -1319,7 +1324,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "sha3 0.10.6", + "sha3 0.10.8", "strum 0.25.0", "strum_macros 0.25.3", "subtle", @@ -1338,7 +1343,7 @@ dependencies = [ "regex", "serde", "serde_json", - "sha3 0.10.6", + "sha3 0.10.8", "thiserror", "uint", ] @@ -1513,6 +1518,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 = "form_urlencoded" version = "1.1.0" @@ -1644,7 +1655,7 @@ dependencies = [ "eth-types", "halo2_proofs", "poseidon-base", - "sha3 0.10.6", + "sha3 0.10.8", "strum 0.25.0", ] @@ -1757,7 +1768,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -1776,7 +1787,7 @@ dependencies = [ "num-integer", "num-traits", "rand_chacha", - "rustc-hash", + "rustc-hash 1.1.0", ] [[package]] @@ -1927,6 +1938,15 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "foldhash", +] + [[package]] name = "hashers" version = "1.0.1" @@ -1987,15 +2007,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 = "http" version = "0.2.9" @@ -2162,6 +2173,16 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", +] + [[package]] name = "inout" version = "0.1.3" @@ -2193,7 +2214,7 @@ dependencies = [ "log4rs", "prover", "rand", - "revm 3.5.0", + "revm 17.1.0", "serde", "serde_derive", "serde_json", @@ -2298,9 +2319,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -2324,28 +2345,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.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" -[[package]] -name = "libloading" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" -dependencies = [ - "cfg-if 1.0.0", - "windows-targets 0.52.5", -] - [[package]] name = "libm" version = "0.2.8" @@ -2449,12 +2454,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -2521,16 +2520,6 @@ dependencies = [ "zktrie", ] -[[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.0" @@ -2822,12 +2811,6 @@ dependencies = [ "hmac", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" version = "2.2.0" @@ -2943,16 +2926,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "prettyplease" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" -dependencies = [ - "proc-macro2", - "syn 2.0.66", -] - [[package]] name = "primitive-types" version = "0.12.1" @@ -3255,56 +3228,62 @@ dependencies = [ "primitive-types", "revm_precompiles", "rlp", - "sha3 0.10.6", + "sha3 0.10.8", ] [[package]] name = "revm" -version = "3.5.0" +version = "17.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f4ca8ae0345104523b4af1a8a7ea97cfa1865cdb7a7c25d23c1a18d9b48598" +checksum = "055bee6a81aaeee8c2389ae31f0d4de87f44df24f4444a1116f9755fd87a76ad" dependencies = [ "auto_impl", + "cfg-if 1.0.0", + "dyn-clone", "revm-interpreter", - "revm-precompile 2.2.0", + "revm-precompile 14.0.0", + "serde", + "serde_json", ] [[package]] name = "revm-interpreter" -version = "1.3.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f959cafdf64a7f89b014fa73dc2325001cf654b3d9400260b212d19a2ebe3da0" +checksum = "fac2034454f8bc69dc7d3c94cdb1b57559e27f5ef0518771f1787de543d7d6a1" dependencies = [ - "revm-primitives 1.3.0", + "revm-primitives 13.0.0", + "serde", ] [[package]] name = "revm-precompile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d360a88223d85709d2e95d4609eb1e19c649c47e28954bfabae5e92bb37e83e" +version = "7.0.0" +source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v36#36c304d9e9ba4e4b2d5468d91a6bd27210133b6a" dependencies = [ - "c-kzg 0.1.1", + "aurora-engine-modexp", + "c-kzg", "k256", - "num", "once_cell", - "revm-primitives 1.3.0", + "revm-primitives 4.0.0", "ripemd", - "secp256k1 0.27.0", + "secp256k1 0.29.0", "sha2", "substrate-bn", ] [[package]] name = "revm-precompile" -version = "7.0.0" -source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v36#36c304d9e9ba4e4b2d5468d91a6bd27210133b6a" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a88c8c7c5f9b988a9e65fc0990c6ce859cdb74114db705bd118a96d22d08027" dependencies = [ "aurora-engine-modexp", - "c-kzg 1.0.2", + "c-kzg", + "cfg-if 1.0.0", "k256", "once_cell", - "revm-primitives 4.0.0", + "revm-primitives 13.0.0", "ripemd", "secp256k1 0.29.0", "sha2", @@ -3313,39 +3292,42 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51187b852d9e458816a2e19c81f1dd6c924077e1a8fccd16e4f044f865f299d7" +version = "4.0.0" +source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v36#36c304d9e9ba4e4b2d5468d91a6bd27210133b6a" dependencies = [ - "alloy-primitives 0.4.2", - "alloy-rlp", + "alloy-primitives 0.7.7", "auto_impl", "bitflags 2.6.0", "bitvec", + "c-kzg", + "cfg-if 1.0.0", + "derive_more 0.99.17", + "dyn-clone", "enumn", + "halo2curves", "hashbrown 0.14.3", "hex", + "once_cell", + "poseidon-base", + "serde", ] [[package]] name = "revm-primitives" -version = "4.0.0" -source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v36#36c304d9e9ba4e4b2d5468d91a6bd27210133b6a" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d11fa1e195b0bebaf3fb18596f314a13ba3a4cb1fdd16d3465934d812fd921e" dependencies = [ - "alloy-primitives 0.7.7", + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives 0.8.10", "auto_impl", "bitflags 2.6.0", "bitvec", - "c-kzg 1.0.2", "cfg-if 1.0.0", - "derive_more", "dyn-clone", "enumn", - "halo2curves", - "hashbrown 0.14.3", "hex", - "once_cell", - "poseidon-base", "serde", ] @@ -3363,7 +3345,7 @@ dependencies = [ "ripemd", "secp256k1 0.24.3", "sha2", - "sha3 0.10.6", + "sha3 0.10.8", "substrate-bn", ] @@ -3465,6 +3447,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -3597,7 +3585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cfdffd972d76b22f3d7f81c8be34b2296afd3a25e0a547bd9abe340a4dbbe97" dependencies = [ "cfg-if 1.0.0", - "derive_more", + "derive_more 0.99.17", "parity-scale-codec", "scale-info-derive", ] @@ -3671,15 +3659,6 @@ dependencies = [ "secp256k1-sys 0.6.1", ] -[[package]] -name = "secp256k1" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" -dependencies = [ - "secp256k1-sys 0.8.1", -] - [[package]] name = "secp256k1" version = "0.29.0" @@ -3699,15 +3678,6 @@ dependencies = [ "cc", ] -[[package]] -name = "secp256k1-sys" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" -dependencies = [ - "cc", -] - [[package]] name = "secp256k1-sys" version = "0.10.0" @@ -3788,6 +3758,7 @@ version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" dependencies = [ + "indexmap 1.9.3", "itoa", "ryu", "serde", @@ -3873,9 +3844,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ "digest 0.10.7", "keccak", @@ -3891,12 +3862,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -3949,9 +3914,9 @@ dependencies = [ "rand", "revm 2.3.1", "rlp", - "rustc-hash", + "rustc-hash 1.1.0", "serde", - "sha3 0.10.6", + "sha3 0.10.8", ] [[package]] @@ -3972,9 +3937,9 @@ dependencies = [ "rand", "revm 2.3.1", "rlp", - "rustc-hash", + "rustc-hash 1.1.0", "serde", - "sha3 0.10.6", + "sha3 0.10.8", ] [[package]] @@ -4354,7 +4319,7 @@ version = "0.19.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" dependencies = [ - "indexmap", + "indexmap 1.9.3", "toml_datetime", "winnow", ] @@ -4675,18 +4640,6 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" -[[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 0.38.13", -] - [[package]] name = "winapi" version = "0.3.9" @@ -4745,15 +4698,6 @@ dependencies = [ "windows-targets 0.48.0", ] -[[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.5", -] - [[package]] name = "windows-targets" version = "0.42.2" @@ -4784,22 +4728,6 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -4812,12 +4740,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -4830,12 +4752,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -4848,18 +4764,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4872,12 +4776,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4890,12 +4788,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -4908,12 +4800,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4926,12 +4812,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - [[package]] name = "winnow" version = "0.4.1" @@ -5053,7 +4933,7 @@ dependencies = [ "rayon", "serde", "serde_json", - "sha3 0.10.6", + "sha3 0.10.8", "snark-verifier 0.1.0 (git+https://github.com/scroll-tech/snark-verifier?branch=v0.1)", "snark-verifier-sdk 0.0.1 (git+https://github.com/scroll-tech/snark-verifier?branch=v0.1)", "strum 0.25.0", diff --git a/integration/Cargo.toml b/integration/Cargo.toml index 50b80afa..9c939c93 100644 --- a/integration/Cargo.toml +++ b/integration/Cargo.toml @@ -17,7 +17,7 @@ serde_json.workspace = true serde_derive.workspace = true tokio.workspace = true -revm = { version = "3.5.0", default-features = false, features = ["std"] } +revm = { version = "17.1.0", default-features = false, features = ["std"] } snark-verifier = { git = "https://github.com/scroll-tech/snark-verifier", branch = "develop" } snark-verifier-sdk = { git = "https://github.com/scroll-tech/snark-verifier", branch = "develop", default-features = false, features = ["loader_halo2", "loader_evm", "halo2-pse"] } diff --git a/integration/src/evm.rs b/integration/src/evm.rs index e2c5bb2c..725dc710 100644 --- a/integration/src/evm.rs +++ b/integration/src/evm.rs @@ -1,23 +1,23 @@ use revm::{ - primitives::{CreateScheme, ExecutionResult, Output, TransactTo, TxEnv}, - InMemoryDB, EVM, + primitives::{Env, ExecutionResult, Output, SpecId, TransactTo, TxEnv, TxKind}, + Evm, 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()), - }; - - evm.env.tx = TxEnv { + let mut env = Box::::default(); + env.tx = TxEnv { gas_limit: u64::MAX, - transact_to: TransactTo::Create(CreateScheme::Create), + transact_to: TxKind::Create, data: deployment_code.into(), ..Default::default() }; - + let mut evm = Evm::builder() + .with_spec_id(SpecId::CANCUN) + .with_db(InMemoryDB::default()) + .with_env(env.clone()) + .build(); let result = evm.transact_commit().unwrap(); let contract = match result { ExecutionResult::Success { @@ -37,13 +37,17 @@ pub fn deploy_and_call(deployment_code: Vec, calldata: Vec) -> Result unreachable!(), }; - evm.env.tx = TxEnv { + env.tx = TxEnv { gas_limit: u64::MAX, transact_to: TransactTo::Call(contract), data: calldata.into(), ..Default::default() }; - + let mut evm = Evm::builder() + .with_spec_id(SpecId::CANCUN) + .with_db(InMemoryDB::default()) + .with_env(env) + .build(); let result = evm.transact_commit().unwrap(); match result { ExecutionResult::Success { gas_used, .. } => Ok(gas_used),