From 664809e96035e370c3d25118a98f262b308eae40 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Tue, 11 Mar 2025 02:00:16 +0400 Subject: [PATCH 01/23] wip --- Cargo.lock | 475 ++++++++++++++++---- Cargo.toml | 7 +- crates/cheatcodes/src/inspector.rs | 8 +- crates/evm/core/Cargo.toml | 2 +- crates/evm/core/src/backend/cow.rs | 71 ++- crates/evm/core/src/backend/error.rs | 8 +- crates/evm/core/src/backend/in_memory_db.rs | 5 +- crates/evm/core/src/backend/mod.rs | 199 ++++---- crates/evm/core/src/backend/snapshot.rs | 13 +- crates/evm/core/src/buffer.rs | 2 +- crates/evm/core/src/env.rs | 61 +++ crates/evm/core/src/fork/database.rs | 15 +- crates/evm/core/src/fork/init.rs | 29 +- crates/evm/core/src/fork/mod.rs | 2 +- crates/evm/core/src/fork/multi.rs | 23 +- crates/evm/core/src/ic.rs | 7 +- crates/evm/core/src/lib.rs | 10 +- crates/evm/core/src/opcodes.rs | 2 +- crates/evm/core/src/opts.rs | 39 +- crates/evm/core/src/precompiles.rs | 7 +- crates/evm/core/src/utils.rs | 197 +++++--- 21 files changed, 811 insertions(+), 371 deletions(-) create mode 100644 crates/evm/core/src/env.rs diff --git a/Cargo.lock b/Cargo.lock index 1cea57209a9b5..3944759905490 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,10 +90,10 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1715ed2a977d3ca4b39ffe0fc69f9f5b0e81382b348bdb5172abaa77a10f0b6d" dependencies = [ - "alloy-eips", + "alloy-eips 0.12.4", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-trie", "auto_impl", "c-kzg", @@ -114,10 +114,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "660705969af143897d83937d73f53c741c1587f49c27c2cfce594e188fcbc1e4" dependencies = [ "alloy-consensus", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.12.4", "serde", ] @@ -184,8 +184,6 @@ checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ "alloy-primitives", "alloy-rlp", - "arbitrary", - "rand 0.8.5", "serde", ] @@ -197,13 +195,30 @@ checksum = "9b15b13d38b366d01e818fe8e710d4d702ef7499eacd44926a06171dd9585d0c" dependencies = [ "alloy-primitives", "alloy-rlp", - "arbitrary", "k256", - "rand 0.8.5", "serde", "thiserror 2.0.12", ] +[[package]] +name = "alloy-eips" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5591581ca2ab0b3e7226a4047f9a1bfcf431da1d0cce3752fda609fea3c27e37" +dependencies = [ + "alloy-eip2124", + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.11.1", + "auto_impl", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", +] + [[package]] name = "alloy-eips" version = "0.12.4" @@ -215,14 +230,30 @@ dependencies = [ "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.12.4", "auto_impl", "c-kzg", "derive_more 2.0.1", "either", "once_cell", "serde", - "sha2", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-evm" +version = "0.1.0" +dependencies = [ + "alloy-consensus", + "alloy-eips 0.12.4", + "alloy-hardforks", + "alloy-primitives", + "alloy-sol-types", + "auto_impl", + "derive_more 1.0.0", + "op-revm", + "revm", + "thiserror 2.0.12", ] [[package]] @@ -231,13 +262,25 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "738b6d7da21955cfdebeb7bcf300040b79e51c58a22e5f029ae989a8d834a3f3" dependencies = [ - "alloy-eips", + "alloy-eips 0.12.4", "alloy-primitives", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-trie", "serde", ] +[[package]] +name = "alloy-hardforks" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/hardforks?rev=ae4176c#ae4176c0027171d38832644f63f05f4f80861c6e" +dependencies = [ + "alloy-chains", + "alloy-eip2124", + "alloy-primitives", + "auto_impl", + "dyn-clone", +] + [[package]] name = "alloy-json-abi" version = "0.8.22" @@ -272,13 +315,13 @@ checksum = "f10b0bc0657b018ee4f3758f889d066af6b1f20f57cd825b540182029090c151" dependencies = [ "alloy-consensus", "alloy-consensus-any", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-json-rpc", "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-any", "alloy-rpc-types-eth", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-signer", "alloy-sol-types", "async-trait", @@ -297,9 +340,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cac4aeeabbbc16623d0745ae3b5a515d727ce8ef4ec4b6a886c3634d8b298fe" dependencies = [ "alloy-consensus", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-primitives", - "alloy-serde", + "alloy-serde 0.12.4", "serde", ] @@ -362,7 +405,7 @@ checksum = "d06ffafc44e68c8244feb51919895c679c153a0b143c182e1ffe8cce998abf15" dependencies = [ "alloy-chains", "alloy-consensus", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-json-rpc", "alloy-network", "alloy-network-primitives", @@ -476,7 +519,7 @@ dependencies = [ "alloy-rpc-types-eth", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde", + "alloy-serde 0.12.4", "serde", ] @@ -488,7 +531,7 @@ checksum = "2852d7350760c3fbfc60ee3396b95a66ea57afe3aeecee72bf1171ac6b1d5d18" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde", + "alloy-serde 0.12.4", "serde", ] @@ -500,7 +543,7 @@ checksum = "f726ebb03d5918a946d0a6e17829cabd90ffe928664dc3f7fdbba1be511760de" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", - "alloy-serde", + "alloy-serde 0.12.4", ] [[package]] @@ -520,10 +563,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05bfe640e4708c5a83dfcc65b5e4a0deb6ddcb18897dd49862ddc3964e06ff8" dependencies = [ "alloy-consensus", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.12.4", "derive_more 2.0.1", "jsonwebtoken", "rand 0.8.5", @@ -539,11 +582,11 @@ checksum = "c24a3b6c552b74c4abdbaa45fd467a230f5564f62c6adae16972dd90b6b4dca5" dependencies = [ "alloy-consensus", "alloy-consensus-any", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-sol-types", "itertools 0.14.0", "serde", @@ -559,7 +602,7 @@ checksum = "e25f16f6bfe65c23d873741aa343830de270db42c982822e23689d11f2f4d812" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde", + "alloy-serde 0.12.4", "serde", "serde_json", "thiserror 2.0.12", @@ -573,10 +616,21 @@ checksum = "9415e7e3f32a93a38ecb83aa449f7326081b5b362964291463f8f2060b4b8a31" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde", + "alloy-serde 0.12.4", "serde", ] +[[package]] +name = "alloy-serde" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8732058f5ca28c1d53d241e8504620b997ef670315d7c8afab856b3e3b80d945" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.12.4" @@ -978,7 +1032,7 @@ dependencies = [ "alloy-consensus", "alloy-contract", "alloy-dyn-abi", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-genesis", "alloy-json-abi", "alloy-json-rpc", @@ -989,7 +1043,7 @@ dependencies = [ "alloy-rlp", "alloy-rpc-client", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-signer", "alloy-signer-local", "alloy-sol-types", @@ -1045,12 +1099,12 @@ version = "1.0.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-network", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-trie", "bytes", "foundry-common", @@ -1241,6 +1295,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.6" @@ -1558,7 +1618,7 @@ dependencies = [ "http 1.2.0", "once_cell", "percent-encoding", - "sha2", + "sha2 0.10.8", "time", "tracing", ] @@ -1802,6 +1862,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.21.7" @@ -1872,6 +1938,22 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -1884,7 +1966,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" dependencies = [ - "arbitrary", "serde", ] @@ -1901,6 +1982,15 @@ dependencies = [ "wyz", ] +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -1953,7 +2043,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ - "sha2", + "sha2 0.10.8", "tinyvec", ] @@ -2073,7 +2163,7 @@ dependencies = [ "alloy-provider", "alloy-rlp", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-signer", "alloy-signer-local", "alloy-sol-types", @@ -2341,7 +2431,7 @@ dependencies = [ "hmac", "k256", "serde", - "sha2", + "sha2 0.10.8", "thiserror 1.0.69", ] @@ -2357,7 +2447,7 @@ dependencies = [ "once_cell", "pbkdf2 0.12.2", "rand 0.8.5", - "sha2", + "sha2 0.10.8", "thiserror 1.0.69", ] @@ -2375,7 +2465,7 @@ dependencies = [ "generic-array", "ripemd", "serde", - "sha2", + "sha2 0.10.8", "sha3", "thiserror 1.0.69", ] @@ -2810,6 +2900,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.99", +] + [[package]] name = "derive_arbitrary" version = "1.4.1" @@ -2923,7 +3024,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "const-oid", "crypto-common", "subtle", @@ -3227,7 +3328,7 @@ dependencies = [ "scrypt", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "sha3", "thiserror 1.0.69", "uuid 0.8.2", @@ -3422,7 +3523,7 @@ dependencies = [ "alloy-primitives", "alloy-provider", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-signer", "alloy-signer-local", "alloy-sol-macro-expander", @@ -3546,13 +3647,13 @@ dependencies = [ "alloy-chains", "alloy-consensus", "alloy-dyn-abi", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-json-abi", "alloy-network", "alloy-primitives", "alloy-provider", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-signer", "clap", "dialoguer", @@ -3641,7 +3742,7 @@ dependencies = [ "itertools 0.14.0", "regex", "reqwest", - "revm-primitives", + "revm-primitives 15.2.0", "semver 1.0.26", "serde", "serde_json", @@ -3742,7 +3843,7 @@ version = "1.0.0" dependencies = [ "alloy-chains", "alloy-dyn-abi", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-json-abi", "alloy-primitives", "alloy-provider", @@ -3782,7 +3883,7 @@ dependencies = [ "alloy-consensus", "alloy-contract", "alloy-dyn-abi", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-json-abi", "alloy-json-rpc", "alloy-network", @@ -3791,7 +3892,7 @@ dependencies = [ "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.12.4", "alloy-sol-types", "alloy-transport", "alloy-transport-http", @@ -3838,11 +3939,11 @@ dependencies = [ "alloy-network", "alloy-primitives", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.12.4", "chrono", "comfy-table", "foundry-macros", - "revm-primitives", + "revm-primitives 15.2.0", "serde", "serde_json", "similar-asserts", @@ -3874,7 +3975,7 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "solar-parse", "svm-rs", "svm-rs-builds", @@ -3978,7 +4079,7 @@ dependencies = [ "path-slash", "regex", "reqwest", - "revm-primitives", + "revm-primitives 15.2.0", "semver 1.0.26", "serde", "serde_json", @@ -4058,6 +4159,7 @@ version = "1.0.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", + "alloy-evm", "alloy-genesis", "alloy-json-abi", "alloy-network", @@ -4156,8 +4258,7 @@ dependencies = [ [[package]] name = "foundry-fork-db" version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7beb856e73f59015823eb221a98b7c22b58bc4e7066c9c86774ebe74e61dd6" +source = "git+https://github.com/foundry-rs/foundry-fork-db?rev=e60b89c#e60b89c09942eada380b9577a60d5655fbc40ff6" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -4859,6 +4960,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + [[package]] name = "hidapi-rusb" version = "1.3.3" @@ -5611,7 +5721,7 @@ dependencies = [ "elliptic-curve", "once_cell", "serdect", - "sha2", + "sha2 0.10.8", "signature", ] @@ -5736,6 +5846,52 @@ dependencies = [ "redox_syscall", ] +[[package]] +name = "libsecp256k1" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +dependencies = [ + "arrayref", + "base64 0.13.1", + "digest 0.9.0", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + [[package]] name = "libusb1-sys" version = "0.7.0" @@ -5899,7 +6055,7 @@ dependencies = [ "regex", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "shlex", "tempfile", "toml 0.5.11", @@ -6348,10 +6504,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d297150146a63778a29400320700e804ec6e1e4d6ec99857cdbbaf17b3de9241" dependencies = [ "alloy-consensus", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.12.4", "derive_more 1.0.0", "serde", "thiserror 2.0.12", @@ -6364,17 +6520,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7095f87d34fc814e3de06a7af8ffff9121993f322231647f84df304821cc0275" dependencies = [ "alloy-consensus", - "alloy-eips", + "alloy-eips 0.12.4", "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde", + "alloy-serde 0.12.4", "derive_more 1.0.0", "op-alloy-consensus", "serde", "serde_json", ] +[[package]] +name = "op-revm" +version = "1.0.0-alpha.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0bce0ed6dd4f417e31ded4afa9dda6f9ee7c9c95c14f36f383f8bdc3af2356" +dependencies = [ + "auto_impl", + "once_cell", + "revm", + "serde", +] + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "opener" version = "0.7.2" @@ -6426,7 +6600,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -6607,7 +6781,7 @@ checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -6638,6 +6812,7 @@ checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", "phf_shared", + "serde", ] [[package]] @@ -7421,16 +7596,118 @@ dependencies = [ [[package]] name = "revm" -version = "19.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5bef3c95fadf3b6a24a253600348380c169ef285f9780a793bb7090c8990d" +version = "20.0.0-alpha.3" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database", + "revm-database-interface", + "revm-handler", + "revm-inspector", + "revm-interpreter", + "revm-precompile", + "revm-primitives 16.0.0-alpha.2", + "revm-state", +] + +[[package]] +name = "revm-bytecode" +version = "1.0.0-alpha.2" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "bitvec", + "phf", + "revm-primitives 16.0.0-alpha.2", + "serde", +] + +[[package]] +name = "revm-context" +version = "1.0.0-alpha.2" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" dependencies = [ "auto_impl", "cfg-if", - "dyn-clone", - "once_cell", + "derive-where", + "revm-bytecode", + "revm-context-interface", + "revm-database-interface", + "revm-primitives 16.0.0-alpha.2", + "revm-state", + "serde", +] + +[[package]] +name = "revm-context-interface" +version = "1.0.0-alpha.2" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "auto_impl", + "revm-database-interface", + "revm-primitives 16.0.0-alpha.2", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database" +version = "1.0.0-alpha.2" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "alloy-eips 0.11.1", + "auto_impl", + "revm-bytecode", + "revm-database-interface", + "revm-primitives 16.0.0-alpha.2", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database-interface" +version = "1.0.0-alpha.2" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "auto_impl", + "revm-primitives 16.0.0-alpha.2", + "revm-state", + "serde", +] + +[[package]] +name = "revm-handler" +version = "1.0.0-alpha.3" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "auto_impl", + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database-interface", "revm-interpreter", "revm-precompile", + "revm-primitives 16.0.0-alpha.2", + "revm-state", + "serde", +] + +[[package]] +name = "revm-inspector" +version = "1.0.0-alpha.3" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "auto_impl", + "revm-context", + "revm-database-interface", + "revm-handler", + "revm-interpreter", + "revm-precompile", + "revm-primitives 16.0.0-alpha.2", + "revm-state", "serde", "serde_json", ] @@ -7438,8 +7715,7 @@ dependencies = [ [[package]] name = "revm-inspectors" version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a43423d81f4bef634469bfb2d9ebe36a9ea9167f20ab3a7d1ff1e05fa63099" +source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=2a365e3#2a365e34e220a6273fbe3ea27eda3d7f1208f8de" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -7455,31 +7731,33 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "15.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcab7ef2064057acfc84731205f4bc77f4ec1b35630800b26ff6a185731c5ab" +version = "16.0.0-alpha.3" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" dependencies = [ - "revm-primitives", + "revm-bytecode", + "revm-context-interface", + "revm-primitives 16.0.0-alpha.2", "serde", ] [[package]] name = "revm-precompile" -version = "16.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6caa1a7ff2cc4a09a263fcf9de99151706f323d30f33d519ed329f017a02b046" +version = "17.0.0-alpha.3" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" dependencies = [ "aurora-engine-modexp", "blst", "c-kzg", "cfg-if", "k256", + "libsecp256k1", "once_cell", "p256", - "revm-primitives", + "revm-context-interface", + "revm-primitives 16.0.0-alpha.2", "ripemd", "secp256k1", - "sha2", + "sha2 0.10.8", "substrate-bn", ] @@ -7495,11 +7773,30 @@ dependencies = [ "auto_impl", "bitflags 2.9.0", "bitvec", - "c-kzg", "cfg-if", "dyn-clone", "enumn", "hex", +] + +[[package]] +name = "revm-primitives" +version = "16.0.0-alpha.2" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "alloy-primitives", + "enumn", + "serde", +] + +[[package]] +name = "revm-state" +version = "1.0.0-alpha.2" +source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" +dependencies = [ + "bitflags 2.9.0", + "revm-bytecode", + "revm-primitives 16.0.0-alpha.2", "serde", ] @@ -7920,7 +8217,7 @@ dependencies = [ "hmac", "pbkdf2 0.11.0", "salsa20", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -7956,10 +8253,11 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.29.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" dependencies = [ + "bitcoin_hashes", "rand 0.8.5", "secp256k1-sys", ] @@ -8233,6 +8531,19 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" +[[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", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "sha2" version = "0.10.8" @@ -8583,7 +8894,7 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "thiserror 2.0.12", "tokio", "toml_edit", @@ -8742,7 +9053,7 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "tempfile", "thiserror 2.0.12", "url", diff --git a/Cargo.toml b/Cargo.toml index b33d3c4b46c0b..ce006190a5b89 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -189,16 +189,17 @@ foundry-linking = { path = "crates/linking" } # solc & compilation utilities foundry-block-explorers = { version = "0.11.0", default-features = false } foundry-compilers = { version = "0.13.3", default-features = false } -foundry-fork-db = "0.12" +foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "e60b89c" } solang-parser = "=0.3.3" solar-parse = { version = "=0.1.1", default-features = false } ## revm -revm = { version = "19.4.0", default-features = false } +revm = { version = "20.0.0-alpha.3", default-features = false } revm-primitives = { version = "15.1.0", default-features = false } revm-inspectors = { version = "0.16.0", features = ["serde"] } ## alloy +alloy-evm = { path = "../evm/crates/evm" } alloy-consensus = { version = "0.12.1", default-features = false } alloy-contract = { version = "0.12.1", default-features = false } alloy-eips = { version = "0.12.1", default-features = false } @@ -316,6 +317,8 @@ vergen = { version = "8", default-features = false } yansi = { version = "1.0", features = ["detect-tty", "detect-env"] } [patch.crates-io] +revm = { git = "https://github.com/bluealloy/revm", rev = "9e39df5" } +revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "2a365e3" } ## alloy-core # alloy-dyn-abi = { path = "../../alloy-rs/core/crates/dyn-abi" } # alloy-json-abi = { path = "../../alloy-rs/core/crates/json-abi" } diff --git a/crates/cheatcodes/src/inspector.rs b/crates/cheatcodes/src/inspector.rs index 79a19baa7aec9..feb04944b18c7 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -33,7 +33,7 @@ use foundry_evm_core::{ abi::Vm::stopExpectSafeMemoryCall, backend::{DatabaseError, DatabaseExt, RevertDiagnostic}, constants::{CHEATCODE_ADDRESS, HARDHAT_CONSOLE_ADDRESS, MAGIC_ASSUME}, - utils::new_evm_with_existing_context, + utils::new_evm_with_context, InspectorExt, }; use foundry_evm_traces::{TracingInspector, TracingInspectorConfig}; @@ -161,7 +161,7 @@ where l1_block_info, }; - let mut evm = new_evm_with_existing_context(inner, &mut *inspector); + let mut evm = new_evm_with_context(inner, &mut *inspector); let res = f(&mut evm)?; @@ -1368,7 +1368,7 @@ impl Inspector<&mut dyn DatabaseExt> for Cheatcodes { outcome.result.output = error.abi_encode().into(); outcome } - } + }; } else { // Call didn't revert, reset `assume_no_revert` state. self.assume_no_revert = None; @@ -1820,7 +1820,7 @@ impl Cheatcodes { let (key, target_address) = if interpreter.current_opcode() == op::SLOAD { (try_or_return!(interpreter.stack().peek(0)), interpreter.contract().target_address) } else { - return + return; }; let Ok(value) = ecx.sload(target_address, key) else { diff --git a/crates/evm/core/Cargo.toml b/crates/evm/core/Cargo.toml index 5730e6fb3ab4a..b15f5011a6e09 100644 --- a/crates/evm/core/Cargo.toml +++ b/crates/evm/core/Cargo.toml @@ -19,6 +19,7 @@ foundry-common.workspace = true foundry-config.workspace = true foundry-evm-abi.workspace = true +alloy-evm.workspace = true alloy-dyn-abi = { workspace = true, features = ["arbitrary", "eip712"] } alloy-genesis.workspace = true alloy-json-abi.workspace = true @@ -43,7 +44,6 @@ revm = { workspace = true, features = [ "optional_block_gas_limit", "optional_no_base_fee", "arbitrary", - "optimism", "c-kzg", "blst", ] } diff --git a/crates/evm/core/src/backend/cow.rs b/crates/evm/core/src/backend/cow.rs index 3ffb9fc84f3cd..dc226b8c8ddae 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -1,12 +1,10 @@ //! A wrapper around `Backend` that is clone-on-write used for fuzzing. -use super::BackendError; +use super::{BackendError, JournaledState}; use crate::{ backend::{ diagnostic::RevertDiagnostic, Backend, DatabaseExt, LocalForkId, RevertStateSnapshotAction, - }, - fork::{CreateFork, ForkId}, - InspectorExt, + }, fork::{CreateFork, ForkId}, AsEnvMut, Env, EnvMut, InspectorExt }; use alloy_genesis::GenesisAccount; use alloy_primitives::{Address, B256, U256}; @@ -14,12 +12,11 @@ use alloy_rpc_types::TransactionRequest; use eyre::WrapErr; use foundry_fork_db::DatabaseError; use revm::{ - db::DatabaseRef, - primitives::{ - Account, AccountInfo, Bytecode, Env, EnvWithHandlerCfg, HashMap as Map, ResultAndState, - SpecId, - }, - Database, DatabaseCommit, JournaledState, + context::{result::ResultAndState, JournalInit}, + database::DatabaseRef, + primitives::{hardfork::SpecId, HashMap as Map}, + state::{Account, AccountInfo, Bytecode}, + Database, DatabaseCommit, ExecuteEvm, }; use std::{borrow::Cow, collections::BTreeMap}; @@ -64,7 +61,7 @@ impl<'a> CowBackend<'a> { #[instrument(name = "inspect", level = "debug", skip_all)] pub fn inspect( &mut self, - env: &mut EnvWithHandlerCfg, + env: &mut Env, inspector: &mut I, ) -> eyre::Result { // this is a new call to inspect with a new env, so even if we've cloned the backend @@ -73,9 +70,9 @@ impl<'a> CowBackend<'a> { self.spec_id = env.handler_cfg.spec_id; let mut evm = crate::utils::new_evm_with_inspector(self, env.clone(), inspector); - let res = evm.transact().wrap_err("EVM error")?; + let res = evm.replay().wrap_err("EVM error")?; - env.env = evm.context.evm.inner.env; + *env = evm.data.ctx.as_env_mut().to_owned(); Ok(res) } @@ -90,13 +87,15 @@ impl<'a> CowBackend<'a> { /// Returns a mutable instance of the Backend. /// /// If this is the first time this is called, the backed is cloned and initialized. - fn backend_mut(&mut self, env: &Env) -> &mut Backend { + fn backend_mut(&mut self, env: EnvMut<'_>) -> &mut Backend { + let env = env.as_env_mut().to_owned(); if !self.is_initialized { let backend = self.backend.to_mut(); - let env = EnvWithHandlerCfg::new_with_spec_id(Box::new(env.clone()), self.spec_id); + let mut env = env.to_owned(); + env.evm_env.spec = self.spec_id; backend.initialize(&env); self.is_initialized = true; - return backend + return backend; } self.backend.to_mut() } @@ -104,31 +103,31 @@ impl<'a> CowBackend<'a> { /// Returns a mutable instance of the Backend if it is initialized. fn initialized_backend_mut(&mut self) -> Option<&mut Backend> { if self.is_initialized { - return Some(self.backend.to_mut()) + return Some(self.backend.to_mut()); } None } } impl DatabaseExt for CowBackend<'_> { - fn snapshot_state(&mut self, journaled_state: &JournaledState, env: &Env) -> U256 { + fn snapshot_state(&mut self, journaled_state: &JournaledState<'_>, env: &Env) -> U256 { self.backend_mut(env).snapshot_state(journaled_state, env) } fn revert_state( &mut self, id: U256, - journaled_state: &JournaledState, - current: &mut Env, + journaled_state: &JournaledState<'_>, + current: EnvMut<'_>, action: RevertStateSnapshotAction, - ) -> Option { + ) -> Option { self.backend_mut(current).revert_state(id, journaled_state, current, action) } fn delete_state_snapshot(&mut self, id: U256) -> bool { // delete state snapshot requires a previous snapshot to be initialized if let Some(backend) = self.initialized_backend_mut() { - return backend.delete_state_snapshot(id) + return backend.delete_state_snapshot(id); } false } @@ -154,30 +153,30 @@ impl DatabaseExt for CowBackend<'_> { fn select_fork( &mut self, id: LocalForkId, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()> { - self.backend_mut(env).select_fork(id, env, journaled_state) + self.backend_mut(&mut env).select_fork(id, env, journaled_state) } fn roll_fork( &mut self, id: Option, block_number: u64, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()> { - self.backend_mut(env).roll_fork(id, block_number, env, journaled_state) + self.backend_mut(env.as_env_mut()).roll_fork(id, block_number, env, journaled_state) } fn roll_fork_to_transaction( &mut self, id: Option, transaction: B256, - env: &mut Env, - journaled_state: &mut JournaledState, + mut env: EnvMut<'_>, + journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()> { - self.backend_mut(env).roll_fork_to_transaction(id, transaction, env, journaled_state) + self.backend_mut(env.as_env_mut()).roll_fork_to_transaction(id, transaction, env, journaled_state) } fn transact( @@ -185,7 +184,7 @@ impl DatabaseExt for CowBackend<'_> { id: Option, transaction: B256, env: Env, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, inspector: &mut dyn InspectorExt, ) -> eyre::Result<()> { self.backend_mut(&env).transact(id, transaction, env, journaled_state, inspector) @@ -195,7 +194,7 @@ impl DatabaseExt for CowBackend<'_> { &mut self, transaction: &TransactionRequest, env: Env, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, inspector: &mut dyn InspectorExt, ) -> eyre::Result<()> { self.backend_mut(&env).transact_from_tx(transaction, env, journaled_state, inspector) @@ -220,7 +219,7 @@ impl DatabaseExt for CowBackend<'_> { fn diagnose_revert( &self, callee: Address, - journaled_state: &JournaledState, + journaled_state: &JournaledState<'_>, ) -> Option { self.backend.diagnose_revert(callee, journaled_state) } @@ -228,7 +227,7 @@ impl DatabaseExt for CowBackend<'_> { fn load_allocs( &mut self, allocs: &BTreeMap, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, ) -> Result<(), BackendError> { self.backend_mut(&Env::default()).load_allocs(allocs, journaled_state) } @@ -237,7 +236,7 @@ impl DatabaseExt for CowBackend<'_> { &mut self, source: &GenesisAccount, target: &Address, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, ) -> Result<(), BackendError> { self.backend_mut(&Env::default()).clone_account(source, target, journaled_state) } diff --git a/crates/evm/core/src/backend/error.rs b/crates/evm/core/src/backend/error.rs index 15649d9e1c7e8..2ab374192c629 100644 --- a/crates/evm/core/src/backend/error.rs +++ b/crates/evm/core/src/backend/error.rs @@ -1,7 +1,7 @@ use alloy_primitives::Address; pub use foundry_fork_db::{DatabaseError, DatabaseResult}; -use revm::primitives::EVMError; -use std::convert::Infallible; +use revm::context::result::EVMError; +use std::{convert::Infallible, fmt::Display}; pub type BackendResult = Result; @@ -53,8 +53,8 @@ impl From for BackendError { } // Note: this is mostly necessary to use some revm internals that return an [EVMError] -impl> From> for BackendError { - fn from(err: EVMError) -> Self { +impl, TxError: Display> From> for BackendError { + fn from(err: EVMError) -> Self { match err { EVMError::Database(err) => err.into(), EVMError::Custom(err) => Self::msg(err), diff --git a/crates/evm/core/src/backend/in_memory_db.rs b/crates/evm/core/src/backend/in_memory_db.rs index 4e90bfec0ae05..0fb3f235e1216 100644 --- a/crates/evm/core/src/backend/in_memory_db.rs +++ b/crates/evm/core/src/backend/in_memory_db.rs @@ -4,8 +4,9 @@ use crate::state_snapshot::StateSnapshots; use alloy_primitives::{Address, B256, U256}; use foundry_fork_db::DatabaseError; use revm::{ - db::{CacheDB, DatabaseRef, EmptyDB}, - primitives::{Account, AccountInfo, Bytecode, HashMap as Map}, + database::{CacheDB, DatabaseRef, EmptyDB}, + primitives::HashMap as Map, + state::{Account, AccountInfo, Bytecode}, Database, DatabaseCommit, }; diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 80dfaecf14d1b..2a9babe9ff9c7 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -1,11 +1,7 @@ //! Foundry's main executor backend abstraction and implementation. use crate::{ - constants::{CALLER, CHEATCODE_ADDRESS, DEFAULT_CREATE2_DEPLOYER, TEST_CONTRACT_ADDRESS}, - fork::{CreateFork, ForkId, MultiFork}, - state_snapshot::StateSnapshots, - utils::{configure_tx_env, configure_tx_req_env, new_evm_with_inspector}, - InspectorExt, + constants::{CALLER, CHEATCODE_ADDRESS, DEFAULT_CREATE2_DEPLOYER, TEST_CONTRACT_ADDRESS}, fork::{CreateFork, ForkId, MultiFork}, state_snapshot::StateSnapshots, utils::{configure_tx_env, configure_tx_req_env, new_evm_with_inspector}, AsEnvMut, Env, EnvMut, InspectorExt }; use alloy_genesis::GenesisAccount; use alloy_network::{AnyRpcBlock, AnyTxEnvelope, TransactionResponse}; @@ -15,14 +11,14 @@ use eyre::Context; use foundry_common::{is_known_system_sender, SYSTEM_TRANSACTION_TYPE}; pub use foundry_fork_db::{cache::BlockchainDbMeta, BlockchainDb, SharedBackend}; use revm::{ - db::{CacheDB, DatabaseRef}, - inspectors::NoOpInspector, + context::{result::ResultAndState, JournalInit}, + context_interface::block::BlobExcessGasAndPrice, + database::{CacheDB, DatabaseRef}, + inspector::NoOpInspector, precompile::{PrecompileSpecId, Precompiles}, - primitives::{ - Account, AccountInfo, BlobExcessGasAndPrice, Bytecode, Env, EnvWithHandlerCfg, EvmState, - EvmStorageSlot, HashMap as Map, Log, ResultAndState, SpecId, KECCAK_EMPTY, - }, - Database, DatabaseCommit, JournaledState, + primitives::{hardfork::SpecId, HashMap as Map, Log, KECCAK_EMPTY}, + state::{Account, AccountInfo, Bytecode, EvmState, EvmStorageSlot}, + Database, DatabaseCommit, ExecuteEvm, Journal, }; use std::{ collections::{BTreeMap, HashMap, HashSet}, @@ -68,6 +64,8 @@ const DEFAULT_PERSISTENT_ACCOUNTS: [Address; 3] = pub const GLOBAL_FAIL_SLOT: U256 = uint!(0x6661696c65640000000000000000000000000000000000000000000000000000_U256); +pub type JournaledState<'a> = Journal<&'a mut dyn DatabaseExt>; + /// An extension trait that allows us to easily extend the `revm::Inspector` capabilities #[auto_impl::auto_impl(&mut)] pub trait DatabaseExt: Database + DatabaseCommit { @@ -76,7 +74,7 @@ pub trait DatabaseExt: Database + DatabaseCommit { /// A state snapshot is associated with a new unique id that's created for the snapshot. /// State snapshots can be reverted: [DatabaseExt::revert_state], however, depending on the /// [RevertStateSnapshotAction], it will keep the snapshot alive or delete it. - fn snapshot_state(&mut self, journaled_state: &JournaledState, env: &Env) -> U256; + fn snapshot_state(&mut self, journaled_state: &JournaledState<'_>, env: &Env) -> U256; /// Reverts the snapshot if it exists /// @@ -93,10 +91,10 @@ pub trait DatabaseExt: Database + DatabaseCommit { fn revert_state( &mut self, id: U256, - journaled_state: &JournaledState, - env: &mut Env, + journaled_state: &JournaledState<'_>, + env: EnvMut<'_>, action: RevertStateSnapshotAction, - ) -> Option; + ) -> Option; /// Deletes the state snapshot with the given `id` /// @@ -113,8 +111,8 @@ pub trait DatabaseExt: Database + DatabaseCommit { fn create_select_fork( &mut self, fork: CreateFork, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournaledState<'_>, ) -> eyre::Result { let id = self.create_fork(fork)?; self.select_fork(id, env, journaled_state)?; @@ -127,8 +125,8 @@ pub trait DatabaseExt: Database + DatabaseCommit { fn create_select_fork_at_transaction( &mut self, fork: CreateFork, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournaledState<'_>, transaction: B256, ) -> eyre::Result { let id = self.create_fork_at_transaction(fork, transaction)?; @@ -158,8 +156,8 @@ pub trait DatabaseExt: Database + DatabaseCommit { fn select_fork( &mut self, id: LocalForkId, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()>; /// Updates the fork to given block number. @@ -173,8 +171,8 @@ pub trait DatabaseExt: Database + DatabaseCommit { &mut self, id: Option, block_number: u64, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()>; /// Updates the fork to given transaction hash @@ -189,8 +187,8 @@ pub trait DatabaseExt: Database + DatabaseCommit { &mut self, id: Option, transaction: B256, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()>; /// Fetches the given transaction for the fork and executes it, committing the state in the DB @@ -199,7 +197,7 @@ pub trait DatabaseExt: Database + DatabaseCommit { id: Option, transaction: B256, env: Env, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, inspector: &mut dyn InspectorExt, ) -> eyre::Result<()>; @@ -208,7 +206,7 @@ pub trait DatabaseExt: Database + DatabaseCommit { &mut self, transaction: &TransactionRequest, env: Env, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, inspector: &mut dyn InspectorExt, ) -> eyre::Result<()>; @@ -267,7 +265,7 @@ pub trait DatabaseExt: Database + DatabaseCommit { fn diagnose_revert( &self, callee: Address, - journaled_state: &JournaledState, + journaled_state: &JournaledState<'_>, ) -> Option; /// Loads the account allocs from the given `allocs` map into the passed [JournaledState]. @@ -276,7 +274,7 @@ pub trait DatabaseExt: Database + DatabaseCommit { fn load_allocs( &mut self, allocs: &BTreeMap, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, ) -> Result<(), BackendError>; /// Copies bytecode, storage, nonce and balance from the given genesis account to the target @@ -287,7 +285,7 @@ pub trait DatabaseExt: Database + DatabaseCommit { &mut self, source: &GenesisAccount, target: &Address, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, ) -> Result<(), BackendError>; /// Returns true if the given account is currently marked as persistent. @@ -447,7 +445,7 @@ pub struct Backend { /// /// This will be an empty `JournaledState`, which will be populated with persistent accounts, /// See [`Self::update_fork_db()`]. - fork_init_journaled_state: JournaledState, + fork_init_journaled_state: JournalInit, /// The currently active fork database /// /// If this is set, then the Backend is currently in forking mode @@ -507,7 +505,7 @@ impl Backend { /// Creates a new instance of `Backend` with fork added to the fork database and sets the fork /// as active - pub(crate) fn new_with_fork(id: &ForkId, fork: Fork, journaled_state: JournaledState) -> Self { + pub(crate) fn new_with_fork(id: &ForkId, fork: Fork, journaled_state: JournalInit) -> Self { let mut backend = Self::spawn(None); let fork_ids = backend.inner.insert_new_fork(id.clone(), fork.db, journaled_state); backend.inner.launched_with_fork = Some((id.clone(), fork_ids.0, fork_ids.1)); @@ -621,7 +619,7 @@ impl Backend { /// When creating or switching forks, we update the AccountInfo of the contract pub(crate) fn update_fork_db( &self, - active_journaled_state: &mut JournaledState, + active_journaled_state: &mut JournaledState<'_>, target_fork: &mut Fork, ) { self.update_fork_db_contracts( @@ -635,7 +633,7 @@ impl Backend { pub(crate) fn update_fork_db_contracts( &self, accounts: impl IntoIterator, - active_journaled_state: &mut JournaledState, + active_journaled_state: &mut JournaledState<'_>, target_fork: &mut Fork, ) { if let Some(db) = self.active_fork_db() { @@ -735,11 +733,11 @@ impl Backend { /// Initializes settings we need to keep track of. /// /// We need to track these mainly to prevent issues when switching between different evms - pub(crate) fn initialize(&mut self, env: &EnvWithHandlerCfg) { + pub(crate) fn initialize(&mut self, env: &Env) { self.set_caller(env.tx.caller); - self.set_spec_id(env.handler_cfg.spec_id); + self.set_spec_id(env.evm_env.cfg_env.spec); - let test_contract = match env.tx.transact_to { + let test_contract = match env.tx.kind { TxKind::Call(to) => to, TxKind::Create => { let nonce = self @@ -764,15 +762,15 @@ impl Backend { #[instrument(name = "inspect", level = "debug", skip_all)] pub fn inspect( &mut self, - env: &mut EnvWithHandlerCfg, + env: &mut Env, inspector: &mut I, ) -> eyre::Result { self.initialize(env); let mut evm = crate::utils::new_evm_with_inspector(self, env.clone(), inspector); - let res = evm.transact().wrap_err("EVM error")?; + let res = evm.replay().wrap_err("EVM error")?; - env.env = evm.context.evm.inner.env; + *env = evm.data.ctx.as_env_mut().to_owned(); Ok(res) } @@ -784,7 +782,7 @@ impl Backend { /// Sets the initial journaled state to use when initializing forks #[inline] - fn set_init_journaled_state(&mut self, journaled_state: JournaledState) { + fn set_init_journaled_state(&mut self, journaled_state: JournalInit) { trace!("recording fork init journaled_state"); self.fork_init_journaled_state = journaled_state; } @@ -820,7 +818,7 @@ impl Backend { // created account takes precedence: for example contract creation in setups if init_account.is_created() { trace!(?loaded_account, "skipping created account"); - continue + continue; } // otherwise we need to replace the account's info with the one from the fork's @@ -868,7 +866,7 @@ impl Backend { id: LocalForkId, env: Env, tx_hash: B256, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, ) -> eyre::Result>> { trace!(?id, ?tx_hash, "replay until transaction"); @@ -891,7 +889,7 @@ impl Backend { if tx.tx_hash() == tx_hash { // found the target transaction - return Ok(Some(tx.inner.clone())) + return Ok(Some(tx.inner.clone())); } trace!(tx=?tx.tx_hash(), "committing transaction"); @@ -902,7 +900,7 @@ impl Backend { fork, &fork_id, &persistent_accounts, - &mut NoOpInspector, + &mut NoOpInspector {}, )?; } @@ -911,11 +909,11 @@ impl Backend { } impl DatabaseExt for Backend { - fn snapshot_state(&mut self, journaled_state: &JournaledState, env: &Env) -> U256 { + fn snapshot_state(&mut self, journaled_state: &JournaledState<'_>, env: &Env) -> U256 { trace!("create snapshot"); let id = self.inner.state_snapshots.insert(BackendStateSnapshot::new( self.create_db_snapshot(), - journaled_state.clone(), + journaled_state.to_init(), env.clone(), )); trace!(target: "backend", "Created new snapshot {}", id); @@ -925,10 +923,10 @@ impl DatabaseExt for Backend { fn revert_state( &mut self, id: U256, - current_state: &JournaledState, - current: &mut Env, + current_state: &JournaledState<'_>, + current: EnvMut<'_>, action: RevertStateSnapshotAction, - ) -> Option { + ) -> Option { trace!(?id, "revert snapshot"); if let Some(mut snapshot) = self.inner.state_snapshots.remove_at(id) { // Re-insert snapshot to persist it @@ -967,7 +965,7 @@ impl DatabaseExt for Backend { .map(|acc| acc.info.clone()) .unwrap_or_default(); - if !fork.db.accounts.contains_key(&caller) { + if !fork.db.cache.accounts.contains_key(&caller) { // update the caller account which is required by the evm fork.db.insert_account_info(caller, caller_account.clone()); } @@ -1035,8 +1033,8 @@ impl DatabaseExt for Backend { fn select_fork( &mut self, id: LocalForkId, - env: &mut Env, - active_journaled_state: &mut JournaledState, + env: EnvMut<'_>, + active_journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()> { trace!(?id, "select fork"); if self.is_active_fork(id) { @@ -1064,7 +1062,7 @@ impl DatabaseExt for Backend { // If we're currently in forking mode we need to update the journaled_state to this point, // this ensures the changes performed while the fork was active are recorded if let Some(active) = self.active_fork_mut() { - active.journaled_state = active_journaled_state.clone(); + active.journaled_state = active_journaled_state.to_init(); let caller = env.tx.caller; let caller_account = active.journaled_state.state.get(&env.tx.caller).cloned(); @@ -1088,7 +1086,7 @@ impl DatabaseExt for Backend { // first fork is selected, we need to update it for all forks and use it as init state // for all future forks - self.set_init_journaled_state(active_journaled_state.clone()); + self.set_init_journaled_state(active_journaled_state.to_init()); self.prepare_init_journal_state()?; // Make sure that the next created fork has a depth of 0. @@ -1116,7 +1114,7 @@ impl DatabaseExt for Backend { .map(|acc| acc.info.clone()) .unwrap_or_default(); - if !fork.db.accounts.contains_key(&caller) { + if !fork.db.cache.accounts.contains_key(&caller) { // update the caller account which is required by the evm fork.db.insert_account_info(caller, caller_account.clone()); } @@ -1142,8 +1140,8 @@ impl DatabaseExt for Backend { &mut self, id: Option, block_number: u64, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournalInit, ) -> eyre::Result<()> { trace!(?id, ?block_number, "roll fork"); let id = self.ensure_fork(id)?; @@ -1206,8 +1204,8 @@ impl DatabaseExt for Backend { &mut self, id: Option, transaction: B256, - env: &mut Env, - journaled_state: &mut JournaledState, + env: EnvMut<'_>, + journaled_state: &mut JournalInit, ) -> eyre::Result<()> { trace!(?id, ?transaction, "roll fork to transaction"); let id = self.ensure_fork(id)?; @@ -1221,7 +1219,7 @@ impl DatabaseExt for Backend { update_env_block(env, &block); // replay all transactions that came before - let env = env.clone(); + let env = env.to_owned(); self.replay_until(id, env, transaction, journaled_state)?; @@ -1233,7 +1231,7 @@ impl DatabaseExt for Backend { maybe_id: Option, transaction: B256, mut env: Env, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, inspector: &mut dyn InspectorExt, ) -> eyre::Result<()> { trace!(?maybe_id, ?transaction, "execute transaction"); @@ -1273,7 +1271,7 @@ impl DatabaseExt for Backend { &mut self, tx: &TransactionRequest, mut env: Env, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, inspector: &mut dyn InspectorExt, ) -> eyre::Result<()> { trace!(?tx, "execute signed transaction"); @@ -1286,8 +1284,8 @@ impl DatabaseExt for Backend { let mut db = self.clone(); let mut evm = new_evm_with_inspector(&mut db, env, inspector); - evm.context.evm.journaled_state.depth = journaled_state.depth + 1; - evm.transact()? + evm.data.ctx.journaled_state.depth = journaled_state.depth + 1; + evm.replay()? }; self.commit(res.state); @@ -1326,7 +1324,7 @@ impl DatabaseExt for Backend { fn diagnose_revert( &self, callee: Address, - journaled_state: &JournaledState, + journaled_state: &JournaledState<'_>, ) -> Option { let active_id = self.active_fork_id()?; let active_fork = self.active_fork()?; @@ -1372,7 +1370,7 @@ impl DatabaseExt for Backend { fn load_allocs( &mut self, allocs: &BTreeMap, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, ) -> Result<(), BackendError> { // Loop through all of the allocs defined in the map and commit them to the journal. for (addr, acc) in allocs.iter() { @@ -1390,11 +1388,11 @@ impl DatabaseExt for Backend { &mut self, source: &GenesisAccount, target: &Address, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, ) -> Result<(), BackendError> { // Fetch the account from the journaled state. Will create a new account if it does // not already exist. - let mut state_acc = journaled_state.load_account(*target, self)?; + let mut state_acc = journaled_state.load_account(*target)?; // Set the account's bytecode and code hash, if the `bytecode` field is present. if let Some(bytecode) = source.code.as_ref() { @@ -1463,9 +1461,9 @@ impl DatabaseExt for Backend { fn set_blockhash(&mut self, block_number: U256, block_hash: B256) { if let Some(db) = self.active_fork_db_mut() { - db.block_hashes.insert(block_number, block_hash); + db.cache.block_hashes.insert(block_number, block_hash); } else { - self.mem_db.block_hashes.insert(block_number, block_hash); + self.mem_db.cache.block_hashes.insert(block_number, block_hash); } } } @@ -1564,7 +1562,7 @@ pub enum BackendDatabaseSnapshot { #[derive(Clone, Debug)] pub struct Fork { db: ForkDB, - journaled_state: JournaledState, + journaled_state: JournalInit, } impl Fork { @@ -1718,7 +1716,7 @@ impl BackendInner { id: LocalForkId, fork_id: ForkId, db: ForkDB, - journaled_state: JournaledState, + journaled_state: JournalInit, ) -> ForkLookupIndex { let idx = self.forks.len(); self.issued_local_fork_ids.insert(id, fork_id.clone()); @@ -1759,7 +1757,7 @@ impl BackendInner { &mut self, fork_id: ForkId, db: ForkDB, - journaled_state: JournaledState, + journaled_state: JournalInit, ) -> (LocalForkId, ForkLookupIndex) { let idx = self.forks.len(); self.created_forks.insert(fork_id.clone(), idx); @@ -1791,8 +1789,8 @@ impl BackendInner { } /// Returns a new, empty, `JournaledState` with set precompiles - pub fn new_journaled_state(&self) -> JournaledState { - JournaledState::new(self.spec_id, self.precompiles().addresses().copied().collect()) + pub fn new_journaled_state(&self) -> JournalInit { + Journal::new(self.spec_id, Default::default()) } } @@ -1821,9 +1819,9 @@ impl Default for BackendInner { } /// This updates the currently used env with the fork's environment -pub(crate) fn update_current_env_with_fork_env(current: &mut Env, fork: Env) { - current.block = fork.block; - current.cfg = fork.cfg; +pub(crate) fn update_current_env_with_fork_env(current: EnvMut<'_>, fork: Env) { + *current.block = fork.evm_env.block_env; + *current.cfg = fork.evm_env.cfg_env; current.tx.chain_id = fork.tx.chain_id; } @@ -1832,7 +1830,7 @@ pub(crate) fn update_current_env_with_fork_env(current: &mut Env, fork: Env) { pub(crate) fn merge_account_data( accounts: impl IntoIterator, active: &CacheDB, - active_journaled_state: &mut JournaledState, + active_journaled_state: &mut JournaledState<'_>, target_fork: &mut Fork, ) { for addr in accounts.into_iter() { @@ -1852,8 +1850,8 @@ pub(crate) fn merge_account_data( /// Clones the account data from the `active_journaled_state` into the `fork_journaled_state` fn merge_journaled_state_data( addr: Address, - active_journaled_state: &JournaledState, - fork_journaled_state: &mut JournaledState, + active_journaled_state: &JournaledState<'_>, + fork_journaled_state: &mut JournalInit, ) { if let Some(mut acc) = active_journaled_state.state.get(&addr).cloned() { trace!(?addr, "updating journaled_state account data"); @@ -1875,17 +1873,17 @@ fn merge_db_account_data( ) { trace!(?addr, "merging database data"); - let Some(acc) = active.accounts.get(&addr) else { return }; + let Some(acc) = active.cache.accounts.get(&addr) else { return }; // port contract cache over - if let Some(code) = active.contracts.get(&acc.info.code_hash) { + if let Some(code) = active.cache.contracts.get(&acc.info.code_hash) { trace!("merging contract cache"); - fork_db.contracts.insert(acc.info.code_hash, code.clone()); + fork_db.cache.contracts.insert(acc.info.code_hash, code.clone()); } // port account storage over use std::collections::hash_map::Entry; - match fork_db.accounts.entry(addr) { + match fork_db.cache.accounts.entry(addr) { Entry::Vacant(vacant) => { trace!("target account not present - inserting from active"); // if the fork_db doesn't have the target account @@ -1903,7 +1901,7 @@ fn merge_db_account_data( } /// Returns true of the address is a contract -fn is_contract_in_state(journaled_state: &JournaledState, acc: Address) -> bool { +fn is_contract_in_state(journaled_state: &Journal, acc: Address) -> bool { journaled_state .state .get(&acc) @@ -1912,14 +1910,15 @@ fn is_contract_in_state(journaled_state: &JournaledState, acc: Address) -> bool } /// Updates the env's block with the block's data -fn update_env_block(env: &mut Env, block: &AnyRpcBlock) { - env.block.timestamp = U256::from(block.header.timestamp); - env.block.coinbase = block.header.beneficiary; +fn update_env_block(mut env: impl AsEnvMut, block: &AnyRpcBlock) { + let env = env.as_env_mut(); + env.block.timestamp = block.header.timestamp; + env.block.beneficiary = block.header.beneficiary; env.block.difficulty = block.header.difficulty; env.block.prevrandao = Some(block.header.mix_hash.unwrap_or_default()); - env.block.basefee = U256::from(block.header.base_fee_per_gas.unwrap_or_default()); - env.block.gas_limit = U256::from(block.header.gas_limit); - env.block.number = U256::from(block.header.number); + env.block.basefee = block.header.base_fee_per_gas.unwrap_or_default(); + env.block.gas_limit = block.header.gas_limit; + env.block.number = block.header.number; if let Some(excess_blob_gas) = block.header.excess_blob_gas { env.block.blob_excess_gas_and_price = Some(BlobExcessGasAndPrice::new(excess_blob_gas, false)); @@ -1930,14 +1929,14 @@ fn update_env_block(env: &mut Env, block: &AnyRpcBlock) { /// state, with an inspector. fn commit_transaction( tx: &Transaction, - mut env: EnvWithHandlerCfg, - journaled_state: &mut JournaledState, + mut env: Env, + journaled_state: &mut JournaledState<'_>, fork: &mut Fork, fork_id: &ForkId, persistent_accounts: &HashSet
, inspector: &mut dyn InspectorExt, ) -> eyre::Result<()> { - configure_tx_env(&mut env.env, tx); + configure_tx_env(&mut env, tx); let now = Instant::now(); let res = { @@ -1948,8 +1947,8 @@ fn commit_transaction( let mut evm = crate::utils::new_evm_with_inspector(&mut db as _, env, inspector); // Adjust inner EVM depth to ensure that inspectors receive accurate data. - evm.context.evm.inner.journaled_state.depth = depth + 1; - evm.transact().wrap_err("backend: failed committing transaction")? + evm.data.ctx.journaled_state.depth = depth + 1; + evm.replay().wrap_err("backend: failed committing transaction")? }; trace!(elapsed = ?now.elapsed(), "transacted transaction"); @@ -1980,7 +1979,7 @@ pub fn update_state( /// forked db fn apply_state_changeset( state: Map, - journaled_state: &mut JournaledState, + journaled_state: &mut JournaledState<'_>, fork: &mut Fork, persistent_accounts: &HashSet
, ) -> Result<(), BackendError> { diff --git a/crates/evm/core/src/backend/snapshot.rs b/crates/evm/core/src/backend/snapshot.rs index 36c4657c2618c..a7aed7ffa16ac 100644 --- a/crates/evm/core/src/backend/snapshot.rs +++ b/crates/evm/core/src/backend/snapshot.rs @@ -1,10 +1,9 @@ use alloy_primitives::{map::AddressHashMap, B256, U256}; -use revm::{ - primitives::{AccountInfo, Env, HashMap}, - JournaledState, -}; +use revm::{context::JournalInit, primitives::HashMap, state::AccountInfo, Journal}; use serde::{Deserialize, Serialize}; +use crate::Env; + /// A minimal abstraction of a state at a certain point in time #[derive(Clone, Debug, Default, Serialize, Deserialize)] pub struct StateSnapshot { @@ -18,14 +17,14 @@ pub struct StateSnapshot { pub struct BackendStateSnapshot { pub db: T, /// The journaled_state state at a specific point - pub journaled_state: JournaledState, + pub journaled_state: JournalInit, /// Contains the env at the time of the snapshot pub env: Env, } impl BackendStateSnapshot { /// Takes a new state snapshot. - pub fn new(db: T, journaled_state: JournaledState, env: Env) -> Self { + pub fn new(db: T, journaled_state: JournalInit, env: Env) -> Self { Self { db, journaled_state, env } } @@ -36,7 +35,7 @@ impl BackendStateSnapshot { /// those logs that are missing in the snapshot's journaled_state, since the current /// journaled_state includes the same logs, we can simply replace use that See also /// `DatabaseExt::revert`. - pub fn merge(&mut self, current: &JournaledState) { + pub fn merge(&mut self, current: &Journal) { self.journaled_state.logs.clone_from(¤t.logs); } } diff --git a/crates/evm/core/src/buffer.rs b/crates/evm/core/src/buffer.rs index 1db7420d78736..5cce0a91ad97b 100644 --- a/crates/evm/core/src/buffer.rs +++ b/crates/evm/core/src/buffer.rs @@ -1,5 +1,5 @@ use alloy_primitives::U256; -use revm::interpreter::opcode; +use revm::bytecode::opcode; /// Used to keep track of which buffer is currently active to be drawn by the debugger. #[derive(Debug, PartialEq)] diff --git a/crates/evm/core/src/env.rs b/crates/evm/core/src/env.rs new file mode 100644 index 0000000000000..e58773a820083 --- /dev/null +++ b/crates/evm/core/src/env.rs @@ -0,0 +1,61 @@ +use alloy_evm::EvmEnv; +use revm::{ + context::{BlockEnv, CfgEnv, ContextTr, JournalTr, TxEnv}, + Context, Database, +}; + +/// Helper container type for [`EvmEnv`] and [`TxEnv`]. +#[derive(Clone, Debug, Default)] +pub struct Env { + pub evm_env: EvmEnv, + pub tx: TxEnv, +} + +/// Helper struct with mutable references to the block and cfg environments. +pub struct EnvMut<'a> { + pub block: &'a mut BlockEnv, + pub cfg: &'a mut CfgEnv, + pub tx: &'a mut TxEnv, +} + +impl EnvMut<'_> { + /// Returns a copy of the environment. + pub fn to_owned(&self) -> Env { + Env { + evm_env: EvmEnv { cfg_env: self.cfg.to_owned(), block_env: self.block.to_owned() }, + tx: self.tx.to_owned(), + } + } +} + +pub trait AsEnvMut { + fn as_env_mut(&mut self) -> EnvMut<'_>; +} + +impl AsEnvMut for EnvMut<'_> { + fn as_env_mut(&mut self) -> EnvMut<'_> { + EnvMut { + block: self.block, + cfg: self.cfg, + tx: self.tx, + } + } +} + +impl AsEnvMut for Env { + fn as_env_mut(&mut self) -> EnvMut<'_> { + EnvMut { + block: &mut self.evm_env.block_env, + cfg: &mut self.evm_env.cfg_env, + tx: &mut self.tx, + } + } +} + +impl, C> AsEnvMut + for Context +{ + fn as_env_mut(&mut self) -> EnvMut<'_> { + EnvMut { block: &mut self.block, cfg: &mut self.cfg, tx: &mut self.tx } + } +} diff --git a/crates/evm/core/src/fork/database.rs b/crates/evm/core/src/fork/database.rs index 53595e451fd2f..b2df580c9d88c 100644 --- a/crates/evm/core/src/fork/database.rs +++ b/crates/evm/core/src/fork/database.rs @@ -9,8 +9,8 @@ use alloy_rpc_types::BlockId; use foundry_fork_db::{BlockchainDb, DatabaseError, SharedBackend}; use parking_lot::Mutex; use revm::{ - db::{CacheDB, DatabaseRef}, - primitives::{Account, AccountInfo, Bytecode}, + database::{CacheDB, DatabaseRef}, + state::{Account, AccountInfo, Bytecode}, Database, DatabaseCommit, }; use std::sync::Arc; @@ -209,7 +209,12 @@ pub struct ForkDbStateSnapshot { impl ForkDbStateSnapshot { fn get_storage(&self, address: Address, index: U256) -> Option { - self.local.accounts.get(&address).and_then(|account| account.storage.get(&index)).copied() + self.local + .cache + .accounts + .get(&address) + .and_then(|account| account.storage.get(&index)) + .copied() } } @@ -220,7 +225,7 @@ impl DatabaseRef for ForkDbStateSnapshot { type Error = DatabaseError; fn basic_ref(&self, address: Address) -> Result, Self::Error> { - match self.local.accounts.get(&address) { + match self.local.cache.accounts.get(&address) { Some(account) => Ok(Some(account.info.clone())), None => { let mut acc = self.state_snapshot.accounts.get(&address).cloned(); @@ -238,7 +243,7 @@ impl DatabaseRef for ForkDbStateSnapshot { } fn storage_ref(&self, address: Address, index: U256) -> Result { - match self.local.accounts.get(&address) { + match self.local.cache.accounts.get(&address) { Some(account) => match account.storage.get(&index) { Some(entry) => Ok(*entry), None => match self.get_storage(address, index) { diff --git a/crates/evm/core/src/fork/init.rs b/crates/evm/core/src/fork/init.rs index c84cd945c4ded..ebe8b63b728a1 100644 --- a/crates/evm/core/src/fork/init.rs +++ b/crates/evm/core/src/fork/init.rs @@ -1,11 +1,12 @@ -use crate::utils::apply_chain_and_block_specific_env_changes; +use crate::{utils::apply_chain_and_block_specific_env_changes, Env}; use alloy_consensus::BlockHeader; +use alloy_evm::EvmEnv; use alloy_primitives::{Address, U256}; use alloy_provider::{network::BlockResponse, Network, Provider}; use alloy_rpc_types::BlockNumberOrTag; use eyre::WrapErr; use foundry_common::NON_ARCHIVE_NODE_WARNING; -use revm::primitives::{BlockEnv, CfgEnv, Env, TxEnv}; +use revm::context::{BlockEnv, CfgEnv, TxEnv}; /// Initializes a REVM block environment based on a forked /// ethereum provider. @@ -57,20 +58,22 @@ pub async fn environment>( cfg.disable_block_gas_limit = disable_block_gas_limit; let mut env = Env { - cfg, - block: BlockEnv { - number: U256::from(block.header().number()), - timestamp: U256::from(block.header().timestamp()), - coinbase: block.header().beneficiary(), - difficulty: block.header().difficulty(), - prevrandao: block.header().mix_hash(), - basefee: U256::from(block.header().base_fee_per_gas().unwrap_or_default()), - gas_limit: U256::from(block.header().gas_limit()), - ..Default::default() + evm_env: EvmEnv { + cfg_env: cfg, + block_env: BlockEnv { + number: block.header().number(), + timestamp: block.header().timestamp(), + beneficiary: block.header().beneficiary(), + difficulty: block.header().difficulty(), + prevrandao: block.header().mix_hash(), + basefee: block.header().base_fee_per_gas().unwrap_or_default(), + gas_limit: block.header().gas_limit(), + ..Default::default() + }, }, tx: TxEnv { caller: origin, - gas_price: U256::from(gas_price.unwrap_or(fork_gas_price)), + gas_price: gas_price.unwrap_or(fork_gas_price), chain_id: Some(override_chain_id.unwrap_or(rpc_chain_id)), gas_limit: block.header().gas_limit() as u64, ..Default::default() diff --git a/crates/evm/core/src/fork/mod.rs b/crates/evm/core/src/fork/mod.rs index 9401c2d32ed58..b7d8c26eab025 100644 --- a/crates/evm/core/src/fork/mod.rs +++ b/crates/evm/core/src/fork/mod.rs @@ -1,5 +1,5 @@ +use crate::Env; use super::opts::EvmOpts; -use revm::primitives::Env; mod init; pub use init::environment; diff --git a/crates/evm/core/src/fork/multi.rs b/crates/evm/core/src/fork/multi.rs index 56bd7f3a3ce34..666e33295f074 100644 --- a/crates/evm/core/src/fork/multi.rs +++ b/crates/evm/core/src/fork/multi.rs @@ -3,6 +3,8 @@ //! The design is similar to the single `SharedBackend`, `BackendHandler` but supports multiple //! concurrently active pairs at once. +use crate::Env; + use super::CreateFork; use alloy_consensus::BlockHeader; use alloy_primitives::{map::HashMap, U256}; @@ -16,7 +18,6 @@ use futures::{ task::{Context, Poll}, Future, FutureExt, StreamExt, }; -use revm::primitives::Env; use std::{ fmt::{self, Write}, pin::Pin, @@ -150,7 +151,7 @@ impl MultiFork { } /// Updates block number and timestamp of given fork with new values. - pub fn update_block(&self, fork: ForkId, number: U256, timestamp: U256) -> eyre::Result<()> { + pub fn update_block(&self, fork: ForkId, number: u64, timestamp: u64) -> eyre::Result<()> { trace!(?fork, ?number, ?timestamp, "update fork block"); self.handler .clone() @@ -200,7 +201,7 @@ enum Request { /// Returns the environment of the fork. GetEnv(ForkId, GetEnvSender), /// Updates the block number and timestamp of the fork. - UpdateBlock(ForkId, U256, U256), + UpdateBlock(ForkId, u64, u64), /// Shutdowns the entire `MultiForkHandler`, see `ShutDownMultiFork` ShutDown(OneshotSender<()>), /// Returns the Fork Url for the `ForkId` if it exists. @@ -302,10 +303,10 @@ impl MultiForkHandler { /// Update fork block number and timestamp. Used to preserve values set by `roll` and `warp` /// cheatcodes when new fork selected. - fn update_block(&mut self, fork_id: ForkId, block_number: U256, block_timestamp: U256) { + fn update_block(&mut self, fork_id: ForkId, block_number: u64, block_timestamp: u64) { if let Some(fork) = self.forks.get_mut(&fork_id) { - fork.opts.env.block.number = block_number; - fork.opts.env.block.timestamp = block_timestamp; + fork.opts.env.block_env.number = block_number; + fork.opts.env.block_env.timestamp = block_timestamp; } } @@ -519,18 +520,16 @@ async fn create_fork(mut fork: CreateFork) -> eyre::Result<(ForkId, CreatedFork, // Initialise the fork environment. let (env, block) = fork.evm_opts.fork_evm_env(&fork.url).await?; fork.env = env; - let meta = BlockchainDbMeta::new(fork.env.clone(), fork.url.clone()); + let chain_id = env.cfg_env.chain_id; + let meta = BlockchainDbMeta::new(fork.env.block_env.clone(), fork.url.clone()); // We need to use the block number from the block because the env's number can be different on // some L2s (e.g. Arbitrum). let number = block.header().number(); // Determine the cache path if caching is enabled. - let cache_path = if fork.enable_caching { - Config::foundry_block_cache_dir(meta.cfg_env.chain_id, number) - } else { - None - }; + let cache_path = + if fork.enable_caching { Config::foundry_block_cache_dir(chain_id, number) } else { None }; let db = BlockchainDb::new(meta, cache_path); let (backend, handler) = SharedBackend::new(provider, db, Some(number.into())); diff --git a/crates/evm/core/src/ic.rs b/crates/evm/core/src/ic.rs index 80fef528c9ac5..4e37322a64e99 100644 --- a/crates/evm/core/src/ic.rs +++ b/crates/evm/core/src/ic.rs @@ -1,9 +1,6 @@ use alloy_primitives::map::rustc_hash::FxHashMap; use eyre::Result; -use revm::interpreter::{ - opcode::{PUSH0, PUSH1, PUSH32}, - OpCode, -}; +use revm::bytecode::opcode::{OpCode, PUSH0, PUSH1, PUSH32}; use revm_inspectors::opcode::immediate_size; use serde::Serialize; @@ -117,7 +114,7 @@ pub fn decode_instructions(code: &[u8]) -> Result>> { while pc < code.len() { let op = OpCode::new(code[pc]); pc += 1; - let immediate_size = op.map(|op| immediate_size(op, &code[pc..])).unwrap_or(0) as usize; + let immediate_size = op.map(|op| op.info().immediate_size()).unwrap_or(0) as usize; if pc + immediate_size > code.len() { eyre::bail!("incomplete sequence of bytecode"); diff --git a/crates/evm/core/src/lib.rs b/crates/evm/core/src/lib.rs index cf678551e21d6..bbbb07886a401 100644 --- a/crates/evm/core/src/lib.rs +++ b/crates/evm/core/src/lib.rs @@ -6,10 +6,11 @@ #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use crate::constants::DEFAULT_CREATE2_DEPLOYER; +use alloy_evm::eth::EthEvmContext; use alloy_primitives::Address; use auto_impl::auto_impl; use backend::DatabaseExt; -use revm::{inspectors::NoOpInspector, interpreter::CreateInputs, EvmContext, Inspector}; +use revm::{inspector::NoOpInspector, interpreter::CreateInputs, EvmContext, Inspector}; use revm_inspectors::access_list::AccessListInspector; #[macro_use] @@ -26,24 +27,27 @@ pub mod backend; pub mod buffer; pub mod constants; pub mod decode; +pub mod env; pub mod fork; pub mod opcodes; pub mod opts; pub mod precompiles; pub mod state_snapshot; pub mod utils; +pub use env::*; +use utils::FoundryEvmCtx; /// An extension trait that allows us to add additional hooks to Inspector for later use in /// handlers. #[auto_impl(&mut, Box)] -pub trait InspectorExt: for<'a> Inspector<&'a mut dyn DatabaseExt> { +pub trait InspectorExt: for<'a> Inspector> { /// Determines whether the `DEFAULT_CREATE2_DEPLOYER` should be used for a CREATE2 frame. /// /// If this function returns true, we'll replace CREATE2 frame with a CALL frame to CREATE2 /// factory. fn should_use_create2_factory( &mut self, - _context: &mut EvmContext<&mut dyn DatabaseExt>, + _context: &mut FoundryEvmCtx, _inputs: &mut CreateInputs, ) -> bool { false diff --git a/crates/evm/core/src/opcodes.rs b/crates/evm/core/src/opcodes.rs index 3251036c78f7a..7fad7ca5f3a3e 100644 --- a/crates/evm/core/src/opcodes.rs +++ b/crates/evm/core/src/opcodes.rs @@ -1,6 +1,6 @@ //! Opcode utils -use revm::interpreter::OpCode; +use revm::bytecode::opcode::OpCode; /// Returns true if the opcode modifies memory. /// diff --git a/crates/evm/core/src/opts.rs b/crates/evm/core/src/opts.rs index d135cceb904f9..ef05f61cce2d7 100644 --- a/crates/evm/core/src/opts.rs +++ b/crates/evm/core/src/opts.rs @@ -1,11 +1,12 @@ use super::fork::environment; use crate::{constants::DEFAULT_CREATE2_DEPLOYER, fork::CreateFork}; +use alloy_evm::EvmEnv; use alloy_primitives::{Address, B256, U256}; use alloy_provider::{network::AnyRpcBlock, Provider}; use eyre::WrapErr; use foundry_common::{provider::ProviderBuilder, ALCHEMY_FREE_TIER_CUPS}; use foundry_config::{Chain, Config, GasLimit}; -use revm::primitives::{BlockEnv, CfgEnv, TxEnv}; +use revm::context::{BlockEnv, CfgEnv, TxEnv}; use serde::{Deserialize, Serialize}; use std::fmt::Write; use url::Url; @@ -106,7 +107,7 @@ impl EvmOpts { /// /// If a `fork_url` is set, it gets configured with settings fetched from the endpoint (chain /// id, ) - pub async fn evm_env(&self) -> eyre::Result { + pub async fn evm_env(&self) -> eyre::Result { if let Some(ref fork_url) = self.fork_url { Ok(self.fork_evm_env(fork_url).await?.0) } else { @@ -119,7 +120,7 @@ impl EvmOpts { pub async fn fork_evm_env( &self, fork_url: &str, - ) -> eyre::Result<(revm::primitives::Env, AnyRpcBlock)> { + ) -> eyre::Result<(crate::Env, AnyRpcBlock)> { let provider = ProviderBuilder::new(fork_url) .compute_units_per_second(self.get_compute_units_per_second()) .build()?; @@ -145,7 +146,7 @@ impl EvmOpts { } /// Returns the `revm::Env` configured with only local settings - pub fn local_evm_env(&self) -> revm::primitives::Env { + pub fn local_evm_env(&self) -> crate::Env { let mut cfg = CfgEnv::default(); cfg.chain_id = self.env.chain_id.unwrap_or(foundry_common::DEV_CHAIN_ID); cfg.limit_contract_code_size = self.env.code_size_limit.or(Some(usize::MAX)); @@ -156,20 +157,22 @@ impl EvmOpts { cfg.disable_eip3607 = true; cfg.disable_block_gas_limit = self.disable_block_gas_limit; - revm::primitives::Env { - block: BlockEnv { - number: U256::from(self.env.block_number), - coinbase: self.env.block_coinbase, - timestamp: U256::from(self.env.block_timestamp), - difficulty: U256::from(self.env.block_difficulty), - prevrandao: Some(self.env.block_prevrandao), - basefee: U256::from(self.env.block_base_fee_per_gas), - gas_limit: U256::from(self.gas_limit()), - ..Default::default() + crate::Env { + evm_env: EvmEnv { + block_env: BlockEnv { + number: self.env.block_number, + beneficiary: self.env.block_coinbase, + timestamp: self.env.block_timestamp, + difficulty: U256::from(self.env.block_difficulty), + prevrandao: Some(self.env.block_prevrandao), + basefee: self.env.block_base_fee_per_gas, + gas_limit: self.gas_limit(), + ..Default::default() + }, + cfg_env: cfg, }, - cfg, tx: TxEnv { - gas_price: U256::from(self.env.gas_price.unwrap_or_default()), + gas_price: self.env.gas_price.unwrap_or_default(), gas_limit: self.gas_limit(), caller: self.sender, ..Default::default() @@ -190,9 +193,9 @@ impl EvmOpts { /// /// for `mainnet` and `--fork-block-number 14435000` on mac the corresponding storage cache will /// be at `~/.foundry/cache/mainnet/14435000/storage.json`. - pub fn get_fork(&self, config: &Config, env: revm::primitives::Env) -> Option { + pub fn get_fork(&self, config: &Config, env: crate::Env) -> Option { let url = self.fork_url.clone()?; - let enable_caching = config.enable_caching(&url, env.cfg.chain_id); + let enable_caching = config.enable_caching(&url, env.evm_env.cfg_env.chain_id); Some(CreateFork { url, enable_caching, env, evm_opts: self.clone() }) } diff --git a/crates/evm/core/src/precompiles.rs b/crates/evm/core/src/precompiles.rs index c70dc06d21442..949a20e57c5d4 100644 --- a/crates/evm/core/src/precompiles.rs +++ b/crates/evm/core/src/precompiles.rs @@ -1,8 +1,5 @@ use alloy_primitives::{address, Address, Bytes, B256}; -use revm::{ - precompile::{secp256r1::p256_verify as revm_p256_verify, PrecompileWithAddress}, - primitives::{Precompile, PrecompileResult}, -}; +use revm::precompile::{secp256r1::p256_verify as revm_p256_verify, PrecompileResult, PrecompileWithAddress}; /// The ECRecover precompile address. pub const EC_RECOVER: Address = address!("0000000000000000000000000000000000000001"); @@ -70,4 +67,4 @@ pub fn p256_verify(input: &Bytes, gas_limit: u64) -> PrecompileResult { /// [EIP-7212](https://eips.ethereum.org/EIPS/eip-7212#specification) secp256r1 precompile. pub const ODYSSEY_P256: PrecompileWithAddress = - PrecompileWithAddress(ODYSSEY_P256_ADDRESS, Precompile::Standard(p256_verify)); + PrecompileWithAddress(ODYSSEY_P256_ADDRESS, p256_verify); diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index f66f458387762..41e4bf4c7ae12 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -1,30 +1,35 @@ pub use crate::ic::*; use crate::{ backend::DatabaseExt, constants::DEFAULT_CREATE2_DEPLOYER_CODEHASH, precompiles::ODYSSEY_P256, - InspectorExt, + AsEnvMut, Env, EnvMut, InspectorExt, }; use alloy_consensus::BlockHeader; +use alloy_evm::{eth::EthEvmContext, EvmEnv}; use alloy_json_abi::{Function, JsonAbi}; use alloy_network::{AnyTxEnvelope, TransactionResponse}; -use alloy_primitives::{Address, Selector, TxKind, B256, U256}; +use alloy_primitives::{Address, Bytes, Selector, TxKind, B256, U256}; use alloy_provider::{network::BlockResponse, Network}; use alloy_rpc_types::{Transaction, TransactionRequest}; use foundry_common::is_impersonated_tx; use foundry_config::NamedChain; use foundry_fork_db::DatabaseError; use revm::{ - handler::register::EvmHandler, + context::{result::EVMError, ContextTr, Evm, EvmData}, + handler::{ + instructions::EthInstructions, register::EvmHandler, EthFrame, EthPrecompiles, Frame, + PrecompileProvider, + }, interpreter::{ - return_ok, CallInputs, CallOutcome, CallScheme, CallValue, CreateInputs, CreateOutcome, - Gas, InstructionResult, InterpreterResult, + interpreter::EthInterpreter, return_ok, CallInputs, CallOutcome, CallScheme, CallValue, + CreateInputs, CreateOutcome, FrameInput, Gas, InstructionResult, InterpreterResult, }, - precompile::secp256r1::P256VERIFY, + precompile::{secp256r1::P256VERIFY, PrecompileError}, primitives::{CreateScheme, EVMError, HandlerCfg, SpecId, KECCAK_EMPTY}, - FrameOrResult, FrameResult, + FrameOrResult, FrameResult, Journal, MainBuilder, }; use std::{cell::RefCell, rc::Rc, sync::Arc}; -pub use revm::primitives::EvmState as StateChangeset; +pub use revm::state::EvmState as StateChangeset; /// Depending on the configured chain id and block number this should apply any specific changes /// @@ -33,10 +38,11 @@ pub use revm::primitives::EvmState as StateChangeset; /// /// Should be called with proper chain id (retrieved from provider if not provided). pub fn apply_chain_and_block_specific_env_changes( - env: &mut revm::primitives::Env, + env: &mut impl AsEnvMut, block: &N::BlockResponse, ) { use NamedChain::*; + let env = env.as_env_mut(); if let Ok(chain) = NamedChain::try_from(env.cfg.chain_id) { let block_number = block.header().number(); @@ -75,7 +81,7 @@ pub fn apply_chain_and_block_specific_env_changes( serde_json::from_value::(l1_block_number).ok() }) { - env.block.number = l1_block_number; + env.block.number = l1_block_number.to(); } } _ => {} @@ -101,10 +107,10 @@ pub fn get_function<'a>( /// Configures the env for the given RPC transaction. /// Accounts for an impersonated transaction by resetting the `env.tx.caller` field to `tx.from`. -pub fn configure_tx_env(env: &mut revm::primitives::Env, tx: &Transaction) { +pub fn configure_tx_env(mut env: impl AsEnvMut, tx: &Transaction) { let impersonated_from = is_impersonated_tx(&tx.inner).then_some(tx.from()); if let AnyTxEnvelope::Ethereum(tx) = &tx.inner.inner() { - configure_tx_req_env(env, &tx.clone().into(), impersonated_from).expect("cannot fail"); + configure_tx_req_env(env.as_env_mut(), &tx.clone().into(), impersonated_from).expect("cannot fail"); } } @@ -112,7 +118,7 @@ pub fn configure_tx_env(env: &mut revm::primitives::Env, tx: &Transaction, tx: &TransactionRequest, impersonated_from: Option
, ) -> eyre::Result<()> { @@ -136,7 +142,7 @@ pub fn configure_tx_req_env( } = *tx; // If no `to` field then set create kind: https://eips.ethereum.org/EIPS/eip-2470#deployment-transaction - env.tx.transact_to = to.unwrap_or(TxKind::Create); + env.tx.kind = to.unwrap_or(TxKind::Create); // If the transaction is impersonated, we need to set the caller to the from // address Ref: https://github.com/foundry-rs/foundry/issues/9541 env.tx.caller = @@ -148,15 +154,15 @@ pub fn configure_tx_req_env( env.tx.chain_id = chain_id; // Type 1, EIP-2930 - env.tx.access_list = access_list.clone().unwrap_or_default().0.into_iter().collect(); + env.tx.access_list = access_list.clone().unwrap_or_default(); // Type 2, EIP-1559 - env.tx.gas_price = U256::from(gas_price.or(max_fee_per_gas).unwrap_or_default()); - env.tx.gas_priority_fee = max_priority_fee_per_gas.map(U256::from); + env.tx.gas_price = gas_price.or(max_fee_per_gas).unwrap_or_default(); + env.tx.gas_priority_fee = max_priority_fee_per_gas; // Type 3, EIP-4844 env.tx.blob_hashes = blob_versioned_hashes.clone().unwrap_or_default(); - env.tx.max_fee_per_blob_gas = max_fee_per_blob_gas.map(U256::from); + env.tx.max_fee_per_blob_gas = max_fee_per_blob_gas.unwrap_or_default(); // Type 4, EIP-7702 if let Some(authorization_list) = authorization_list { @@ -241,7 +247,7 @@ pub fn create2_handler_register( gas: Gas::new(gas_limit), }, memory_offset: 0..0, - }))) + }))); } else if code_hash != DEFAULT_CREATE2_DEPLOYER_CODEHASH { return Ok(FrameOrResult::Result(FrameResult::Call(CallOutcome { result: InterpreterResult { @@ -250,7 +256,7 @@ pub fn create2_handler_register( gas: Gas::new(gas_limit), }, memory_offset: 0..0, - }))) + }))); } // Handle potential inspector override. @@ -306,65 +312,118 @@ pub fn create2_handler_register( }); } -/// Adds Odyssey P256 precompile to the list of loaded precompiles. -pub fn odyssey_handler_register(handler: &mut EvmHandler<'_, EXT, DB>) { - let prev = handler.pre_execution.load_precompiles.clone(); - handler.pre_execution.load_precompiles = Arc::new(move || { - let mut loaded_precompiles = prev(); +/// [`PrecompileProvider`] wrapper that enables [`P256VERIFY`] if `odyssey` is enabled. +pub struct MaybeOdysseyPrecompiles { + inner: EthPrecompiles, + odyssey: bool, +} + +impl MaybeOdysseyPrecompiles { + /// Creates a new instance of the [`MaybeOdysseyPrecompiles`]. + pub fn new(odyssey: bool) -> Self { + Self { inner: EthPrecompiles::default(), odyssey } + } +} + +impl PrecompileProvider for MaybeOdysseyPrecompiles { + type Output = InterpreterResult; + + fn set_spec(&mut self, spec: <::Cfg as revm::context::Cfg>::Spec) { + PrecompileProvider::::set_spec(&mut self.inner, spec); + } + + fn run( + &mut self, + context: &mut CTX, + address: &Address, + bytes: &Bytes, + gas_limit: u64, + ) -> Result, revm::precompile::PrecompileError> { + if self.odyssey && address == P256VERIFY { + let mut result = InterpreterResult { + result: InstructionResult::Return, + gas: Gas::new(gas_limit), + output: Bytes::new(), + }; + + match P256VERIFY.precompile()(bytes, gas_limit) { + Ok(output) => { + let underflow = result.gas.record_cost(output.gas_used); + result.result = InstructionResult::Return; + result.output = output.bytes; + } + Err(e) => { + if let PrecompileError::Fatal(_) = e { + return Err(e); + } + result.result = if e.is_oog() { + InstructionResult::PrecompileOOG + } else { + InstructionResult::PrecompileError + }; + } + } + } - loaded_precompiles.extend([ODYSSEY_P256, P256VERIFY]); + self.inner.run(context, address, bytes, gas_limit) + } - loaded_precompiles - }); + fn warm_addresses(&self) -> Box> { + if self.odyssey { + Box::new(*self.inner.warm_addresses().chain(core::iter::once(P256VERIFY.address()))) + } else { + self.inner.warm_addresses() + } + } + + fn contains(&self, address: &Address) -> bool { + if self.odyssey && address == P256VERIFY { + true + } else { + self.inner.contains(address) + } + } } +/// [`revm::Context`] type used by Foundry. +pub type FoundryEvmCtx<'a> = EthEvmContext<&'a mut dyn DatabaseExt>; + +/// Type alias for revm's EVM used by Foundry. +pub type FoundryEvm<'db, INSP> = Evm< + FoundryEvmCtx<'db>, + INSP, + EthInstructions>, + MaybeOdysseyPrecompiles, +>; + /// Creates a new EVM with the given inspector. pub fn new_evm_with_inspector<'evm, 'i, 'db, I: InspectorExt + ?Sized>( db: &'db mut dyn DatabaseExt, - env: revm::primitives::EnvWithHandlerCfg, + env: Env, inspector: &'i mut I, -) -> revm::Evm<'evm, &'i mut I, &'db mut dyn DatabaseExt> { - let revm::primitives::EnvWithHandlerCfg { env, handler_cfg } = env; - - // NOTE: We could use `revm::Evm::builder()` here, but on the current patch it has some - // performance issues. - /* - revm::Evm::builder() - .with_db(db) - .with_env(env) - .with_external_context(inspector) - .with_handler_cfg(handler_cfg) - .append_handler_register(revm::inspector_handle_register) - .append_handler_register(create2_handler_register) - .build() - */ - - let mut handler = revm::Handler::new(handler_cfg); - handler.append_handler_register_plain(revm::inspector_handle_register); - if inspector.is_odyssey() { - handler.append_handler_register_plain(odyssey_handler_register); - } - handler.append_handler_register_plain(create2_handler_register); - - let context = revm::Context::new(revm::EvmContext::new_with_env(db, env), inspector); - - revm::Evm::new(context, handler) +) -> FoundryEvm<'db, &'i mut I> { + new_evm_with_context( + FoundryEvmCtx { + journaled_state: Journal::new(env.evm_env.cfg_env.spec, db), + block: env.evm_env.block_env, + cfg: env.evm_env.cfg_env, + tx: env.tx, + chain: (), + error: Ok(()), + }, + inspector, + ) } -pub fn new_evm_with_existing_context<'a>( - inner: revm::InnerEvmContext<&'a mut dyn DatabaseExt>, - inspector: &'a mut dyn InspectorExt, -) -> revm::Evm<'a, &'a mut dyn InspectorExt, &'a mut dyn DatabaseExt> { - let handler_cfg = HandlerCfg::new(inner.spec_id()); - - let mut handler = revm::Handler::new(handler_cfg); - handler.append_handler_register_plain(revm::inspector_handle_register); - if inspector.is_odyssey() { - handler.append_handler_register_plain(odyssey_handler_register); - } +pub fn new_evm_with_context<'db, 'i, I: InspectorExt + ?Sized>( + ctx: FoundryEvmCtx<'db>, + inspector: &'i mut I, +) -> FoundryEvm<'db, &'i mut I> { handler.append_handler_register_plain(create2_handler_register); - let context = - revm::Context::new(revm::EvmContext { inner, precompiles: Default::default() }, inspector); - revm::Evm::new(context, handler) + Evm { + data: EvmData { ctx, inspector }, + instruction: EthInstructions::default(), + precompiles: MaybeOdysseyPrecompiles::new(inspector.is_odyssey()), + } } From f823aea65aae63eaccf86e427eb639759817c15b Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Tue, 11 Mar 2025 02:07:35 +0400 Subject: [PATCH 02/23] ODYSSEY_P256 --- crates/evm/core/src/backend/cow.rs | 11 +++++++++-- crates/evm/core/src/backend/mod.rs | 6 +++++- crates/evm/core/src/env.rs | 6 +----- crates/evm/core/src/fork/mod.rs | 2 +- crates/evm/core/src/opts.rs | 5 +---- crates/evm/core/src/precompiles.rs | 4 +++- crates/evm/core/src/utils.rs | 15 +++++++++------ 7 files changed, 29 insertions(+), 20 deletions(-) diff --git a/crates/evm/core/src/backend/cow.rs b/crates/evm/core/src/backend/cow.rs index dc226b8c8ddae..6076d48381cdd 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -4,7 +4,9 @@ use super::{BackendError, JournaledState}; use crate::{ backend::{ diagnostic::RevertDiagnostic, Backend, DatabaseExt, LocalForkId, RevertStateSnapshotAction, - }, fork::{CreateFork, ForkId}, AsEnvMut, Env, EnvMut, InspectorExt + }, + fork::{CreateFork, ForkId}, + AsEnvMut, Env, EnvMut, InspectorExt, }; use alloy_genesis::GenesisAccount; use alloy_primitives::{Address, B256, U256}; @@ -176,7 +178,12 @@ impl DatabaseExt for CowBackend<'_> { mut env: EnvMut<'_>, journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()> { - self.backend_mut(env.as_env_mut()).roll_fork_to_transaction(id, transaction, env, journaled_state) + self.backend_mut(env.as_env_mut()).roll_fork_to_transaction( + id, + transaction, + env, + journaled_state, + ) } fn transact( diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 2a9babe9ff9c7..b2e1d74a3f806 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -1,7 +1,11 @@ //! Foundry's main executor backend abstraction and implementation. use crate::{ - constants::{CALLER, CHEATCODE_ADDRESS, DEFAULT_CREATE2_DEPLOYER, TEST_CONTRACT_ADDRESS}, fork::{CreateFork, ForkId, MultiFork}, state_snapshot::StateSnapshots, utils::{configure_tx_env, configure_tx_req_env, new_evm_with_inspector}, AsEnvMut, Env, EnvMut, InspectorExt + constants::{CALLER, CHEATCODE_ADDRESS, DEFAULT_CREATE2_DEPLOYER, TEST_CONTRACT_ADDRESS}, + fork::{CreateFork, ForkId, MultiFork}, + state_snapshot::StateSnapshots, + utils::{configure_tx_env, configure_tx_req_env, new_evm_with_inspector}, + AsEnvMut, Env, EnvMut, InspectorExt, }; use alloy_genesis::GenesisAccount; use alloy_network::{AnyRpcBlock, AnyTxEnvelope, TransactionResponse}; diff --git a/crates/evm/core/src/env.rs b/crates/evm/core/src/env.rs index e58773a820083..48e55f84df3ac 100644 --- a/crates/evm/core/src/env.rs +++ b/crates/evm/core/src/env.rs @@ -34,11 +34,7 @@ pub trait AsEnvMut { impl AsEnvMut for EnvMut<'_> { fn as_env_mut(&mut self) -> EnvMut<'_> { - EnvMut { - block: self.block, - cfg: self.cfg, - tx: self.tx, - } + EnvMut { block: self.block, cfg: self.cfg, tx: self.tx } } } diff --git a/crates/evm/core/src/fork/mod.rs b/crates/evm/core/src/fork/mod.rs index b7d8c26eab025..d870e6a0b0e15 100644 --- a/crates/evm/core/src/fork/mod.rs +++ b/crates/evm/core/src/fork/mod.rs @@ -1,5 +1,5 @@ -use crate::Env; use super::opts::EvmOpts; +use crate::Env; mod init; pub use init::environment; diff --git a/crates/evm/core/src/opts.rs b/crates/evm/core/src/opts.rs index ef05f61cce2d7..fb7a7cb7a4f90 100644 --- a/crates/evm/core/src/opts.rs +++ b/crates/evm/core/src/opts.rs @@ -117,10 +117,7 @@ impl EvmOpts { /// Returns the `revm::Env` that is configured with settings retrieved from the endpoint. /// And the block that was used to configure the environment. - pub async fn fork_evm_env( - &self, - fork_url: &str, - ) -> eyre::Result<(crate::Env, AnyRpcBlock)> { + pub async fn fork_evm_env(&self, fork_url: &str) -> eyre::Result<(crate::Env, AnyRpcBlock)> { let provider = ProviderBuilder::new(fork_url) .compute_units_per_second(self.get_compute_units_per_second()) .build()?; diff --git a/crates/evm/core/src/precompiles.rs b/crates/evm/core/src/precompiles.rs index 949a20e57c5d4..36b32ea1e7fdd 100644 --- a/crates/evm/core/src/precompiles.rs +++ b/crates/evm/core/src/precompiles.rs @@ -1,5 +1,7 @@ use alloy_primitives::{address, Address, Bytes, B256}; -use revm::precompile::{secp256r1::p256_verify as revm_p256_verify, PrecompileResult, PrecompileWithAddress}; +use revm::precompile::{ + secp256r1::p256_verify as revm_p256_verify, PrecompileResult, PrecompileWithAddress, +}; /// The ECRecover precompile address. pub const EC_RECOVER: Address = address!("0000000000000000000000000000000000000001"); diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 41e4bf4c7ae12..751b822bea7f6 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -1,6 +1,8 @@ pub use crate::ic::*; use crate::{ - backend::DatabaseExt, constants::DEFAULT_CREATE2_DEPLOYER_CODEHASH, precompiles::ODYSSEY_P256, + backend::DatabaseExt, + constants::DEFAULT_CREATE2_DEPLOYER_CODEHASH, + precompiles::{ODYSSEY_P256, ODYSSEY_P256_ADDRESS}, AsEnvMut, Env, EnvMut, InspectorExt, }; use alloy_consensus::BlockHeader; @@ -110,7 +112,8 @@ pub fn get_function<'a>( pub fn configure_tx_env(mut env: impl AsEnvMut, tx: &Transaction) { let impersonated_from = is_impersonated_tx(&tx.inner).then_some(tx.from()); if let AnyTxEnvelope::Ethereum(tx) = &tx.inner.inner() { - configure_tx_req_env(env.as_env_mut(), &tx.clone().into(), impersonated_from).expect("cannot fail"); + configure_tx_req_env(env.as_env_mut(), &tx.clone().into(), impersonated_from) + .expect("cannot fail"); } } @@ -339,14 +342,14 @@ impl PrecompileProvider for MaybeOdysseyPrecompiles { bytes: &Bytes, gas_limit: u64, ) -> Result, revm::precompile::PrecompileError> { - if self.odyssey && address == P256VERIFY { + if self.odyssey && address == ODYSSEY_P256.address() { let mut result = InterpreterResult { result: InstructionResult::Return, gas: Gas::new(gas_limit), output: Bytes::new(), }; - match P256VERIFY.precompile()(bytes, gas_limit) { + match ODYSSEY_P256.precompile()(bytes, gas_limit) { Ok(output) => { let underflow = result.gas.record_cost(output.gas_used); result.result = InstructionResult::Return; @@ -370,14 +373,14 @@ impl PrecompileProvider for MaybeOdysseyPrecompiles { fn warm_addresses(&self) -> Box> { if self.odyssey { - Box::new(*self.inner.warm_addresses().chain(core::iter::once(P256VERIFY.address()))) + Box::new(*self.inner.warm_addresses().chain(core::iter::once(ODYSSEY_P256.address()))) } else { self.inner.warm_addresses() } } fn contains(&self, address: &Address) -> bool { - if self.odyssey && address == P256VERIFY { + if self.odyssey && address == ODYSSEY_P256.address() { true } else { self.inner.contains(address) From e5076f06fef219f87e301bdd026900cd1c6d7560 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 20 Mar 2025 11:30:00 +0100 Subject: [PATCH 03/23] bump deps --- Cargo.lock | 1660 +++++++++++++++++++++++++++++----------------------- Cargo.toml | 52 +- 2 files changed, 958 insertions(+), 754 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3944759905490..641daa180b6ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.1.64" +version = "0.1.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "963fc7ac17f25d92c237448632330eb87b39ba8aa0209d4b517069a05b57db62" +checksum = "f8e42c54af787e3521229df1787d7b8300910dc6d9d04d378eb593b26388bd11" dependencies = [ "alloy-primitives", "num_enum", @@ -86,14 +86,14 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1715ed2a977d3ca4b39ffe0fc69f9f5b0e81382b348bdb5172abaa77a10f0b6d" +checksum = "6fbf458101ed6c389e9bb70a34ebc56039868ad10472540614816cdedc8f5265" dependencies = [ - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-trie", "auto_impl", "c-kzg", @@ -109,24 +109,25 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660705969af143897d83937d73f53c741c1587f49c27c2cfce594e188fcbc1e4" +checksum = "fc982af629e511292310fe85b433427fd38cb3105147632b574abc997db44c91" dependencies = [ "alloy-consensus", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "serde", ] [[package]] name = "alloy-contract" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5362637b25ba5282a921ca139a10f188fa34e1248a7c83c907a21de54d36dce1" +checksum = "cd0a0c1ddee20ecc14308aae21c2438c994df7b39010c26d70f86e1d8fdb8db0" dependencies = [ + "alloy-consensus", "alloy-dyn-abi", "alloy-json-abi", "alloy-network", @@ -144,9 +145,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e08c581811006021970bf07f2ecf3213f6237c125f7fd99607004b23627b61" +checksum = "7078bef2bc353c1d1a97b44981d0186198be320038fbfbb0b37d1dd822a555d3" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -160,7 +161,7 @@ dependencies = [ "proptest", "serde", "serde_json", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] @@ -221,16 +222,16 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d13734f722326c846e7690ce732c9864f5ae82f52c7fb60c871f56654f348d4c" +checksum = "6e86967eb559920e4b9102e4cb825fe30f2e9467988353ce4809f0d3f2c90cd4" dependencies = [ "alloy-eip2124", "alloy-eip2930", "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "auto_impl", "c-kzg", "derive_more 2.0.1", @@ -242,37 +243,38 @@ dependencies = [ [[package]] name = "alloy-evm" -version = "0.1.0" +version = "0.1.0-alpha.1" dependencies = [ "alloy-consensus", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-hardforks", "alloy-primitives", "alloy-sol-types", "auto_impl", - "derive_more 1.0.0", + "derive_more 2.0.1", "op-revm", - "revm", + "revm 20.0.0-alpha.6", "thiserror 2.0.12", ] [[package]] name = "alloy-genesis" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738b6d7da21955cfdebeb7bcf300040b79e51c58a22e5f029ae989a8d834a3f3" +checksum = "a40de6f5b53ecf5fd7756072942f41335426d9a3704cd961f77d854739933bcf" dependencies = [ - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-primitives", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-trie", "serde", ] [[package]] name = "alloy-hardforks" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/hardforks?rev=ae4176c#ae4176c0027171d38832644f63f05f4f80861c6e" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1692158e9d100486fa6c2429edb42680298678ee74644b058c44f8484a278fea" dependencies = [ "alloy-chains", "alloy-eip2124", @@ -283,9 +285,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125601804507fef5ae7debcbf800906b12741f19800c1c05b953d0f1b990131a" +checksum = "ec80745c33797e8baf547a8cfeb850e60d837fe9b9e67b3f579c1fcd26f527e9" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -295,9 +297,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fbb61c4dfe5def9a065438162faf39503b3e8d90f36d01563418a75f0ef016" +checksum = "27434beae2514d4a2aa90f53832cbdf6f23e4b5e2656d95eaf15f9276e2418b6" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -309,19 +311,19 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f10b0bc0657b018ee4f3758f889d066af6b1f20f57cd825b540182029090c151" +checksum = "26a33a38c7486b1945f8d093ff027add2f3a8f83c7300dbad6165cc49150085e" dependencies = [ "alloy-consensus", "alloy-consensus-any", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-json-rpc", "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-any", "alloy-rpc-types-eth", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-signer", "alloy-sol-types", "async-trait", @@ -335,24 +337,25 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cac4aeeabbbc16623d0745ae3b5a515d727ce8ef4ec4b6a886c3634d8b298fe" +checksum = "db973a7a23cbe96f2958e5687c51ce2d304b5c6d0dc5ccb3de8667ad8476f50b" dependencies = [ "alloy-consensus", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-primitives", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "serde", ] [[package]] name = "alloy-node-bindings" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9151507742ac142201c3a56f74fd94c2ceda96115eed60a3dabaeef85e6b64a" +checksum = "846c2248472c3a7efa8d9d6c51af5b545a88335af0ed7a851d01debfc3b03395" dependencies = [ "alloy-genesis", + "alloy-hardforks", "alloy-network", "alloy-primitives", "alloy-signer", @@ -368,9 +371,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c66bb6715b7499ea755bde4c96223ae8eb74e05c014ab38b9db602879ffb825" +checksum = "eacedba97e65cdc7ab592f2b22ef5d3ab8d60b2056bc3a6e6363577e8270ec6f" dependencies = [ "alloy-rlp", "arbitrary", @@ -382,7 +385,7 @@ dependencies = [ "foldhash", "getrandom 0.2.15", "hashbrown 0.15.2", - "indexmap 2.7.1", + "indexmap 2.8.0", "itoa", "k256", "keccak-asm", @@ -391,7 +394,7 @@ dependencies = [ "proptest-derive", "rand 0.8.5", "ruint", - "rustc-hash", + "rustc-hash 2.1.1", "serde", "sha3", "tiny-keccak", @@ -399,13 +402,13 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06ffafc44e68c8244feb51919895c679c153a0b143c182e1ffe8cce998abf15" +checksum = "8b03bde77ad73feae14aa593bcabb932c8098c0f0750ead973331cfc0003a4e1" dependencies = [ "alloy-chains", "alloy-consensus", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-json-rpc", "alloy-network", "alloy-network-primitives", @@ -442,9 +445,9 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6abe9f9e6be75dc8532bb2bf3f4c700c9e7bce8a3b05ec702a7324abdb118016" +checksum = "721aca709a9231815ad5903a2d284042cc77e7d9d382696451b30c9ee0950001" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -478,14 +481,14 @@ checksum = "a40e1ef334153322fd878d07e86af7a529bcb86b2439525920a88eba87bcf943" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "alloy-rpc-client" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ae316fdb92a4546f0dba4919ea4c1c0edb89a876536520c248fada0febac5d" +checksum = "445a3298c14fae7afb5b9f2f735dead989f3dd83020c2ab8e48ed95d7b6d1acb" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -494,6 +497,7 @@ dependencies = [ "alloy-transport-http", "alloy-transport-ipc", "alloy-transport-ws", + "async-stream", "futures", "pin-project 1.1.10", "reqwest", @@ -503,15 +507,16 @@ dependencies = [ "tokio-stream", "tower 0.5.2", "tracing", + "tracing-futures", "url", "wasmtimer", ] [[package]] name = "alloy-rpc-types" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e50cc5a693dfbef452e3dbcea3cd3342840d10eb3ffa018b0a5676967d8b6b" +checksum = "9157deaec6ba2ad7854f16146e4cd60280e76593eed79fdcb06e0fa8b6c60f77" dependencies = [ "alloy-primitives", "alloy-rpc-types-anvil", @@ -519,38 +524,38 @@ dependencies = [ "alloy-rpc-types-eth", "alloy-rpc-types-trace", "alloy-rpc-types-txpool", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "serde", ] [[package]] name = "alloy-rpc-types-anvil" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2852d7350760c3fbfc60ee3396b95a66ea57afe3aeecee72bf1171ac6b1d5d18" +checksum = "3a80ee83ef97e7ffd667a81ebdb6154558dfd5e8f20d8249a10a12a1671a04b3" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "serde", ] [[package]] name = "alloy-rpc-types-any" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f726ebb03d5918a946d0a6e17829cabd90ffe928664dc3f7fdbba1be511760de" +checksum = "604dea1f00fd646debe8033abe8e767c732868bf8a5ae9df6321909ccbc99c56" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", ] [[package]] name = "alloy-rpc-types-debug" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab1fe2c636a14190fe3c6caf6a20d2fb8691a5824c1789ee495324a14295df82" +checksum = "08b113a0087d226291b9768ed331818fa0b0744cc1207ae7c150687cf3fde1bd" dependencies = [ "alloy-primitives", "serde", @@ -558,15 +563,15 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05bfe640e4708c5a83dfcc65b5e4a0deb6ddcb18897dd49862ddc3964e06ff8" +checksum = "874ac9d1249ece0453e262d9ba72da9dbb3b7a2866220ded5940c2e47f1aa04d" dependencies = [ "alloy-consensus", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "derive_more 2.0.1", "jsonwebtoken", "rand 0.8.5", @@ -576,17 +581,17 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c24a3b6c552b74c4abdbaa45fd467a230f5564f62c6adae16972dd90b6b4dca5" +checksum = "7e13d71eac04513a71af4b3df580f52f2b4dcbff9d971cc9a52519acf55514cb" dependencies = [ "alloy-consensus", "alloy-consensus-any", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-sol-types", "itertools 0.14.0", "serde", @@ -596,13 +601,13 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25f16f6bfe65c23d873741aa343830de270db42c982822e23689d11f2f4d812" +checksum = "4747763aee39c1b0f5face79bde9be8932be05b2db7d8bdcebb93490f32c889c" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "serde", "serde_json", "thiserror 2.0.12", @@ -610,13 +615,13 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9415e7e3f32a93a38ecb83aa449f7326081b5b362964291463f8f2060b4b8a31" +checksum = "70132ebdbea1eaa68c4d6f7a62c2fadf0bdce83b904f895ab90ca4ec96f63468" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "serde", ] @@ -633,9 +638,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aebca035ca670bd7de8165a9494c0d502625e26129dd95d17fdfd70d5521c02" +checksum = "3a1cd73fc054de6353c7f22ff9b846b0f0f145cd0112da07d4119e41e9959207" dependencies = [ "alloy-primitives", "serde", @@ -644,9 +649,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abfef2a155c7d6a9f54861159a3fdd29abe1f67f0865b081bce4c2fdc9e83cc" +checksum = "c96fbde54bee943cd94ebacc8a62c50b38c7dfd2552dcd79ff61aea778b1bfcc" dependencies = [ "alloy-dyn-abi", "alloy-primitives", @@ -661,9 +666,9 @@ dependencies = [ [[package]] name = "alloy-signer-aws" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25d4994d79911d1fdf64945c8fc08df46e0ba828abd5c7505264b7012318443" +checksum = "4e73835ed6689740b76cab0f59afbdce374a03d3f856ea33ba1fc054630a1b28" dependencies = [ "alloy-consensus", "alloy-network", @@ -679,9 +684,9 @@ dependencies = [ [[package]] name = "alloy-signer-gcp" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4316e51a4131884e42a5d8b3228a508a60d280add3742bc1196b81f758b7c204" +checksum = "a16b468ae86bb876d9c7a3b49b1e8d614a581a1a9673e4e0d2393b411080fe64" dependencies = [ "alloy-consensus", "alloy-network", @@ -697,9 +702,9 @@ dependencies = [ [[package]] name = "alloy-signer-ledger" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4097dcfbbef9ca5bc3c02901af815c82db89a1a429520acad1c34a0b136acbba" +checksum = "44cf8a7f45edcc43566218e44b70ed3c278b7556926158cfeb63c8d41fefef70" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -717,9 +722,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "326033310c939b0d00b03fdbe2c243cb45add25c4e195d97b1792883c93a4c4c" +checksum = "cc6e72002cc1801d8b41e9892165e3a6551b7bd382bd9d0414b21e90c0c62551" dependencies = [ "alloy-consensus", "alloy-network", @@ -736,9 +741,9 @@ dependencies = [ [[package]] name = "alloy-signer-trezor" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6da910dc4386ab642a58a5a98cec80ecb47855b28b340a997ba7fa019f1cec0" +checksum = "1d4fd403c53cf7924c3e16c61955742cfc3813188f0975622f4fa6f8a01760aa" dependencies = [ "alloy-consensus", "alloy-network", @@ -753,69 +758,70 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f9c3c7bc1f4e334e5c5fc59ec8dac894973a71b11da09065affc6094025049" +checksum = "3637022e781bc73a9e300689cd91105a0e6be00391dd4e2110a71cc7e9f20a94" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ff7aa715eb2404cb87fa94390d2c5d5addd70d9617e20b2398ee6f48cb21f0" +checksum = "3b9bd22d0bba90e40f40c625c33d39afb7d62b22192476a2ce1dcf8409dce880" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck", - "indexmap 2.7.1", + "indexmap 2.8.0", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f105fa700140c0cc6e2c3377adef650c389ac57b8ead8318a2e6bd52f1ae841" +checksum = "05ae4646e8123ec2fd10f9c22e361ffe4365c42811431829c2eabae528546bcc" dependencies = [ "alloy-json-abi", "const-hex", "dunce", "heck", + "macro-string", "proc-macro2", "quote", "serde_json", - "syn 2.0.99", + "syn 2.0.100", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c649acc6c9d3893e392c737faeadce30b4a1751eed148ae43bc2f27f29c4480c" +checksum = "488a747fdcefeec5c1ed5aa9e08becd775106777fdeae2a35730729fc8a95910" dependencies = [ "serde", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] name = "alloy-sol-types" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f819635439ebb06aa13c96beac9b2e7360c259e90f5160a6848ae0d94d10452" +checksum = "767957235807b021126dca1598ac3ef477007eace07961607dc5f490550909c7" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -826,13 +832,16 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463f6cb5234c7420e7e77c248c0460a8e2dea933f2bb4e8f169d5f12510b38e0" +checksum = "9aec325c2af8562ef355c02aeb527c755a07e9d8cf6a1e65dda8d0bf23e29b2c" dependencies = [ "alloy-json-rpc", "base64 0.22.1", + "derive_more 2.0.1", + "futures", "futures-utils-wasm", + "parking_lot", "serde", "serde_json", "thiserror 2.0.12", @@ -845,9 +854,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eacd1c195c2a706bfbc92113d4bd3481b0dbd1742923a232dbe8a7910ac0fe5" +checksum = "a082c9473c6642cce8b02405a979496126a03b096997888e86229afad05db06c" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -860,9 +869,9 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5d3531e65eed82f14f93bb668fb06797c3754d0141c5da042bb63c5c19f13c" +checksum = "45a78cfda2cac16fa83f6b5dd8b4643caec6161433b25b67e484ce05d2194513" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -881,15 +890,15 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "218e64c375edd8fe8d00d9aa983fb2d85f7cfeebb91f707fe4c7ba52410803f5" +checksum = "ae865917bdabaae21f418010fe7e8837c6daa6611fde25f8d78a1778d6ecb523" dependencies = [ "alloy-pubsub", "alloy-transport", "futures", - "http 1.2.0", - "rustls 0.23.23", + "http 1.3.1", + "rustls", "serde_json", "tokio", "tokio-tungstenite 0.26.2", @@ -1032,7 +1041,7 @@ dependencies = [ "alloy-consensus", "alloy-contract", "alloy-dyn-abi", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-genesis", "alloy-json-abi", "alloy-json-rpc", @@ -1043,7 +1052,7 @@ dependencies = [ "alloy-rlp", "alloy-rpc-client", "alloy-rpc-types", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-signer", "alloy-signer-local", "alloy-sol-types", @@ -1071,14 +1080,14 @@ dependencies = [ "foundry-evm", "foundry-test-utils", "futures", - "hyper 1.6.0", + "hyper", "itertools 0.14.0", "k256", "op-alloy-consensus", "op-alloy-rpc-types", "parking_lot", "rand 0.8.5", - "revm", + "revm 20.0.0-alpha.6", "serde", "serde_json", "serde_repr", @@ -1099,19 +1108,19 @@ version = "1.0.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-network", "alloy-primitives", "alloy-rlp", "alloy-rpc-types", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-trie", "bytes", "foundry-common", "foundry-evm", "op-alloy-consensus", "rand 0.8.5", - "revm", + "revm 20.0.0-alpha.6", "serde", "serde_json", "thiserror 2.0.12", @@ -1163,9 +1172,9 @@ dependencies = [ [[package]] name = "ariadne" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31beedec3ce83ae6da3a79592b3d8d7afd146a5b15bb9bb940279aced60faa89" +checksum = "36f5e3dca4e09a6f340a61a0e9c7b61e030c69fc27bf29d73218f7e5e3b7638f" dependencies = [ "unicode-width 0.1.14", "yansi", @@ -1321,9 +1330,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310c9bcae737a48ef5cdee3174184e6d548b292739ede61a1f955ef76a738861" +checksum = "c0cf008e5e1a9e9e22a7d3c9a4992e21a350290069e36d8fb72304ed17e8f2d2" dependencies = [ "flate2", "futures-core", @@ -1349,7 +1358,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1371,18 +1380,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "async-trait" -version = "0.1.87" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d556ec1359574147ec0c4fc5eb525f3f23263a592b1a9c07e0a75b427de55c97" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1435,7 +1444,7 @@ checksum = "e12882f59de5360c748c4cbf569a042d5fb0eb515f7bea9c1f470b47f6ffbd73" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -1446,9 +1455,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.18" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90aff65e86db5fe300752551c1b015ef72b708ac54bded8ef43d0d53cb7cb0b1" +checksum = "6a84fe2c5e9965fba0fbc2001db252f1d57527d82a905cca85127df227bca748" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1456,7 +1465,7 @@ dependencies = [ "aws-sdk-ssooidc", "aws-sdk-sts", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1465,7 +1474,7 @@ dependencies = [ "bytes", "fastrand", "hex", - "http 0.2.12", + "http 1.3.1", "ring", "time", "tokio", @@ -1476,9 +1485,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" +checksum = "4471bef4c22a06d2c7a1b6492493d3fdf24a805323109d6874f9c94d5906ac14" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -1486,16 +1495,39 @@ dependencies = [ "zeroize", ] +[[package]] +name = "aws-lc-rs" +version = "1.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77926887776171ced7d662120a75998e444d3750c951abfe07f90da130514b1f" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "aws-runtime" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76dd04d39cc12844c0994f2c9c5a6f5184c22e9188ec1ff723de41910a21dcad" +checksum = "0aff45ffe35196e593ea3b9dd65b320e51e2dda95aff4390bc459e461d09c6ad" dependencies = [ "aws-credential-types", "aws-sigv4", "aws-smithy-async", - "aws-smithy-http 0.60.12", + "aws-smithy-http", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1508,19 +1540,19 @@ dependencies = [ "percent-encoding", "pin-project-lite", "tracing", - "uuid 1.15.1", + "uuid 1.16.0", ] [[package]] name = "aws-sdk-kms" -version = "1.62.0" +version = "1.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4ecacd2e7947b670b7f9e5146c860d1b638cef1392351df47ddf6bb4c68839" +checksum = "a971bfe62ca4a228627a1b74a87a7a142979b20b168d2e2884f4893212ebb715" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1535,14 +1567,14 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.61.0" +version = "1.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e65ff295979977039a25f5a0bf067a64bc5e6aa38f3cef4037cf42516265553c" +checksum = "1d5330ad4e8a1ff49e9f26b738611caa72b105c41d41733801d1a36e8f9de936" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1557,14 +1589,14 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.62.0" +version = "1.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91430a60f754f235688387b75ee798ef00cfd09709a582be2b7525ebb5306d4f" +checksum = "7956b1a85d49082347a7d17daa2e32df191f3e23c03d47294b99f95413026a78" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1579,14 +1611,14 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.62.0" +version = "1.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9276e139d39fff5a0b0c984fc2d30f970f9a202da67234f948fda02e5bea1dbe" +checksum = "065c533fbe6f84962af33fcf02b0350b7c1f79285baab5924615d2be3b232855" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-query", "aws-smithy-runtime", @@ -1602,12 +1634,12 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.9" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfe75fad52793ce6dec0dc3d4b1f388f038b5eb866c8d4d7f3a8e21b5ea5051" +checksum = "69d03c3c05ff80d54ff860fe38c726f6f494c639ae975203a101335f223386db" dependencies = [ "aws-credential-types", - "aws-smithy-http 0.60.12", + "aws-smithy-http", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", @@ -1615,7 +1647,7 @@ dependencies = [ "hex", "hmac", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "once_cell", "percent-encoding", "sha2 0.10.8", @@ -1625,9 +1657,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa59d1327d8b5053c54bf2eaae63bf629ba9e904434d0835a28ed3c0ed0a614e" +checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c" dependencies = [ "futures-util", "pin-project-lite", @@ -1636,9 +1668,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.12" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7809c27ad8da6a6a68c454e651d4962479e81472aa19ae99e59f9aba1f9713cc" +checksum = "c5949124d11e538ca21142d1fba61ab0a2a2c1bc3ed323cdb3e4b878bfb83166" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", @@ -1646,6 +1678,7 @@ dependencies = [ "bytes-utils", "futures-core", "http 0.2.12", + "http 1.3.1", "http-body 0.4.6", "once_cell", "percent-encoding", @@ -1655,30 +1688,33 @@ dependencies = [ ] [[package]] -name = "aws-smithy-http" -version = "0.61.1" +name = "aws-smithy-http-client" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f276f21c7921fe902826618d1423ae5bf74cf8c1b8472aee8434f3dfd31824" +checksum = "0497ef5d53065b7cd6a35e9c1654bd1fefeae5c52900d91d1b188b0af0f29324" dependencies = [ + "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", - "http 0.2.12", - "http-body 0.4.6", - "once_cell", - "percent-encoding", + "h2", + "http 1.3.1", + "hyper", + "hyper-rustls", + "hyper-util", "pin-project-lite", - "pin-utils", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tower 0.5.2", "tracing", ] [[package]] name = "aws-smithy-json" -version = "0.61.2" +version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "623a51127f24c30776c8b374295f2df78d92517386f77ba30773f15a30ce1422" +checksum = "92144e45819cae7dc62af23eac5a038a58aa544432d2102609654376a900bd07" dependencies = [ "aws-smithy-types", ] @@ -1695,42 +1731,39 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.8" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d526a12d9ed61fadefda24abe2e682892ba288c2018bcb38b1b4c111d13f6d92" +checksum = "f6328865e36c6fd970094ead6b05efd047d3a80ec5fc3be5e743910da9f2ebf8" dependencies = [ "aws-smithy-async", - "aws-smithy-http 0.60.12", + "aws-smithy-http", + "aws-smithy-http-client", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "fastrand", - "h2 0.3.26", "http 0.2.12", + "http 1.3.1", "http-body 0.4.6", "http-body 1.0.1", - "httparse", - "hyper 0.14.32", - "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", "pin-utils", - "rustls 0.21.12", "tokio", "tracing", ] [[package]] name = "aws-smithy-runtime-api" -version = "1.7.3" +version = "1.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92165296a47a812b267b4f41032ff8069ab7ff783696d217f0994a0d7ab585cd" +checksum = "3da37cf5d57011cb1753456518ec76e31691f1f474b73934a284eb2a1c76510f" dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "pin-project-lite", "tokio", "tracing", @@ -1739,15 +1772,15 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.13" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b8a53819e42f10d0821f56da995e1470b199686a1809168db6ca485665f042" +checksum = "836155caafba616c0ff9b07944324785de2ab016141c3550bd1c07882f8cee8f" dependencies = [ "base64-simd", "bytes", "bytes-utils", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", @@ -1771,9 +1804,9 @@ dependencies = [ [[package]] name = "aws-types" -version = "1.3.5" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbd0a668309ec1f66c0f6bda4840dd6d4796ae26d699ebc266d7cc95c6d040f" +checksum = "3873f8deed8927ce8d04487630dc9ff73193bab64742a61d050e57a68dec4125" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -1794,10 +1827,10 @@ dependencies = [ "base64 0.22.1", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-util", "itoa", "matchit", @@ -1829,7 +1862,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "mime", @@ -1862,12 +1895,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -1892,9 +1919,9 @@ dependencies = [ [[package]] name = "base64ct" -version = "1.6.0" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "bech32" @@ -1908,6 +1935,29 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.9.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.100", + "which 4.4.2", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -2014,9 +2064,9 @@ dependencies = [ [[package]] name = "bon" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8a41e51fda5f7d87152d00f50d08ce24bf5cee8a962facf7f2526a66f8a5fa" +checksum = "65268237be94042665b92034f979c42d431d2fd998b49809543afe3e66abad1c" dependencies = [ "bon-macros", "rustversion", @@ -2024,9 +2074,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b592add4016ac26ca340298fed5cc2524abe8bacae78ebca3780286da588304" +checksum = "803c95b2ecf650eb10b5f87dda6b9f6a1b758cee53245e2b7b825c9b3803a443" dependencies = [ "darling", "ident_case", @@ -2034,7 +2084,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2163,7 +2213,7 @@ dependencies = [ "alloy-provider", "alloy-rlp", "alloy-rpc-types", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-signer", "alloy-signer-local", "alloy-sol-types", @@ -2220,9 +2270,20 @@ version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ + "jobserver", + "libc", "shlex", ] +[[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" @@ -2243,7 +2304,7 @@ dependencies = [ "alloy-json-abi", "alloy-primitives", "clap", - "dirs 6.0.0", + "dirs", "eyre", "forge-fmt", "foundry-cli", @@ -2253,7 +2314,7 @@ dependencies = [ "foundry-evm", "regex", "reqwest", - "revm", + "revm 20.0.0-alpha.6", "rustyline", "semver 1.0.26", "serde", @@ -2321,11 +2382,22 @@ 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 = "4.5.31" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" +checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" dependencies = [ "clap_builder", "clap_derive", @@ -2333,9 +2405,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.31" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" +checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" dependencies = [ "anstream", "anstyle", @@ -2348,9 +2420,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.46" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5c5508ea23c5366f77e53f5a0070e5a84e51687ec3ef9e0464c86dc8d13ce98" +checksum = "c06f5378ea264ad4f82bbc826628b5aad714a75abf6ece087e923010eb937fb6" dependencies = [ "clap", ] @@ -2367,14 +2439,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.28" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2392,7 +2464,7 @@ dependencies = [ "nix 0.29.0", "terminfo", "thiserror 2.0.12", - "which", + "which 7.0.2", "windows-sys 0.59.0", ] @@ -2419,6 +2491,15 @@ dependencies = [ "error-code", ] +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] + [[package]] name = "coins-bip32" version = "0.12.0" @@ -2638,13 +2719,12 @@ dependencies = [ ] [[package]] -name = "core-foundation" -version = "0.9.4" +name = "convert_case" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" dependencies = [ - "core-foundation-sys", - "libc", + "unicode-segmentation", ] [[package]] @@ -2823,7 +2903,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2834,7 +2914,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2881,9 +2961,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", "serde", @@ -2908,7 +2988,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2919,7 +2999,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2940,7 +3020,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2950,7 +3030,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -2977,10 +3057,10 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ - "convert_case", + "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "unicode-xid", ] @@ -2990,9 +3070,10 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ + "convert_case 0.7.1", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "unicode-xid", ] @@ -3030,22 +3111,13 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys 0.4.1", -] - [[package]] name = "dirs" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys 0.5.0", + "dirs-sys", ] [[package]] @@ -3058,18 +3130,6 @@ 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 0.4.6", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys" version = "0.5.0" @@ -3101,7 +3161,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3126,7 +3186,7 @@ checksum = "8dc51d98e636f5e3b0759a39257458b22619cac7e96d932da6eeb052891bb67c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3258,7 +3318,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3279,14 +3339,14 @@ checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" [[package]] name = "env_logger" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" +checksum = "c3716d7a920fb4fac5d84e9d4bce8ceb321e9414b4409da61b07b75c1e3d0697" dependencies = [ "anstream", "anstyle", "env_filter", - "humantime", + "jiff 0.2.4", "log", ] @@ -3414,12 +3474,12 @@ dependencies = [ [[package]] name = "fd-lock" -version = "4.0.3" +version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c44818c96aec5cadc9dacfb97bbcbcfc19a0de75b218412d56f57fbaab94e439" +checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", - "rustix 0.38.44", + "rustix 1.0.3", "windows-sys 0.59.0", ] @@ -3435,9 +3495,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ "rand_core 0.6.4", "subtle", @@ -3507,9 +3567,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "forge" @@ -3523,7 +3583,7 @@ dependencies = [ "alloy-primitives", "alloy-provider", "alloy-rpc-types", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-signer", "alloy-signer-local", "alloy-sol-macro-expander", @@ -3561,7 +3621,7 @@ dependencies = [ "futures", "globset", "humantime-serde", - "hyper 1.6.0", + "hyper", "indicatif", "inferno", "itertools 0.14.0", @@ -3647,13 +3707,13 @@ dependencies = [ "alloy-chains", "alloy-consensus", "alloy-dyn-abi", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-json-abi", "alloy-network", "alloy-primitives", "alloy-provider", "alloy-rpc-types", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-signer", "clap", "dialoguer", @@ -3715,7 +3775,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -3742,7 +3802,7 @@ dependencies = [ "itertools 0.14.0", "regex", "reqwest", - "revm-primitives 15.2.0", + "revm-primitives 16.0.0-alpha.4", "semver 1.0.26", "serde", "serde_json", @@ -3763,9 +3823,9 @@ dependencies = [ [[package]] name = "foundry-block-explorers" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d7f2a3d90ff85c164c0eb05fdf19b22e68b9190b5449d1aa0eef8314c1874e9" +checksum = "d3fa56da41a30ea92956a1a19b66ab0e69b31c158fed5c7aabd2d564bfcfe809" dependencies = [ "alloy-chains", "alloy-json-abi", @@ -3815,7 +3875,7 @@ dependencies = [ "parking_lot", "proptest", "rand 0.8.5", - "revm", + "revm 20.0.0-alpha.6", "revm-inspectors", "semver 1.0.26", "serde", @@ -3843,7 +3903,7 @@ version = "1.0.0" dependencies = [ "alloy-chains", "alloy-dyn-abi", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-json-abi", "alloy-primitives", "alloy-provider", @@ -3883,7 +3943,7 @@ dependencies = [ "alloy-consensus", "alloy-contract", "alloy-dyn-abi", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-json-abi", "alloy-json-rpc", "alloy-network", @@ -3892,7 +3952,7 @@ dependencies = [ "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "alloy-sol-types", "alloy-transport", "alloy-transport-http", @@ -3939,11 +3999,11 @@ dependencies = [ "alloy-network", "alloy-primitives", "alloy-rpc-types", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "chrono", "comfy-table", "foundry-macros", - "revm-primitives 15.2.0", + "revm-primitives 16.0.0-alpha.4", "serde", "serde_json", "similar-asserts", @@ -3952,15 +4012,15 @@ dependencies = [ [[package]] name = "foundry-compilers" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8f0bab060fd7c1764c4be2563e6933d39ec8c2b8a8d6c08aaf45ab29d08310" +checksum = "21089dce1284b88283a6dc1684b22347debb517e86f7e0033e1cf277fda3ea7e" dependencies = [ "alloy-json-abi", "alloy-primitives", "auto_impl", "derive_more 1.0.0", - "dirs 6.0.0", + "dirs", "dyn-clone", "foundry-compilers-artifacts", "foundry-compilers-core", @@ -3983,15 +4043,15 @@ dependencies = [ "thiserror 2.0.12", "tokio", "tracing", - "winnow 0.7.3", + "winnow 0.7.4", "yansi", ] [[package]] name = "foundry-compilers-artifacts" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b102dd131e939d80cc5c85214d2f0f6ba20ed75cf098019c4d995791b4ebae05" +checksum = "c6cc7a5aec89a3e0f271ec522aac586f97d9104c3b31563716f9ca20113e7f5c" dependencies = [ "foundry-compilers-artifacts-solc", "foundry-compilers-artifacts-vyper", @@ -3999,9 +4059,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-solc" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db9ef02de4fda04ae3ed098afb6e16edd742d1073f972197a4566836b453bdcd" +checksum = "c0c1058532f7a062f9bba3cd807f74e034b2f37f8a27d8bcccabdc104102f847" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -4023,9 +4083,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-vyper" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd9d33cbeda448af917105920fefdc3ac42f9ffdaa2d840d58207db7807ea29" +checksum = "33f5f4621a0fad72868c5174c01bbfdfb16a6a650edd2f4a41cf5e5dc611a15e" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -4038,9 +4098,9 @@ dependencies = [ [[package]] name = "foundry-compilers-core" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "746d121f7b86b84b20e582a27a56c49435768ad3b8005e9afeaf68b53a77fb5c" +checksum = "3de4acbffff75510c230626f2c3071efa1d6c031afc821a8ed410b67ee6958dd" dependencies = [ "alloy-primitives", "cfg-if", @@ -4065,7 +4125,7 @@ dependencies = [ "Inflector", "alloy-chains", "alloy-primitives", - "dirs 6.0.0", + "dirs", "dunce", "eyre", "figment", @@ -4079,7 +4139,7 @@ dependencies = [ "path-slash", "regex", "reqwest", - "revm-primitives 15.2.0", + "revm-primitives 16.0.0-alpha.4", "semver 1.0.26", "serde", "serde_json", @@ -4107,7 +4167,7 @@ dependencies = [ "foundry-evm-core", "foundry-evm-traces", "ratatui", - "revm", + "revm 20.0.0-alpha.6", "revm-inspectors", "serde", "tracing", @@ -4133,7 +4193,7 @@ dependencies = [ "indicatif", "parking_lot", "proptest", - "revm", + "revm 20.0.0-alpha.6", "revm-inspectors", "serde", "thiserror 2.0.12", @@ -4178,7 +4238,7 @@ dependencies = [ "futures", "itertools 0.14.0", "parking_lot", - "revm", + "revm 20.0.0-alpha.6", "revm-inspectors", "serde", "serde_json", @@ -4198,7 +4258,7 @@ dependencies = [ "foundry-compilers", "foundry-evm-core", "rayon", - "revm", + "revm 20.0.0-alpha.6", "semver 1.0.26", "tracing", ] @@ -4221,7 +4281,7 @@ dependencies = [ "parking_lot", "proptest", "rand 0.8.5", - "revm", + "revm 20.0.0-alpha.6", "serde", "thiserror 2.0.12", "tracing", @@ -4245,7 +4305,7 @@ dependencies = [ "futures", "itertools 0.14.0", "rayon", - "revm", + "revm 20.0.0-alpha.6", "revm-inspectors", "serde", "serde_json", @@ -4267,7 +4327,7 @@ dependencies = [ "eyre", "futures", "parking_lot", - "revm", + "revm 20.0.0-alpha.3", "serde", "serde_json", "thiserror 2.0.12", @@ -4293,7 +4353,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -4453,7 +4513,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -4494,15 +4554,15 @@ checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] name = "gcloud-sdk" -version = "0.26.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6392faf01950e198a204b13034efd7aadda1877e7c174f5442ee39bad5d99bd" +checksum = "8269d6c07cddc7c4f7d679da74fbffa43713a891e0ccfcb37eb02deb21620225" dependencies = [ "async-trait", "bytes", "chrono", "futures", - "hyper 1.6.0", + "hyper", "jsonwebtoken", "once_cell", "prost", @@ -4559,14 +4619,16 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", + "js-sys", "libc", - "wasi 0.13.3+wasi-0.2.2", - "windows-targets 0.52.6", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -4631,7 +4693,7 @@ checksum = "c57c477b645ee248b173bb1176b52dd528872f12c50375801a58aaf5ae91113f" dependencies = [ "bstr", "itoa", - "jiff", + "jiff 0.1.29", "thiserror 2.0.12", ] @@ -4841,25 +4903,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.7.1", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.8" @@ -4871,8 +4914,8 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.2.0", - "indexmap 2.7.1", + "http 1.3.1", + "indexmap 2.8.0", "slab", "tokio", "tokio-util", @@ -4881,9 +4924,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1" dependencies = [ "cfg-if", "crunchy", @@ -4891,9 +4934,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "6.3.1" +version = "6.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d752747ddabc4c1a70dd28e72f2e3c218a816773e0d7faf67433f1acfa6cba7c" +checksum = "759e2d5aea3287cb1190c8ec394f42866cb5bf74fcbf213f354e3c856ea26098" dependencies = [ "derive_builder", "log", @@ -5019,7 +5062,7 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -5035,9 +5078,9 @@ dependencies = [ [[package]] name = "http" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -5062,18 +5105,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http 1.3.1", ] [[package]] name = "http-body-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", - "futures-util", - "http 1.2.0", + "futures-core", + "http 1.3.1", "http-body 1.0.1", "pin-project-lite", ] @@ -5098,9 +5141,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" [[package]] name = "humantime-serde" @@ -5112,30 +5155,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.6.0" @@ -5145,8 +5164,8 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.8", - "http 1.2.0", + "h2", + "http 1.3.1", "http-body 1.0.1", "httparse", "httpdate", @@ -5157,22 +5176,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.32", - "log", - "rustls 0.21.12", - "rustls-native-certs 0.6.3", - "tokio", - "tokio-rustls 0.24.1", -] - [[package]] name = "hyper-rustls" version = "0.27.5" @@ -5180,14 +5183,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.2.0", - "hyper 1.6.0", + "http 1.3.1", + "hyper", "hyper-util", - "rustls 0.23.23", - "rustls-native-certs 0.8.1", + "rustls", + "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tower-service", "webpki-roots", ] @@ -5198,7 +5201,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.6.0", + "hyper", "hyper-util", "pin-project-lite", "tokio", @@ -5214,9 +5217,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", - "hyper 1.6.0", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -5362,7 +5365,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -5444,7 +5447,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -5472,9 +5475,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "arbitrary", "equivalent", @@ -5562,7 +5565,7 @@ dependencies = [ "indoc", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -5621,6 +5624,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -5659,6 +5671,30 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "jiff" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d699bc6dfc879fb1bf9bdff0d4c56f0884fc6f0d0eb0fba397a6d00cd9a6b85e" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d16e75759ee0aa64c57a56acbf43916987b20c77373cb7e808979e02b93c9f9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "jiff-tzdb" version = "0.1.3" @@ -5674,6 +5710,15 @@ dependencies = [ "jiff-tzdb", ] +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.77" @@ -5813,11 +5858,17 @@ 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.170" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libdbus-sys" @@ -5830,10 +5881,20 @@ dependencies = [ ] [[package]] -name = "libm" -version = "0.2.11" +name = "libloading" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libredox" @@ -5848,12 +5909,12 @@ dependencies = [ [[package]] name = "libsecp256k1" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +checksum = "e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139" dependencies = [ "arrayref", - "base64 0.13.1", + "base64 0.22.1", "digest 0.9.0", "libsecp256k1-core", "libsecp256k1-gen-ecmult", @@ -5912,9 +5973,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9" +checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" [[package]] name = "litemap" @@ -5981,6 +6042,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "maplit" version = "1.0.2" @@ -6034,9 +6106,9 @@ dependencies = [ [[package]] name = "mdbook" -version = "0.4.46" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c54109598152e19add1933b223b1913bcd16e27cbd7c2783269fe2f9a6cbdc" +checksum = "7e1a8fe3a4a01f28dab245c474cb7b95ccb4d3d2f17a5419a3d949f474c45e84" dependencies = [ "ammonia", "anyhow", @@ -6117,7 +6189,7 @@ checksum = "bf45bf44ab49be92fd1227a3be6fc6f617f1a337c06af54981048574d8783147" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -6207,7 +6279,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -6222,7 +6294,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee3224f0e8be7c2a1ebc77ef9c3eecb90f55c6594399ee825de964526b3c9056" dependencies = [ - "uuid 1.15.1", + "uuid 1.16.0", ] [[package]] @@ -6451,7 +6523,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -6493,21 +6565,21 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.3" +version = "1.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" +checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" [[package]] name = "op-alloy-consensus" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d297150146a63778a29400320700e804ec6e1e4d6ec99857cdbbaf17b3de9241" +checksum = "971eaae9cfc8b6aabb62cef8d7d49640d2e8e948e5aa3177788c4dea3d226452" dependencies = [ "alloy-consensus", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "derive_more 1.0.0", "serde", "thiserror 2.0.12", @@ -6515,16 +6587,16 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7095f87d34fc814e3de06a7af8ffff9121993f322231647f84df304821cc0275" +checksum = "398b77b1fe4a9ca83d031d59a19fa9aa4ffcc2a896a83b7861a94292c2098412" dependencies = [ "alloy-consensus", - "alloy-eips 0.12.4", + "alloy-eips 0.12.6", "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 0.12.4", + "alloy-serde 0.12.6", "derive_more 1.0.0", "op-alloy-consensus", "serde", @@ -6533,13 +6605,13 @@ dependencies = [ [[package]] name = "op-revm" -version = "1.0.0-alpha.2" +version = "1.0.0-alpha.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0bce0ed6dd4f417e31ded4afa9dda6f9ee7c9c95c14f36f383f8bdc3af2356" +checksum = "61d0efbcc12d851c5f1e034d97f055491424b35515a2956ff8c3886fd9e0c148" dependencies = [ "auto_impl", "once_cell", - "revm", + "revm 20.0.0-alpha.6", "serde", ] @@ -6628,7 +6700,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -6711,7 +6783,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -6770,7 +6842,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -6791,7 +6863,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.7.1", + "indexmap 2.8.0", ] [[package]] @@ -6845,7 +6917,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -6894,7 +6966,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -6948,11 +7020,11 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.7.35", + "zerocopy 0.8.23", ] [[package]] @@ -6989,12 +7061,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.30" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ccf34da56fc294e7d4ccf69a85992b7dfb826b7cf57bac6a70bba3494cc08a" +checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" dependencies = [ "proc-macro2", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -7069,7 +7141,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -7089,7 +7161,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "version_check", "yansi", ] @@ -7101,7 +7173,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d35f4dc9988d1326b065b4def5e950c3ed727aa03e3151b86cc9e2aec6b03f54" dependencies = [ "futures", - "indexmap 2.7.1", + "indexmap 2.8.0", "nix 0.29.0", "tokio", "tracing", @@ -7110,9 +7182,9 @@ dependencies = [ [[package]] name = "prodash" -version = "29.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a266d8d6020c61a437be704c5e618037588e1985c7dbb7bf8d265db84cffe325" +checksum = "9ee7ce24c980b976607e2d6ae4aae92827994d23fed71659c3ede3f92528b58b" dependencies = [ "log", "parking_lot", @@ -7157,7 +7229,7 @@ checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -7180,7 +7252,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -7243,12 +7315,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed1a693391a16317257103ad06a88c6529ac640846021da7c435a06fffdacd7" dependencies = [ "chrono", - "indexmap 2.7.1", + "indexmap 2.8.0", "newtype-uuid", "quick-xml 0.37.2", "strip-ansi-escapes", "thiserror 2.0.12", - "uuid 1.15.1", + "uuid 1.16.0", ] [[package]] @@ -7271,34 +7343,36 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" dependencies = [ "bytes", + "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", - "rustls 0.23.23", + "rustc-hash 2.1.1", + "rustls", "socket2", "thiserror 2.0.12", "tokio", "tracing", + "web-time", ] [[package]] name = "quinn-proto" -version = "0.11.9" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" dependencies = [ "bytes", - "getrandom 0.2.15", - "rand 0.8.5", + "getrandom 0.3.2", + "rand 0.9.0", "ring", - "rustc-hash", - "rustls 0.23.23", + "rustc-hash 2.1.1", + "rustls", "rustls-pki-types", "slab", "thiserror 2.0.12", @@ -7323,13 +7397,19 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "radium" version = "0.7.0" @@ -7404,7 +7484,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.1", + "getrandom 0.3.2", ] [[package]] @@ -7546,9 +7626,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.12" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" dependencies = [ "async-compression", "base64 0.22.1", @@ -7556,11 +7636,11 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", - "hyper-rustls 0.27.5", + "hyper", + "hyper-rustls", "hyper-util", "ipnet", "js-sys", @@ -7571,16 +7651,16 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.23", - "rustls-native-certs 0.8.1", - "rustls-pemfile 2.2.0", + "rustls", + "rustls-native-certs", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-socks", "tokio-util", "tower 0.5.2", @@ -7599,17 +7679,36 @@ name = "revm" version = "20.0.0-alpha.3" source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" dependencies = [ - "revm-bytecode", - "revm-context", - "revm-context-interface", - "revm-database", - "revm-database-interface", - "revm-handler", - "revm-inspector", - "revm-interpreter", - "revm-precompile", + "revm-bytecode 1.0.0-alpha.2", + "revm-context 1.0.0-alpha.2", + "revm-context-interface 1.0.0-alpha.2", + "revm-database 1.0.0-alpha.2", + "revm-database-interface 1.0.0-alpha.2", + "revm-handler 1.0.0-alpha.3", + "revm-inspector 1.0.0-alpha.3", + "revm-interpreter 16.0.0-alpha.3", + "revm-precompile 17.0.0-alpha.3", "revm-primitives 16.0.0-alpha.2", - "revm-state", + "revm-state 1.0.0-alpha.2", +] + +[[package]] +name = "revm" +version = "20.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33790dc343daaa413e5426a508094e2055db97200e6e1a9362339e672058259d" +dependencies = [ + "revm-bytecode 1.0.0-alpha.4", + "revm-context 1.0.0-alpha.5", + "revm-context-interface 1.0.0-alpha.5", + "revm-database 1.0.0-alpha.4", + "revm-database-interface 1.0.0-alpha.4", + "revm-handler 1.0.0-alpha.6", + "revm-inspector 1.0.0-alpha.6", + "revm-interpreter 16.0.0-alpha.6", + "revm-precompile 17.0.0-alpha.6", + "revm-primitives 16.0.0-alpha.4", + "revm-state 1.0.0-alpha.4", ] [[package]] @@ -7623,6 +7722,18 @@ dependencies = [ "serde", ] +[[package]] +name = "revm-bytecode" +version = "1.0.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a1f19307417b325447bcb4bb12586d47c91df6551d33e4b6ced89eeedae7f5b" +dependencies = [ + "bitvec", + "phf", + "revm-primitives 16.0.0-alpha.4", + "serde", +] + [[package]] name = "revm-context" version = "1.0.0-alpha.2" @@ -7631,11 +7742,27 @@ dependencies = [ "auto_impl", "cfg-if", "derive-where", - "revm-bytecode", - "revm-context-interface", - "revm-database-interface", + "revm-bytecode 1.0.0-alpha.2", + "revm-context-interface 1.0.0-alpha.2", + "revm-database-interface 1.0.0-alpha.2", "revm-primitives 16.0.0-alpha.2", - "revm-state", + "revm-state 1.0.0-alpha.2", + "serde", +] + +[[package]] +name = "revm-context" +version = "1.0.0-alpha.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e100b379bda77580ad0fe7cc54b87675bfb1d4762ac6747b7933f01984e238cb" +dependencies = [ + "cfg-if", + "derive-where", + "revm-bytecode 1.0.0-alpha.4", + "revm-context-interface 1.0.0-alpha.5", + "revm-database-interface 1.0.0-alpha.4", + "revm-primitives 16.0.0-alpha.4", + "revm-state 1.0.0-alpha.4", "serde", ] @@ -7647,9 +7774,24 @@ dependencies = [ "alloy-eip2930", "alloy-eip7702", "auto_impl", - "revm-database-interface", + "revm-database-interface 1.0.0-alpha.2", "revm-primitives 16.0.0-alpha.2", - "revm-state", + "revm-state 1.0.0-alpha.2", + "serde", +] + +[[package]] +name = "revm-context-interface" +version = "1.0.0-alpha.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "828f3d1147ac4eff5c98e4c3714f659a97781aa4f8f0f67087c9639bdc44cb61" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "auto_impl", + "revm-database-interface 1.0.0-alpha.4", + "revm-primitives 16.0.0-alpha.4", + "revm-state 1.0.0-alpha.4", "serde", ] @@ -7660,10 +7802,25 @@ source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c dependencies = [ "alloy-eips 0.11.1", "auto_impl", - "revm-bytecode", - "revm-database-interface", + "revm-bytecode 1.0.0-alpha.2", + "revm-database-interface 1.0.0-alpha.2", "revm-primitives 16.0.0-alpha.2", - "revm-state", + "revm-state 1.0.0-alpha.2", + "serde", +] + +[[package]] +name = "revm-database" +version = "1.0.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1ade2662c72125f191296da438fdb42388311b0080db660459015dacfeeb9f" +dependencies = [ + "alloy-eips 0.12.6", + "auto_impl", + "revm-bytecode 1.0.0-alpha.4", + "revm-database-interface 1.0.0-alpha.4", + "revm-primitives 16.0.0-alpha.4", + "revm-state 1.0.0-alpha.4", "serde", ] @@ -7674,7 +7831,19 @@ source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c dependencies = [ "auto_impl", "revm-primitives 16.0.0-alpha.2", - "revm-state", + "revm-state 1.0.0-alpha.2", + "serde", +] + +[[package]] +name = "revm-database-interface" +version = "1.0.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830335bea29c435ad60d532198444af1fa9d9de6724887c36156dc643c3b6f62" +dependencies = [ + "auto_impl", + "revm-primitives 16.0.0-alpha.4", + "revm-state 1.0.0-alpha.4", "serde", ] @@ -7684,14 +7853,32 @@ version = "1.0.0-alpha.3" source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" dependencies = [ "auto_impl", - "revm-bytecode", - "revm-context", - "revm-context-interface", - "revm-database-interface", - "revm-interpreter", - "revm-precompile", + "revm-bytecode 1.0.0-alpha.2", + "revm-context 1.0.0-alpha.2", + "revm-context-interface 1.0.0-alpha.2", + "revm-database-interface 1.0.0-alpha.2", + "revm-interpreter 16.0.0-alpha.3", + "revm-precompile 17.0.0-alpha.3", "revm-primitives 16.0.0-alpha.2", - "revm-state", + "revm-state 1.0.0-alpha.2", + "serde", +] + +[[package]] +name = "revm-handler" +version = "1.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "278c4ce30c07a5a5ac26b4f5f72fed5120e764bd051ec5eeb6fbdb4ff537383e" +dependencies = [ + "auto_impl", + "revm-bytecode 1.0.0-alpha.4", + "revm-context 1.0.0-alpha.5", + "revm-context-interface 1.0.0-alpha.5", + "revm-database-interface 1.0.0-alpha.4", + "revm-interpreter 16.0.0-alpha.6", + "revm-precompile 17.0.0-alpha.6", + "revm-primitives 16.0.0-alpha.4", + "revm-state 1.0.0-alpha.4", "serde", ] @@ -7701,21 +7888,40 @@ version = "1.0.0-alpha.3" source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" dependencies = [ "auto_impl", - "revm-context", - "revm-database-interface", - "revm-handler", - "revm-interpreter", - "revm-precompile", + "revm-context 1.0.0-alpha.2", + "revm-database-interface 1.0.0-alpha.2", + "revm-handler 1.0.0-alpha.3", + "revm-interpreter 16.0.0-alpha.3", + "revm-precompile 17.0.0-alpha.3", "revm-primitives 16.0.0-alpha.2", - "revm-state", + "revm-state 1.0.0-alpha.2", + "serde", + "serde_json", +] + +[[package]] +name = "revm-inspector" +version = "1.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8faa8ebce23b85a42f660560dd3553371e5b97352a2fe229a9e849e91cd0a113" +dependencies = [ + "auto_impl", + "revm-context 1.0.0-alpha.5", + "revm-database-interface 1.0.0-alpha.4", + "revm-handler 1.0.0-alpha.6", + "revm-interpreter 16.0.0-alpha.6", + "revm-precompile 17.0.0-alpha.6", + "revm-primitives 16.0.0-alpha.4", + "revm-state 1.0.0-alpha.4", "serde", "serde_json", ] [[package]] name = "revm-inspectors" -version = "0.16.0" -source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=2a365e3#2a365e34e220a6273fbe3ea27eda3d7f1208f8de" +version = "0.17.0-alpha.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1504e2851a11562fb350a9f408e5783351650aef11790aea0b0d0d9ab961c40" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -7723,7 +7929,7 @@ dependencies = [ "alloy-sol-types", "anstyle", "colorchoice", - "revm", + "revm 20.0.0-alpha.6", "serde", "serde_json", "thiserror 2.0.12", @@ -7734,12 +7940,24 @@ name = "revm-interpreter" version = "16.0.0-alpha.3" source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" dependencies = [ - "revm-bytecode", - "revm-context-interface", + "revm-bytecode 1.0.0-alpha.2", + "revm-context-interface 1.0.0-alpha.2", "revm-primitives 16.0.0-alpha.2", "serde", ] +[[package]] +name = "revm-interpreter" +version = "16.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a86403b3a0ddf4b5aa8da800a73ab500e947150ecd5b453a93b42482dde2c1c" +dependencies = [ + "revm-bytecode 1.0.0-alpha.4", + "revm-context-interface 1.0.0-alpha.5", + "revm-primitives 16.0.0-alpha.4", + "serde", +] + [[package]] name = "revm-precompile" version = "17.0.0-alpha.3" @@ -7753,7 +7971,7 @@ dependencies = [ "libsecp256k1", "once_cell", "p256", - "revm-context-interface", + "revm-context-interface 1.0.0-alpha.2", "revm-primitives 16.0.0-alpha.2", "ripemd", "secp256k1", @@ -7762,21 +7980,25 @@ dependencies = [ ] [[package]] -name = "revm-primitives" -version = "15.2.0" +name = "revm-precompile" +version = "17.0.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f987564210317706def498421dfba2ae1af64a8edce82c6102758b48133fcb" +checksum = "20da0ec6e79a5420d7619e8d5fa900b8632f076fb35579b5463949fe2b328da7" dependencies = [ - "alloy-eip2930", - "alloy-eip7702", - "alloy-primitives", - "auto_impl", - "bitflags 2.9.0", - "bitvec", + "aurora-engine-modexp", + "blst", + "c-kzg", "cfg-if", - "dyn-clone", - "enumn", - "hex", + "k256", + "libsecp256k1", + "once_cell", + "p256", + "revm-context-interface 1.0.0-alpha.5", + "revm-primitives 16.0.0-alpha.4", + "ripemd", + "secp256k1", + "sha2 0.10.8", + "substrate-bn", ] [[package]] @@ -7789,17 +8011,40 @@ dependencies = [ "serde", ] +[[package]] +name = "revm-primitives" +version = "16.0.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b719ced7ba199ea5e7a18fe62d75537e852dfc6b6afe608aac0c4cdc51af87d" +dependencies = [ + "alloy-primitives", + "enumn", + "serde", +] + [[package]] name = "revm-state" version = "1.0.0-alpha.2" source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" dependencies = [ "bitflags 2.9.0", - "revm-bytecode", + "revm-bytecode 1.0.0-alpha.2", "revm-primitives 16.0.0-alpha.2", "serde", ] +[[package]] +name = "revm-state" +version = "1.0.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a268b9798bbaa1e7d52c22d94ef231dae692d66f7c5ef29ff03e0776357156e" +dependencies = [ + "bitflags 2.9.0", + "revm-bytecode 1.0.0-alpha.4", + "revm-primitives 16.0.0-alpha.4", + "serde", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -7821,9 +8066,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.13" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", @@ -7922,6 +8167,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hash" version = "2.1.1" @@ -7970,56 +8221,33 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dade4812df5c384711475be5fcd8c162555352945401aed22a35bffeab61f657" +checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" dependencies = [ "bitflags 2.9.0", "errno", "libc", - "linux-raw-sys 0.9.2", + "linux-raw-sys 0.9.3", "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.23.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" +checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.4", - "schannel", - "security-framework 2.11.1", -] - [[package]] name = "rustls-native-certs" version = "0.8.1" @@ -8029,16 +8257,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.2.0", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", + "security-framework", ] [[package]] @@ -8061,20 +8280,11 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.102.8" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "0aa4eeac2588ffff23e9d7a7e9b3f971c5fb5b7ebc9452745e0c232c64f83b2f" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -8193,7 +8403,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -8220,21 +8430,11 @@ dependencies = [ "sha2 0.10.8", ] -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sdd" -version = "3.0.7" +version = "3.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07779b9b918cc05650cb30f404d4d7835d26df37c235eded8a6832e2fb82cca" +checksum = "584e070911c7017da6cb2eb0788d09f43d789029b5877d3e5ecc8acf86ceee21" [[package]] name = "sec1" @@ -8284,19 +8484,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.9.0", - "core-foundation 0.9.4", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - [[package]] name = "security-framework" version = "3.2.0" @@ -8304,7 +8491,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ "bitflags 2.9.0", - "core-foundation 0.10.0", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -8355,22 +8542,22 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.218" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.218" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -8381,7 +8568,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -8390,7 +8577,7 @@ version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "itoa", "memchr", "ryu", @@ -8425,7 +8612,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -8459,7 +8646,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_derive", "serde_json", @@ -8476,7 +8663,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -8511,7 +8698,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -8790,10 +8977,10 @@ checksum = "71d07263243b313296eca18f18eda3a190902dc3284bf67ceff29b8b54dac3e6" dependencies = [ "bumpalo", "index_vec", - "indexmap 2.7.1", + "indexmap 2.8.0", "parking_lot", "rayon", - "rustc-hash", + "rustc-hash 2.1.1", "smallvec", ] @@ -8833,7 +9020,7 @@ checksum = "970d7c774741f786d62cab78290e47d845b0b9c0c9d094a1642aced1d7946036" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -8898,7 +9085,7 @@ dependencies = [ "thiserror 2.0.12", "tokio", "toml_edit", - "uuid 1.15.1", + "uuid 1.16.0", "zip", "zip-extract", ] @@ -9005,7 +9192,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -9018,7 +9205,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -9042,12 +9229,12 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "svm-rs" -version = "0.5.11" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4197826bb07b996788b9860a95a1fe2c1307b2404a8c66f5ba825c42532b7c3c" +checksum = "1c86f1c4a401aa4526c0e823af56a4a967a8b445718cd1b0e87b14375e5bace8" dependencies = [ "const-hex", - "dirs 5.0.1", + "dirs", "fs4", "reqwest", "semver 1.0.26", @@ -9062,9 +9249,9 @@ dependencies = [ [[package]] name = "svm-rs-builds" -version = "0.5.11" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074faea21171905847a96135b3896e2e0b74373758ca07b96a41c646cc04a8e5" +checksum = "0a9b30390308e3c0f7d146d87e2c798409233fe250d849a02fe57d6a9ae6810f" dependencies = [ "build_const", "const-hex", @@ -9086,9 +9273,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.99" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -9097,14 +9284,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9f9798a84bca5cd4d1760db691075fda8f2c3a5d9647e8bfd29eb9b3fabb87" +checksum = "d975606bae72d8aad5b07d9342465e123a2cccf53a5a735aedf81ca92a709ecb" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -9124,7 +9311,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -9135,15 +9322,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.18.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c317e0a526ee6120d8dabad239c8dadca62b24b6f168914bbbc8e2fb1f0e567" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ - "cfg-if", "fastrand", - "getrandom 0.3.1", + "getrandom 0.3.2", "once_cell", - "rustix 1.0.1", + "rustix 1.0.3", "windows-sys 0.59.0", ] @@ -9175,7 +9361,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" dependencies = [ - "rustix 1.0.1", + "rustix 1.0.3", "windows-sys 0.59.0", ] @@ -9234,7 +9420,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -9245,7 +9431,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -9289,9 +9475,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.39" +version = "0.3.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" +checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618" dependencies = [ "deranged", "itoa", @@ -9306,15 +9492,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" +checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04" dependencies = [ "num-conv", "time-core", @@ -9356,9 +9542,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.0" +version = "1.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" +checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" dependencies = [ "backtrace", "bytes", @@ -9380,17 +9566,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", + "syn 2.0.100", ] [[package]] @@ -9399,7 +9575,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.23", + "rustls", "tokio", ] @@ -9447,19 +9623,19 @@ checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" dependencies = [ "futures-util", "log", - "rustls 0.23.23", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tungstenite 0.26.2", "webpki-roots", ] [[package]] name = "tokio-util" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" dependencies = [ "bytes", "futures-core", @@ -9483,7 +9659,7 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_spanned", "toml_datetime", @@ -9505,11 +9681,11 @@ version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] @@ -9523,21 +9699,21 @@ dependencies = [ "axum", "base64 0.22.1", "bytes", - "h2 0.4.8", - "http 1.2.0", + "h2", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project 1.1.10", "prost", - "rustls-native-certs 0.8.1", - "rustls-pemfile 2.2.0", + "rustls-native-certs", + "rustls-pemfile", "socket2", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-stream", "tower 0.4.13", "tower-layer", @@ -9596,7 +9772,7 @@ dependencies = [ "bitflags 2.9.0", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "http-range-header", @@ -9656,7 +9832,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -9679,6 +9855,18 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "futures", + "futures-task", + "pin-project 1.1.10", + "tracing", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -9769,7 +9957,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.2.0", + "http 1.3.1", "httparse", "log", "rand 0.8.5", @@ -9786,11 +9974,11 @@ checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" dependencies = [ "bytes", "data-encoding", - "http 1.2.0", + "http 1.3.1", "httparse", "log", "rand 0.9.0", - "rustls 0.23.23", + "rustls", "rustls-pki-types", "sha1", "thiserror 2.0.12", @@ -9975,11 +10163,11 @@ dependencies = [ [[package]] name = "uuid" -version = "1.15.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ - "getrandom 0.3.1", + "getrandom 0.3.2", "serde", ] @@ -10064,9 +10252,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" -version = "0.13.3+wasi-0.2.2" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] @@ -10093,7 +10281,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "wasm-bindgen-shared", ] @@ -10128,7 +10316,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10261,6 +10449,18 @@ dependencies = [ "rustls-pki-types", ] +[[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.44", +] + [[package]] name = "which" version = "7.0.2" @@ -10275,9 +10475,9 @@ dependencies = [ [[package]] name = "widestring" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" +checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" [[package]] name = "winapi" @@ -10359,8 +10559,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce" dependencies = [ "windows-implement 0.59.0", - "windows-interface 0.59.0", - "windows-result 0.3.1", + "windows-interface 0.59.1", + "windows-result 0.3.2", "windows-strings 0.3.1", "windows-targets 0.53.0", ] @@ -10373,7 +10573,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -10384,7 +10584,7 @@ checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -10395,35 +10595,35 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "windows-interface" -version = "0.59.0" +version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "windows-link" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" [[package]] name = "windows-registry" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", + "windows-result 0.3.2", + "windows-strings 0.3.1", + "windows-targets 0.53.0", ] [[package]] @@ -10437,9 +10637,9 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ "windows-link", ] @@ -10686,9 +10886,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" dependencies = [ "memchr", ] @@ -10701,9 +10901,9 @@ checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] name = "wit-bindgen-rt" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ "bitflags 2.9.0", ] @@ -10783,7 +10983,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "synstructure", ] @@ -10793,7 +10993,6 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "byteorder", "zerocopy-derive 0.7.35", ] @@ -10814,7 +11013,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -10825,7 +11024,7 @@ checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -10845,7 +11044,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", "synstructure", ] @@ -10866,7 +11065,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] @@ -10888,14 +11087,14 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.99", + "syn 2.0.100", ] [[package]] name = "zip" -version = "2.2.3" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b280484c454e74e5fff658bbf7df8fdbe7a07c6b2de4a53def232c15ef138f3a" +checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" dependencies = [ "arbitrary", "bzip2", @@ -10903,7 +11102,7 @@ dependencies = [ "crossbeam-utils", "displaydoc", "flate2", - "indexmap 2.7.1", + "indexmap 2.8.0", "memchr", "thiserror 2.0.12", "zopfli", @@ -10933,3 +11132,8 @@ dependencies = [ "once_cell", "simd-adler32", ] + +[[patch.unused]] +name = "revm-inspectors" +version = "0.16.0" +source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=2a365e3#2a365e34e220a6273fbe3ea27eda3d7f1208f8de" diff --git a/Cargo.toml b/Cargo.toml index ce006190a5b89..3455143b4dc95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -194,35 +194,35 @@ solang-parser = "=0.3.3" solar-parse = { version = "=0.1.1", default-features = false } ## revm -revm = { version = "20.0.0-alpha.3", default-features = false } -revm-primitives = { version = "15.1.0", default-features = false } -revm-inspectors = { version = "0.16.0", features = ["serde"] } +revm = { version = "20.0.0-alpha.6", default-features = false } +revm-primitives = { version = "16.0.0-alpha.4", default-features = false } +revm-inspectors = { version = "0.17.0-alpha.1", features = ["serde"] } ## alloy alloy-evm = { path = "../evm/crates/evm" } -alloy-consensus = { version = "0.12.1", default-features = false } -alloy-contract = { version = "0.12.1", default-features = false } -alloy-eips = { version = "0.12.1", default-features = false } -alloy-genesis = { version = "0.12.1", default-features = false } -alloy-json-rpc = { version = "0.12.1", default-features = false } -alloy-network = { version = "0.12.1", default-features = false } -alloy-provider = { version = "0.12.1", default-features = false } -alloy-pubsub = { version = "0.12.1", default-features = false } -alloy-rpc-client = { version = "0.12.1", default-features = false } -alloy-rpc-types = { version = "0.12.1", default-features = true } -alloy-serde = { version = "0.12.1", default-features = false } -alloy-signer = { version = "0.12.1", default-features = false } -alloy-signer-aws = { version = "0.12.1", default-features = false } -alloy-signer-gcp = { version = "0.12.1", default-features = false } -alloy-signer-ledger = { version = "0.12.1", default-features = false } -alloy-signer-local = { version = "0.12.1", default-features = false } -alloy-signer-trezor = { version = "0.12.1", default-features = false } -alloy-transport = { version = "0.12.1", default-features = false } -alloy-transport-http = { version = "0.12.1", default-features = false } -alloy-transport-ipc = { version = "0.12.1", default-features = false } -alloy-transport-ws = { version = "0.12.1", default-features = false } -alloy-node-bindings = { version = "0.12.1", default-features = false } -alloy-network-primitives = { version = "0.12.1", default-features = false } +alloy-consensus = { version = "0.12.6", default-features = false } +alloy-contract = { version = "0.12.6", default-features = false } +alloy-eips = { version = "0.12.6", default-features = false } +alloy-genesis = { version = "0.12.6", default-features = false } +alloy-json-rpc = { version = "0.12.6", default-features = false } +alloy-network = { version = "0.12.6", default-features = false } +alloy-provider = { version = "0.12.6", default-features = false } +alloy-pubsub = { version = "0.12.6", default-features = false } +alloy-rpc-client = { version = "0.12.6", default-features = false } +alloy-rpc-types = { version = "0.12.6", default-features = true } +alloy-serde = { version = "0.12.6", default-features = false } +alloy-signer = { version = "0.12.6", default-features = false } +alloy-signer-aws = { version = "0.12.6", default-features = false } +alloy-signer-gcp = { version = "0.12.6", default-features = false } +alloy-signer-ledger = { version = "0.12.6", default-features = false } +alloy-signer-local = { version = "0.12.6", default-features = false } +alloy-signer-trezor = { version = "0.12.6", default-features = false } +alloy-transport = { version = "0.12.6", default-features = false } +alloy-transport-http = { version = "0.12.6", default-features = false } +alloy-transport-ipc = { version = "0.12.6", default-features = false } +alloy-transport-ws = { version = "0.12.6", default-features = false } +alloy-node-bindings = { version = "0.12.6", default-features = false } +alloy-network-primitives = { version = "0.12.6", default-features = false } ## alloy-core alloy-dyn-abi = "0.8.22" From 0ee50b00a3d8f86738cba3822de9e6f72adfac7d Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 20 Mar 2025 11:53:25 +0100 Subject: [PATCH 04/23] minor fixes --- crates/evm/core/Cargo.toml | 1 + crates/evm/core/src/utils.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/evm/core/Cargo.toml b/crates/evm/core/Cargo.toml index b15f5011a6e09..e3f5f3afc1fbc 100644 --- a/crates/evm/core/Cargo.toml +++ b/crates/evm/core/Cargo.toml @@ -46,6 +46,7 @@ revm = { workspace = true, features = [ "arbitrary", "c-kzg", "blst", + "secp256r1", ] } revm-inspectors.workspace = true diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 751b822bea7f6..2be6c146d0cfc 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -151,7 +151,7 @@ pub fn configure_tx_req_env( env.tx.caller = impersonated_from.unwrap_or(from.ok_or_else(|| eyre::eyre!("missing `from` field"))?); env.tx.gas_limit = gas.ok_or_else(|| eyre::eyre!("missing `gas` field"))?; - env.tx.nonce = nonce; + env.tx.nonce = nonce.unwrap_or_default(); env.tx.value = value.unwrap_or_default(); env.tx.data = input.input().cloned().unwrap_or_default(); env.tx.chain_id = chain_id; From 56c033d07e2843cfc99a01712716a5c1074620b1 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 20 Mar 2025 12:30:05 +0100 Subject: [PATCH 05/23] bump foundry-fork-db --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/anvil/src/config.rs | 4 +++- crates/evm/core/src/lib.rs | 2 +- crates/forge/tests/it/test_helpers.rs | 2 +- crates/verify/src/utils.rs | 3 ++- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 134b430117c44..6cf113e5b5f41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4310,7 +4310,7 @@ dependencies = [ [[package]] name = "foundry-fork-db" version = "0.12.0" -source = "git+https://github.com/foundry-rs/foundry-fork-db?rev=cd548da#cd548da1dbfa21a98a158dcf43d044e333e6e538" +source = "git+https://github.com/foundry-rs/foundry-fork-db?rev=c168d11#c168d119f593e0447891def5efe814ada4a92575" dependencies = [ "alloy-consensus", "alloy-primitives", diff --git a/Cargo.toml b/Cargo.toml index f785973f88ca2..944a2f3b16106 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -189,7 +189,7 @@ foundry-linking = { path = "crates/linking" } # solc & compilation utilities foundry-block-explorers = { version = "0.11.0", default-features = false } foundry-compilers = { version = "0.13.5", default-features = false } -foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "cd548da" } +foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "c168d11" } solang-parser = "=0.3.3" solar-parse = { version = "=0.1.1", default-features = false } diff --git a/crates/anvil/src/config.rs b/crates/anvil/src/config.rs index 2af6d7ff84b1a..deb25628487bd 100644 --- a/crates/anvil/src/config.rs +++ b/crates/anvil/src/config.rs @@ -37,7 +37,9 @@ use foundry_config::Config; use foundry_evm::{ backend::{BlockchainDb, BlockchainDbMeta, SharedBackend}, constants::DEFAULT_CREATE2_DEPLOYER, - revm::primitives::{BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, SpecId, TxEnv}, + revm::primitives::{ + hardfork::SpecId, BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, TxEnv, + }, utils::apply_chain_and_block_specific_env_changes, }; use itertools::Itertools; diff --git a/crates/evm/core/src/lib.rs b/crates/evm/core/src/lib.rs index bbbb07886a401..0aca4ccfdcdba 100644 --- a/crates/evm/core/src/lib.rs +++ b/crates/evm/core/src/lib.rs @@ -10,7 +10,7 @@ use alloy_evm::eth::EthEvmContext; use alloy_primitives::Address; use auto_impl::auto_impl; use backend::DatabaseExt; -use revm::{inspector::NoOpInspector, interpreter::CreateInputs, EvmContext, Inspector}; +use revm::{inspector::NoOpInspector, interpreter::CreateInputs, Inspector}; use revm_inspectors::access_list::AccessListInspector; #[macro_use] diff --git a/crates/forge/tests/it/test_helpers.rs b/crates/forge/tests/it/test_helpers.rs index 0712ea73bd976..f04594a52bfef 100644 --- a/crates/forge/tests/it/test_helpers.rs +++ b/crates/forge/tests/it/test_helpers.rs @@ -2,7 +2,7 @@ use alloy_chains::NamedChain; use alloy_primitives::U256; -use forge::{revm::primitives::SpecId, MultiContractRunner, MultiContractRunnerBuilder}; +use forge::{revm::primitives::hardfork::SpecId, MultiContractRunner, MultiContractRunnerBuilder}; use foundry_compilers::{ artifacts::{EvmVersion, Libraries, Settings}, compilers::multi::MultiCompiler, diff --git a/crates/verify/src/utils.rs b/crates/verify/src/utils.rs index 132f0218f8d79..84a59948acc5e 100644 --- a/crates/verify/src/utils.rs +++ b/crates/verify/src/utils.rs @@ -20,7 +20,8 @@ use reqwest::Url; use revm_primitives::{ db::Database, env::{EnvWithHandlerCfg, HandlerCfg}, - Bytecode, Env, SpecId, TxKind, + hardfork::SpecId, + Bytecode, Env, TxKind, }; use semver::Version; use serde::{Deserialize, Serialize}; From 26298f3628ae4c2492a4cd2d7cbd37651e34f39a Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Thu, 20 Mar 2025 17:27:55 +0100 Subject: [PATCH 06/23] minor fixes --- Cargo.lock | 6 ++++-- Cargo.toml | 3 +-- crates/common/fmt/Cargo.toml | 2 +- crates/common/fmt/src/eof.rs | 2 +- crates/evm/core/src/backend/cow.rs | 2 +- crates/evm/core/src/fork/database.rs | 6 +----- crates/evm/core/src/fork/multi.rs | 10 +++++----- 7 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6cf113e5b5f41..beb7eb9203050 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -224,7 +224,9 @@ dependencies = [ [[package]] name = "alloy-evm" -version = "0.1.0-alpha.1" +version = "0.1.0-alpha.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee1682d3b973d08cdcba76014b5e119142c0f0d094b3ba372164e61abd53d9f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3995,7 +3997,7 @@ dependencies = [ "chrono", "comfy-table", "foundry-macros", - "revm-bytecode", + "revm", "serde", "serde_json", "similar-asserts", diff --git a/Cargo.toml b/Cargo.toml index 944a2f3b16106..c8437c9c336f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -195,12 +195,10 @@ solar-parse = { version = "=0.1.1", default-features = false } ## revm revm = { version = "20.0.0-alpha.6", default-features = false } -revm-bytecode = { version = "1.0.0-alpha.4", default-features = false } revm-primitives = { version = "16.0.0-alpha.4", default-features = false } revm-inspectors = { version = "0.17.0-alpha.1", features = ["serde"] } ## alloy -alloy-evm = { path = "../evm/crates/evm" } alloy-consensus = { version = "0.12.6", default-features = false } alloy-contract = { version = "0.12.6", default-features = false } alloy-eips = { version = "0.12.6", default-features = false } @@ -239,6 +237,7 @@ alloy-sol-macro-input = "0.8.22" alloy-sol-types = "0.8.22" syn-solidity = "0.8.22" +alloy-evm = "0.1.0-alpha.2" alloy-chains = "0.1" alloy-rlp = "0.3" alloy-trie = "0.7.0" diff --git a/crates/common/fmt/Cargo.toml b/crates/common/fmt/Cargo.toml index 3aba34c9ab0a1..cf4aa5a7ba765 100644 --- a/crates/common/fmt/Cargo.toml +++ b/crates/common/fmt/Cargo.toml @@ -25,7 +25,7 @@ alloy-serde.workspace = true serde.workspace = true serde_json.workspace = true chrono.workspace = true -revm-bytecode.workspace = true +revm.workspace = true comfy-table.workspace = true yansi.workspace = true diff --git a/crates/common/fmt/src/eof.rs b/crates/common/fmt/src/eof.rs index 160d113daa9e1..50bfe06f67256 100644 --- a/crates/common/fmt/src/eof.rs +++ b/crates/common/fmt/src/eof.rs @@ -1,5 +1,5 @@ use comfy_table::{modifiers::UTF8_ROUND_CORNERS, ContentArrangement, Table}; -use revm_bytecode::{ +use revm::bytecode::{ eof::{EofBody, EofHeader}, Eof, }; diff --git a/crates/evm/core/src/backend/cow.rs b/crates/evm/core/src/backend/cow.rs index 6076d48381cdd..32d82c57915d7 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -94,7 +94,7 @@ impl<'a> CowBackend<'a> { if !self.is_initialized { let backend = self.backend.to_mut(); let mut env = env.to_owned(); - env.evm_env.spec = self.spec_id; + env.evm_env.cfg_env.spec = self.spec_id; backend.initialize(&env); self.is_initialized = true; return backend; diff --git a/crates/evm/core/src/fork/database.rs b/crates/evm/core/src/fork/database.rs index b2df580c9d88c..93a7b1641224b 100644 --- a/crates/evm/core/src/fork/database.rs +++ b/crates/evm/core/src/fork/database.rs @@ -279,11 +279,7 @@ mod tests { async fn fork_db_insert_basic_default() { let rpc = foundry_test_utils::rpc::next_http_rpc_endpoint(); let provider = get_http_provider(rpc.clone()); - let meta = BlockchainDbMeta { - cfg_env: Default::default(), - block_env: Default::default(), - hosts: BTreeSet::from([rpc]), - }; + let meta = BlockchainDbMeta { block_env: Default::default(), hosts: BTreeSet::from([rpc]) }; let db = BlockchainDb::new(meta, None); let backend = SharedBackend::spawn_backend(Arc::new(provider), db.clone(), None).await; diff --git a/crates/evm/core/src/fork/multi.rs b/crates/evm/core/src/fork/multi.rs index 666e33295f074..ffcb06a8e6267 100644 --- a/crates/evm/core/src/fork/multi.rs +++ b/crates/evm/core/src/fork/multi.rs @@ -7,7 +7,7 @@ use crate::Env; use super::CreateFork; use alloy_consensus::BlockHeader; -use alloy_primitives::{map::HashMap, U256}; +use alloy_primitives::map::HashMap; use alloy_provider::network::BlockResponse; use foundry_common::provider::{ProviderBuilder, RetryProvider}; use foundry_config::Config; @@ -305,8 +305,8 @@ impl MultiForkHandler { /// cheatcodes when new fork selected. fn update_block(&mut self, fork_id: ForkId, block_number: u64, block_timestamp: u64) { if let Some(fork) = self.forks.get_mut(&fork_id) { - fork.opts.env.block_env.number = block_number; - fork.opts.env.block_env.timestamp = block_timestamp; + fork.opts.env.evm_env.block_env.number = block_number; + fork.opts.env.evm_env.block_env.timestamp = block_timestamp; } } @@ -520,8 +520,8 @@ async fn create_fork(mut fork: CreateFork) -> eyre::Result<(ForkId, CreatedFork, // Initialise the fork environment. let (env, block) = fork.evm_opts.fork_evm_env(&fork.url).await?; fork.env = env; - let chain_id = env.cfg_env.chain_id; - let meta = BlockchainDbMeta::new(fork.env.block_env.clone(), fork.url.clone()); + let chain_id = fork.env.evm_env.cfg_env.chain_id; + let meta = BlockchainDbMeta::new(fork.env.evm_env.block_env.clone(), fork.url.clone()); // We need to use the block number from the block because the env's number can be different on // some L2s (e.g. Arbitrum). From e349eb6839f7d79d60890592569b28fa5834bccb Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 15:01:27 +0100 Subject: [PATCH 07/23] minor fixes --- Cargo.lock | 10 ---------- Cargo.toml | 6 ++++-- crates/evm/core/src/backend/cow.rs | 2 +- crates/evm/core/src/backend/mod.rs | 3 +-- crates/evm/core/src/opts.rs | 2 +- crates/evm/core/src/utils.rs | 3 +-- 6 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index beb7eb9203050..4b1d9b207ef2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11108,13 +11108,3 @@ dependencies = [ "once_cell", "simd-adler32", ] - -[[patch.unused]] -name = "revm" -version = "20.0.0-alpha.3" -source = "git+https://github.com/bluealloy/revm?rev=9e39df5#9e39df5dbc5fdc98779c644629b28b8bee75794a" - -[[patch.unused]] -name = "revm-inspectors" -version = "0.16.0" -source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=2a365e3#2a365e34e220a6273fbe3ea27eda3d7f1208f8de" diff --git a/Cargo.toml b/Cargo.toml index c8437c9c336f8..d82ff6a4c5ebe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -317,8 +317,6 @@ vergen = { version = "8", default-features = false } yansi = { version = "1.0", features = ["detect-tty", "detect-env"] } [patch.crates-io] -revm = { git = "https://github.com/bluealloy/revm", rev = "9e39df5" } -revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "2a365e3" } ## alloy-core # alloy-dyn-abi = { path = "../../alloy-rs/core/crates/dyn-abi" } # alloy-json-abi = { path = "../../alloy-rs/core/crates/json-abi" } @@ -354,3 +352,7 @@ revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev # alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" } # alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" } # alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" } + +## revm +# revm = { git = "https://github.com/bluealloy/revm", rev = "9e39df5" } +# revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "2a365e3" } diff --git a/crates/evm/core/src/backend/cow.rs b/crates/evm/core/src/backend/cow.rs index 32d82c57915d7..019ce7b33c6fb 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -69,7 +69,7 @@ impl<'a> CowBackend<'a> { // this is a new call to inspect with a new env, so even if we've cloned the backend // already, we reset the initialized state self.is_initialized = false; - self.spec_id = env.handler_cfg.spec_id; + self.spec_id = env.evm_env.cfg_env.spec; let mut evm = crate::utils::new_evm_with_inspector(self, env.clone(), inspector); let res = evm.replay().wrap_err("EVM error")?; diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index b2e1d74a3f806..cb0906802e97a 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -2045,8 +2045,7 @@ mod tests { } drop(backend); - let meta = - BlockchainDbMeta { cfg_env: env.cfg, block_env: env.block, hosts: Default::default() }; + let meta = BlockchainDbMeta { block_env: env.evm_env.block_env, hosts: Default::default() }; let db = BlockchainDb::new( meta, diff --git a/crates/evm/core/src/opts.rs b/crates/evm/core/src/opts.rs index fb7a7cb7a4f90..883f67177c436 100644 --- a/crates/evm/core/src/opts.rs +++ b/crates/evm/core/src/opts.rs @@ -169,7 +169,7 @@ impl EvmOpts { cfg_env: cfg, }, tx: TxEnv { - gas_price: self.env.gas_price.unwrap_or_default(), + gas_price: self.env.gas_price.unwrap_or_default().into(), gas_limit: self.gas_limit(), caller: self.sender, ..Default::default() diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 2be6c146d0cfc..5f114ae1f28d7 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -169,8 +169,7 @@ pub fn configure_tx_req_env( // Type 4, EIP-7702 if let Some(authorization_list) = authorization_list { - env.tx.authorization_list = - Some(revm::primitives::AuthorizationList::Signed(authorization_list.clone())); + env.tx.authorization_list = authorization_list.clone(); } Ok(()) From 8bcd70454a82b63adaf6f5defd855fc5c256a4f4 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 17:48:02 +0100 Subject: [PATCH 08/23] fix imports --- Cargo.lock | 1 + crates/anvil/core/Cargo.toml | 1 + crates/anvil/src/config.rs | 2 +- crates/anvil/src/eth/api.rs | 2 +- crates/anvil/src/eth/backend/executor.rs | 2 +- crates/anvil/src/eth/backend/fork.rs | 2 +- crates/anvil/src/eth/backend/mem/fork_db.rs | 2 +- crates/anvil/src/eth/backend/mem/mod.rs | 5 +++-- crates/anvil/src/eth/error.rs | 14 +++++++------- crates/anvil/src/evm.rs | 2 +- crates/cheatcodes/src/error.rs | 2 +- crates/cheatcodes/src/evm.rs | 5 ++++- crates/cheatcodes/src/inspector.rs | 9 +++++---- crates/cheatcodes/src/script.rs | 2 +- crates/evm/evm/src/executors/builder.rs | 2 +- crates/evm/evm/src/executors/trace.rs | 2 +- crates/evm/fuzz/src/strategies/param.rs | 2 +- crates/evm/fuzz/src/strategies/state.rs | 6 +++--- crates/evm/traces/src/debug/mod.rs | 2 +- crates/evm/traces/src/lib.rs | 2 +- crates/forge/src/multi_runner.rs | 2 +- 21 files changed, 38 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4b1d9b207ef2e..76c1091347bb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1081,6 +1081,7 @@ dependencies = [ "alloy-consensus", "alloy-dyn-abi", "alloy-eips", + "alloy-evm", "alloy-network", "alloy-primitives", "alloy-rlp", diff --git a/crates/anvil/core/Cargo.toml b/crates/anvil/core/Cargo.toml index dacc7f20e0ea3..c5adf376a9a59 100644 --- a/crates/anvil/core/Cargo.toml +++ b/crates/anvil/core/Cargo.toml @@ -22,6 +22,7 @@ revm = { workspace = true, default-features = false, features = [ "c-kzg", ] } +alloy-evm.workspace = true alloy-primitives = { workspace = true, features = ["serde", "rlp"] } alloy-rpc-types = { workspace = true, features = ["anvil", "trace"] } alloy-serde.workspace = true diff --git a/crates/anvil/src/config.rs b/crates/anvil/src/config.rs index deb25628487bd..b7d9cdb9f7c56 100644 --- a/crates/anvil/src/config.rs +++ b/crates/anvil/src/config.rs @@ -45,7 +45,7 @@ use foundry_evm::{ use itertools::Itertools; use parking_lot::RwLock; use rand::thread_rng; -use revm::primitives::BlobExcessGasAndPrice; +use revm::context_interface::block::BlobExcessGasAndPrice; use serde_json::{json, Value}; use std::{ fmt::Write as FmtWrite, diff --git a/crates/anvil/src/eth/api.rs b/crates/anvil/src/eth/api.rs index 66405f1d455fa..ab2db1f2bc0a7 100644 --- a/crates/anvil/src/eth/api.rs +++ b/crates/anvil/src/eth/api.rs @@ -90,7 +90,7 @@ use foundry_evm::{ }; use futures::channel::{mpsc::Receiver, oneshot}; use parking_lot::RwLock; -use revm::primitives::Bytecode; +use revm::bytecode::Bytecode; use std::{future::Future, sync::Arc, time::Duration}; /// The client version: `anvil/v{major}.{minor}.{patch}` diff --git a/crates/anvil/src/eth/backend/executor.rs b/crates/anvil/src/eth/backend/executor.rs index c07bfab785e24..de5469ee7d361 100644 --- a/crates/anvil/src/eth/backend/executor.rs +++ b/crates/anvil/src/eth/backend/executor.rs @@ -30,7 +30,7 @@ use foundry_evm::{ traces::CallTraceNode, utils::odyssey_handler_register, }; -use revm::db::WrapDatabaseRef; +use revm::database::WrapDatabaseRef; use std::sync::Arc; /// Represents an executed transaction (transacted on the DB) diff --git a/crates/anvil/src/eth/backend/fork.rs b/crates/anvil/src/eth/backend/fork.rs index 4024428a85047..df0b1a329f62a 100644 --- a/crates/anvil/src/eth/backend/fork.rs +++ b/crates/anvil/src/eth/backend/fork.rs @@ -29,7 +29,7 @@ use parking_lot::{ lock_api::{RwLockReadGuard, RwLockWriteGuard}, RawRwLock, RwLock, }; -use revm::primitives::BlobExcessGasAndPrice; +use revm::context_interface::block::BlobExcessGasAndPrice; use std::{sync::Arc, time::Duration}; use tokio::sync::RwLock as AsyncRwLock; diff --git a/crates/anvil/src/eth/backend/mem/fork_db.rs b/crates/anvil/src/eth/backend/mem/fork_db.rs index be5c3bcd7b32e..5467a73c1302b 100644 --- a/crates/anvil/src/eth/backend/mem/fork_db.rs +++ b/crates/anvil/src/eth/backend/mem/fork_db.rs @@ -14,7 +14,7 @@ use foundry_evm::{ fork::database::ForkDbStateSnapshot, revm::{primitives::BlockEnv, Database}, }; -use revm::{db::DbAccount, DatabaseRef}; +use revm::{database::DbAccount, DatabaseRef}; pub use foundry_evm::fork::database::ForkedDatabase; diff --git a/crates/anvil/src/eth/backend/mem/mod.rs b/crates/anvil/src/eth/backend/mem/mod.rs index 2c2553592b9ca..d17a429bbb19b 100644 --- a/crates/anvil/src/eth/backend/mem/mod.rs +++ b/crates/anvil/src/eth/backend/mem/mod.rs @@ -97,8 +97,9 @@ use futures::channel::mpsc::{unbounded, UnboundedSender}; use op_alloy_consensus::{TxDeposit, DEPOSIT_TX_TYPE_ID}; use parking_lot::{Mutex, RwLock}; use revm::{ - db::WrapDatabaseRef, - primitives::{BlobExcessGasAndPrice, HashMap, OptimismFields, ResultAndState}, + context_interface::{block::BlobExcessGasAndPrice, result::ResultAndState}, + database::WrapDatabaseRef, + primitives::{HashMap, OptimismFields}, }; use std::{ collections::BTreeMap, diff --git a/crates/anvil/src/eth/error.rs b/crates/anvil/src/eth/error.rs index 6666f8021dcfe..ed303fd3c3677 100644 --- a/crates/anvil/src/eth/error.rs +++ b/crates/anvil/src/eth/error.rs @@ -246,8 +246,8 @@ pub enum InvalidTransactionError { /// Thrown when there are no `blob_hashes` in the transaction, and it is an EIP-4844 tx. #[error("`blob_hashes` are required for EIP-4844 transactions")] NoBlobHashes, - #[error("too many blobs in one transaction, have: {0}")] - TooManyBlobs(usize), + #[error("too many blobs in one transaction, have: {0}, max: {1}")] + TooManyBlobs(usize, usize), /// Thrown when there's a blob validation error #[error(transparent)] BlobTransactionValidationError(#[from] alloy_consensus::BlobTransactionValidationError), @@ -265,12 +265,12 @@ pub enum InvalidTransactionError { AuthorizationListNotSupported, /// Forwards error from the revm #[error(transparent)] - Revm(revm::primitives::InvalidTransaction), + Revm(revm::context::result::InvalidTransaction), } -impl From for InvalidTransactionError { - fn from(err: revm::primitives::InvalidTransaction) -> Self { - use revm::primitives::InvalidTransaction; +impl From for InvalidTransactionError { + fn from(err: revm::context::result::InvalidTransaction) -> Self { + use revm::context::result::InvalidTransaction; match err { InvalidTransaction::InvalidChainId => Self::InvalidChainId, InvalidTransaction::PriorityFeeGreaterThanMaxFee => Self::TipAboveFeeCap, @@ -300,7 +300,7 @@ impl From for InvalidTransactionError { InvalidTransaction::BlobCreateTransaction => Self::BlobCreateTransaction, InvalidTransaction::BlobVersionNotSupported => Self::BlobVersionNotSupported, InvalidTransaction::EmptyBlobs => Self::EmptyBlobs, - InvalidTransaction::TooManyBlobs { have } => Self::TooManyBlobs(have), + InvalidTransaction::TooManyBlobs { max, have } => Self::TooManyBlobs(have, max), InvalidTransaction::AuthorizationListNotSupported => { Self::AuthorizationListNotSupported } diff --git a/crates/anvil/src/evm.rs b/crates/anvil/src/evm.rs index 794d2ce853ca9..5394ac3ede21b 100644 --- a/crates/anvil/src/evm.rs +++ b/crates/anvil/src/evm.rs @@ -33,7 +33,7 @@ mod tests { use crate::{evm::inject_precompiles, PrecompileFactory}; use alloy_primitives::Address; use foundry_evm::revm::primitives::{address, Bytes, Precompile, PrecompileResult, SpecId}; - use revm::primitives::PrecompileOutput; + use revm::precompile::PrecompileOutput; #[test] fn build_evm_with_extra_precompiles() { diff --git a/crates/cheatcodes/src/error.rs b/crates/cheatcodes/src/error.rs index b77c889d59ab7..4bb9f1395bf2b 100644 --- a/crates/cheatcodes/src/error.rs +++ b/crates/cheatcodes/src/error.rs @@ -8,7 +8,7 @@ use foundry_config::UnresolvedEnvVarError; use foundry_evm_core::backend::{BackendError, DatabaseError}; use foundry_wallets::error::WalletSignerError; use k256::ecdsa::signature::Error as SignatureError; -use revm::primitives::EVMError; +use revm::context_interface::result::EVMError; use std::{borrow::Cow, fmt}; /// Cheatcode result type. diff --git a/crates/cheatcodes/src/evm.rs b/crates/cheatcodes/src/evm.rs index 807400f602468..728ccd287d5a8 100644 --- a/crates/cheatcodes/src/evm.rs +++ b/crates/cheatcodes/src/evm.rs @@ -18,7 +18,10 @@ use foundry_evm_core::{ use foundry_evm_traces::StackSnapshotType; use itertools::Itertools; use rand::Rng; -use revm::primitives::{Account, Bytecode, SpecId, KECCAK_EMPTY}; +use revm::{ + bytecode::Bytecode, + primitives::{hardfork::SpecId, Account, KECCAK_EMPTY}, +}; use std::{ collections::{btree_map::Entry, BTreeMap}, fmt::Display, diff --git a/crates/cheatcodes/src/inspector.rs b/crates/cheatcodes/src/inspector.rs index 4cbe9c7682124..e7a96b28266d1 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -45,15 +45,16 @@ use itertools::Itertools; use proptest::test_runner::{RngAlgorithm, TestRng, TestRunner}; use rand::Rng; use revm::{ + bytecode::EOF_MAGIC_BYTES, + context::{BlockEnv, CreateScheme, EVMError}, + context_interface::{transaction::SignedAuthorization, EVMError}, interpreter::{ opcode as op, CallInputs, CallOutcome, CallScheme, CallValue, CreateInputs, CreateOutcome, EOFCreateInputs, EOFCreateKind, Gas, InstructionResult, Interpreter, InterpreterAction, InterpreterResult, }, - primitives::{ - BlockEnv, CreateScheme, EVMError, EvmStorageSlot, SignedAuthorization, SpecId, - EOF_MAGIC_BYTES, - }, + primitives::hardfork::SpecId, + state::EvmStorageSlot, EvmContext, InnerEvmContext, Inspector, }; use serde_json::Value; diff --git a/crates/cheatcodes/src/script.rs b/crates/cheatcodes/src/script.rs index 80db1078c5774..186db9205ac20 100644 --- a/crates/cheatcodes/src/script.rs +++ b/crates/cheatcodes/src/script.rs @@ -8,7 +8,7 @@ use alloy_signer_local::PrivateKeySigner; use alloy_sol_types::SolValue; use foundry_wallets::{multi_wallet::MultiWallet, WalletSigner}; use parking_lot::Mutex; -use revm::primitives::{Bytecode, SignedAuthorization}; +use revm::{bytecode::Bytecode, context_interface::transaction::SignedAuthorization}; use std::sync::Arc; impl Cheatcode for broadcast_0Call { diff --git a/crates/evm/evm/src/executors/builder.rs b/crates/evm/evm/src/executors/builder.rs index c371a6550b879..81a7bf5092686 100644 --- a/crates/evm/evm/src/executors/builder.rs +++ b/crates/evm/evm/src/executors/builder.rs @@ -1,6 +1,6 @@ use crate::{executors::Executor, inspectors::InspectorStackBuilder}; use foundry_evm_core::backend::Backend; -use revm::primitives::{Env, EnvWithHandlerCfg, SpecId}; +use revm::primitives::{hardfork::SpecId, Env, EnvWithHandlerCfg}; /// The builder that allows to configure an evm [`Executor`] which a stack of optional /// [`revm::Inspector`]s, such as [`Cheatcodes`]. diff --git a/crates/evm/evm/src/executors/trace.rs b/crates/evm/evm/src/executors/trace.rs index b55517a672d57..43f2fc872edc6 100644 --- a/crates/evm/evm/src/executors/trace.rs +++ b/crates/evm/evm/src/executors/trace.rs @@ -4,7 +4,7 @@ use foundry_compilers::artifacts::EvmVersion; use foundry_config::{utils::evm_spec_id, Chain, Config}; use foundry_evm_core::{backend::Backend, fork::CreateFork, opts::EvmOpts}; use foundry_evm_traces::TraceMode; -use revm::primitives::{Env, SpecId}; +use revm::primitives::{hardfork::SpecId, Env}; use std::ops::{Deref, DerefMut}; /// A default executor with tracing enabled diff --git a/crates/evm/fuzz/src/strategies/param.rs b/crates/evm/fuzz/src/strategies/param.rs index 43dcdae7b00f3..a8834bcef9942 100644 --- a/crates/evm/fuzz/src/strategies/param.rs +++ b/crates/evm/fuzz/src/strategies/param.rs @@ -235,7 +235,7 @@ mod tests { }; use foundry_common::abi::get_func; use foundry_config::FuzzDictionaryConfig; - use revm::db::{CacheDB, EmptyDB}; + use revm::database::{CacheDB, EmptyDB}; #[test] fn can_fuzz_array() { diff --git a/crates/evm/fuzz/src/strategies/state.rs b/crates/evm/fuzz/src/strategies/state.rs index 9bcca6aa16d2e..6004f52fb7211 100644 --- a/crates/evm/fuzz/src/strategies/state.rs +++ b/crates/evm/fuzz/src/strategies/state.rs @@ -9,9 +9,9 @@ use foundry_config::FuzzDictionaryConfig; use foundry_evm_core::utils::StateChangeset; use parking_lot::{lock_api::RwLockReadGuard, RawRwLock, RwLock}; use revm::{ - db::{CacheDB, DatabaseRef, DbAccount}, - interpreter::opcode, - primitives::AccountInfo, + bytecode::opcode::OpCode, + database::{CacheDB, DatabaseRef, DbAccount}, + state::AccountInfo, }; use std::{collections::BTreeMap, fmt, sync::Arc}; diff --git a/crates/evm/traces/src/debug/mod.rs b/crates/evm/traces/src/debug/mod.rs index 1f3fb0b2faedd..54ac0056b0d66 100644 --- a/crates/evm/traces/src/debug/mod.rs +++ b/crates/evm/traces/src/debug/mod.rs @@ -7,7 +7,7 @@ use alloy_dyn_abi::{ use alloy_primitives::U256; use foundry_common::fmt::format_token; use foundry_compilers::artifacts::sourcemap::{Jump, SourceElement}; -use revm::interpreter::OpCode; +use revm::bytecode::opcode::OpCode; use revm_inspectors::tracing::types::{CallTraceStep, DecodedInternalCall, DecodedTraceStep}; pub use sources::{ArtifactData, ContractSources, SourceData}; diff --git a/crates/evm/traces/src/lib.rs b/crates/evm/traces/src/lib.rs index 0d22352ca9e3b..d63bd40ddc239 100644 --- a/crates/evm/traces/src/lib.rs +++ b/crates/evm/traces/src/lib.rs @@ -15,7 +15,7 @@ use foundry_common::{ contracts::{ContractsByAddress, ContractsByArtifact}, shell, }; -use revm::interpreter::OpCode; +use revm::bytecode::opcode::OpCode; use revm_inspectors::tracing::{ types::{DecodedTraceStep, TraceMemberOrder}, OpcodeFilter, diff --git a/crates/forge/src/multi_runner.rs b/crates/forge/src/multi_runner.rs index 8ecb0e63a6152..0e071086199df 100644 --- a/crates/forge/src/multi_runner.rs +++ b/crates/forge/src/multi_runner.rs @@ -26,7 +26,7 @@ use foundry_evm::{ }; use foundry_linking::{LinkOutput, Linker}; use rayon::prelude::*; -use revm::primitives::SpecId; +use revm::primitives::hardfork::SpecId; use std::{ borrow::Borrow, collections::BTreeMap, From a83a1cab4134b12dd0ba444c5b8e4517b22c5707 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 18:08:36 +0100 Subject: [PATCH 09/23] start updating imports --- Cargo.lock | 394 ++++++++++++++++++++++++++++++----- Cargo.toml | 7 +- crates/common/fmt/Cargo.toml | 2 +- crates/common/fmt/src/eof.rs | 7 +- crates/config/Cargo.toml | 2 +- crates/config/src/lib.rs | 2 +- crates/config/src/utils.rs | 2 +- crates/evm/core/Cargo.toml | 1 - crates/verify/Cargo.toml | 2 +- crates/verify/src/utils.rs | 8 +- crates/verify/src/verify.rs | 2 +- 11 files changed, 365 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b533749fd15e..e0abefb369af9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -184,8 +184,6 @@ checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ "alloy-primitives", "alloy-rlp", - "arbitrary", - "rand 0.8.5", "serde", ] @@ -197,9 +195,7 @@ checksum = "9b15b13d38b366d01e818fe8e710d4d702ef7499eacd44926a06171dd9585d0c" dependencies = [ "alloy-primitives", "alloy-rlp", - "arbitrary", "k256", - "rand 0.8.5", "serde", "thiserror 2.0.12", ] @@ -222,7 +218,7 @@ dependencies = [ "either", "once_cell", "serde", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -996,7 +992,7 @@ dependencies = [ "op-alloy-rpc-types", "parking_lot", "rand 0.8.5", - "revm", + "revm 20.0.0-alpha.7", "serde", "serde_json", "tempfile", @@ -1026,7 +1022,7 @@ dependencies = [ "foundry-evm", "op-alloy-consensus", "rand 0.8.5", - "revm", + "revm 20.0.0-alpha.7", "serde", "serde_json", "thiserror 2.0.12", @@ -1210,6 +1206,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.6" @@ -1527,7 +1529,7 @@ dependencies = [ "http 1.2.0", "once_cell", "percent-encoding", - "sha2", + "sha2 0.10.8", "time", "tracing", ] @@ -1879,6 +1881,22 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -1891,7 +1909,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" dependencies = [ - "arbitrary", "serde", ] @@ -1908,6 +1925,15 @@ dependencies = [ "wyz", ] +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -1960,7 +1986,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ - "sha2", + "sha2 0.10.8", "tinyvec", ] @@ -2166,7 +2192,7 @@ dependencies = [ "foundry-evm", "regex", "reqwest", - "revm", + "revm 20.0.0-alpha.7", "rustyline", "semver 1.0.26", "serde", @@ -2354,7 +2380,7 @@ dependencies = [ "hmac", "k256", "serde", - "sha2", + "sha2 0.10.8", "thiserror 1.0.69", ] @@ -2370,7 +2396,7 @@ dependencies = [ "once_cell", "pbkdf2 0.12.2", "rand 0.8.5", - "sha2", + "sha2 0.10.8", "thiserror 1.0.69", ] @@ -2388,7 +2414,7 @@ dependencies = [ "generic-array", "ripemd", "serde", - "sha2", + "sha2 0.10.8", "sha3", "thiserror 1.0.69", ] @@ -2808,6 +2834,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "derive_arbitrary" version = "1.4.1" @@ -2921,7 +2958,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "const-oid", "crypto-common", "subtle", @@ -3198,7 +3235,7 @@ dependencies = [ "scrypt", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "sha3", "thiserror 1.0.69", "uuid 0.8.2", @@ -3602,7 +3639,7 @@ dependencies = [ "itertools 0.14.0", "regex", "reqwest", - "revm-primitives", + "revm 20.0.0-alpha.7", "semver 1.0.26", "serde", "serde_json", @@ -3675,7 +3712,7 @@ dependencies = [ "parking_lot", "proptest", "rand 0.8.5", - "revm", + "revm 20.0.0-alpha.7", "revm-inspectors", "semver 1.0.26", "serde", @@ -3801,7 +3838,7 @@ dependencies = [ "chrono", "comfy-table", "foundry-macros", - "revm-primitives", + "revm 20.0.0-alpha.7", "serde", "serde_json", "similar-asserts", @@ -3833,7 +3870,7 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "solar-parse", "svm-rs", "svm-rs-builds", @@ -3937,7 +3974,7 @@ dependencies = [ "path-slash", "regex", "reqwest", - "revm-primitives", + "revm 20.0.0-alpha.7", "semver 1.0.26", "serde", "serde_json", @@ -3965,7 +4002,7 @@ dependencies = [ "foundry-evm-core", "foundry-evm-traces", "ratatui", - "revm", + "revm 20.0.0-alpha.7", "revm-inspectors", "serde", "tracing", @@ -3991,7 +4028,7 @@ dependencies = [ "indicatif", "parking_lot", "proptest", - "revm", + "revm 20.0.0-alpha.7", "revm-inspectors", "serde", "thiserror 2.0.12", @@ -4034,7 +4071,7 @@ dependencies = [ "futures", "itertools 0.14.0", "parking_lot", - "revm", + "revm 20.0.0-alpha.7", "revm-inspectors", "serde", "serde_json", @@ -4054,7 +4091,7 @@ dependencies = [ "foundry-compilers", "foundry-evm-core", "rayon", - "revm", + "revm 20.0.0-alpha.7", "semver 1.0.26", "tracing", ] @@ -4077,7 +4114,7 @@ dependencies = [ "parking_lot", "proptest", "rand 0.8.5", - "revm", + "revm 20.0.0-alpha.7", "serde", "thiserror 2.0.12", "tracing", @@ -4101,7 +4138,7 @@ dependencies = [ "futures", "itertools 0.14.0", "rayon", - "revm", + "revm 20.0.0-alpha.7", "revm-inspectors", "serde", "serde_json", @@ -4124,7 +4161,7 @@ dependencies = [ "eyre", "futures", "parking_lot", - "revm", + "revm 19.6.0", "serde", "serde_json", "thiserror 2.0.12", @@ -4817,6 +4854,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + [[package]] name = "hidapi-rusb" version = "1.3.3" @@ -5593,7 +5639,7 @@ dependencies = [ "elliptic-curve", "once_cell", "serdect", - "sha2", + "sha2 0.10.8", "signature", ] @@ -5718,6 +5764,52 @@ dependencies = [ "redox_syscall", ] +[[package]] +name = "libsecp256k1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139" +dependencies = [ + "arrayref", + "base64 0.22.1", + "digest 0.9.0", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + [[package]] name = "libusb1-sys" version = "0.7.0" @@ -5884,7 +5976,7 @@ dependencies = [ "regex", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "shlex", "tempfile", "toml 0.5.11", @@ -6354,6 +6446,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "opener" version = "0.7.2" @@ -6405,7 +6503,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -6586,7 +6684,7 @@ checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -6617,6 +6715,7 @@ checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", "phf_shared", + "serde", ] [[package]] @@ -7410,18 +7509,141 @@ dependencies = [ "auto_impl", "cfg-if", "dyn-clone", - "once_cell", - "revm-interpreter", - "revm-precompile", + "revm-interpreter 15.2.0", + "revm-precompile 16.1.0", + "serde", + "serde_json", +] + +[[package]] +name = "revm" +version = "20.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4502328b029ff68ddbbe42994faf7384c8aac0a47d53c3323ea52c7696fe2154" +dependencies = [ + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database", + "revm-database-interface", + "revm-handler", + "revm-inspector", + "revm-interpreter 16.0.0-alpha.7", + "revm-precompile 17.0.0-alpha.7", + "revm-primitives 16.0.0-alpha.5", + "revm-state", +] + +[[package]] +name = "revm-bytecode" +version = "1.0.0-alpha.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f018d50979559e6c0fcad3f0e5c5bd54e4ebff3d6f0d4da82ac83fe7f5bc3ac0" +dependencies = [ + "bitvec", + "phf", + "revm-primitives 16.0.0-alpha.5", + "serde", +] + +[[package]] +name = "revm-context" +version = "1.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "247e37d3df5918952a004f637b6b6a018daee83163c540f8b2c3b14ae05e9e78" +dependencies = [ + "cfg-if", + "derive-where", + "revm-bytecode", + "revm-context-interface", + "revm-database-interface", + "revm-primitives 16.0.0-alpha.5", + "revm-state", + "serde", +] + +[[package]] +name = "revm-context-interface" +version = "1.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef08da7b423908efbfd5733bb3fb08916319fdec0a879f6d1fb5c8ae1994b239" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "auto_impl", + "revm-database-interface", + "revm-primitives 16.0.0-alpha.5", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database" +version = "1.0.0-alpha.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefe6672af9849f9fd6ef836aff4b32020952992454e66597d32da68341fb89e" +dependencies = [ + "alloy-eips", + "auto_impl", + "revm-bytecode", + "revm-database-interface", + "revm-primitives 16.0.0-alpha.5", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database-interface" +version = "1.0.0-alpha.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8b4ab0ff9891593c719abdfadc8968450e1e2e0a8320339dd6968813a23db9d" +dependencies = [ + "auto_impl", + "revm-primitives 16.0.0-alpha.5", + "revm-state", + "serde", +] + +[[package]] +name = "revm-handler" +version = "1.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12d95e6f9ccc5e9129d2ee3672125f0e1d7cc4c6a488d99818f7c6559e2bf4bc" +dependencies = [ + "auto_impl", + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database-interface", + "revm-interpreter 16.0.0-alpha.7", + "revm-precompile 17.0.0-alpha.7", + "revm-primitives 16.0.0-alpha.5", + "revm-state", + "serde", +] + +[[package]] +name = "revm-inspector" +version = "1.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5289f17f28b3ab3be2d1be9e604eca7a1a554e7da336ddbe8860798e2bea88bc" +dependencies = [ + "auto_impl", + "revm-context", + "revm-database-interface", + "revm-handler", + "revm-interpreter 16.0.0-alpha.7", + "revm-primitives 16.0.0-alpha.5", + "revm-state", "serde", "serde_json", ] [[package]] name = "revm-inspectors" -version = "0.16.0" +version = "0.17.0-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a43423d81f4bef634469bfb2d9ebe36a9ea9167f20ab3a7d1ff1e05fa63099" +checksum = "b1504e2851a11562fb350a9f408e5783351650aef11790aea0b0d0d9ab961c40" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -7429,7 +7651,7 @@ dependencies = [ "alloy-sol-types", "anstyle", "colorchoice", - "revm", + "revm 20.0.0-alpha.7", "serde", "serde_json", "thiserror 2.0.12", @@ -7441,7 +7663,19 @@ version = "15.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dcab7ef2064057acfc84731205f4bc77f4ec1b35630800b26ff6a185731c5ab" dependencies = [ - "revm-primitives", + "revm-primitives 15.2.0", + "serde", +] + +[[package]] +name = "revm-interpreter" +version = "16.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a97985e55a551d5d86c07a4469ecdd3b8c0d793cb330bb4a4f747e1ee0af864" +dependencies = [ + "revm-bytecode", + "revm-context-interface", + "revm-primitives 16.0.0-alpha.5", "serde", ] @@ -7450,18 +7684,37 @@ name = "revm-precompile" version = "16.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6caa1a7ff2cc4a09a263fcf9de99151706f323d30f33d519ed329f017a02b046" +dependencies = [ + "aurora-engine-modexp", + "c-kzg", + "cfg-if", + "k256", + "once_cell", + "revm-primitives 15.2.0", + "ripemd", + "secp256k1 0.29.1", + "sha2 0.10.8", + "substrate-bn", +] + +[[package]] +name = "revm-precompile" +version = "17.0.0-alpha.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d46dad4a7db8e6de9015f2419c160b41fa5e721345c1678a66db6d9f5ef619" dependencies = [ "aurora-engine-modexp", "blst", "c-kzg", "cfg-if", "k256", + "libsecp256k1", "once_cell", "p256", - "revm-primitives", + "revm-primitives 16.0.0-alpha.5", "ripemd", - "secp256k1", - "sha2", + "secp256k1 0.30.0", + "sha2 0.10.8", "substrate-bn", ] @@ -7485,6 +7738,29 @@ dependencies = [ "serde", ] +[[package]] +name = "revm-primitives" +version = "16.0.0-alpha.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b385df11c27aa339c2d80cb22b8d5621ad95e7464cd319c8b5343448ea8ad673" +dependencies = [ + "alloy-primitives", + "enumn", + "serde", +] + +[[package]] +name = "revm-state" +version = "1.0.0-alpha.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217e158f471dd39065b14db956c3d40437f311163efd05254dc9a66b9dc426ba" +dependencies = [ + "bitflags 2.9.0", + "revm-bytecode", + "revm-primitives 16.0.0-alpha.5", + "serde", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -7901,7 +8177,7 @@ dependencies = [ "hmac", "pbkdf2 0.11.0", "salsa20", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -7945,6 +8221,17 @@ dependencies = [ "secp256k1-sys", ] +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys", +] + [[package]] name = "secp256k1-sys" version = "0.10.1" @@ -8223,6 +8510,19 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" +[[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", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "sha2" version = "0.10.8" @@ -8577,7 +8877,7 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "thiserror 2.0.12", "tokio", "toml_edit", @@ -8814,7 +9114,7 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "tempfile", "thiserror 2.0.12", "url", @@ -9519,7 +9819,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f" dependencies = [ "cc", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -10125,7 +10425,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 1aaa3305ac812..f1c4d52bce60b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -195,14 +195,15 @@ solang-parser = "=0.3.3" solar-parse = { version = "=0.1.1", default-features = false } ## revm -revm = { version = "19.4.0", default-features = false } -revm-primitives = { version = "15.1.0", default-features = false } -revm-inspectors = { version = "0.16.0", features = ["serde"] } +revm = { version = "20.0.0-alpha.7", default-features = false } +revm-primitives = { version = "16.0.0-alpha.5", default-features = false } +revm-inspectors = { version = "0.17.0-alpha.1", features = ["serde"] } ## alloy alloy-consensus = { version = "0.12.1", default-features = false } alloy-contract = { version = "0.12.1", default-features = false } alloy-eips = { version = "0.12.1", default-features = false } +alloy-evm = { version = "0.1.0-alpha.3", default-features = false } alloy-genesis = { version = "0.12.1", default-features = false } alloy-json-rpc = { version = "0.12.1", default-features = false } alloy-network = { version = "0.12.1", default-features = false } diff --git a/crates/common/fmt/Cargo.toml b/crates/common/fmt/Cargo.toml index 2a56b3b10e010..cf4aa5a7ba765 100644 --- a/crates/common/fmt/Cargo.toml +++ b/crates/common/fmt/Cargo.toml @@ -25,7 +25,7 @@ alloy-serde.workspace = true serde.workspace = true serde_json.workspace = true chrono.workspace = true -revm-primitives.workspace = true +revm.workspace = true comfy-table.workspace = true yansi.workspace = true diff --git a/crates/common/fmt/src/eof.rs b/crates/common/fmt/src/eof.rs index 1ae9de70b6b3a..50bfe06f67256 100644 --- a/crates/common/fmt/src/eof.rs +++ b/crates/common/fmt/src/eof.rs @@ -1,5 +1,5 @@ use comfy_table::{modifiers::UTF8_ROUND_CORNERS, ContentArrangement, Table}; -use revm_primitives::{ +use revm::bytecode::{ eof::{EofBody, EofHeader}, Eof, }; @@ -16,8 +16,7 @@ pub fn pretty_eof(eof: &Eof) -> Result { sum_code_sizes: _, sum_container_sizes: _, }, - body: - EofBody { types_section, code_section, container_section, data_section, is_data_filled: _ }, + body: EofBody { code_info, code_section, container_section, data_section, .. }, raw: _, } = eof; @@ -43,7 +42,7 @@ pub fn pretty_eof(eof: &Eof) -> Result { table.apply_modifier(UTF8_ROUND_CORNERS); table.set_content_arrangement(ContentArrangement::Dynamic); table.set_header(vec!["", "Inputs", "Outputs", "Max stack height", "Code"]); - for (idx, (code, type_section)) in code_section.iter().zip(types_section).enumerate() { + for (idx, (code, type_section)) in code_section.iter().zip(code_info).enumerate() { table.add_row(vec![ &idx.to_string(), &type_section.inputs.to_string(), diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index 2d2b80b4ad695..0c7d62ab1a326 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -19,7 +19,7 @@ foundry-compilers = { workspace = true, features = ["svm-solc"] } alloy-chains = { workspace = true, features = ["serde"] } alloy-primitives = { workspace = true, features = ["serde"] } -revm-primitives.workspace = true +revm.workspace = true solar-parse.workspace = true diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index f58b49ff1c338..4360bdc7a9747 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -39,7 +39,7 @@ use foundry_compilers::{ RestrictionsWithVersion, VyperLanguage, }; use regex::Regex; -use revm_primitives::{map::AddressHashMap, FixedBytes, SpecId}; +use revm::primitives::{hardfork::SpecId, map::AddressHashMap, FixedBytes}; use semver::Version; use serde::{Deserialize, Serialize, Serializer}; use std::{ diff --git a/crates/config/src/utils.rs b/crates/config/src/utils.rs index 86b25d1043797..bcb20ab698afb 100644 --- a/crates/config/src/utils.rs +++ b/crates/config/src/utils.rs @@ -7,7 +7,7 @@ use foundry_compilers::artifacts::{ remappings::{Remapping, RemappingError}, EvmVersion, }; -use revm_primitives::SpecId; +use revm::primitives::hardfork::SpecId; use serde::{de::Error, Deserialize, Deserializer}; use std::{ io, diff --git a/crates/evm/core/Cargo.toml b/crates/evm/core/Cargo.toml index 5730e6fb3ab4a..6eb8417cee1dd 100644 --- a/crates/evm/core/Cargo.toml +++ b/crates/evm/core/Cargo.toml @@ -43,7 +43,6 @@ revm = { workspace = true, features = [ "optional_block_gas_limit", "optional_no_base_fee", "arbitrary", - "optimism", "c-kzg", "blst", ] } diff --git a/crates/verify/Cargo.toml b/crates/verify/Cargo.toml index 443d44cc110a4..4060f0975f881 100644 --- a/crates/verify/Cargo.toml +++ b/crates/verify/Cargo.toml @@ -23,7 +23,7 @@ alloy-json-abi.workspace = true alloy-primitives.workspace = true alloy-rpc-types.workspace = true alloy-dyn-abi.workspace = true -revm-primitives.workspace = true +revm.workspace = true serde.workspace = true eyre.workspace = true alloy-provider.workspace = true diff --git a/crates/verify/src/utils.rs b/crates/verify/src/utils.rs index 132f0218f8d79..e71c497e88535 100644 --- a/crates/verify/src/utils.rs +++ b/crates/verify/src/utils.rs @@ -17,10 +17,12 @@ use foundry_evm::{ traces::TraceMode, }; use reqwest::Url; -use revm_primitives::{ - db::Database, +use revm::primitives::{ + bytecode::Bytecode, + database::Database, env::{EnvWithHandlerCfg, HandlerCfg}, - Bytecode, Env, SpecId, TxKind, + hardfork::SpecId, + Env, TxKind, }; use semver::Version; use serde::{Deserialize, Serialize}; diff --git a/crates/verify/src/verify.rs b/crates/verify/src/verify.rs index 71bfc60cc1673..0489118fc930a 100644 --- a/crates/verify/src/verify.rs +++ b/crates/verify/src/verify.rs @@ -19,7 +19,7 @@ use foundry_compilers::{artifacts::EvmVersion, compilers::solc::Solc, info::Cont use foundry_config::{figment, impl_figment_convert, impl_figment_convert_cast, Config, SolcReq}; use itertools::Itertools; use reqwest::Url; -use revm_primitives::HashSet; +use revm::primitives::HashSet; use semver::BuildMetadata; use std::path::PathBuf; From bfc6848ffe4962fe5002c99a788c05b7c23081c8 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 18:23:02 +0100 Subject: [PATCH 10/23] continue fixing imports --- Cargo.toml | 5 +---- crates/cheatcodes/src/error.rs | 2 +- crates/evm/core/Cargo.toml | 1 + crates/evm/core/src/backend/cow.rs | 9 ++++----- crates/evm/core/src/backend/error.rs | 2 +- crates/evm/core/src/backend/in_memory_db.rs | 6 ++++-- crates/evm/core/src/backend/mod.rs | 11 +++++++---- crates/evm/core/src/backend/snapshot.rs | 3 ++- crates/evm/core/src/buffer.rs | 2 +- crates/evm/core/src/fork/database.rs | 5 +++-- crates/evm/core/src/fork/init.rs | 16 ++++++++-------- crates/evm/core/src/ic.rs | 7 ++----- crates/evm/core/src/lib.rs | 2 +- crates/evm/core/src/opcodes.rs | 2 +- crates/evm/core/src/opts.rs | 2 +- crates/evm/core/src/precompiles.rs | 7 +++---- crates/evm/core/src/utils.rs | 6 +++--- crates/verify/src/bytecode.rs | 2 +- 18 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f1c4d52bce60b..ae71751413d8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -116,10 +116,8 @@ alloy-sol-types.opt-level = 3 hashbrown.opt-level = 3 foldhash.opt-level = 3 keccak.opt-level = 3 -revm-interpreter.opt-level = 3 -revm-precompile.opt-level = 3 -revm-primitives.opt-level = 3 revm.opt-level = 3 +revm-interpreter.opt-level = 3 ruint.opt-level = 3 sha2.opt-level = 3 sha3.opt-level = 3 @@ -196,7 +194,6 @@ solar-parse = { version = "=0.1.1", default-features = false } ## revm revm = { version = "20.0.0-alpha.7", default-features = false } -revm-primitives = { version = "16.0.0-alpha.5", default-features = false } revm-inspectors = { version = "0.17.0-alpha.1", features = ["serde"] } ## alloy diff --git a/crates/cheatcodes/src/error.rs b/crates/cheatcodes/src/error.rs index b77c889d59ab7..4bb9f1395bf2b 100644 --- a/crates/cheatcodes/src/error.rs +++ b/crates/cheatcodes/src/error.rs @@ -8,7 +8,7 @@ use foundry_config::UnresolvedEnvVarError; use foundry_evm_core::backend::{BackendError, DatabaseError}; use foundry_wallets::error::WalletSignerError; use k256::ecdsa::signature::Error as SignatureError; -use revm::primitives::EVMError; +use revm::context_interface::result::EVMError; use std::{borrow::Cow, fmt}; /// Cheatcode result type. diff --git a/crates/evm/core/Cargo.toml b/crates/evm/core/Cargo.toml index 6eb8417cee1dd..d53a16764b74b 100644 --- a/crates/evm/core/Cargo.toml +++ b/crates/evm/core/Cargo.toml @@ -45,6 +45,7 @@ revm = { workspace = true, features = [ "arbitrary", "c-kzg", "blst", + "secp256r1", ] } revm-inspectors.workspace = true diff --git a/crates/evm/core/src/backend/cow.rs b/crates/evm/core/src/backend/cow.rs index 3ffb9fc84f3cd..48c3143964c1a 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -14,11 +14,10 @@ use alloy_rpc_types::TransactionRequest; use eyre::WrapErr; use foundry_fork_db::DatabaseError; use revm::{ - db::DatabaseRef, - primitives::{ - Account, AccountInfo, Bytecode, Env, EnvWithHandlerCfg, HashMap as Map, ResultAndState, - SpecId, - }, + bytecode::Bytecode, + database::DatabaseRef, + primitives::{hardfork::SpecId, Env, EnvWithHandlerCfg, HashMap as Map, ResultAndState}, + state::{Account, AccountInfo}, Database, DatabaseCommit, JournaledState, }; use std::{borrow::Cow, collections::BTreeMap}; diff --git a/crates/evm/core/src/backend/error.rs b/crates/evm/core/src/backend/error.rs index 1dabeafded152..7ed1e42fe9b3b 100644 --- a/crates/evm/core/src/backend/error.rs +++ b/crates/evm/core/src/backend/error.rs @@ -1,6 +1,6 @@ use alloy_primitives::Address; pub use foundry_fork_db::{DatabaseError, DatabaseResult}; -use revm::primitives::EVMError; +use revm::context_interface::result::EVMError; use std::convert::Infallible; pub type BackendResult = Result; diff --git a/crates/evm/core/src/backend/in_memory_db.rs b/crates/evm/core/src/backend/in_memory_db.rs index 4e90bfec0ae05..b209c6dcf7836 100644 --- a/crates/evm/core/src/backend/in_memory_db.rs +++ b/crates/evm/core/src/backend/in_memory_db.rs @@ -4,8 +4,10 @@ use crate::state_snapshot::StateSnapshots; use alloy_primitives::{Address, B256, U256}; use foundry_fork_db::DatabaseError; use revm::{ - db::{CacheDB, DatabaseRef, EmptyDB}, - primitives::{Account, AccountInfo, Bytecode, HashMap as Map}, + bytecode::Bytecode, + database::{CacheDB, DatabaseRef, EmptyDB}, + primitives::HashMap as Map, + state::{Account, AccountInfo}, Database, DatabaseCommit, }; diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 299e747231e16..a7a0285d7b4a0 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -15,13 +15,16 @@ use eyre::Context; use foundry_common::{is_known_system_sender, SYSTEM_TRANSACTION_TYPE}; pub use foundry_fork_db::{cache::BlockchainDbMeta, BlockchainDb, SharedBackend}; use revm::{ - db::{CacheDB, DatabaseRef}, - inspectors::NoOpInspector, + bytecode::Bytecode, + context_interface::{block::BlobExcessGasAndPrice, result::ResultAndState}, + database::{CacheDB, DatabaseRef}, + inspector::NoOpInspector, precompile::{PrecompileSpecId, Precompiles}, primitives::{ - Account, AccountInfo, BlobExcessGasAndPrice, Bytecode, Env, EnvWithHandlerCfg, EvmState, - EvmStorageSlot, HashMap as Map, Log, ResultAndState, SpecId, KECCAK_EMPTY, + hardfork::SpecId, Env, EnvWithHandlerCfg, EvmState, EvmStorageSlot, HashMap as Map, Log, + KECCAK_EMPTY, }, + state::{Account, AccountInfo}, Database, DatabaseCommit, JournaledState, }; use std::{ diff --git a/crates/evm/core/src/backend/snapshot.rs b/crates/evm/core/src/backend/snapshot.rs index 36c4657c2618c..30f9e444d25d8 100644 --- a/crates/evm/core/src/backend/snapshot.rs +++ b/crates/evm/core/src/backend/snapshot.rs @@ -1,6 +1,7 @@ use alloy_primitives::{map::AddressHashMap, B256, U256}; use revm::{ - primitives::{AccountInfo, Env, HashMap}, + primitives::{Env, HashMap}, + state::AccountInfo, JournaledState, }; use serde::{Deserialize, Serialize}; diff --git a/crates/evm/core/src/buffer.rs b/crates/evm/core/src/buffer.rs index 1db7420d78736..5cce0a91ad97b 100644 --- a/crates/evm/core/src/buffer.rs +++ b/crates/evm/core/src/buffer.rs @@ -1,5 +1,5 @@ use alloy_primitives::U256; -use revm::interpreter::opcode; +use revm::bytecode::opcode; /// Used to keep track of which buffer is currently active to be drawn by the debugger. #[derive(Debug, PartialEq)] diff --git a/crates/evm/core/src/fork/database.rs b/crates/evm/core/src/fork/database.rs index 53595e451fd2f..6b4830aefb1bb 100644 --- a/crates/evm/core/src/fork/database.rs +++ b/crates/evm/core/src/fork/database.rs @@ -9,8 +9,9 @@ use alloy_rpc_types::BlockId; use foundry_fork_db::{BlockchainDb, DatabaseError, SharedBackend}; use parking_lot::Mutex; use revm::{ - db::{CacheDB, DatabaseRef}, - primitives::{Account, AccountInfo, Bytecode}, + bytecode::Bytecode, + database::{CacheDB, DatabaseRef}, + state::{Account, AccountInfo}, Database, DatabaseCommit, }; use std::sync::Arc; diff --git a/crates/evm/core/src/fork/init.rs b/crates/evm/core/src/fork/init.rs index c84cd945c4ded..4e05c048fd97b 100644 --- a/crates/evm/core/src/fork/init.rs +++ b/crates/evm/core/src/fork/init.rs @@ -1,11 +1,11 @@ use crate::utils::apply_chain_and_block_specific_env_changes; use alloy_consensus::BlockHeader; -use alloy_primitives::{Address, U256}; +use alloy_primitives::Address; use alloy_provider::{network::BlockResponse, Network, Provider}; use alloy_rpc_types::BlockNumberOrTag; use eyre::WrapErr; use foundry_common::NON_ARCHIVE_NODE_WARNING; -use revm::primitives::{BlockEnv, CfgEnv, Env, TxEnv}; +use revm::context::{BlockEnv, CfgEnv, Env, TxEnv}; /// Initializes a REVM block environment based on a forked /// ethereum provider. @@ -59,18 +59,18 @@ pub async fn environment>( let mut env = Env { cfg, block: BlockEnv { - number: U256::from(block.header().number()), - timestamp: U256::from(block.header().timestamp()), - coinbase: block.header().beneficiary(), + number: block.header().number(), + timestamp: block.header().timestamp(), + beneficiary: block.header().beneficiary(), difficulty: block.header().difficulty(), prevrandao: block.header().mix_hash(), - basefee: U256::from(block.header().base_fee_per_gas().unwrap_or_default()), - gas_limit: U256::from(block.header().gas_limit()), + basefee: block.header().base_fee_per_gas().unwrap_or_default(), + gas_limit: block.header().gas_limit(), ..Default::default() }, tx: TxEnv { caller: origin, - gas_price: U256::from(gas_price.unwrap_or(fork_gas_price)), + gas_price: gas_price.unwrap_or(fork_gas_price), chain_id: Some(override_chain_id.unwrap_or(rpc_chain_id)), gas_limit: block.header().gas_limit() as u64, ..Default::default() diff --git a/crates/evm/core/src/ic.rs b/crates/evm/core/src/ic.rs index 80fef528c9ac5..4e37322a64e99 100644 --- a/crates/evm/core/src/ic.rs +++ b/crates/evm/core/src/ic.rs @@ -1,9 +1,6 @@ use alloy_primitives::map::rustc_hash::FxHashMap; use eyre::Result; -use revm::interpreter::{ - opcode::{PUSH0, PUSH1, PUSH32}, - OpCode, -}; +use revm::bytecode::opcode::{OpCode, PUSH0, PUSH1, PUSH32}; use revm_inspectors::opcode::immediate_size; use serde::Serialize; @@ -117,7 +114,7 @@ pub fn decode_instructions(code: &[u8]) -> Result>> { while pc < code.len() { let op = OpCode::new(code[pc]); pc += 1; - let immediate_size = op.map(|op| immediate_size(op, &code[pc..])).unwrap_or(0) as usize; + let immediate_size = op.map(|op| op.info().immediate_size()).unwrap_or(0) as usize; if pc + immediate_size > code.len() { eyre::bail!("incomplete sequence of bytecode"); diff --git a/crates/evm/core/src/lib.rs b/crates/evm/core/src/lib.rs index cf678551e21d6..e6155ef957534 100644 --- a/crates/evm/core/src/lib.rs +++ b/crates/evm/core/src/lib.rs @@ -9,7 +9,7 @@ use crate::constants::DEFAULT_CREATE2_DEPLOYER; use alloy_primitives::Address; use auto_impl::auto_impl; use backend::DatabaseExt; -use revm::{inspectors::NoOpInspector, interpreter::CreateInputs, EvmContext, Inspector}; +use revm::{inspector::NoOpInspector, interpreter::CreateInputs, EvmContext, Inspector}; use revm_inspectors::access_list::AccessListInspector; #[macro_use] diff --git a/crates/evm/core/src/opcodes.rs b/crates/evm/core/src/opcodes.rs index 3251036c78f7a..7fad7ca5f3a3e 100644 --- a/crates/evm/core/src/opcodes.rs +++ b/crates/evm/core/src/opcodes.rs @@ -1,6 +1,6 @@ //! Opcode utils -use revm::interpreter::OpCode; +use revm::bytecode::opcode::OpCode; /// Returns true if the opcode modifies memory. /// diff --git a/crates/evm/core/src/opts.rs b/crates/evm/core/src/opts.rs index d135cceb904f9..51c47d9af4dd3 100644 --- a/crates/evm/core/src/opts.rs +++ b/crates/evm/core/src/opts.rs @@ -5,7 +5,7 @@ use alloy_provider::{network::AnyRpcBlock, Provider}; use eyre::WrapErr; use foundry_common::{provider::ProviderBuilder, ALCHEMY_FREE_TIER_CUPS}; use foundry_config::{Chain, Config, GasLimit}; -use revm::primitives::{BlockEnv, CfgEnv, TxEnv}; +use revm::context::{BlockEnv, CfgEnv, TxEnv}; use serde::{Deserialize, Serialize}; use std::fmt::Write; use url::Url; diff --git a/crates/evm/core/src/precompiles.rs b/crates/evm/core/src/precompiles.rs index 7e9441f4ac99a..83ab9ad69d33f 100644 --- a/crates/evm/core/src/precompiles.rs +++ b/crates/evm/core/src/precompiles.rs @@ -1,7 +1,6 @@ use alloy_primitives::{address, Address, Bytes, B256}; -use revm::{ - precompile::{secp256r1::p256_verify as revm_p256_verify, PrecompileWithAddress}, - primitives::{Precompile, PrecompileResult}, +use revm::precompile::{ + secp256r1::p256_verify as revm_p256_verify, PrecompileResult, PrecompileWithAddress, }; /// The ECRecover precompile address. @@ -70,4 +69,4 @@ pub fn p256_verify(input: &Bytes, gas_limit: u64) -> PrecompileResult { /// [RIP-7212](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md) secp256r1 precompile. pub const ODYSSEY_P256: PrecompileWithAddress = - PrecompileWithAddress(ODYSSEY_P256_ADDRESS, Precompile::Standard(p256_verify)); + PrecompileWithAddress(ODYSSEY_P256_ADDRESS, p256_verify); diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index f66f458387762..e650b3039c5f0 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -13,14 +13,14 @@ use foundry_common::is_impersonated_tx; use foundry_config::NamedChain; use foundry_fork_db::DatabaseError; use revm::{ - handler::register::EvmHandler, + context::{result::EVMError, CreateScheme}, + handler::{register::EvmHandler, FrameOrResult, FrameResult}, interpreter::{ return_ok, CallInputs, CallOutcome, CallScheme, CallValue, CreateInputs, CreateOutcome, Gas, InstructionResult, InterpreterResult, }, precompile::secp256r1::P256VERIFY, - primitives::{CreateScheme, EVMError, HandlerCfg, SpecId, KECCAK_EMPTY}, - FrameOrResult, FrameResult, + primitives::{hardfork::SpecId, HandlerCfg, KECCAK_EMPTY}, }; use std::{cell::RefCell, rc::Rc, sync::Arc}; diff --git a/crates/verify/src/bytecode.rs b/crates/verify/src/bytecode.rs index c3ddd3c4df867..85a7fddab64e0 100644 --- a/crates/verify/src/bytecode.rs +++ b/crates/verify/src/bytecode.rs @@ -23,7 +23,7 @@ use foundry_common::shell; use foundry_compilers::{artifacts::EvmVersion, info::ContractInfo}; use foundry_config::{figment, impl_figment_convert, Config}; use foundry_evm::{constants::DEFAULT_CREATE2_DEPLOYER, utils::configure_tx_req_env}; -use revm_primitives::{AccountInfo, TxKind}; +use revm::{primitives::TxKind, state::AccountInfo}; use std::path::PathBuf; impl_figment_convert!(VerifyBytecodeArgs); From 5dad168ec379cb35be628bda29fb919b963016a1 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 18:29:44 +0100 Subject: [PATCH 11/23] fix imports, add foundry-fork-db patch --- Cargo.toml | 3 +++ crates/evm/evm/src/executors/mod.rs | 2 +- crates/evm/evm/src/executors/trace.rs | 2 +- crates/evm/evm/src/inspectors/stack.rs | 8 ++++---- crates/evm/fuzz/src/strategies/param.rs | 2 +- crates/evm/fuzz/src/strategies/state.rs | 6 +++--- crates/evm/traces/src/debug/mod.rs | 2 +- crates/evm/traces/src/lib.rs | 2 +- crates/forge/src/multi_runner.rs | 2 +- 9 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ae71751413d8a..4485fadb15184 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -344,3 +344,6 @@ yansi = { version = "1.0", features = ["detect-tty", "detect-env"] } # alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" } # alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" } # alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "7fab7ee" } + +## foundry +foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "c168d11" } diff --git a/crates/evm/evm/src/executors/mod.rs b/crates/evm/evm/src/executors/mod.rs index 5c26a6d6cdc5d..a94a7b7aa6e48 100644 --- a/crates/evm/evm/src/executors/mod.rs +++ b/crates/evm/evm/src/executors/mod.rs @@ -29,7 +29,7 @@ use foundry_evm_core::{ use foundry_evm_coverage::HitMaps; use foundry_evm_traces::{SparsedTraceArena, TraceMode}; use revm::{ - db::{DatabaseCommit, DatabaseRef}, + database::{DatabaseCommit, DatabaseRef}, interpreter::{return_ok, InstructionResult}, primitives::{ AuthorizationList, BlockEnv, Bytecode, Env, EnvWithHandlerCfg, ExecutionResult, Output, diff --git a/crates/evm/evm/src/executors/trace.rs b/crates/evm/evm/src/executors/trace.rs index b55517a672d57..43f2fc872edc6 100644 --- a/crates/evm/evm/src/executors/trace.rs +++ b/crates/evm/evm/src/executors/trace.rs @@ -4,7 +4,7 @@ use foundry_compilers::artifacts::EvmVersion; use foundry_config::{utils::evm_spec_id, Chain, Config}; use foundry_evm_core::{backend::Backend, fork::CreateFork, opts::EvmOpts}; use foundry_evm_traces::TraceMode; -use revm::primitives::{Env, SpecId}; +use revm::primitives::{hardfork::SpecId, Env}; use std::ops::{Deref, DerefMut}; /// A default executor with tracing enabled diff --git a/crates/evm/evm/src/inspectors/stack.rs b/crates/evm/evm/src/inspectors/stack.rs index e23adfcae0661..16c1c2659cd94 100644 --- a/crates/evm/evm/src/inspectors/stack.rs +++ b/crates/evm/evm/src/inspectors/stack.rs @@ -8,15 +8,15 @@ use foundry_evm_core::{backend::DatabaseExt, InspectorExt}; use foundry_evm_coverage::HitMaps; use foundry_evm_traces::{SparsedTraceArena, TraceMode}; use revm::{ + context::result::ExecutionResult, + context_interface::cfg::{CreateScheme, TransactTo}, inspectors::CustomPrintTracer, interpreter::{ CallInputs, CallOutcome, CallScheme, CreateInputs, CreateOutcome, EOFCreateInputs, EOFCreateKind, Gas, InstructionResult, Interpreter, InterpreterResult, }, - primitives::{ - Account, AccountStatus, BlockEnv, CreateScheme, Env, EnvWithHandlerCfg, ExecutionResult, - HashMap, Output, TransactTo, - }, + primitives::{BlockEnv, Env, EnvWithHandlerCfg, HashMap, Output}, + state::{Account, AccountStatus}, EvmContext, Inspector, JournaledState, }; use std::{ diff --git a/crates/evm/fuzz/src/strategies/param.rs b/crates/evm/fuzz/src/strategies/param.rs index 43dcdae7b00f3..a8834bcef9942 100644 --- a/crates/evm/fuzz/src/strategies/param.rs +++ b/crates/evm/fuzz/src/strategies/param.rs @@ -235,7 +235,7 @@ mod tests { }; use foundry_common::abi::get_func; use foundry_config::FuzzDictionaryConfig; - use revm::db::{CacheDB, EmptyDB}; + use revm::database::{CacheDB, EmptyDB}; #[test] fn can_fuzz_array() { diff --git a/crates/evm/fuzz/src/strategies/state.rs b/crates/evm/fuzz/src/strategies/state.rs index 9bcca6aa16d2e..8f757198911dd 100644 --- a/crates/evm/fuzz/src/strategies/state.rs +++ b/crates/evm/fuzz/src/strategies/state.rs @@ -9,9 +9,9 @@ use foundry_config::FuzzDictionaryConfig; use foundry_evm_core::utils::StateChangeset; use parking_lot::{lock_api::RwLockReadGuard, RawRwLock, RwLock}; use revm::{ - db::{CacheDB, DatabaseRef, DbAccount}, - interpreter::opcode, - primitives::AccountInfo, + bytecode::opcode, + database::{CacheDB, DatabaseRef, DbAccount}, + state::AccountInfo, }; use std::{collections::BTreeMap, fmt, sync::Arc}; diff --git a/crates/evm/traces/src/debug/mod.rs b/crates/evm/traces/src/debug/mod.rs index 1f3fb0b2faedd..54ac0056b0d66 100644 --- a/crates/evm/traces/src/debug/mod.rs +++ b/crates/evm/traces/src/debug/mod.rs @@ -7,7 +7,7 @@ use alloy_dyn_abi::{ use alloy_primitives::U256; use foundry_common::fmt::format_token; use foundry_compilers::artifacts::sourcemap::{Jump, SourceElement}; -use revm::interpreter::OpCode; +use revm::bytecode::opcode::OpCode; use revm_inspectors::tracing::types::{CallTraceStep, DecodedInternalCall, DecodedTraceStep}; pub use sources::{ArtifactData, ContractSources, SourceData}; diff --git a/crates/evm/traces/src/lib.rs b/crates/evm/traces/src/lib.rs index 0d22352ca9e3b..d63bd40ddc239 100644 --- a/crates/evm/traces/src/lib.rs +++ b/crates/evm/traces/src/lib.rs @@ -15,7 +15,7 @@ use foundry_common::{ contracts::{ContractsByAddress, ContractsByArtifact}, shell, }; -use revm::interpreter::OpCode; +use revm::bytecode::opcode::OpCode; use revm_inspectors::tracing::{ types::{DecodedTraceStep, TraceMemberOrder}, OpcodeFilter, diff --git a/crates/forge/src/multi_runner.rs b/crates/forge/src/multi_runner.rs index 8ecb0e63a6152..0e071086199df 100644 --- a/crates/forge/src/multi_runner.rs +++ b/crates/forge/src/multi_runner.rs @@ -26,7 +26,7 @@ use foundry_evm::{ }; use foundry_linking::{LinkOutput, Linker}; use rayon::prelude::*; -use revm::primitives::SpecId; +use revm::primitives::hardfork::SpecId; use std::{ borrow::Borrow, collections::BTreeMap, From 8bfa8a4067fc8d1c95e67eab83e1bf3e78f22cbf Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 18:40:40 +0100 Subject: [PATCH 12/23] continue porting --- Cargo.lock | 266 +++++++++++---------------- Cargo.toml | 46 ++--- crates/evm/core/src/backend/mod.rs | 16 +- crates/evm/core/src/fork/database.rs | 17 +- 4 files changed, 145 insertions(+), 200 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0abefb369af9..86bb2c27167dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1715ed2a977d3ca4b39ffe0fc69f9f5b0e81382b348bdb5172abaa77a10f0b6d" +checksum = "6fbf458101ed6c389e9bb70a34ebc56039868ad10472540614816cdedc8f5265" dependencies = [ "alloy-eips", "alloy-primitives", @@ -123,10 +123,11 @@ dependencies = [ [[package]] name = "alloy-contract" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5362637b25ba5282a921ca139a10f188fa34e1248a7c83c907a21de54d36dce1" +checksum = "cd0a0c1ddee20ecc14308aae21c2438c994df7b39010c26d70f86e1d8fdb8db0" dependencies = [ + "alloy-consensus", "alloy-dyn-abi", "alloy-json-abi", "alloy-network", @@ -202,9 +203,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d13734f722326c846e7690ce732c9864f5ae82f52c7fb60c871f56654f348d4c" +checksum = "6e86967eb559920e4b9102e4cb825fe30f2e9467988353ce4809f0d3f2c90cd4" dependencies = [ "alloy-eip2124", "alloy-eip2930", @@ -223,9 +224,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738b6d7da21955cfdebeb7bcf300040b79e51c58a22e5f029ae989a8d834a3f3" +checksum = "a40de6f5b53ecf5fd7756072942f41335426d9a3704cd961f77d854739933bcf" dependencies = [ "alloy-eips", "alloy-primitives", @@ -248,9 +249,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fbb61c4dfe5def9a065438162faf39503b3e8d90f36d01563418a75f0ef016" +checksum = "27434beae2514d4a2aa90f53832cbdf6f23e4b5e2656d95eaf15f9276e2418b6" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -262,9 +263,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f10b0bc0657b018ee4f3758f889d066af6b1f20f57cd825b540182029090c151" +checksum = "26a33a38c7486b1945f8d093ff027add2f3a8f83c7300dbad6165cc49150085e" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -288,9 +289,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cac4aeeabbbc16623d0745ae3b5a515d727ce8ef4ec4b6a886c3634d8b298fe" +checksum = "db973a7a23cbe96f2958e5687c51ce2d304b5c6d0dc5ccb3de8667ad8476f50b" dependencies = [ "alloy-consensus", "alloy-eips", @@ -301,9 +302,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c66bb6715b7499ea755bde4c96223ae8eb74e05c014ab38b9db602879ffb825" +checksum = "7283185baefbe66136649dc316c9dcc6f0e9f1d635ae19783615919f83bc298a" dependencies = [ "alloy-rlp", "arbitrary", @@ -332,9 +333,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06ffafc44e68c8244feb51919895c679c153a0b143c182e1ffe8cce998abf15" +checksum = "8b03bde77ad73feae14aa593bcabb932c8098c0f0750ead973331cfc0003a4e1" dependencies = [ "alloy-chains", "alloy-consensus", @@ -375,9 +376,9 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6abe9f9e6be75dc8532bb2bf3f4c700c9e7bce8a3b05ec702a7324abdb118016" +checksum = "721aca709a9231815ad5903a2d284042cc77e7d9d382696451b30c9ee0950001" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -416,9 +417,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ae316fdb92a4546f0dba4919ea4c1c0edb89a876536520c248fada0febac5d" +checksum = "445a3298c14fae7afb5b9f2f735dead989f3dd83020c2ab8e48ed95d7b6d1acb" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -427,6 +428,7 @@ dependencies = [ "alloy-transport-http", "alloy-transport-ipc", "alloy-transport-ws", + "async-stream", "futures", "pin-project 1.1.10", "reqwest", @@ -436,15 +438,16 @@ dependencies = [ "tokio-stream", "tower 0.5.2", "tracing", + "tracing-futures", "url", "wasmtimer", ] [[package]] name = "alloy-rpc-types" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e50cc5a693dfbef452e3dbcea3cd3342840d10eb3ffa018b0a5676967d8b6b" +checksum = "9157deaec6ba2ad7854f16146e4cd60280e76593eed79fdcb06e0fa8b6c60f77" dependencies = [ "alloy-primitives", "alloy-rpc-types-anvil", @@ -509,9 +512,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c24a3b6c552b74c4abdbaa45fd467a230f5564f62c6adae16972dd90b6b4dca5" +checksum = "7e13d71eac04513a71af4b3df580f52f2b4dcbff9d971cc9a52519acf55514cb" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -555,9 +558,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aebca035ca670bd7de8165a9494c0d502625e26129dd95d17fdfd70d5521c02" +checksum = "3a1cd73fc054de6353c7f22ff9b846b0f0f145cd0112da07d4119e41e9959207" dependencies = [ "alloy-primitives", "serde", @@ -566,9 +569,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abfef2a155c7d6a9f54861159a3fdd29abe1f67f0865b081bce4c2fdc9e83cc" +checksum = "c96fbde54bee943cd94ebacc8a62c50b38c7dfd2552dcd79ff61aea778b1bfcc" dependencies = [ "alloy-dyn-abi", "alloy-primitives", @@ -583,9 +586,9 @@ dependencies = [ [[package]] name = "alloy-signer-aws" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25d4994d79911d1fdf64945c8fc08df46e0ba828abd5c7505264b7012318443" +checksum = "4e73835ed6689740b76cab0f59afbdce374a03d3f856ea33ba1fc054630a1b28" dependencies = [ "alloy-consensus", "alloy-network", @@ -601,9 +604,9 @@ dependencies = [ [[package]] name = "alloy-signer-gcp" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4316e51a4131884e42a5d8b3228a508a60d280add3742bc1196b81f758b7c204" +checksum = "a16b468ae86bb876d9c7a3b49b1e8d614a581a1a9673e4e0d2393b411080fe64" dependencies = [ "alloy-consensus", "alloy-network", @@ -619,9 +622,9 @@ dependencies = [ [[package]] name = "alloy-signer-ledger" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4097dcfbbef9ca5bc3c02901af815c82db89a1a429520acad1c34a0b136acbba" +checksum = "44cf8a7f45edcc43566218e44b70ed3c278b7556926158cfeb63c8d41fefef70" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -639,9 +642,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "326033310c939b0d00b03fdbe2c243cb45add25c4e195d97b1792883c93a4c4c" +checksum = "cc6e72002cc1801d8b41e9892165e3a6551b7bd382bd9d0414b21e90c0c62551" dependencies = [ "alloy-consensus", "alloy-network", @@ -658,9 +661,9 @@ dependencies = [ [[package]] name = "alloy-signer-trezor" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6da910dc4386ab642a58a5a98cec80ecb47855b28b340a997ba7fa019f1cec0" +checksum = "1d4fd403c53cf7924c3e16c61955742cfc3813188f0975622f4fa6f8a01760aa" dependencies = [ "alloy-consensus", "alloy-network", @@ -748,13 +751,16 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463f6cb5234c7420e7e77c248c0460a8e2dea933f2bb4e8f169d5f12510b38e0" +checksum = "9aec325c2af8562ef355c02aeb527c755a07e9d8cf6a1e65dda8d0bf23e29b2c" dependencies = [ "alloy-json-rpc", "base64 0.22.1", + "derive_more 2.0.1", + "futures", "futures-utils-wasm", + "parking_lot", "serde", "serde_json", "thiserror 2.0.12", @@ -767,9 +773,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eacd1c195c2a706bfbc92113d4bd3481b0dbd1742923a232dbe8a7910ac0fe5" +checksum = "a082c9473c6642cce8b02405a979496126a03b096997888e86229afad05db06c" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -782,9 +788,9 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5d3531e65eed82f14f93bb668fb06797c3754d0141c5da042bb63c5c19f13c" +checksum = "45a78cfda2cac16fa83f6b5dd8b4643caec6161433b25b67e484ce05d2194513" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -802,9 +808,9 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "218e64c375edd8fe8d00d9aa983fb2d85f7cfeebb91f707fe4c7ba52410803f5" +checksum = "ae865917bdabaae21f418010fe7e8837c6daa6611fde25f8d78a1778d6ecb523" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -992,7 +998,7 @@ dependencies = [ "op-alloy-rpc-types", "parking_lot", "rand 0.8.5", - "revm 20.0.0-alpha.7", + "revm", "serde", "serde_json", "tempfile", @@ -1022,7 +1028,7 @@ dependencies = [ "foundry-evm", "op-alloy-consensus", "rand 0.8.5", - "revm 20.0.0-alpha.7", + "revm", "serde", "serde_json", "thiserror 2.0.12", @@ -2192,7 +2198,7 @@ dependencies = [ "foundry-evm", "regex", "reqwest", - "revm 20.0.0-alpha.7", + "revm", "rustyline", "semver 1.0.26", "serde", @@ -3639,7 +3645,7 @@ dependencies = [ "itertools 0.14.0", "regex", "reqwest", - "revm 20.0.0-alpha.7", + "revm", "semver 1.0.26", "serde", "serde_json", @@ -3712,7 +3718,7 @@ dependencies = [ "parking_lot", "proptest", "rand 0.8.5", - "revm 20.0.0-alpha.7", + "revm", "revm-inspectors", "semver 1.0.26", "serde", @@ -3838,7 +3844,7 @@ dependencies = [ "chrono", "comfy-table", "foundry-macros", - "revm 20.0.0-alpha.7", + "revm", "serde", "serde_json", "similar-asserts", @@ -3974,7 +3980,7 @@ dependencies = [ "path-slash", "regex", "reqwest", - "revm 20.0.0-alpha.7", + "revm", "semver 1.0.26", "serde", "serde_json", @@ -4002,7 +4008,7 @@ dependencies = [ "foundry-evm-core", "foundry-evm-traces", "ratatui", - "revm 20.0.0-alpha.7", + "revm", "revm-inspectors", "serde", "tracing", @@ -4028,7 +4034,7 @@ dependencies = [ "indicatif", "parking_lot", "proptest", - "revm 20.0.0-alpha.7", + "revm", "revm-inspectors", "serde", "thiserror 2.0.12", @@ -4071,7 +4077,7 @@ dependencies = [ "futures", "itertools 0.14.0", "parking_lot", - "revm 20.0.0-alpha.7", + "revm", "revm-inspectors", "serde", "serde_json", @@ -4091,7 +4097,7 @@ dependencies = [ "foundry-compilers", "foundry-evm-core", "rayon", - "revm 20.0.0-alpha.7", + "revm", "semver 1.0.26", "tracing", ] @@ -4114,7 +4120,7 @@ dependencies = [ "parking_lot", "proptest", "rand 0.8.5", - "revm 20.0.0-alpha.7", + "revm", "serde", "thiserror 2.0.12", "tracing", @@ -4138,7 +4144,7 @@ dependencies = [ "futures", "itertools 0.14.0", "rayon", - "revm 20.0.0-alpha.7", + "revm", "revm-inspectors", "serde", "serde_json", @@ -4151,8 +4157,7 @@ dependencies = [ [[package]] name = "foundry-fork-db" version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7beb856e73f59015823eb221a98b7c22b58bc4e7066c9c86774ebe74e61dd6" +source = "git+https://github.com/foundry-rs/foundry-fork-db?rev=c168d11#c168d119f593e0447891def5efe814ada4a92575" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -4161,7 +4166,7 @@ dependencies = [ "eyre", "futures", "parking_lot", - "revm 19.6.0", + "revm", "serde", "serde_json", "thiserror 2.0.12", @@ -4388,9 +4393,9 @@ checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] name = "gcloud-sdk" -version = "0.26.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6392faf01950e198a204b13034efd7aadda1877e7c174f5442ee39bad5d99bd" +checksum = "8269d6c07cddc7c4f7d679da74fbffa43713a891e0ccfcb37eb02deb21620225" dependencies = [ "async-trait", "bytes", @@ -6414,9 +6419,9 @@ checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad" [[package]] name = "op-alloy-consensus" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d297150146a63778a29400320700e804ec6e1e4d6ec99857cdbbaf17b3de9241" +checksum = "971eaae9cfc8b6aabb62cef8d7d49640d2e8e948e5aa3177788c4dea3d226452" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6430,9 +6435,9 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7095f87d34fc814e3de06a7af8ffff9121993f322231647f84df304821cc0275" +checksum = "398b77b1fe4a9ca83d031d59a19fa9aa4ffcc2a896a83b7861a94292c2098412" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7500,21 +7505,6 @@ dependencies = [ "windows-registry", ] -[[package]] -name = "revm" -version = "19.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b906766b7ba049b515848952b5ae74f363d456e98de2021048a513e442b4f42" -dependencies = [ - "auto_impl", - "cfg-if", - "dyn-clone", - "revm-interpreter 15.2.0", - "revm-precompile 16.1.0", - "serde", - "serde_json", -] - [[package]] name = "revm" version = "20.0.0-alpha.7" @@ -7528,9 +7518,9 @@ dependencies = [ "revm-database-interface", "revm-handler", "revm-inspector", - "revm-interpreter 16.0.0-alpha.7", - "revm-precompile 17.0.0-alpha.7", - "revm-primitives 16.0.0-alpha.5", + "revm-interpreter", + "revm-precompile", + "revm-primitives", "revm-state", ] @@ -7542,7 +7532,7 @@ checksum = "f018d50979559e6c0fcad3f0e5c5bd54e4ebff3d6f0d4da82ac83fe7f5bc3ac0" dependencies = [ "bitvec", "phf", - "revm-primitives 16.0.0-alpha.5", + "revm-primitives", "serde", ] @@ -7557,7 +7547,7 @@ dependencies = [ "revm-bytecode", "revm-context-interface", "revm-database-interface", - "revm-primitives 16.0.0-alpha.5", + "revm-primitives", "revm-state", "serde", ] @@ -7572,7 +7562,7 @@ dependencies = [ "alloy-eip7702", "auto_impl", "revm-database-interface", - "revm-primitives 16.0.0-alpha.5", + "revm-primitives", "revm-state", "serde", ] @@ -7587,7 +7577,7 @@ dependencies = [ "auto_impl", "revm-bytecode", "revm-database-interface", - "revm-primitives 16.0.0-alpha.5", + "revm-primitives", "revm-state", "serde", ] @@ -7599,7 +7589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8b4ab0ff9891593c719abdfadc8968450e1e2e0a8320339dd6968813a23db9d" dependencies = [ "auto_impl", - "revm-primitives 16.0.0-alpha.5", + "revm-primitives", "revm-state", "serde", ] @@ -7615,9 +7605,9 @@ dependencies = [ "revm-context", "revm-context-interface", "revm-database-interface", - "revm-interpreter 16.0.0-alpha.7", - "revm-precompile 17.0.0-alpha.7", - "revm-primitives 16.0.0-alpha.5", + "revm-interpreter", + "revm-precompile", + "revm-primitives", "revm-state", "serde", ] @@ -7632,8 +7622,8 @@ dependencies = [ "revm-context", "revm-database-interface", "revm-handler", - "revm-interpreter 16.0.0-alpha.7", - "revm-primitives 16.0.0-alpha.5", + "revm-interpreter", + "revm-primitives", "revm-state", "serde", "serde_json", @@ -7651,22 +7641,12 @@ dependencies = [ "alloy-sol-types", "anstyle", "colorchoice", - "revm 20.0.0-alpha.7", + "revm", "serde", "serde_json", "thiserror 2.0.12", ] -[[package]] -name = "revm-interpreter" -version = "15.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcab7ef2064057acfc84731205f4bc77f4ec1b35630800b26ff6a185731c5ab" -dependencies = [ - "revm-primitives 15.2.0", - "serde", -] - [[package]] name = "revm-interpreter" version = "16.0.0-alpha.7" @@ -7675,28 +7655,10 @@ checksum = "2a97985e55a551d5d86c07a4469ecdd3b8c0d793cb330bb4a4f747e1ee0af864" dependencies = [ "revm-bytecode", "revm-context-interface", - "revm-primitives 16.0.0-alpha.5", + "revm-primitives", "serde", ] -[[package]] -name = "revm-precompile" -version = "16.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6caa1a7ff2cc4a09a263fcf9de99151706f323d30f33d519ed329f017a02b046" -dependencies = [ - "aurora-engine-modexp", - "c-kzg", - "cfg-if", - "k256", - "once_cell", - "revm-primitives 15.2.0", - "ripemd", - "secp256k1 0.29.1", - "sha2 0.10.8", - "substrate-bn", -] - [[package]] name = "revm-precompile" version = "17.0.0-alpha.7" @@ -7711,33 +7673,13 @@ dependencies = [ "libsecp256k1", "once_cell", "p256", - "revm-primitives 16.0.0-alpha.5", + "revm-primitives", "ripemd", - "secp256k1 0.30.0", + "secp256k1", "sha2 0.10.8", "substrate-bn", ] -[[package]] -name = "revm-primitives" -version = "15.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f987564210317706def498421dfba2ae1af64a8edce82c6102758b48133fcb" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702", - "alloy-primitives", - "auto_impl", - "bitflags 2.9.0", - "bitvec", - "c-kzg", - "cfg-if", - "dyn-clone", - "enumn", - "hex", - "serde", -] - [[package]] name = "revm-primitives" version = "16.0.0-alpha.5" @@ -7757,7 +7699,7 @@ checksum = "217e158f471dd39065b14db956c3d40437f311163efd05254dc9a66b9dc426ba" dependencies = [ "bitflags 2.9.0", "revm-bytecode", - "revm-primitives 16.0.0-alpha.5", + "revm-primitives", "serde", ] @@ -8211,16 +8153,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "secp256k1" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" -dependencies = [ - "rand 0.8.5", - "secp256k1-sys", -] - [[package]] name = "secp256k1" version = "0.30.0" @@ -9761,6 +9693,18 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "futures", + "futures-task", + "pin-project 1.1.10", + "tracing", +] + [[package]] name = "tracing-log" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 4485fadb15184..dee712b707252 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -197,28 +197,28 @@ revm = { version = "20.0.0-alpha.7", default-features = false } revm-inspectors = { version = "0.17.0-alpha.1", features = ["serde"] } ## alloy -alloy-consensus = { version = "0.12.1", default-features = false } -alloy-contract = { version = "0.12.1", default-features = false } -alloy-eips = { version = "0.12.1", default-features = false } +alloy-consensus = { version = "0.12.6", default-features = false } +alloy-contract = { version = "0.12.6", default-features = false } +alloy-eips = { version = "0.12.6", default-features = false } alloy-evm = { version = "0.1.0-alpha.3", default-features = false } -alloy-genesis = { version = "0.12.1", default-features = false } -alloy-json-rpc = { version = "0.12.1", default-features = false } -alloy-network = { version = "0.12.1", default-features = false } -alloy-provider = { version = "0.12.1", default-features = false } -alloy-pubsub = { version = "0.12.1", default-features = false } -alloy-rpc-client = { version = "0.12.1", default-features = false } -alloy-rpc-types = { version = "0.12.1", default-features = true } -alloy-serde = { version = "0.12.1", default-features = false } -alloy-signer = { version = "0.12.1", default-features = false } -alloy-signer-aws = { version = "0.12.1", default-features = false } -alloy-signer-gcp = { version = "0.12.1", default-features = false } -alloy-signer-ledger = { version = "0.12.1", default-features = false } -alloy-signer-local = { version = "0.12.1", default-features = false } -alloy-signer-trezor = { version = "0.12.1", default-features = false } -alloy-transport = { version = "0.12.1", default-features = false } -alloy-transport-http = { version = "0.12.1", default-features = false } -alloy-transport-ipc = { version = "0.12.1", default-features = false } -alloy-transport-ws = { version = "0.12.1", default-features = false } +alloy-genesis = { version = "0.12.6", default-features = false } +alloy-json-rpc = { version = "0.12.6", default-features = false } +alloy-network = { version = "0.12.6", default-features = false } +alloy-provider = { version = "0.12.6", default-features = false } +alloy-pubsub = { version = "0.12.6", default-features = false } +alloy-rpc-client = { version = "0.12.6", default-features = false } +alloy-rpc-types = { version = "0.12.6", default-features = true } +alloy-serde = { version = "0.12.6", default-features = false } +alloy-signer = { version = "0.12.6", default-features = false } +alloy-signer-aws = { version = "0.12.6", default-features = false } +alloy-signer-gcp = { version = "0.12.6", default-features = false } +alloy-signer-ledger = { version = "0.12.6", default-features = false } +alloy-signer-local = { version = "0.12.6", default-features = false } +alloy-signer-trezor = { version = "0.12.6", default-features = false } +alloy-transport = { version = "0.12.6", default-features = false } +alloy-transport-http = { version = "0.12.6", default-features = false } +alloy-transport-ipc = { version = "0.12.6", default-features = false } +alloy-transport-ws = { version = "0.12.6", default-features = false } ## alloy-core alloy-dyn-abi = "0.8.22" @@ -238,8 +238,8 @@ alloy-rlp = "0.3" alloy-trie = "0.7.0" ## op-alloy -op-alloy-consensus = "0.11.0" -op-alloy-rpc-types = "0.11.0" +op-alloy-consensus = "0.11.2" +op-alloy-rpc-types = "0.11.2" ## cli anstream = "0.6" diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index a7a0285d7b4a0..bed08d51ebf1d 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -970,7 +970,7 @@ impl DatabaseExt for Backend { .map(|acc| acc.info.clone()) .unwrap_or_default(); - if !fork.db.accounts.contains_key(&caller) { + if !fork.db.cache.accounts.contains_key(&caller) { // update the caller account which is required by the evm fork.db.insert_account_info(caller, caller_account.clone()); } @@ -1119,7 +1119,7 @@ impl DatabaseExt for Backend { .map(|acc| acc.info.clone()) .unwrap_or_default(); - if !fork.db.accounts.contains_key(&caller) { + if !fork.db.cache.accounts.contains_key(&caller) { // update the caller account which is required by the evm fork.db.insert_account_info(caller, caller_account.clone()); } @@ -1466,9 +1466,9 @@ impl DatabaseExt for Backend { fn set_blockhash(&mut self, block_number: U256, block_hash: B256) { if let Some(db) = self.active_fork_db_mut() { - db.block_hashes.insert(block_number, block_hash); + db.cache.block_hashes.insert(block_number, block_hash); } else { - self.mem_db.block_hashes.insert(block_number, block_hash); + self.mem_db.cache.block_hashes.insert(block_number, block_hash); } } } @@ -1878,17 +1878,17 @@ fn merge_db_account_data( ) { trace!(?addr, "merging database data"); - let Some(acc) = active.accounts.get(&addr) else { return }; + let Some(acc) = active.cache.accounts.get(&addr) else { return }; // port contract cache over - if let Some(code) = active.contracts.get(&acc.info.code_hash) { + if let Some(code) = active.cache.contracts.get(&acc.info.code_hash) { trace!("merging contract cache"); - fork_db.contracts.insert(acc.info.code_hash, code.clone()); + fork_db.cache.contracts.insert(acc.info.code_hash, code.clone()); } // port account storage over use std::collections::hash_map::Entry; - match fork_db.accounts.entry(addr) { + match fork_db.cache.accounts.entry(addr) { Entry::Vacant(vacant) => { trace!("target account not present - inserting from active"); // if the fork_db doesn't have the target account diff --git a/crates/evm/core/src/fork/database.rs b/crates/evm/core/src/fork/database.rs index 6b4830aefb1bb..30549f028aace 100644 --- a/crates/evm/core/src/fork/database.rs +++ b/crates/evm/core/src/fork/database.rs @@ -210,7 +210,12 @@ pub struct ForkDbStateSnapshot { impl ForkDbStateSnapshot { fn get_storage(&self, address: Address, index: U256) -> Option { - self.local.accounts.get(&address).and_then(|account| account.storage.get(&index)).copied() + self.local + .cache + .accounts + .get(&address) + .and_then(|account| account.storage.get(&index)) + .copied() } } @@ -221,7 +226,7 @@ impl DatabaseRef for ForkDbStateSnapshot { type Error = DatabaseError; fn basic_ref(&self, address: Address) -> Result, Self::Error> { - match self.local.accounts.get(&address) { + match self.local.cache.accounts.get(&address) { Some(account) => Ok(Some(account.info.clone())), None => { let mut acc = self.state_snapshot.accounts.get(&address).cloned(); @@ -239,7 +244,7 @@ impl DatabaseRef for ForkDbStateSnapshot { } fn storage_ref(&self, address: Address, index: U256) -> Result { - match self.local.accounts.get(&address) { + match self.local.cache.accounts.get(&address) { Some(account) => match account.storage.get(&index) { Some(entry) => Ok(*entry), None => match self.get_storage(address, index) { @@ -275,11 +280,7 @@ mod tests { async fn fork_db_insert_basic_default() { let rpc = foundry_test_utils::rpc::next_http_rpc_endpoint(); let provider = get_http_provider(rpc.clone()); - let meta = BlockchainDbMeta { - cfg_env: Default::default(), - block_env: Default::default(), - hosts: BTreeSet::from([rpc]), - }; + let meta = BlockchainDbMeta { block_env: Default::default(), hosts: BTreeSet::from([rpc]) }; let db = BlockchainDb::new(meta, None); let backend = SharedBackend::spawn_backend(Arc::new(provider), db.clone(), None).await; From 10904752794acd3e3b92fa63c716ebfe49423f18 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 18:43:21 +0100 Subject: [PATCH 13/23] import env --- Cargo.lock | 31 ++++++++++++++++ crates/evm/core/Cargo.toml | 1 + crates/evm/core/src/backend/env.rs | 57 ++++++++++++++++++++++++++++++ crates/evm/core/src/backend/mod.rs | 3 ++ 4 files changed, 92 insertions(+) create mode 100644 crates/evm/core/src/backend/env.rs diff --git a/Cargo.lock b/Cargo.lock index 86bb2c27167dd..b5fb940261d5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,6 +222,23 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "alloy-evm" +version = "0.1.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40fe575395f20dc9527c2dc65350786492e9723d2035e9f716269b65be34c9c" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-hardforks", + "alloy-primitives", + "alloy-sol-types", + "auto_impl", + "derive_more 2.0.1", + "revm", + "thiserror 2.0.12", +] + [[package]] name = "alloy-genesis" version = "0.12.6" @@ -235,6 +252,19 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-hardforks" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1692158e9d100486fa6c2429edb42680298678ee74644b058c44f8484a278fea" +dependencies = [ + "alloy-chains", + "alloy-eip2124", + "alloy-primitives", + "auto_impl", + "dyn-clone", +] + [[package]] name = "alloy-json-abi" version = "0.8.22" @@ -4059,6 +4089,7 @@ version = "1.0.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", + "alloy-evm", "alloy-genesis", "alloy-json-abi", "alloy-network", diff --git a/crates/evm/core/Cargo.toml b/crates/evm/core/Cargo.toml index d53a16764b74b..9b47d476dc805 100644 --- a/crates/evm/core/Cargo.toml +++ b/crates/evm/core/Cargo.toml @@ -20,6 +20,7 @@ foundry-config.workspace = true foundry-evm-abi.workspace = true alloy-dyn-abi = { workspace = true, features = ["arbitrary", "eip712"] } +alloy-evm.workspace = true alloy-genesis.workspace = true alloy-json-abi.workspace = true alloy-primitives = { workspace = true, features = [ diff --git a/crates/evm/core/src/backend/env.rs b/crates/evm/core/src/backend/env.rs new file mode 100644 index 0000000000000..bce00302da24f --- /dev/null +++ b/crates/evm/core/src/backend/env.rs @@ -0,0 +1,57 @@ +use alloy_evm::EvmEnv; +use revm::{ + context::{BlockEnv, CfgEnv, JournalTr, TxEnv}, + Context, Database, +}; + +/// Helper container type for [`EvmEnv`] and [`TxEnv`]. +#[derive(Clone, Debug, Default)] +pub struct Env { + pub evm_env: EvmEnv, + pub tx: TxEnv, +} + +/// Helper struct with mutable references to the block and cfg environments. +pub struct EnvMut<'a> { + pub block: &'a mut BlockEnv, + pub cfg: &'a mut CfgEnv, + pub tx: &'a mut TxEnv, +} + +impl EnvMut<'_> { + /// Returns a copy of the environment. + pub fn to_owned(&self) -> Env { + Env { + evm_env: EvmEnv { cfg_env: self.cfg.to_owned(), block_env: self.block.to_owned() }, + tx: self.tx.to_owned(), + } + } +} + +pub trait AsEnvMut { + fn as_env_mut(&mut self) -> EnvMut<'_>; +} + +impl AsEnvMut for EnvMut<'_> { + fn as_env_mut(&mut self) -> EnvMut<'_> { + EnvMut { block: self.block, cfg: self.cfg, tx: self.tx } + } +} + +impl AsEnvMut for Env { + fn as_env_mut(&mut self) -> EnvMut<'_> { + EnvMut { + block: &mut self.evm_env.block_env, + cfg: &mut self.evm_env.cfg_env, + tx: &mut self.tx, + } + } +} + +impl, C> AsEnvMut + for Context +{ + fn as_env_mut(&mut self) -> EnvMut<'_> { + EnvMut { block: &mut self.block, cfg: &mut self.cfg, tx: &mut self.tx } + } +} diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index bed08d51ebf1d..4700a1c8e2d7f 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -35,6 +35,9 @@ use std::{ mod diagnostic; pub use diagnostic::RevertDiagnostic; +mod env; +pub use env::{AsEnvMut, Env, EnvMut}; + mod error; pub use error::{BackendError, BackendResult, DatabaseError, DatabaseResult}; From 73d37a637d45cd3a9f7352696e33f62b3d69c21f Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 18:46:22 +0100 Subject: [PATCH 14/23] bump alloy-chains deps --- Cargo.lock | 824 ++++++++++++++++++++++++++--------------------------- 1 file changed, 402 insertions(+), 422 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b5fb940261d5c..f674ddf86a787 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.1.64" +version = "0.1.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "963fc7ac17f25d92c237448632330eb87b39ba8aa0209d4b517069a05b57db62" +checksum = "f8e42c54af787e3521229df1787d7b8300910dc6d9d04d378eb593b26388bd11" dependencies = [ "alloy-primitives", "num_enum", @@ -109,9 +109,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660705969af143897d83937d73f53c741c1587f49c27c2cfce594e188fcbc1e4" +checksum = "fc982af629e511292310fe85b433427fd38cb3105147632b574abc997db44c91" dependencies = [ "alloy-consensus", "alloy-eips", @@ -145,9 +145,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e08c581811006021970bf07f2ecf3213f6237c125f7fd99607004b23627b61" +checksum = "ada55b5ab26624766bb8c65f72516dee93eaf28d5d87fc18ff4324cd8c2a948d" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -161,7 +161,7 @@ dependencies = [ "proptest", "serde", "serde_json", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] @@ -267,9 +267,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125601804507fef5ae7debcbf800906b12741f19800c1c05b953d0f1b990131a" +checksum = "df4054f177d1600f17e2bc152f6a927592641b19861e6005cc51bdf7d4fa27a6" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -355,7 +355,7 @@ dependencies = [ "proptest-derive", "rand 0.8.5", "ruint", - "rustc-hash", + "rustc-hash 2.1.1", "serde", "sha3", "tiny-keccak", @@ -491,9 +491,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2852d7350760c3fbfc60ee3396b95a66ea57afe3aeecee72bf1171ac6b1d5d18" +checksum = "3a80ee83ef97e7ffd667a81ebdb6154558dfd5e8f20d8249a10a12a1671a04b3" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -503,9 +503,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f726ebb03d5918a946d0a6e17829cabd90ffe928664dc3f7fdbba1be511760de" +checksum = "604dea1f00fd646debe8033abe8e767c732868bf8a5ae9df6321909ccbc99c56" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -514,9 +514,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab1fe2c636a14190fe3c6caf6a20d2fb8691a5824c1789ee495324a14295df82" +checksum = "08b113a0087d226291b9768ed331818fa0b0744cc1207ae7c150687cf3fde1bd" dependencies = [ "alloy-primitives", "serde", @@ -524,9 +524,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05bfe640e4708c5a83dfcc65b5e4a0deb6ddcb18897dd49862ddc3964e06ff8" +checksum = "874ac9d1249ece0453e262d9ba72da9dbb3b7a2866220ded5940c2e47f1aa04d" dependencies = [ "alloy-consensus", "alloy-eips", @@ -562,9 +562,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25f16f6bfe65c23d873741aa343830de270db42c982822e23689d11f2f4d812" +checksum = "4747763aee39c1b0f5face79bde9be8932be05b2db7d8bdcebb93490f32c889c" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -576,9 +576,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9415e7e3f32a93a38ecb83aa449f7326081b5b362964291463f8f2060b4b8a31" +checksum = "70132ebdbea1eaa68c4d6f7a62c2fadf0bdce83b904f895ab90ca4ec96f63468" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -708,9 +708,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f9c3c7bc1f4e334e5c5fc59ec8dac894973a71b11da09065affc6094025049" +checksum = "f99b007e002f1082b28827cc47d9c72562d412a98c06f29aa438118ff3036c43" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -722,9 +722,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ff7aa715eb2404cb87fa94390d2c5d5addd70d9617e20b2398ee6f48cb21f0" +checksum = "6c0a9cb9b1afbcd3325e0fff9fdf98e6d095643fae9e5584e80597f0b79b6d6e" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", @@ -741,14 +741,15 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f105fa700140c0cc6e2c3377adef650c389ac57b8ead8318a2e6bd52f1ae841" +checksum = "530c4863e707b95f99b37792cdfa94d30004ec552aed41e200a1d9264d44e669" dependencies = [ "alloy-json-abi", "const-hex", "dunce", "heck", + "macro-string", "proc-macro2", "quote", "serde_json", @@ -758,19 +759,19 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c649acc6c9d3893e392c737faeadce30b4a1751eed148ae43bc2f27f29c4480c" +checksum = "74b210dd863afa9da93c488601a1f23bee1e3ce47e15519582320c205645a7a0" dependencies = [ "serde", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] name = "alloy-sol-types" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f819635439ebb06aa13c96beac9b2e7360c259e90f5160a6848ae0d94d10452" +checksum = "4f5ff802859e2797d022dc812b5b4ee40d829e0fb446c269a87826c7f0021976" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -845,8 +846,8 @@ dependencies = [ "alloy-pubsub", "alloy-transport", "futures", - "http 1.2.0", - "rustls 0.23.23", + "http 1.3.1", + "rustls", "serde_json", "tokio", "tokio-tungstenite 0.26.2", @@ -1022,7 +1023,7 @@ dependencies = [ "foundry-evm", "foundry-test-utils", "futures", - "hyper 1.6.0", + "hyper", "itertools 0.14.0", "op-alloy-consensus", "op-alloy-rpc-types", @@ -1110,9 +1111,9 @@ dependencies = [ [[package]] name = "ariadne" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31beedec3ce83ae6da3a79592b3d8d7afd146a5b15bb9bb940279aced60faa89" +checksum = "36f5e3dca4e09a6f340a61a0e9c7b61e030c69fc27bf29d73218f7e5e3b7638f" dependencies = [ "unicode-width 0.1.14", "yansi", @@ -1268,9 +1269,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310c9bcae737a48ef5cdee3174184e6d548b292739ede61a1f955ef76a738861" +checksum = "c0cf008e5e1a9e9e22a7d3c9a4992e21a350290069e36d8fb72304ed17e8f2d2" dependencies = [ "flate2", "futures-core", @@ -1323,9 +1324,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.87" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d556ec1359574147ec0c4fc5eb525f3f23263a592b1a9c07e0a75b427de55c97" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", @@ -1393,9 +1394,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.18" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90aff65e86db5fe300752551c1b015ef72b708ac54bded8ef43d0d53cb7cb0b1" +checksum = "6a84fe2c5e9965fba0fbc2001db252f1d57527d82a905cca85127df227bca748" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1403,7 +1404,7 @@ dependencies = [ "aws-sdk-ssooidc", "aws-sdk-sts", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1412,7 +1413,7 @@ dependencies = [ "bytes", "fastrand", "hex", - "http 0.2.12", + "http 1.3.1", "ring", "time", "tokio", @@ -1423,9 +1424,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" +checksum = "4471bef4c22a06d2c7a1b6492493d3fdf24a805323109d6874f9c94d5906ac14" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -1433,16 +1434,39 @@ dependencies = [ "zeroize", ] +[[package]] +name = "aws-lc-rs" +version = "1.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77926887776171ced7d662120a75998e444d3750c951abfe07f90da130514b1f" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "aws-runtime" -version = "1.5.5" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76dd04d39cc12844c0994f2c9c5a6f5184c22e9188ec1ff723de41910a21dcad" +checksum = "0aff45ffe35196e593ea3b9dd65b320e51e2dda95aff4390bc459e461d09c6ad" dependencies = [ "aws-credential-types", "aws-sigv4", "aws-smithy-async", - "aws-smithy-http 0.60.12", + "aws-smithy-http", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1455,19 +1479,19 @@ dependencies = [ "percent-encoding", "pin-project-lite", "tracing", - "uuid 1.15.1", + "uuid 1.16.0", ] [[package]] name = "aws-sdk-kms" -version = "1.62.0" +version = "1.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4ecacd2e7947b670b7f9e5146c860d1b638cef1392351df47ddf6bb4c68839" +checksum = "a971bfe62ca4a228627a1b74a87a7a142979b20b168d2e2884f4893212ebb715" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1482,14 +1506,14 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.61.0" +version = "1.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e65ff295979977039a25f5a0bf067a64bc5e6aa38f3cef4037cf42516265553c" +checksum = "1d5330ad4e8a1ff49e9f26b738611caa72b105c41d41733801d1a36e8f9de936" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1504,14 +1528,14 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.62.0" +version = "1.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91430a60f754f235688387b75ee798ef00cfd09709a582be2b7525ebb5306d4f" +checksum = "7956b1a85d49082347a7d17daa2e32df191f3e23c03d47294b99f95413026a78" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1526,14 +1550,14 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.62.0" +version = "1.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9276e139d39fff5a0b0c984fc2d30f970f9a202da67234f948fda02e5bea1dbe" +checksum = "065c533fbe6f84962af33fcf02b0350b7c1f79285baab5924615d2be3b232855" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", - "aws-smithy-http 0.61.1", + "aws-smithy-http", "aws-smithy-json", "aws-smithy-query", "aws-smithy-runtime", @@ -1549,12 +1573,12 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.9" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfe75fad52793ce6dec0dc3d4b1f388f038b5eb866c8d4d7f3a8e21b5ea5051" +checksum = "69d03c3c05ff80d54ff860fe38c726f6f494c639ae975203a101335f223386db" dependencies = [ "aws-credential-types", - "aws-smithy-http 0.60.12", + "aws-smithy-http", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", @@ -1562,7 +1586,7 @@ dependencies = [ "hex", "hmac", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "once_cell", "percent-encoding", "sha2 0.10.8", @@ -1581,46 +1605,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "aws-smithy-http" -version = "0.60.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7809c27ad8da6a6a68c454e651d4962479e81472aa19ae99e59f9aba1f9713cc" -dependencies = [ - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", - "http 0.2.12", - "http-body 0.4.6", - "once_cell", - "percent-encoding", - "pin-project-lite", - "pin-utils", - "tracing", -] - -[[package]] -name = "aws-smithy-http" -version = "0.61.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f276f21c7921fe902826618d1423ae5bf74cf8c1b8472aee8434f3dfd31824" -dependencies = [ - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", - "http 0.2.12", - "http-body 0.4.6", - "once_cell", - "percent-encoding", - "pin-project-lite", - "pin-utils", - "tracing", -] - [[package]] name = "aws-smithy-http" version = "0.62.0" @@ -1633,7 +1617,7 @@ dependencies = [ "bytes-utils", "futures-core", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "http-body 0.4.6", "once_cell", "percent-encoding", @@ -1651,14 +1635,17 @@ dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", - "h2 0.4.8", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-rustls 0.24.2", + "h2", + "http 1.3.1", + "hyper", + "hyper-rustls", + "hyper-util", "pin-project-lite", - "rustls 0.21.12", + "rustls", + "rustls-native-certs", + "rustls-pki-types", "tokio", + "tower 0.5.2", "tracing", ] @@ -1688,14 +1675,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6328865e36c6fd970094ead6b05efd047d3a80ec5fc3be5e743910da9f2ebf8" dependencies = [ "aws-smithy-async", - "aws-smithy-http 0.62.0", + "aws-smithy-http", "aws-smithy-http-client", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "fastrand", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "http-body 0.4.6", "http-body 1.0.1", "once_cell", @@ -1715,7 +1702,7 @@ dependencies = [ "aws-smithy-types", "bytes", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "pin-project-lite", "tokio", "tracing", @@ -1732,7 +1719,7 @@ dependencies = [ "bytes", "bytes-utils", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", @@ -1756,9 +1743,9 @@ dependencies = [ [[package]] name = "aws-types" -version = "1.3.5" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbd0a668309ec1f66c0f6bda4840dd6d4796ae26d699ebc266d7cc95c6d040f" +checksum = "3873f8deed8927ce8d04487630dc9ff73193bab64742a61d050e57a68dec4125" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -1779,10 +1766,10 @@ dependencies = [ "base64 0.22.1", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-util", "itoa", "matchit", @@ -1814,7 +1801,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "mime", @@ -1871,9 +1858,9 @@ dependencies = [ [[package]] name = "base64ct" -version = "1.7.1" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb97d56060ee67d285efb8001fec9d2a4c710c32efd2e14b5cbb5ba71930fc2d" +checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "bech32" @@ -1887,6 +1874,29 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.9.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.100", + "which 4.4.2", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -1993,9 +2003,9 @@ dependencies = [ [[package]] name = "bon" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8a41e51fda5f7d87152d00f50d08ce24bf5cee8a962facf7f2526a66f8a5fa" +checksum = "65268237be94042665b92034f979c42d431d2fd998b49809543afe3e66abad1c" dependencies = [ "bon-macros", "rustversion", @@ -2003,9 +2013,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b592add4016ac26ca340298fed5cc2524abe8bacae78ebca3780286da588304" +checksum = "803c95b2ecf650eb10b5f87dda6b9f6a1b758cee53245e2b7b825c9b3803a443" dependencies = [ "darling", "ident_case", @@ -2191,13 +2201,24 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.16" +version = "1.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" +checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" dependencies = [ + "jobserver", + "libc", "shlex", ] +[[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" @@ -2296,6 +2317,17 @@ 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 = "4.5.32" @@ -2333,9 +2365,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.46" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5c5508ea23c5366f77e53f5a0070e5a84e51687ec3ef9e0464c86dc8d13ce98" +checksum = "c06f5378ea264ad4f82bbc826628b5aad714a75abf6ece087e923010eb937fb6" dependencies = [ "clap", ] @@ -2377,7 +2409,7 @@ dependencies = [ "nix 0.29.0", "terminfo", "thiserror 2.0.12", - "which", + "which 7.0.2", "windows-sys 0.59.0", ] @@ -2404,6 +2436,15 @@ dependencies = [ "error-code", ] +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] + [[package]] name = "coins-bip32" version = "0.12.0" @@ -2851,9 +2892,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", "serde", @@ -3364,7 +3405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", - "rustix 1.0.2", + "rustix 1.0.3", "windows-sys 0.59.0", ] @@ -3452,9 +3493,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "forge" @@ -3696,9 +3737,9 @@ dependencies = [ [[package]] name = "foundry-block-explorers" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d7f2a3d90ff85c164c0eb05fdf19b22e68b9190b5449d1aa0eef8314c1874e9" +checksum = "d3fa56da41a30ea92956a1a19b66ab0e69b31c158fed5c7aabd2d564bfcfe809" dependencies = [ "alloy-chains", "alloy-json-abi", @@ -3914,7 +3955,7 @@ dependencies = [ "thiserror 2.0.12", "tokio", "tracing", - "winnow 0.7.3", + "winnow 0.7.4", "yansi", ] @@ -4432,7 +4473,7 @@ dependencies = [ "bytes", "chrono", "futures", - "hyper 1.6.0", + "hyper", "jsonwebtoken", "once_cell", "prost", @@ -4489,14 +4530,16 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", + "js-sys", "libc", - "wasi 0.13.3+wasi-0.2.2", - "windows-targets 0.52.6", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -4771,25 +4814,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.8.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.8" @@ -4801,7 +4825,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.2.0", + "http 1.3.1", "indexmap 2.8.0", "slab", "tokio", @@ -4811,9 +4835,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1" dependencies = [ "cfg-if", "crunchy", @@ -4821,9 +4845,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "6.3.1" +version = "6.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d752747ddabc4c1a70dd28e72f2e3c218a816773e0d7faf67433f1acfa6cba7c" +checksum = "759e2d5aea3287cb1190c8ec394f42866cb5bf74fcbf213f354e3c856ea26098" dependencies = [ "derive_builder", "log", @@ -4965,9 +4989,9 @@ dependencies = [ [[package]] name = "http" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -4992,18 +5016,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http 1.3.1", ] [[package]] name = "http-body-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", - "futures-util", - "http 1.2.0", + "futures-core", + "http 1.3.1", "http-body 1.0.1", "pin-project-lite", ] @@ -5028,9 +5052,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" [[package]] name = "humantime-serde" @@ -5042,30 +5066,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.6.0" @@ -5075,8 +5075,8 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.8", - "http 1.2.0", + "h2", + "http 1.3.1", "http-body 1.0.1", "httparse", "httpdate", @@ -5087,22 +5087,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.32", - "log", - "rustls 0.21.12", - "rustls-native-certs 0.6.3", - "tokio", - "tokio-rustls 0.24.1", -] - [[package]] name = "hyper-rustls" version = "0.27.5" @@ -5110,14 +5094,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.2.0", - "hyper 1.6.0", + "http 1.3.1", + "hyper", "hyper-util", - "rustls 0.23.23", - "rustls-native-certs 0.8.1", + "rustls", + "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tower-service", "webpki-roots", ] @@ -5128,7 +5112,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.6.0", + "hyper", "hyper-util", "pin-project-lite", "tokio", @@ -5144,9 +5128,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", - "hyper 1.6.0", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -5551,6 +5535,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -5628,6 +5621,15 @@ dependencies = [ "jiff-tzdb", ] +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.77" @@ -5767,11 +5769,17 @@ 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.170" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libdbus-sys" @@ -5783,6 +5791,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + [[package]] name = "libm" version = "0.2.11" @@ -5866,9 +5884,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9" +checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" [[package]] name = "litemap" @@ -5938,6 +5956,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "maplit" version = "1.0.2" @@ -6167,7 +6196,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee3224f0e8be7c2a1ebc77ef9c3eecb90f55c6594399ee825de964526b3c9056" dependencies = [ - "uuid 1.15.1", + "uuid 1.16.0", ] [[package]] @@ -6444,9 +6473,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.0" +version = "1.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad" +checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" [[package]] name = "op-alloy-consensus" @@ -6891,7 +6920,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.23", + "zerocopy 0.8.24", ] [[package]] @@ -6928,9 +6957,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.30" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ccf34da56fc294e7d4ccf69a85992b7dfb826b7cf57bac6a70bba3494cc08a" +checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" dependencies = [ "proc-macro2", "syn 2.0.100", @@ -7049,9 +7078,9 @@ dependencies = [ [[package]] name = "prodash" -version = "29.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a266d8d6020c61a437be704c5e618037588e1985c7dbb7bf8d265db84cffe325" +checksum = "9ee7ce24c980b976607e2d6ae4aae92827994d23fed71659c3ede3f92528b58b" dependencies = [ "log", "parking_lot", @@ -7187,7 +7216,7 @@ dependencies = [ "quick-xml 0.37.2", "strip-ansi-escapes", "thiserror 2.0.12", - "uuid 1.15.1", + "uuid 1.16.0", ] [[package]] @@ -7210,34 +7239,36 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" dependencies = [ "bytes", + "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", - "rustls 0.23.23", + "rustc-hash 2.1.1", + "rustls", "socket2", "thiserror 2.0.12", "tokio", "tracing", + "web-time", ] [[package]] name = "quinn-proto" -version = "0.11.9" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" dependencies = [ "bytes", - "getrandom 0.2.15", - "rand 0.8.5", + "getrandom 0.3.2", + "rand 0.9.0", "ring", - "rustc-hash", - "rustls 0.23.23", + "rustc-hash 2.1.1", + "rustls", "rustls-pki-types", "slab", "thiserror 2.0.12", @@ -7262,13 +7293,19 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "radium" version = "0.7.0" @@ -7305,7 +7342,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", - "zerocopy 0.8.23", + "zerocopy 0.8.24", ] [[package]] @@ -7343,7 +7380,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.1", + "getrandom 0.3.2", ] [[package]] @@ -7485,9 +7522,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.12" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" dependencies = [ "async-compression", "base64 0.22.1", @@ -7496,12 +7533,12 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.4.8", - "http 1.2.0", + "h2", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", - "hyper-rustls 0.27.5", + "hyper", + "hyper-rustls", "hyper-util", "ipnet", "js-sys", @@ -7512,9 +7549,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.23", - "rustls-native-certs 0.8.1", - "rustls-pemfile 2.2.0", + "rustls", + "rustls-native-certs", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", @@ -7522,7 +7559,7 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-socks", "tokio-util", "tower 0.5.2", @@ -7755,9 +7792,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.13" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", @@ -7856,6 +7893,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hash" version = "2.1.1" @@ -7904,56 +7947,33 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825" +checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" dependencies = [ "bitflags 2.9.0", "errno", "libc", - "linux-raw-sys 0.9.2", + "linux-raw-sys 0.9.3", "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.23.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" +checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.4", - "schannel", - "security-framework 2.11.1", -] - [[package]] name = "rustls-native-certs" version = "0.8.1" @@ -7963,16 +7983,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.2.0", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", + "security-framework", ] [[package]] @@ -7995,20 +8006,11 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.102.8" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "0aa4eeac2588ffff23e9d7a7e9b3f971c5fb5b7ebc9452745e0c232c64f83b2f" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -8153,16 +8155,6 @@ dependencies = [ "sha2 0.10.8", ] -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sdd" version = "3.0.8" @@ -8217,19 +8209,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.9.0", - "core-foundation 0.9.4", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - [[package]] name = "security-framework" version = "3.2.0" @@ -8735,7 +8714,7 @@ dependencies = [ "indexmap 2.8.0", "parking_lot", "rayon", - "rustc-hash", + "rustc-hash 2.1.1", "smallvec", ] @@ -8844,7 +8823,7 @@ dependencies = [ "thiserror 2.0.12", "tokio", "toml_edit", - "uuid 1.15.1", + "uuid 1.16.0", "zip", "zip-extract", ] @@ -9086,9 +9065,9 @@ dependencies = [ [[package]] name = "svm-rs-builds" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebddc0ea9fd9fb61d0de9585a99c58f87e8c14b8811726a57cc5f5b1a029585e" +checksum = "0a9b30390308e3c0f7d146d87e2c798409233fe250d849a02fe57d6a9ae6810f" dependencies = [ "build_const", "const-hex", @@ -9121,9 +9100,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9f9798a84bca5cd4d1760db691075fda8f2c3a5d9647e8bfd29eb9b3fabb87" +checksum = "36dbbf0d465ab9fdfea3093e755ae8839bdc1263dbe18d35064d02d6060f949e" dependencies = [ "paste", "proc-macro2", @@ -9180,15 +9159,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.18.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c317e0a526ee6120d8dabad239c8dadca62b24b6f168914bbbc8e2fb1f0e567" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ - "cfg-if", "fastrand", - "getrandom 0.3.1", + "getrandom 0.3.2", "once_cell", - "rustix 1.0.2", + "rustix 1.0.3", "windows-sys 0.59.0", ] @@ -9220,7 +9198,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" dependencies = [ - "rustix 1.0.2", + "rustix 1.0.3", "windows-sys 0.59.0", ] @@ -9334,9 +9312,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.39" +version = "0.3.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" +checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618" dependencies = [ "deranged", "itoa", @@ -9351,15 +9329,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" +checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04" dependencies = [ "num-conv", "time-core", @@ -9401,9 +9379,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.0" +version = "1.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" +checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" dependencies = [ "backtrace", "bytes", @@ -9428,23 +9406,13 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.23", + "rustls", "tokio", ] @@ -9492,19 +9460,19 @@ checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" dependencies = [ "futures-util", "log", - "rustls 0.23.23", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tungstenite 0.26.2", "webpki-roots", ] [[package]] name = "tokio-util" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" dependencies = [ "bytes", "futures-core", @@ -9554,7 +9522,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] @@ -9568,21 +9536,21 @@ dependencies = [ "axum", "base64 0.22.1", "bytes", - "h2 0.4.8", - "http 1.2.0", + "h2", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project 1.1.10", "prost", - "rustls-native-certs 0.8.1", - "rustls-pemfile 2.2.0", + "rustls-native-certs", + "rustls-pemfile", "socket2", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-stream", "tower 0.4.13", "tower-layer", @@ -9641,7 +9609,7 @@ dependencies = [ "bitflags 2.9.0", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "http-range-header", @@ -9826,7 +9794,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.2.0", + "http 1.3.1", "httparse", "log", "rand 0.8.5", @@ -9843,11 +9811,11 @@ checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" dependencies = [ "bytes", "data-encoding", - "http 1.2.0", + "http 1.3.1", "httparse", "log", "rand 0.9.0", - "rustls 0.23.23", + "rustls", "rustls-pki-types", "sha1", "thiserror 2.0.12", @@ -10038,11 +10006,11 @@ dependencies = [ [[package]] name = "uuid" -version = "1.15.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ - "getrandom 0.3.1", + "getrandom 0.3.2", "serde", ] @@ -10163,9 +10131,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" -version = "0.13.3+wasi-0.2.2" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] @@ -10360,6 +10328,18 @@ dependencies = [ "rustls-pki-types", ] +[[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.44", +] + [[package]] name = "which" version = "7.0.2" @@ -10374,9 +10354,9 @@ dependencies = [ [[package]] name = "widestring" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" +checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" [[package]] name = "winapi" @@ -10458,8 +10438,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce" dependencies = [ "windows-implement 0.59.0", - "windows-interface 0.59.0", - "windows-result 0.3.1", + "windows-interface 0.59.1", + "windows-result 0.3.2", "windows-strings 0.3.1", "windows-targets 0.53.0", ] @@ -10499,9 +10479,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.59.0" +version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", @@ -10510,19 +10490,19 @@ dependencies = [ [[package]] name = "windows-link" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" [[package]] name = "windows-registry" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", + "windows-result 0.3.2", + "windows-strings 0.3.1", + "windows-targets 0.53.0", ] [[package]] @@ -10536,9 +10516,9 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ "windows-link", ] @@ -10785,9 +10765,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" dependencies = [ "memchr", ] @@ -10800,9 +10780,9 @@ checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] name = "wit-bindgen-rt" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ "bitflags 2.9.0", ] @@ -10897,11 +10877,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" dependencies = [ - "zerocopy-derive 0.8.23", + "zerocopy-derive 0.8.24", ] [[package]] @@ -10917,9 +10897,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" dependencies = [ "proc-macro2", "quote", @@ -10991,9 +10971,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938cc23ac49778ac8340e366ddc422b2227ea176edb447e23fc0627608dddadd" +checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" dependencies = [ "arbitrary", "bzip2", From d30a8703b0c7200f431988831b964eecd7e941ee Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 18:53:26 +0100 Subject: [PATCH 15/23] fix imports --- crates/evm/core/src/backend/mod.rs | 3 --- crates/evm/core/src/{backend => }/env.rs | 0 crates/evm/core/src/fork/mod.rs | 2 +- crates/evm/core/src/fork/multi.rs | 24 +++++++++++------------- crates/evm/core/src/lib.rs | 4 ++++ 5 files changed, 16 insertions(+), 17 deletions(-) rename crates/evm/core/src/{backend => }/env.rs (100%) diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 4700a1c8e2d7f..bed08d51ebf1d 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -35,9 +35,6 @@ use std::{ mod diagnostic; pub use diagnostic::RevertDiagnostic; -mod env; -pub use env::{AsEnvMut, Env, EnvMut}; - mod error; pub use error::{BackendError, BackendResult, DatabaseError, DatabaseResult}; diff --git a/crates/evm/core/src/backend/env.rs b/crates/evm/core/src/env.rs similarity index 100% rename from crates/evm/core/src/backend/env.rs rename to crates/evm/core/src/env.rs diff --git a/crates/evm/core/src/fork/mod.rs b/crates/evm/core/src/fork/mod.rs index 9401c2d32ed58..d870e6a0b0e15 100644 --- a/crates/evm/core/src/fork/mod.rs +++ b/crates/evm/core/src/fork/mod.rs @@ -1,5 +1,5 @@ use super::opts::EvmOpts; -use revm::primitives::Env; +use crate::Env; mod init; pub use init::environment; diff --git a/crates/evm/core/src/fork/multi.rs b/crates/evm/core/src/fork/multi.rs index 2470c315410a2..172802ed94b47 100644 --- a/crates/evm/core/src/fork/multi.rs +++ b/crates/evm/core/src/fork/multi.rs @@ -4,8 +4,9 @@ //! concurrently active pairs at once. use super::CreateFork; +use crate::Env; use alloy_consensus::BlockHeader; -use alloy_primitives::{map::HashMap, U256}; +use alloy_primitives::map::HashMap; use alloy_provider::network::BlockResponse; use foundry_common::provider::{ProviderBuilder, RetryProvider}; use foundry_config::Config; @@ -16,7 +17,6 @@ use futures::{ task::{Context, Poll}, Future, FutureExt, StreamExt, }; -use revm::primitives::Env; use std::{ fmt::{self, Write}, pin::Pin, @@ -150,7 +150,7 @@ impl MultiFork { } /// Updates block number and timestamp of given fork with new values. - pub fn update_block(&self, fork: ForkId, number: U256, timestamp: U256) -> eyre::Result<()> { + pub fn update_block(&self, fork: ForkId, number: u64, timestamp: u64) -> eyre::Result<()> { trace!(?fork, ?number, ?timestamp, "update fork block"); self.handler .clone() @@ -200,7 +200,7 @@ enum Request { /// Returns the environment of the fork. GetEnv(ForkId, GetEnvSender), /// Updates the block number and timestamp of the fork. - UpdateBlock(ForkId, U256, U256), + UpdateBlock(ForkId, u64, u64), /// Shutdowns the entire `MultiForkHandler`, see `ShutDownMultiFork` ShutDown(OneshotSender<()>), /// Returns the Fork Url for the `ForkId` if it exists. @@ -302,10 +302,10 @@ impl MultiForkHandler { /// Update fork block number and timestamp. Used to preserve values set by `roll` and `warp` /// cheatcodes when new fork selected. - fn update_block(&mut self, fork_id: ForkId, block_number: U256, block_timestamp: U256) { + fn update_block(&mut self, fork_id: ForkId, block_number: u64, block_timestamp: u64) { if let Some(fork) = self.forks.get_mut(&fork_id) { - fork.opts.env.block.number = block_number; - fork.opts.env.block.timestamp = block_timestamp; + fork.opts.env.evm_env.block_env.number = block_number; + fork.opts.env.evm_env.block_env.timestamp = block_timestamp; } } @@ -519,18 +519,16 @@ async fn create_fork(mut fork: CreateFork) -> eyre::Result<(ForkId, CreatedFork, // Initialise the fork environment. let (env, block) = fork.evm_opts.fork_evm_env(&fork.url).await?; fork.env = env; - let meta = BlockchainDbMeta::new(fork.env.clone(), fork.url.clone()); + let chain_id = fork.env.evm_env.cfg_env.chain_id; + let meta = BlockchainDbMeta::new(fork.env.evm_env.block_env.clone(), fork.url.clone()); // We need to use the block number from the block because the env's number can be different on // some L2s (e.g. Arbitrum). let number = block.header().number(); // Determine the cache path if caching is enabled. - let cache_path = if fork.enable_caching { - Config::foundry_block_cache_dir(meta.cfg_env.chain_id, number) - } else { - None - }; + let cache_path = + if fork.enable_caching { Config::foundry_block_cache_dir(chain_id, number) } else { None }; let db = BlockchainDb::new(meta, cache_path); let (backend, handler) = SharedBackend::new(provider, db, Some(number.into())); diff --git a/crates/evm/core/src/lib.rs b/crates/evm/core/src/lib.rs index e6155ef957534..ca0ed0da00fcc 100644 --- a/crates/evm/core/src/lib.rs +++ b/crates/evm/core/src/lib.rs @@ -26,6 +26,10 @@ pub mod backend; pub mod buffer; pub mod constants; pub mod decode; + +pub mod env; +pub use env::*; + pub mod fork; pub mod opcodes; pub mod opts; From abbc5a26e474c26b3127001e2245a666e17929ae Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 18:57:06 +0100 Subject: [PATCH 16/23] continue implementing env --- crates/evm/core/src/backend/cow.rs | 4 +-- crates/evm/core/src/backend/mod.rs | 4 +-- crates/evm/core/src/backend/snapshot.rs | 7 ++--- crates/evm/core/src/fork/init.rs | 27 +++++++++-------- crates/evm/core/src/opts.rs | 40 ++++++++++++------------- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/crates/evm/core/src/backend/cow.rs b/crates/evm/core/src/backend/cow.rs index 48c3143964c1a..fe6563cf5c10f 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -6,7 +6,7 @@ use crate::{ diagnostic::RevertDiagnostic, Backend, DatabaseExt, LocalForkId, RevertStateSnapshotAction, }, fork::{CreateFork, ForkId}, - InspectorExt, + Env, InspectorExt, }; use alloy_genesis::GenesisAccount; use alloy_primitives::{Address, B256, U256}; @@ -16,7 +16,7 @@ use foundry_fork_db::DatabaseError; use revm::{ bytecode::Bytecode, database::DatabaseRef, - primitives::{hardfork::SpecId, Env, EnvWithHandlerCfg, HashMap as Map, ResultAndState}, + primitives::{hardfork::SpecId, EnvWithHandlerCfg, HashMap as Map, ResultAndState}, state::{Account, AccountInfo}, Database, DatabaseCommit, JournaledState, }; diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index bed08d51ebf1d..c47385f8a6f9b 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -5,7 +5,7 @@ use crate::{ fork::{CreateFork, ForkId, MultiFork}, state_snapshot::StateSnapshots, utils::{configure_tx_env, configure_tx_req_env, new_evm_with_inspector}, - InspectorExt, + Env, InspectorExt, }; use alloy_genesis::GenesisAccount; use alloy_network::{AnyRpcBlock, AnyTxEnvelope, TransactionResponse}; @@ -21,7 +21,7 @@ use revm::{ inspector::NoOpInspector, precompile::{PrecompileSpecId, Precompiles}, primitives::{ - hardfork::SpecId, Env, EnvWithHandlerCfg, EvmState, EvmStorageSlot, HashMap as Map, Log, + hardfork::SpecId, EnvWithHandlerCfg, EvmState, EvmStorageSlot, HashMap as Map, Log, KECCAK_EMPTY, }, state::{Account, AccountInfo}, diff --git a/crates/evm/core/src/backend/snapshot.rs b/crates/evm/core/src/backend/snapshot.rs index 30f9e444d25d8..3d617c3792ff0 100644 --- a/crates/evm/core/src/backend/snapshot.rs +++ b/crates/evm/core/src/backend/snapshot.rs @@ -1,9 +1,6 @@ +use crate::Env; use alloy_primitives::{map::AddressHashMap, B256, U256}; -use revm::{ - primitives::{Env, HashMap}, - state::AccountInfo, - JournaledState, -}; +use revm::{primitives::HashMap, state::AccountInfo, JournaledState}; use serde::{Deserialize, Serialize}; /// A minimal abstraction of a state at a certain point in time diff --git a/crates/evm/core/src/fork/init.rs b/crates/evm/core/src/fork/init.rs index 4e05c048fd97b..05206f90dfafb 100644 --- a/crates/evm/core/src/fork/init.rs +++ b/crates/evm/core/src/fork/init.rs @@ -1,11 +1,12 @@ -use crate::utils::apply_chain_and_block_specific_env_changes; +use crate::{utils::apply_chain_and_block_specific_env_changes, Env}; use alloy_consensus::BlockHeader; +use alloy_evm::EvmEnv; use alloy_primitives::Address; use alloy_provider::{network::BlockResponse, Network, Provider}; use alloy_rpc_types::BlockNumberOrTag; use eyre::WrapErr; use foundry_common::NON_ARCHIVE_NODE_WARNING; -use revm::context::{BlockEnv, CfgEnv, Env, TxEnv}; +use revm::context::{BlockEnv, CfgEnv, TxEnv}; /// Initializes a REVM block environment based on a forked /// ethereum provider. @@ -57,16 +58,18 @@ pub async fn environment>( cfg.disable_block_gas_limit = disable_block_gas_limit; let mut env = Env { - cfg, - block: BlockEnv { - number: block.header().number(), - timestamp: block.header().timestamp(), - beneficiary: block.header().beneficiary(), - difficulty: block.header().difficulty(), - prevrandao: block.header().mix_hash(), - basefee: block.header().base_fee_per_gas().unwrap_or_default(), - gas_limit: block.header().gas_limit(), - ..Default::default() + evm_env: EvmEnv { + cfg_env: cfg, + block_env: BlockEnv { + number: block.header().number(), + timestamp: block.header().timestamp(), + beneficiary: block.header().beneficiary(), + difficulty: block.header().difficulty(), + prevrandao: block.header().mix_hash(), + basefee: block.header().base_fee_per_gas().unwrap_or_default(), + gas_limit: block.header().gas_limit(), + ..Default::default() + }, }, tx: TxEnv { caller: origin, diff --git a/crates/evm/core/src/opts.rs b/crates/evm/core/src/opts.rs index 51c47d9af4dd3..883f67177c436 100644 --- a/crates/evm/core/src/opts.rs +++ b/crates/evm/core/src/opts.rs @@ -1,5 +1,6 @@ use super::fork::environment; use crate::{constants::DEFAULT_CREATE2_DEPLOYER, fork::CreateFork}; +use alloy_evm::EvmEnv; use alloy_primitives::{Address, B256, U256}; use alloy_provider::{network::AnyRpcBlock, Provider}; use eyre::WrapErr; @@ -106,7 +107,7 @@ impl EvmOpts { /// /// If a `fork_url` is set, it gets configured with settings fetched from the endpoint (chain /// id, ) - pub async fn evm_env(&self) -> eyre::Result { + pub async fn evm_env(&self) -> eyre::Result { if let Some(ref fork_url) = self.fork_url { Ok(self.fork_evm_env(fork_url).await?.0) } else { @@ -116,10 +117,7 @@ impl EvmOpts { /// Returns the `revm::Env` that is configured with settings retrieved from the endpoint. /// And the block that was used to configure the environment. - pub async fn fork_evm_env( - &self, - fork_url: &str, - ) -> eyre::Result<(revm::primitives::Env, AnyRpcBlock)> { + pub async fn fork_evm_env(&self, fork_url: &str) -> eyre::Result<(crate::Env, AnyRpcBlock)> { let provider = ProviderBuilder::new(fork_url) .compute_units_per_second(self.get_compute_units_per_second()) .build()?; @@ -145,7 +143,7 @@ impl EvmOpts { } /// Returns the `revm::Env` configured with only local settings - pub fn local_evm_env(&self) -> revm::primitives::Env { + pub fn local_evm_env(&self) -> crate::Env { let mut cfg = CfgEnv::default(); cfg.chain_id = self.env.chain_id.unwrap_or(foundry_common::DEV_CHAIN_ID); cfg.limit_contract_code_size = self.env.code_size_limit.or(Some(usize::MAX)); @@ -156,20 +154,22 @@ impl EvmOpts { cfg.disable_eip3607 = true; cfg.disable_block_gas_limit = self.disable_block_gas_limit; - revm::primitives::Env { - block: BlockEnv { - number: U256::from(self.env.block_number), - coinbase: self.env.block_coinbase, - timestamp: U256::from(self.env.block_timestamp), - difficulty: U256::from(self.env.block_difficulty), - prevrandao: Some(self.env.block_prevrandao), - basefee: U256::from(self.env.block_base_fee_per_gas), - gas_limit: U256::from(self.gas_limit()), - ..Default::default() + crate::Env { + evm_env: EvmEnv { + block_env: BlockEnv { + number: self.env.block_number, + beneficiary: self.env.block_coinbase, + timestamp: self.env.block_timestamp, + difficulty: U256::from(self.env.block_difficulty), + prevrandao: Some(self.env.block_prevrandao), + basefee: self.env.block_base_fee_per_gas, + gas_limit: self.gas_limit(), + ..Default::default() + }, + cfg_env: cfg, }, - cfg, tx: TxEnv { - gas_price: U256::from(self.env.gas_price.unwrap_or_default()), + gas_price: self.env.gas_price.unwrap_or_default().into(), gas_limit: self.gas_limit(), caller: self.sender, ..Default::default() @@ -190,9 +190,9 @@ impl EvmOpts { /// /// for `mainnet` and `--fork-block-number 14435000` on mac the corresponding storage cache will /// be at `~/.foundry/cache/mainnet/14435000/storage.json`. - pub fn get_fork(&self, config: &Config, env: revm::primitives::Env) -> Option { + pub fn get_fork(&self, config: &Config, env: crate::Env) -> Option { let url = self.fork_url.clone()?; - let enable_caching = config.enable_caching(&url, env.cfg.chain_id); + let enable_caching = config.enable_caching(&url, env.evm_env.cfg_env.chain_id); Some(CreateFork { url, enable_caching, env, evm_opts: self.clone() }) } From fa287da27537c3016d3772b70638e9f92f8fad73 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Fri, 21 Mar 2025 19:04:48 +0100 Subject: [PATCH 17/23] continue applying Env --- crates/anvil/src/eth/backend/mem/storage.rs | 3 +-- crates/anvil/src/evm.rs | 4 ++-- crates/evm/core/src/utils.rs | 8 ++++---- crates/evm/evm/src/executors/trace.rs | 4 ++-- crates/forge/src/multi_runner.rs | 6 +++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/crates/anvil/src/eth/backend/mem/storage.rs b/crates/anvil/src/eth/backend/mem/storage.rs index e7e0031df2ddc..0681ab84eae00 100644 --- a/crates/anvil/src/eth/backend/mem/storage.rs +++ b/crates/anvil/src/eth/backend/mem/storage.rs @@ -33,8 +33,7 @@ use anvil_core::eth::{ }; use anvil_rpc::error::RpcError; use foundry_evm::{ - backend::MemDb, - revm::primitives::Env, + backend::{Env, MemDb}, traces::{ CallKind, FourByteInspector, GethTraceBuilder, ParityTraceBuilder, TracingInspectorConfig, }, diff --git a/crates/anvil/src/evm.rs b/crates/anvil/src/evm.rs index 794d2ce853ca9..2393308520548 100644 --- a/crates/anvil/src/evm.rs +++ b/crates/anvil/src/evm.rs @@ -1,5 +1,5 @@ use alloy_primitives::Address; -use foundry_evm::revm::precompile::Precompile; +use foundry_evm::{backend::Env, revm::precompile::Precompile}; use std::{fmt::Debug, sync::Arc}; /// Object-safe trait that enables injecting extra precompiles when using @@ -53,7 +53,7 @@ mod tests { } let db = revm::db::EmptyDB::default(); - let env = Box::::default(); + let env = Box::::default(); let spec = SpecId::LATEST; let handler_cfg = revm::primitives::HandlerCfg::new(spec); let inspector = revm::inspectors::NoOpInspector; diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index e650b3039c5f0..5919d34ba0a1c 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -1,7 +1,7 @@ pub use crate::ic::*; use crate::{ backend::DatabaseExt, constants::DEFAULT_CREATE2_DEPLOYER_CODEHASH, precompiles::ODYSSEY_P256, - InspectorExt, + Env, InspectorExt, }; use alloy_consensus::BlockHeader; use alloy_json_abi::{Function, JsonAbi}; @@ -33,7 +33,7 @@ pub use revm::primitives::EvmState as StateChangeset; /// /// Should be called with proper chain id (retrieved from provider if not provided). pub fn apply_chain_and_block_specific_env_changes( - env: &mut revm::primitives::Env, + env: &mut Env, block: &N::BlockResponse, ) { use NamedChain::*; @@ -101,7 +101,7 @@ pub fn get_function<'a>( /// Configures the env for the given RPC transaction. /// Accounts for an impersonated transaction by resetting the `env.tx.caller` field to `tx.from`. -pub fn configure_tx_env(env: &mut revm::primitives::Env, tx: &Transaction) { +pub fn configure_tx_env(env: &mut Env, tx: &Transaction) { let impersonated_from = is_impersonated_tx(&tx.inner).then_some(tx.from()); if let AnyTxEnvelope::Ethereum(tx) = &tx.inner.inner() { configure_tx_req_env(env, &tx.clone().into(), impersonated_from).expect("cannot fail"); @@ -112,7 +112,7 @@ pub fn configure_tx_env(env: &mut revm::primitives::Env, tx: &Transaction, ) -> eyre::Result<()> { diff --git a/crates/evm/evm/src/executors/trace.rs b/crates/evm/evm/src/executors/trace.rs index 43f2fc872edc6..edad002c47b4d 100644 --- a/crates/evm/evm/src/executors/trace.rs +++ b/crates/evm/evm/src/executors/trace.rs @@ -2,7 +2,7 @@ use crate::executors::{Executor, ExecutorBuilder}; use alloy_primitives::Address; use foundry_compilers::artifacts::EvmVersion; use foundry_config::{utils::evm_spec_id, Chain, Config}; -use foundry_evm_core::{backend::Backend, fork::CreateFork, opts::EvmOpts}; +use foundry_evm_core::{backend::Backend, fork::CreateFork, opts::EvmOpts, Env}; use foundry_evm_traces::TraceMode; use revm::primitives::{hardfork::SpecId, Env}; use std::ops::{Deref, DerefMut}; @@ -14,7 +14,7 @@ pub struct TracingExecutor { impl TracingExecutor { pub fn new( - env: revm::primitives::Env, + env: Env, fork: Option, version: Option, trace_mode: TraceMode, diff --git a/crates/forge/src/multi_runner.rs b/crates/forge/src/multi_runner.rs index 0e071086199df..b0e6106ca0c21 100644 --- a/crates/forge/src/multi_runner.rs +++ b/crates/forge/src/multi_runner.rs @@ -15,7 +15,7 @@ use foundry_compilers::{ }; use foundry_config::{Config, InlineConfig}; use foundry_evm::{ - backend::Backend, + backend::{Backend, Env}, decode::RevertDecoder, executors::{Executor, ExecutorBuilder}, fork::CreateFork, @@ -274,7 +274,7 @@ pub struct TestRunnerConfig { /// EVM configuration. pub evm_opts: EvmOpts, /// EVM environment. - pub env: revm::primitives::Env, + pub env: Env, /// EVM version. pub spec_id: SpecId, /// The address which will be used to deploy the initial contracts and send all transactions. @@ -467,7 +467,7 @@ impl MultiContractRunnerBuilder { self, root: &Path, output: &ProjectCompileOutput, - env: revm::primitives::Env, + env: Env, evm_opts: EvmOpts, ) -> Result { let contracts = output From 906b21f0b6e9b9c855ea991172082fda0ae1f48a Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Mon, 24 Mar 2025 09:41:28 +0100 Subject: [PATCH 18/23] continue porting types --- crates/evm/core/src/utils.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 5919d34ba0a1c..2a07a71a9e0dd 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -44,7 +44,8 @@ pub fn apply_chain_and_block_specific_env_changes( Mainnet => { // after merge difficulty is supplanted with prevrandao EIP-4399 if block_number >= 15_537_351u64 { - env.block.difficulty = env.block.prevrandao.unwrap_or_default().into(); + env.evm_env.block_env.difficulty = + env.evm_env.block_env.prevrandao.unwrap_or_default().into(); } return; @@ -56,13 +57,13 @@ pub fn apply_chain_and_block_specific_env_changes( // (`mixHash`) is always zero, even though bsc adopts the newer EVM // specification. This will confuse revm and causes emulation // failure. - env.block.prevrandao = Some(env.block.difficulty.into()); + env.evm_env.block_env.prevrandao = Some(env.evm_env.block_env.difficulty.into()); return; } Moonbeam | Moonbase | Moonriver | MoonbeamDev => { - if env.block.prevrandao.is_none() { + if env.evm_env.block_env.prevrandao.is_none() { // - env.block.prevrandao = Some(B256::random()); + env.evm_env.block_env.prevrandao = Some(B256::random()); } } c if c.is_arbitrum() => { @@ -71,11 +72,9 @@ pub fn apply_chain_and_block_specific_env_changes( if let Some(l1_block_number) = block .other_fields() .and_then(|other| other.get("l1BlockNumber").cloned()) - .and_then(|l1_block_number| { - serde_json::from_value::(l1_block_number).ok() - }) + .and_then(|l1_block_number| serde_json::from_value::(l1_block_number).ok()) { - env.block.number = l1_block_number; + env.evm_env.block_env.number = l1_block_number; } } _ => {} @@ -84,7 +83,8 @@ pub fn apply_chain_and_block_specific_env_changes( // if difficulty is `0` we assume it's past merge if block.header().difficulty().is_zero() { - env.block.difficulty = env.block.prevrandao.unwrap_or_default().into(); + env.evm_env.block_env.difficulty = + env.evm_env.block_env.prevrandao.unwrap_or_default().into(); } } @@ -136,13 +136,13 @@ pub fn configure_tx_req_env( } = *tx; // If no `to` field then set create kind: https://eips.ethereum.org/EIPS/eip-2470#deployment-transaction - env.tx.transact_to = to.unwrap_or(TxKind::Create); + env.tx.kind = to.unwrap_or(TxKind::Create); // If the transaction is impersonated, we need to set the caller to the from // address Ref: https://github.com/foundry-rs/foundry/issues/9541 env.tx.caller = impersonated_from.unwrap_or(from.ok_or_else(|| eyre::eyre!("missing `from` field"))?); env.tx.gas_limit = gas.ok_or_else(|| eyre::eyre!("missing `gas` field"))?; - env.tx.nonce = nonce; + env.tx.nonce = nonce.unwrap_or_default(); env.tx.value = value.unwrap_or_default(); env.tx.data = input.input().cloned().unwrap_or_default(); env.tx.chain_id = chain_id; From 2ae309d44a3189130d63e22eebcf00b72690ba20 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Mon, 24 Mar 2025 09:50:13 +0100 Subject: [PATCH 19/23] continue fixing types --- crates/evm/core/src/utils.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 2a07a71a9e0dd..c85285cc12ab6 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -6,7 +6,7 @@ use crate::{ use alloy_consensus::BlockHeader; use alloy_json_abi::{Function, JsonAbi}; use alloy_network::{AnyTxEnvelope, TransactionResponse}; -use alloy_primitives::{Address, Selector, TxKind, B256, U256}; +use alloy_primitives::{Address, Selector, TxKind, B256, U128, U256}; use alloy_provider::{network::BlockResponse, Network}; use alloy_rpc_types::{Transaction, TransactionRequest}; use foundry_common::is_impersonated_tx; @@ -148,15 +148,15 @@ pub fn configure_tx_req_env( env.tx.chain_id = chain_id; // Type 1, EIP-2930 - env.tx.access_list = access_list.clone().unwrap_or_default().0.into_iter().collect(); + env.tx.access_list = access_list.clone().unwrap_or_default(); // Type 2, EIP-1559 - env.tx.gas_price = U256::from(gas_price.or(max_fee_per_gas).unwrap_or_default()); - env.tx.gas_priority_fee = max_priority_fee_per_gas.map(U256::from); + env.tx.gas_price = gas_price.or(max_fee_per_gas).unwrap_or_default(); + env.tx.gas_priority_fee = max_priority_fee_per_gas; // Type 3, EIP-4844 env.tx.blob_hashes = blob_versioned_hashes.clone().unwrap_or_default(); - env.tx.max_fee_per_blob_gas = max_fee_per_blob_gas.map(U256::from); + env.tx.max_fee_per_blob_gas = max_fee_per_blob_gas.unwrap_or_default(); // Type 4, EIP-7702 if let Some(authorization_list) = authorization_list { @@ -169,7 +169,7 @@ pub fn configure_tx_req_env( /// Get the gas used, accounting for refunds pub fn gas_used(spec: SpecId, spent: u64, refunded: u64) -> u64 { - let refund_quotient = if SpecId::enabled(spec, SpecId::LONDON) { 5 } else { 2 }; + let refund_quotient = if SpecId::is_enabled_in(spec, SpecId::LONDON) { 5 } else { 2 }; spent - (refunded).min(spent / refund_quotient) } From 28fcee6644c7b819621c8850af9b05140cce14c0 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Mon, 24 Mar 2025 09:58:06 +0100 Subject: [PATCH 20/23] continue fixing types --- crates/evm/core/src/backend/cow.rs | 3 ++- crates/evm/core/src/backend/mod.rs | 27 +++++++++++++-------------- crates/evm/core/src/ic.rs | 1 - crates/evm/core/src/utils.rs | 7 +++---- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/crates/evm/core/src/backend/cow.rs b/crates/evm/core/src/backend/cow.rs index fe6563cf5c10f..a462503ebd10e 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -15,8 +15,9 @@ use eyre::WrapErr; use foundry_fork_db::DatabaseError; use revm::{ bytecode::Bytecode, + context_interface::result::ResultAndState, database::DatabaseRef, - primitives::{hardfork::SpecId, EnvWithHandlerCfg, HashMap as Map, ResultAndState}, + primitives::{hardfork::SpecId, EnvWithHandlerCfg, HashMap as Map}, state::{Account, AccountInfo}, Database, DatabaseCommit, JournaledState, }; diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index c47385f8a6f9b..ef5bb0b73e2ef 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -1052,8 +1052,8 @@ impl DatabaseExt for Backend { if let Some(active_fork_id) = self.active_fork_id() { self.forks.update_block( self.ensure_fork_id(active_fork_id).cloned()?, - env.block.number, - env.block.timestamp, + env.evm_env.block_env.number, + env.evm_env.block_env.timestamp, )?; } @@ -1825,8 +1825,8 @@ impl Default for BackendInner { /// This updates the currently used env with the fork's environment pub(crate) fn update_current_env_with_fork_env(current: &mut Env, fork: Env) { - current.block = fork.block; - current.cfg = fork.cfg; + current.evm_env.block_env = fork.evm_env.block_env; + current.evm_env.cfg_env = fork.evm_env.cfg_env; current.tx.chain_id = fork.tx.chain_id; } @@ -1916,15 +1916,15 @@ fn is_contract_in_state(journaled_state: &JournaledState, acc: Address) -> bool /// Updates the env's block with the block's data fn update_env_block(env: &mut Env, block: &AnyRpcBlock) { - env.block.timestamp = U256::from(block.header.timestamp); - env.block.coinbase = block.header.beneficiary; - env.block.difficulty = block.header.difficulty; - env.block.prevrandao = Some(block.header.mix_hash.unwrap_or_default()); - env.block.basefee = U256::from(block.header.base_fee_per_gas.unwrap_or_default()); - env.block.gas_limit = U256::from(block.header.gas_limit); - env.block.number = U256::from(block.header.number); + env.evm_env.block_env.timestamp = block.header.timestamp; + env.evm_env.block_env.beneficiary = block.header.beneficiary; + env.evm_env.block_env.difficulty = block.header.difficulty; + env.evm_env.block_env.prevrandao = Some(block.header.mix_hash.unwrap_or_default()); + env.evm_env.block_env.basefee = block.header.base_fee_per_gas.unwrap_or_default(); + env.evm_env.block_env.gas_limit = block.header.gas_limit; + env.evm_env.block_env.number = block.header.number; if let Some(excess_blob_gas) = block.header.excess_blob_gas { - env.block.blob_excess_gas_and_price = + env.evm_env.block_env.blob_excess_gas_and_price = Some(BlobExcessGasAndPrice::new(excess_blob_gas, false)); } } @@ -2045,8 +2045,7 @@ mod tests { } drop(backend); - let meta = - BlockchainDbMeta { cfg_env: env.cfg, block_env: env.block, hosts: Default::default() }; + let meta = BlockchainDbMeta { block_env: env.evm_env.block_env, hosts: Default::default() }; let db = BlockchainDb::new( meta, diff --git a/crates/evm/core/src/ic.rs b/crates/evm/core/src/ic.rs index 4e37322a64e99..8efaac22d9640 100644 --- a/crates/evm/core/src/ic.rs +++ b/crates/evm/core/src/ic.rs @@ -1,7 +1,6 @@ use alloy_primitives::map::rustc_hash::FxHashMap; use eyre::Result; use revm::bytecode::opcode::{OpCode, PUSH0, PUSH1, PUSH32}; -use revm_inspectors::opcode::immediate_size; use serde::Serialize; /// Maps from program counter to instruction counter. diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index c85285cc12ab6..35260614fac06 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -6,7 +6,7 @@ use crate::{ use alloy_consensus::BlockHeader; use alloy_json_abi::{Function, JsonAbi}; use alloy_network::{AnyTxEnvelope, TransactionResponse}; -use alloy_primitives::{Address, Selector, TxKind, B256, U128, U256}; +use alloy_primitives::{Address, Selector, TxKind, B256, U256}; use alloy_provider::{network::BlockResponse, Network}; use alloy_rpc_types::{Transaction, TransactionRequest}; use foundry_common::is_impersonated_tx; @@ -37,7 +37,7 @@ pub fn apply_chain_and_block_specific_env_changes( block: &N::BlockResponse, ) { use NamedChain::*; - if let Ok(chain) = NamedChain::try_from(env.cfg.chain_id) { + if let Ok(chain) = NamedChain::try_from(env.evm_env.cfg_env.chain_id) { let block_number = block.header().number(); match chain { @@ -160,8 +160,7 @@ pub fn configure_tx_req_env( // Type 4, EIP-7702 if let Some(authorization_list) = authorization_list { - env.tx.authorization_list = - Some(revm::primitives::AuthorizationList::Signed(authorization_list.clone())); + env.tx.authorization_list = authorization_list.clone(); } Ok(()) From 61215b1c9492f65a80c4b63e50f998533c6635d2 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Mon, 24 Mar 2025 10:11:26 +0100 Subject: [PATCH 21/23] fix types --- crates/evm/core/src/backend/error.rs | 1 - crates/verify/src/bytecode.rs | 4 ++-- crates/verify/src/utils.rs | 14 +++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/crates/evm/core/src/backend/error.rs b/crates/evm/core/src/backend/error.rs index 7ed1e42fe9b3b..42456cceadd16 100644 --- a/crates/evm/core/src/backend/error.rs +++ b/crates/evm/core/src/backend/error.rs @@ -59,7 +59,6 @@ impl> From> for BackendError { EVMError::Database(err) => err.into(), EVMError::Custom(err) => Self::msg(err), EVMError::Header(err) => Self::msg(err.to_string()), - EVMError::Precompile(err) => Self::msg(err), EVMError::Transaction(err) => Self::msg(err.to_string()), } } diff --git a/crates/verify/src/bytecode.rs b/crates/verify/src/bytecode.rs index 85a7fddab64e0..ca0f65e8ec1ea 100644 --- a/crates/verify/src/bytecode.rs +++ b/crates/verify/src/bytecode.rs @@ -243,7 +243,7 @@ impl VerifyBytecodeArgs { ) .await?; - env.block.number = U256::ZERO; // Genesis block + env.evm_env.block_env.number = 0_u64; // Genesis block let genesis_block = provider.get_block(gen_blk_num.into()).full().await?; // Setup genesis tx and env. @@ -445,7 +445,7 @@ impl VerifyBytecodeArgs { evm_opts, ) .await?; - env.block.number = U256::from(simulation_block); + env.evm_env.block_env.number = simulation_block; let block = provider.get_block(simulation_block.into()).full().await?; // Workaround for the NonceTooHigh issue as we're not simulating prior txs of the same diff --git a/crates/verify/src/utils.rs b/crates/verify/src/utils.rs index e71c497e88535..80bc18b84b63f 100644 --- a/crates/verify/src/utils.rs +++ b/crates/verify/src/utils.rs @@ -22,7 +22,7 @@ use revm::primitives::{ database::Database, env::{EnvWithHandlerCfg, HandlerCfg}, hardfork::SpecId, - Env, TxKind, + TxKind, }; use semver::Version; use serde::{Deserialize, Serialize}; @@ -351,12 +351,12 @@ pub async fn get_tracing_executor( } pub fn configure_env_block(env: &mut Env, block: &AnyRpcBlock) { - env.block.timestamp = U256::from(block.header.timestamp); - env.block.coinbase = block.header.beneficiary; - env.block.difficulty = block.header.difficulty; - env.block.prevrandao = Some(block.header.mix_hash.unwrap_or_default()); - env.block.basefee = U256::from(block.header.base_fee_per_gas.unwrap_or_default()); - env.block.gas_limit = U256::from(block.header.gas_limit); + env.evm_env.block_env.timestamp = block.header.timestamp; + env.evm_env.block_env.beneficiary = block.header.beneficiary; + env.evm_env.block_env.difficulty = block.header.difficulty; + env.evm_env.block_env.prevrandao = block.header.mix_hash; + env.evm_env.block_env.basefee = block.header.base_fee_per_gas.unwrap_or_default(); + env.evm_env.block_env.gas_limit = block.header.gas_limit; } pub fn deploy_contract( From df2372fd448b7017c03eae33cbbd487adf1386c6 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Mon, 24 Mar 2025 11:08:12 +0100 Subject: [PATCH 22/23] fix import --- crates/evm/core/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 35260614fac06..377ac088fc0a4 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -37,7 +37,7 @@ pub fn apply_chain_and_block_specific_env_changes( block: &N::BlockResponse, ) { use NamedChain::*; - if let Ok(chain) = NamedChain::try_from(env.evm_env.cfg_env.chain_id) { + if let Ok(chain) = NamedChain::try_from(env.evm_env.cfg_env.cfg.chain_id) { let block_number = block.header().number(); match chain { From 534f6df4e10c278cc7ed9d19efd370e7f923e0e2 Mon Sep 17 00:00:00 2001 From: zerosnacks Date: Mon, 24 Mar 2025 13:07:08 +0100 Subject: [PATCH 23/23] clean up --- Cargo.lock | 1 + crates/evm/core/src/backend/cow.rs | 7 +++---- crates/evm/core/src/backend/error.rs | 2 +- crates/evm/core/src/backend/mod.rs | 11 ++++------- crates/evm/core/src/backend/snapshot.rs | 2 -- crates/evm/core/src/fork/multi.rs | 2 -- crates/evm/core/src/lib.rs | 1 - crates/evm/core/src/utils.rs | 5 ++--- crates/verify/Cargo.toml | 1 + crates/verify/src/bytecode.rs | 4 ++-- crates/verify/src/utils.rs | 16 +++++++++------- 11 files changed, 23 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39797f347cd19..2acf0a43078ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3713,6 +3713,7 @@ dependencies = [ "foundry-compilers", "foundry-config", "foundry-evm", + "foundry-evm-core", "foundry-test-utils", "futures", "itertools 0.14.0", diff --git a/crates/evm/core/src/backend/cow.rs b/crates/evm/core/src/backend/cow.rs index c2c05b8a9f3f3..72f0f04b97e86 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -16,10 +16,9 @@ use foundry_fork_db::DatabaseError; use revm::{ bytecode::Bytecode, context::{result::ResultAndState, JournalInit}, - context_interface::result::ResultAndState, database::DatabaseRef, primitives::{hardfork::SpecId, EnvWithHandlerCfg, HashMap as Map}, - state::{Account, AccountInfo, Bytecode}, + state::{Account, AccountInfo}, Database, DatabaseCommit, ExecuteEvm, JournaledState, }; use std::{borrow::Cow, collections::BTreeMap}; @@ -91,7 +90,7 @@ impl<'a> CowBackend<'a> { /// Returns a mutable instance of the Backend. /// /// If this is the first time this is called, the backed is cloned and initialized. - fn backend_mut(&mut self, env: EnvMut<'_>) -> &mut Backend { + fn backend_mut(&mut self, mut env: EnvMut<'_>) -> &mut Backend { let env = env.as_env_mut().to_owned(); if !self.is_initialized { let backend = self.backend.to_mut(); @@ -167,7 +166,7 @@ impl DatabaseExt for CowBackend<'_> { &mut self, id: Option, block_number: u64, - env: EnvMut<'_>, + mut env: EnvMut<'_>, journaled_state: &mut JournaledState<'_>, ) -> eyre::Result<()> { self.backend_mut(env.as_env_mut()).roll_fork(id, block_number, env, journaled_state) diff --git a/crates/evm/core/src/backend/error.rs b/crates/evm/core/src/backend/error.rs index 084bed96486d9..5e3aacc1040a4 100644 --- a/crates/evm/core/src/backend/error.rs +++ b/crates/evm/core/src/backend/error.rs @@ -1,6 +1,6 @@ use alloy_primitives::Address; pub use foundry_fork_db::{DatabaseError, DatabaseResult}; -use revm::{context::result::EVMError, context_interface::result::EVMError}; +use revm::context::result::EVMError; use std::{convert::Infallible, fmt::Display}; pub type BackendResult = Result; diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 5201b718f521f..b5a968cf7b3f0 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -20,11 +20,8 @@ use revm::{ database::{CacheDB, DatabaseRef}, inspector::NoOpInspector, precompile::{PrecompileSpecId, Precompiles}, - primitives::{ - hardfork::SpecId, EnvWithHandlerCfg, EvmState, EvmStorageSlot, HashMap as Map, Log, - KECCAK_EMPTY, - }, - state::{Account, AccountInfo}, + primitives::{hardfork::SpecId, EnvWithHandlerCfg, HashMap as Map, Log, KECCAK_EMPTY}, + state::{Account, AccountInfo, EvmState, EvmStorageSlot}, Database, DatabaseCommit, JournaledState, }; use std::{ @@ -1054,8 +1051,8 @@ impl DatabaseExt for Backend { if let Some(active_fork_id) = self.active_fork_id() { self.forks.update_block( self.ensure_fork_id(active_fork_id).cloned()?, - env.evm_env.block_env.number, - env.evm_env.block_env.timestamp, + env.block.number, + env.block.timestamp, )?; } diff --git a/crates/evm/core/src/backend/snapshot.rs b/crates/evm/core/src/backend/snapshot.rs index 685c46c824577..afc56c01ca552 100644 --- a/crates/evm/core/src/backend/snapshot.rs +++ b/crates/evm/core/src/backend/snapshot.rs @@ -3,8 +3,6 @@ use alloy_primitives::{map::AddressHashMap, B256, U256}; use revm::{primitives::HashMap, state::AccountInfo, JournaledState}; use serde::{Deserialize, Serialize}; -use crate::Env; - /// A minimal abstraction of a state at a certain point in time #[derive(Clone, Debug, Default, Serialize, Deserialize)] pub struct StateSnapshot { diff --git a/crates/evm/core/src/fork/multi.rs b/crates/evm/core/src/fork/multi.rs index bd57a0cd754e5..172802ed94b47 100644 --- a/crates/evm/core/src/fork/multi.rs +++ b/crates/evm/core/src/fork/multi.rs @@ -3,8 +3,6 @@ //! The design is similar to the single `SharedBackend`, `BackendHandler` but supports multiple //! concurrently active pairs at once. -use crate::Env; - use super::CreateFork; use crate::Env; use alloy_consensus::BlockHeader; diff --git a/crates/evm/core/src/lib.rs b/crates/evm/core/src/lib.rs index 455b7e626ea15..18b6f1cbb232e 100644 --- a/crates/evm/core/src/lib.rs +++ b/crates/evm/core/src/lib.rs @@ -37,7 +37,6 @@ pub mod opts; pub mod precompiles; pub mod state_snapshot; pub mod utils; -pub use env::*; use utils::FoundryEvmCtx; /// An extension trait that allows us to add additional hooks to Inspector for later use in diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 6718a1169d80f..836be727fceec 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -1,10 +1,10 @@ pub use crate::ic::*; use crate::{ backend::DatabaseExt, constants::DEFAULT_CREATE2_DEPLOYER_CODEHASH, precompiles::ODYSSEY_P256, - AsEnvMut, Env, InspectorExt, + AsEnvMut, Env, EnvMut, InspectorExt, }; use alloy_consensus::BlockHeader; -use alloy_evm::{eth::EthEvmContext, EvmEnv}; +use alloy_evm::eth::EthEvmContext; use alloy_json_abi::{Function, JsonAbi}; use alloy_network::{AnyTxEnvelope, TransactionResponse}; use alloy_primitives::{Address, Bytes, Selector, TxKind, B256, U256}; @@ -20,7 +20,6 @@ use revm::{ return_ok, CallInputs, CallOutcome, CallScheme, CallValue, CreateInputs, CreateOutcome, Gas, InstructionResult, InterpreterResult, }, - precompile::secp256r1::P256VERIFY, primitives::{hardfork::SpecId, HandlerCfg, KECCAK_EMPTY}, }; use std::{cell::RefCell, rc::Rc, sync::Arc}; diff --git a/crates/verify/Cargo.toml b/crates/verify/Cargo.toml index 4060f0975f881..08bd798e78c16 100644 --- a/crates/verify/Cargo.toml +++ b/crates/verify/Cargo.toml @@ -18,6 +18,7 @@ foundry-config.workspace = true foundry-cli.workspace = true foundry-common.workspace = true foundry-evm.workspace = true +foundry-evm-core.workspace = true serde_json.workspace = true alloy-json-abi.workspace = true alloy-primitives.workspace = true diff --git a/crates/verify/src/bytecode.rs b/crates/verify/src/bytecode.rs index ca0f65e8ec1ea..17c69fa57442d 100644 --- a/crates/verify/src/bytecode.rs +++ b/crates/verify/src/bytecode.rs @@ -243,7 +243,7 @@ impl VerifyBytecodeArgs { ) .await?; - env.evm_env.block_env.number = 0_u64; // Genesis block + env.block.number = 0_u64; // Genesis block let genesis_block = provider.get_block(gen_blk_num.into()).full().await?; // Setup genesis tx and env. @@ -445,7 +445,7 @@ impl VerifyBytecodeArgs { evm_opts, ) .await?; - env.evm_env.block_env.number = simulation_block; + env.block.number = simulation_block; let block = provider.get_block(simulation_block.into()).full().await?; // Workaround for the NonceTooHigh issue as we're not simulating prior txs of the same diff --git a/crates/verify/src/utils.rs b/crates/verify/src/utils.rs index 80bc18b84b63f..7d8a9e273fbc8 100644 --- a/crates/verify/src/utils.rs +++ b/crates/verify/src/utils.rs @@ -16,6 +16,7 @@ use foundry_evm::{ constants::DEFAULT_CREATE2_DEPLOYER, executors::TracingExecutor, opts::EvmOpts, traces::TraceMode, }; +use foundry_evm_core::AsEnvMut; use reqwest::Url; use revm::primitives::{ bytecode::Bytecode, @@ -350,13 +351,14 @@ pub async fn get_tracing_executor( Ok((env, executor)) } -pub fn configure_env_block(env: &mut Env, block: &AnyRpcBlock) { - env.evm_env.block_env.timestamp = block.header.timestamp; - env.evm_env.block_env.beneficiary = block.header.beneficiary; - env.evm_env.block_env.difficulty = block.header.difficulty; - env.evm_env.block_env.prevrandao = block.header.mix_hash; - env.evm_env.block_env.basefee = block.header.base_fee_per_gas.unwrap_or_default(); - env.evm_env.block_env.gas_limit = block.header.gas_limit; +pub fn configure_env_block(mut env: impl AsEnvMut, block: &AnyRpcBlock) { + let env = env.as_env_mut(); + env.block.timestamp = block.header.timestamp; + env.block.beneficiary = block.header.beneficiary; + env.block.difficulty = block.header.difficulty; + env.block.prevrandao = block.header.mix_hash; + env.block.basefee = block.header.base_fee_per_gas.unwrap_or_default(); + env.block.gas_limit = block.header.gas_limit; } pub fn deploy_contract(