diff --git a/Cargo.lock b/Cargo.lock index 1b533749fd15e..2acf0a43078ad 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,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", @@ -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", @@ -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", @@ -144,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", @@ -160,7 +161,7 @@ dependencies = [ "proptest", "serde", "serde_json", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] @@ -184,8 +185,6 @@ checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ "alloy-primitives", "alloy-rlp", - "arbitrary", - "rand 0.8.5", "serde", ] @@ -197,18 +196,16 @@ checksum = "9b15b13d38b366d01e818fe8e710d4d702ef7499eacd44926a06171dd9585d0c" dependencies = [ "alloy-primitives", "alloy-rlp", - "arbitrary", "k256", - "rand 0.8.5", "serde", "thiserror 2.0.12", ] [[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", @@ -222,14 +219,32 @@ dependencies = [ "either", "once_cell", "serde", - "sha2", + "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", + "op-revm", + "revm", + "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", "alloy-primitives", @@ -238,11 +253,24 @@ 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" +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", @@ -252,9 +280,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", @@ -266,9 +294,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", @@ -292,9 +320,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", @@ -305,9 +333,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", @@ -328,7 +356,7 @@ dependencies = [ "proptest-derive", "rand 0.8.5", "ruint", - "rustc-hash", + "rustc-hash 2.1.1", "serde", "sha3", "tiny-keccak", @@ -336,9 +364,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", @@ -379,9 +407,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", @@ -420,9 +448,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", @@ -431,6 +459,7 @@ dependencies = [ "alloy-transport-http", "alloy-transport-ipc", "alloy-transport-ws", + "async-stream", "futures", "pin-project 1.1.10", "reqwest", @@ -440,15 +469,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", @@ -462,9 +492,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", @@ -474,9 +504,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", @@ -485,9 +515,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", @@ -495,9 +525,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", @@ -513,9 +543,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", @@ -533,9 +563,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", @@ -547,9 +577,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", @@ -559,9 +589,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", @@ -570,9 +600,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", @@ -587,9 +617,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", @@ -605,9 +635,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", @@ -623,9 +653,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", @@ -643,9 +673,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", @@ -662,9 +692,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", @@ -679,9 +709,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", @@ -693,9 +723,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", @@ -712,14 +742,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", @@ -729,19 +760,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", @@ -752,13 +783,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", @@ -771,9 +805,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", @@ -786,9 +820,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", @@ -806,15 +840,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", @@ -990,7 +1024,7 @@ dependencies = [ "foundry-evm", "foundry-test-utils", "futures", - "hyper 1.6.0", + "hyper", "itertools 0.14.0", "op-alloy-consensus", "op-alloy-rpc-types", @@ -1015,6 +1049,7 @@ dependencies = [ "alloy-consensus", "alloy-dyn-abi", "alloy-eips", + "alloy-evm", "alloy-network", "alloy-primitives", "alloy-rlp", @@ -1078,9 +1113,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", @@ -1210,6 +1245,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" @@ -1230,9 +1271,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", @@ -1285,9 +1326,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", @@ -1355,9 +1396,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", @@ -1365,7 +1406,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", @@ -1374,7 +1415,7 @@ dependencies = [ "bytes", "fastrand", "hex", - "http 0.2.12", + "http 1.3.1", "ring", "time", "tokio", @@ -1385,9 +1426,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", @@ -1395,16 +1436,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", @@ -1417,19 +1481,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", @@ -1444,14 +1508,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", @@ -1466,14 +1530,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", @@ -1488,14 +1552,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", @@ -1511,12 +1575,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", @@ -1524,10 +1588,10 @@ dependencies = [ "hex", "hmac", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "once_cell", "percent-encoding", - "sha2", + "sha2 0.10.8", "time", "tracing", ] @@ -1543,46 +1607,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" @@ -1595,7 +1619,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", @@ -1613,14 +1637,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", ] @@ -1650,14 +1677,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", @@ -1677,7 +1704,7 @@ dependencies = [ "aws-smithy-types", "bytes", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "pin-project-lite", "tokio", "tracing", @@ -1694,7 +1721,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", @@ -1718,9 +1745,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", @@ -1741,10 +1768,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", @@ -1776,7 +1803,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "mime", @@ -1833,9 +1860,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" @@ -1849,6 +1876,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" @@ -1879,6 +1929,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 +1957,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" dependencies = [ - "arbitrary", "serde", ] @@ -1908,6 +1973,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" @@ -1931,9 +2005,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", @@ -1941,9 +2015,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", @@ -1960,7 +2034,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ - "sha2", + "sha2 0.10.8", "tinyvec", ] @@ -2129,13 +2203,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" @@ -2234,6 +2319,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" @@ -2271,9 +2367,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", ] @@ -2315,7 +2411,7 @@ dependencies = [ "nix 0.29.0", "terminfo", "thiserror 2.0.12", - "which", + "which 7.0.2", "windows-sys 0.59.0", ] @@ -2342,6 +2438,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" @@ -2354,7 +2459,7 @@ dependencies = [ "hmac", "k256", "serde", - "sha2", + "sha2 0.10.8", "thiserror 1.0.69", ] @@ -2370,7 +2475,7 @@ dependencies = [ "once_cell", "pbkdf2 0.12.2", "rand 0.8.5", - "sha2", + "sha2 0.10.8", "thiserror 1.0.69", ] @@ -2388,7 +2493,7 @@ dependencies = [ "generic-array", "ripemd", "serde", - "sha2", + "sha2 0.10.8", "sha3", "thiserror 1.0.69", ] @@ -2789,9 +2894,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" dependencies = [ "powerfmt", "serde", @@ -2808,6 +2913,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 +3037,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", @@ -3146,7 +3262,7 @@ dependencies = [ "anstream", "anstyle", "env_filter", - "jiff 0.2.4", + "jiff 0.2.5", "log", ] @@ -3198,7 +3314,7 @@ dependencies = [ "scrypt", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "sha3", "thiserror 1.0.69", "uuid 0.8.2", @@ -3291,7 +3407,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", ] @@ -3379,9 +3495,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" @@ -3597,12 +3713,13 @@ dependencies = [ "foundry-compilers", "foundry-config", "foundry-evm", + "foundry-evm-core", "foundry-test-utils", "futures", "itertools 0.14.0", "regex", "reqwest", - "revm-primitives", + "revm", "semver 1.0.26", "serde", "serde_json", @@ -3623,9 +3740,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", @@ -3801,7 +3918,7 @@ dependencies = [ "chrono", "comfy-table", "foundry-macros", - "revm-primitives", + "revm", "serde", "serde_json", "similar-asserts", @@ -3833,7 +3950,7 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "solar-parse", "svm-rs", "svm-rs-builds", @@ -3841,7 +3958,7 @@ dependencies = [ "thiserror 2.0.12", "tokio", "tracing", - "winnow 0.7.3", + "winnow 0.7.4", "yansi", ] @@ -3937,7 +4054,7 @@ dependencies = [ "path-slash", "regex", "reqwest", - "revm-primitives", + "revm", "semver 1.0.26", "serde", "serde_json", @@ -4016,6 +4133,7 @@ version = "1.0.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", + "alloy-evm", "alloy-genesis", "alloy-json-abi", "alloy-network", @@ -4114,8 +4232,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", @@ -4351,15 +4468,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", @@ -4416,14 +4533,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]] @@ -4698,25 +4817,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" @@ -4728,7 +4828,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.2.0", + "http 1.3.1", "indexmap 2.8.0", "slab", "tokio", @@ -4738,9 +4838,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", @@ -4748,9 +4848,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", @@ -4817,6 +4917,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" @@ -4883,9 +4992,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", @@ -4910,18 +5019,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", ] @@ -4946,9 +5055,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" @@ -4960,30 +5069,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" @@ -4993,8 +5078,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", @@ -5005,22 +5090,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" @@ -5028,14 +5097,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", ] @@ -5046,7 +5115,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", @@ -5062,9 +5131,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", @@ -5074,14 +5143,15 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.61" +version = "0.1.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +checksum = "b2fd658b06e56721792c5df4475705b6cda790e9298d19d2f8af083457bcd127" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core 0.52.0", ] @@ -5351,9 +5421,9 @@ checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" [[package]] name = "inferno" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692eda1cc790750b9f5a5e3921ef9c117fd5498b97cfacbc910693e5b29002dc" +checksum = "2094aecddc672e902cd773bad7071542f63641e01e9187c3bba4b43005e837e9" dependencies = [ "ahash", "itoa", @@ -5469,6 +5539,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" @@ -5509,9 +5588,9 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d699bc6dfc879fb1bf9bdff0d4c56f0884fc6f0d0eb0fba397a6d00cd9a6b85e" +checksum = "c102670231191d07d37a35af3eb77f1f0dbf7a71be51a962dcd57ea607be7260" dependencies = [ "jiff-static", "log", @@ -5522,9 +5601,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d16e75759ee0aa64c57a56acbf43916987b20c77373cb7e808979e02b93c9f9" +checksum = "4cdde31a9d349f1b1f51a0b3714a5940ac022976f4b49485fc04be052b183b4c" dependencies = [ "proc-macro2", "quote", @@ -5533,19 +5612,28 @@ dependencies = [ [[package]] name = "jiff-tzdb" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962e1dfe9b2d75a84536cf5bf5eaaa4319aa7906c7160134a22883ac316d5f31" +checksum = "c1283705eb0a21404d2bfd6eef2a7593d240bc42a0bdb39db0ad6fa2ec026524" [[package]] name = "jiff-tzdb-platform" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a63c62e404e7b92979d2792352d885a7f8f83fd1d0d31eea582d77b2ceca697e" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" 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" @@ -5593,7 +5681,7 @@ dependencies = [ "elliptic-curve", "once_cell", "serdect", - "sha2", + "sha2 0.10.8", "signature", ] @@ -5685,11 +5773,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" @@ -5701,6 +5795,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" @@ -5711,11 +5815,57 @@ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" name = "libredox" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.9.0", + "libc", + "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 = [ - "bitflags 2.9.0", - "libc", - "redox_syscall", + "libsecp256k1-core", ] [[package]] @@ -5738,9 +5888,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" @@ -5766,9 +5916,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.26" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" dependencies = [ "value-bag", ] @@ -5810,6 +5960,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" @@ -5884,7 +6045,7 @@ dependencies = [ "regex", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "shlex", "tempfile", "toml 0.5.11", @@ -6039,7 +6200,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]] @@ -6316,15 +6477,15 @@ 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" -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", @@ -6338,9 +6499,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", @@ -6354,6 +6515,24 @@ dependencies = [ "serde_json", ] +[[package]] +name = "op-revm" +version = "1.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "983c408745202267f1f483d091fb498986613ccd6c95e44d634cc0d7a2a9f275" +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" @@ -6405,7 +6584,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -6586,7 +6765,7 @@ checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -6617,6 +6796,7 @@ checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", "phf_shared", + "serde", ] [[package]] @@ -6756,7 +6936,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]] @@ -6793,9 +6973,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", @@ -6914,9 +7094,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", @@ -7052,7 +7232,7 @@ dependencies = [ "quick-xml 0.37.2", "strip-ansi-escapes", "thiserror 2.0.12", - "uuid 1.15.1", + "uuid 1.16.0", ] [[package]] @@ -7075,34 +7255,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", @@ -7127,13 +7309,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" @@ -7170,7 +7358,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", - "zerocopy 0.8.23", + "zerocopy 0.8.24", ] [[package]] @@ -7208,7 +7396,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]] @@ -7350,9 +7538,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", @@ -7361,12 +7549,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", @@ -7377,9 +7565,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", @@ -7387,7 +7575,7 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-socks", "tokio-util", "tower 0.5.2", @@ -7403,25 +7591,133 @@ dependencies = [ [[package]] name = "revm" -version = "19.6.0" +version = "20.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b906766b7ba049b515848952b5ae74f363d456e98de2021048a513e442b4f42" +checksum = "4502328b029ff68ddbbe42994faf7384c8aac0a47d53c3323ea52c7696fe2154" +dependencies = [ + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database", + "revm-database-interface", + "revm-handler", + "revm-inspector", + "revm-interpreter", + "revm-precompile", + "revm-primitives", + "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", + "serde", +] + +[[package]] +name = "revm-context" +version = "1.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "247e37d3df5918952a004f637b6b6a018daee83163c540f8b2c3b14ae05e9e78" dependencies = [ - "auto_impl", "cfg-if", - "dyn-clone", - "once_cell", + "derive-where", + "revm-bytecode", + "revm-context-interface", + "revm-database-interface", + "revm-primitives", + "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", + "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", + "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", + "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", "revm-precompile", + "revm-primitives", + "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", + "revm-primitives", + "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", @@ -7437,51 +7733,57 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "15.2.0" +version = "16.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcab7ef2064057acfc84731205f4bc77f4ec1b35630800b26ff6a185731c5ab" +checksum = "2a97985e55a551d5d86c07a4469ecdd3b8c0d793cb330bb4a4f747e1ee0af864" dependencies = [ + "revm-bytecode", + "revm-context-interface", "revm-primitives", "serde", ] [[package]] name = "revm-precompile" -version = "16.1.0" +version = "17.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6caa1a7ff2cc4a09a263fcf9de99151706f323d30f33d519ed329f017a02b046" +checksum = "c5d46dad4a7db8e6de9015f2419c160b41fa5e721345c1678a66db6d9f5ef619" dependencies = [ "aurora-engine-modexp", "blst", "c-kzg", "cfg-if", "k256", + "libsecp256k1", "once_cell", "p256", "revm-primitives", "ripemd", "secp256k1", - "sha2", + "sha2 0.10.8", "substrate-bn", ] [[package]] name = "revm-primitives" -version = "15.2.0" +version = "16.0.0-alpha.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f987564210317706def498421dfba2ae1af64a8edce82c6102758b48133fcb" +checksum = "b385df11c27aa339c2d80cb22b8d5621ad95e7464cd319c8b5343448ea8ad673" 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-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", "serde", ] @@ -7506,9 +7808,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", @@ -7607,6 +7909,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" @@ -7655,56 +7963,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" -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" +version = "0.23.25" 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" @@ -7714,16 +7999,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]] @@ -7746,20 +8022,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", @@ -7901,17 +8168,7 @@ dependencies = [ "hmac", "pbkdf2 0.11.0", "salsa20", - "sha2", -] - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", + "sha2 0.10.8", ] [[package]] @@ -7937,10 +8194,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", ] @@ -7967,19 +8225,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" @@ -8223,6 +8468,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" @@ -8472,7 +8730,7 @@ dependencies = [ "indexmap 2.8.0", "parking_lot", "rayon", - "rustc-hash", + "rustc-hash 2.1.1", "smallvec", ] @@ -8577,11 +8835,11 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "thiserror 2.0.12", "tokio", "toml_edit", - "uuid 1.15.1", + "uuid 1.16.0", "zip", "zip-extract", ] @@ -8725,15 +8983,15 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sval" -version = "2.14.0" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c2f18f53c889ec3dfe1c08b20fd51406d09b14bf18b366416718763ccff05a" +checksum = "7cc9739f56c5d0c44a5ed45473ec868af02eb896af8c05f616673a31e1d1bb09" [[package]] name = "sval_buffer" -version = "2.14.0" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8cb1bb48d0bed828b908e6b99e7ab8c7244994dc27948a2e31d42e8c4d77c1" +checksum = "f39b07436a8c271b34dad5070c634d1d3d76d6776e938ee97b4a66a5e8003d0b" dependencies = [ "sval", "sval_ref", @@ -8741,18 +8999,18 @@ dependencies = [ [[package]] name = "sval_dynamic" -version = "2.14.0" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba574872d4ad653071a9db76c49656082db83a37cd5f559874273d36b4a02b9d" +checksum = "ffcb072d857431bf885580dacecf05ed987bac931230736739a79051dbf3499b" dependencies = [ "sval", ] [[package]] name = "sval_fmt" -version = "2.14.0" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944450b2dbbf8aae98537776b399b23d72b19243ee42522cfd110305f3c9ba5a" +checksum = "3f214f427ad94a553e5ca5514c95c6be84667cbc5568cce957f03f3477d03d5c" dependencies = [ "itoa", "ryu", @@ -8761,9 +9019,9 @@ dependencies = [ [[package]] name = "sval_json" -version = "2.14.0" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411bbd543c413796ccfbaa44f6676e20032b6c69e4996cb6c3e6ef30c79b96d1" +checksum = "389ed34b32e638dec9a99c8ac92d0aa1220d40041026b625474c2b6a4d6f4feb" dependencies = [ "itoa", "ryu", @@ -8772,9 +9030,9 @@ dependencies = [ [[package]] name = "sval_nested" -version = "2.14.0" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30582d2a90869b380f8260559138c1b68ac3e0765520959f22a1a1fdca31769" +checksum = "14bae8fcb2f24fee2c42c1f19037707f7c9a29a0cda936d2188d48a961c4bb2a" dependencies = [ "sval", "sval_buffer", @@ -8783,18 +9041,18 @@ dependencies = [ [[package]] name = "sval_ref" -version = "2.14.0" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "762d3fbf3c0869064b7c93808c67ad2ed0292dde9b060ac282817941d4707dff" +checksum = "2a4eaea3821d3046dcba81d4b8489421da42961889902342691fb7eab491d79e" dependencies = [ "sval", ] [[package]] name = "sval_serde" -version = "2.14.0" +version = "2.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752d307438c6a6a3d095a2fecf6950cfb946d301a5bd6b57f047db4f6f8d97b9" +checksum = "172dd4aa8cb3b45c8ac8f3b4111d644cd26938b0643ede8f93070812b87fb339" dependencies = [ "serde", "sval", @@ -8814,7 +9072,7 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "tempfile", "thiserror 2.0.12", "url", @@ -8823,9 +9081,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", @@ -8858,9 +9116,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", @@ -8917,15 +9175,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", ] @@ -8957,7 +9214,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", ] @@ -9071,9 +9328,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.39" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "itoa", @@ -9088,15 +9345,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.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ "num-conv", "time-core", @@ -9138,9 +9395,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", @@ -9165,23 +9422,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", ] @@ -9229,19 +9476,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", @@ -9291,7 +9538,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] @@ -9305,21 +9552,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", @@ -9378,7 +9625,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", @@ -9461,6 +9708,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" @@ -9519,7 +9778,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]] @@ -9551,7 +9810,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.2.0", + "http 1.3.1", "httparse", "log", "rand 0.8.5", @@ -9568,11 +9827,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", @@ -9763,11 +10022,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", ] @@ -9888,9 +10147,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", ] @@ -10085,6 +10344,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" @@ -10099,9 +10370,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" @@ -10125,7 +10396,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]] @@ -10183,8 +10454,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", ] @@ -10224,9 +10495,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", @@ -10235,19 +10506,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]] @@ -10261,9 +10532,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", ] @@ -10510,9 +10781,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", ] @@ -10525,9 +10796,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", ] @@ -10622,11 +10893,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]] @@ -10642,9 +10913,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", @@ -10716,19 +10987,17 @@ dependencies = [ [[package]] name = "zip" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938cc23ac49778ac8340e366ddc422b2227ea176edb447e23fc0627608dddadd" +checksum = "27c03817464f64e23f6f37574b4fdc8cf65925b5bfd2b0f2aedf959791941f88" dependencies = [ "arbitrary", "bzip2", "crc32fast", "crossbeam-utils", - "displaydoc", "flate2", "indexmap 2.8.0", "memchr", - "thiserror 2.0.12", "zopfli", ] diff --git a/Cargo.toml b/Cargo.toml index 1aaa3305ac812..e5b5cdb0e9dd4 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 @@ -190,37 +188,36 @@ 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 = "0.12" +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 } ## 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-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-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-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-core alloy-dyn-abi = "0.8.22" @@ -235,13 +232,14 @@ alloy-sol-macro-expander = "0.8.22" alloy-sol-macro-input = "0.8.22" alloy-sol-types = "0.8.22" +alloy-evm = "0.1.0-alpha.3" alloy-chains = "0.1" 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" @@ -346,3 +344,10 @@ 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" } + +## revm +# revm = { git = "https://github.com/bluealloy/revm", rev = "9e39df5" } +# revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "2a365e3" } + +## foundry +foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "c168d11" } diff --git a/crates/anvil/core/Cargo.toml b/crates/anvil/core/Cargo.toml index b1cf977d0a468..7a1ca43c61dd1 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 df23b1875570c..fff0419bad1ce 100644 --- a/crates/anvil/src/config.rs +++ b/crates/anvil/src/config.rs @@ -36,13 +36,15 @@ 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; 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 6e785db5b92a7..0c5246c0727f0 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 1404ce5616f2a..5d0995c18d389 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/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/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..9da1912f866b8 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 @@ -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() { @@ -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/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 52d246958436b..8ab3f79cabfdc 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 a7860f353f322..e7a96b28266d1 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -36,7 +36,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}; @@ -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; @@ -164,7 +165,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)?; @@ -1385,7 +1386,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; @@ -1837,7 +1838,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/cheatcodes/src/script.rs b/crates/cheatcodes/src/script.rs index fbed5f490ad6a..f029bbcea7661 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/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..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 = [ @@ -43,9 +44,9 @@ revm = { workspace = true, features = [ "optional_block_gas_limit", "optional_no_base_fee", "arbitrary", - "optimism", "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..72f0f04b97e86 100644 --- a/crates/evm/core/src/backend/cow.rs +++ b/crates/evm/core/src/backend/cow.rs @@ -1,12 +1,12 @@ //! 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, + AsEnvMut, Env, EnvMut, InspectorExt, }; use alloy_genesis::GenesisAccount; use alloy_primitives::{Address, B256, U256}; @@ -14,12 +14,12 @@ 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, + bytecode::Bytecode, + context::{result::ResultAndState, JournalInit}, + database::DatabaseRef, + primitives::{hardfork::SpecId, EnvWithHandlerCfg, HashMap as Map}, + state::{Account, AccountInfo}, + Database, DatabaseCommit, ExecuteEvm, JournaledState, }; use std::{borrow::Cow, collections::BTreeMap}; @@ -64,18 +64,18 @@ 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 // 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.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 +90,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, mut 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.cfg_env.spec = self.spec_id; backend.initialize(&env); self.is_initialized = true; - return backend + return backend; } self.backend.to_mut() } @@ -104,31 +106,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 +156,35 @@ 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, + mut 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 +192,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 +202,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 +227,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 +235,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 +244,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 1dabeafded152..5e3aacc1040a4 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,13 +53,12 @@ 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), 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/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..b5a968cf7b3f0 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, + AsEnvMut, Env, EnvMut, InspectorExt, }; use alloy_genesis::GenesisAccount; use alloy_network::{AnyRpcBlock, AnyTxEnvelope, TransactionResponse}; @@ -15,13 +15,13 @@ 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, - }, + primitives::{hardfork::SpecId, EnvWithHandlerCfg, HashMap as Map, Log, KECCAK_EMPTY}, + state::{Account, AccountInfo, EvmState, EvmStorageSlot}, Database, DatabaseCommit, JournaledState, }; use std::{ @@ -68,6 +68,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 +78,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 +95,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 +115,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 +129,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 +160,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 +175,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 +191,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 +201,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 +210,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 +269,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 +278,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 +289,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 +449,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 +509,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 +623,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 +637,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 +737,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 +766,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 +786,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 +822,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 +870,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 +893,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 +904,7 @@ impl Backend { fork, &fork_id, &persistent_accounts, - &mut NoOpInspector, + &mut NoOpInspector {}, )?; } @@ -911,11 +913,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 +927,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 +969,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 +1037,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 +1066,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 +1090,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 +1118,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 +1144,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 +1208,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 +1223,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 +1235,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 +1275,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 +1288,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 +1328,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 +1374,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 { @@ -1390,11 +1392,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 +1465,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 +1566,7 @@ pub enum BackendDatabaseSnapshot { #[derive(Clone, Debug)] pub struct Fork { db: ForkDB, - journaled_state: JournaledState, + journaled_state: JournalInit, } impl Fork { @@ -1718,7 +1720,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 +1761,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 +1793,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 +1823,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 +1834,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 +1854,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 +1877,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 +1905,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 +1914,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 +1933,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 +1951,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 +1983,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> { @@ -2042,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/backend/snapshot.rs b/crates/evm/core/src/backend/snapshot.rs index 36c4657c2618c..afc56c01ca552 100644 --- a/crates/evm/core/src/backend/snapshot.rs +++ b/crates/evm/core/src/backend/snapshot.rs @@ -1,8 +1,6 @@ +use crate::Env; use alloy_primitives::{map::AddressHashMap, B256, U256}; -use revm::{ - primitives::{AccountInfo, Env, HashMap}, - JournaledState, -}; +use revm::{primitives::HashMap, state::AccountInfo, JournaledState}; use serde::{Deserialize, Serialize}; /// A minimal abstraction of a state at a certain point in time @@ -18,14 +16,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 +34,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..48e55f84df3ac --- /dev/null +++ b/crates/evm/core/src/env.rs @@ -0,0 +1,57 @@ +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..30549f028aace 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; @@ -209,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() } } @@ -220,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(); @@ -238,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) { @@ -274,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; diff --git a/crates/evm/core/src/fork/init.rs b/crates/evm/core/src/fork/init.rs index c84cd945c4ded..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_primitives::{Address, U256}; +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::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..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/ic.rs b/crates/evm/core/src/ic.rs index 80fef528c9ac5..8efaac22d9640 100644 --- a/crates/evm/core/src/ic.rs +++ b/crates/evm/core/src/ic.rs @@ -1,10 +1,6 @@ use alloy_primitives::map::rustc_hash::FxHashMap; use eyre::Result; -use revm::interpreter::{ - opcode::{PUSH0, PUSH1, PUSH32}, - OpCode, -}; -use revm_inspectors::opcode::immediate_size; +use revm::bytecode::opcode::{OpCode, PUSH0, PUSH1, PUSH32}; use serde::Serialize; /// Maps from program counter to instruction counter. @@ -117,7 +113,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..18b6f1cbb232e 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,29 @@ 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; pub mod precompiles; pub mod state_snapshot; pub mod utils; +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..883f67177c436 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 { @@ -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() }) } 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..836be727fceec 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -1,30 +1,30 @@ 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; 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, 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}; -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 +33,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(); @@ -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.block.number = l1_block_number.to(); } } _ => {} @@ -101,10 +100,11 @@ 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 +112,7 @@ pub fn configure_tx_env(env: &mut revm::primitives::Env, tx: &Transaction, tx: &TransactionRequest, impersonated_from: Option
, ) -> eyre::Result<()> { @@ -136,32 +136,31 @@ 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; // 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 { - env.tx.authorization_list = - Some(revm::primitives::AuthorizationList::Signed(authorization_list.clone())); + env.tx.authorization_list = authorization_list.clone(); } Ok(()) @@ -169,7 +168,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) } @@ -241,7 +240,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 +249,7 @@ pub fn create2_handler_register( gas: Gas::new(gas_limit), }, memory_offset: 0..0, - }))) + }))); } // Handle potential inspector override. @@ -306,65 +305,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 == ODYSSEY_P256.address() { + let mut result = InterpreterResult { + result: InstructionResult::Return, + gas: Gas::new(gas_limit), + output: Bytes::new(), + }; + + match ODYSSEY_P256.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 + }; + } + } + } + + self.inner.run(context, address, bytes, gas_limit) + } - loaded_precompiles.extend([ODYSSEY_P256, P256VERIFY]); + fn warm_addresses(&self) -> Box> { + if self.odyssey { + Box::new(*self.inner.warm_addresses().chain(core::iter::once(ODYSSEY_P256.address()))) + } else { + self.inner.warm_addresses() + } + } - loaded_precompiles - }); + fn contains(&self, address: &Address) -> bool { + if self.odyssey && address == ODYSSEY_P256.address() { + 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()), + } } 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/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..edad002c47b4d 100644 --- a/crates/evm/evm/src/executors/trace.rs +++ b/crates/evm/evm/src/executors/trace.rs @@ -2,9 +2,9 @@ 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::{Env, SpecId}; +use revm::primitives::{hardfork::SpecId, Env}; use std::ops::{Deref, DerefMut}; /// A default executor with tracing enabled @@ -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/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..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, @@ -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, @@ -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 diff --git a/crates/forge/tests/it/test_helpers.rs b/crates/forge/tests/it/test_helpers.rs index 52bf46886368b..ced3d1b532926 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/Cargo.toml b/crates/verify/Cargo.toml index 443d44cc110a4..08bd798e78c16 100644 --- a/crates/verify/Cargo.toml +++ b/crates/verify/Cargo.toml @@ -18,12 +18,13 @@ 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 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/bytecode.rs b/crates/verify/src/bytecode.rs index c3ddd3c4df867..17c69fa57442d 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); @@ -243,7 +243,7 @@ impl VerifyBytecodeArgs { ) .await?; - env.block.number = U256::ZERO; // 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.block.number = U256::from(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 132f0218f8d79..7d8a9e273fbc8 100644 --- a/crates/verify/src/utils.rs +++ b/crates/verify/src/utils.rs @@ -16,11 +16,14 @@ use foundry_evm::{ constants::DEFAULT_CREATE2_DEPLOYER, executors::TracingExecutor, opts::EvmOpts, traces::TraceMode, }; +use foundry_evm_core::AsEnvMut; use reqwest::Url; -use revm_primitives::{ - db::Database, +use revm::primitives::{ + bytecode::Bytecode, + database::Database, env::{EnvWithHandlerCfg, HandlerCfg}, - Bytecode, Env, SpecId, TxKind, + hardfork::SpecId, + TxKind, }; use semver::Version; use serde::{Deserialize, Serialize}; @@ -348,13 +351,14 @@ pub async fn get_tracing_executor( Ok((env, 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; +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 = 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.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( 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;