diff --git a/Cargo.lock b/Cargo.lock index c403709c..76453cdb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -47,9 +47,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.1.51" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e0f0136c085132939da6b753452ebed4efaa73fe523bb855b10c199c2ebfaf" +checksum = "d38fdd69239714d7625cda1e3730773a3c1a8719d506370eb17bb0103b7c2e15" dependencies = [ "alloy-primitives", "num_enum", @@ -58,9 +58,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" +checksum = "f4138dc275554afa6f18c4217262ac9388790b2fc393c2dfe03c51d357abf013" dependencies = [ "alloy-eips", "alloy-primitives", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" +checksum = "0fa04e1882c31288ce1028fdf31b6ea94cfa9eafa2e497f903ded631c8c6a42c" dependencies = [ "alloy-consensus", "alloy-eips", @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" +checksum = "cabf647eb4650c91a9d38cb6f972bb320009e7e9d61765fb688a86f1563b33e8" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9fadfe089e9ccc0650473f2d4ef0a28bc015bbca5631d9f0f09e49b557fdb3" +checksum = "52dd5869ed09e399003e0e0ec6903d981b2a92e74c5d37e6b40890bad2517526" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -131,23 +131,23 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29040b9d5fe2fb70415531882685b64f8efd08dfbd6cc907120650504821105" +checksum = "2008bedb8159a255b46b7c8614516eda06679ea82f620913679afbd8031fea72" dependencies = [ "alloy-primitives", "alloy-sol-types", "serde", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", "tracing", ] [[package]] name = "alloy-network" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" +checksum = "4556f01fe41d0677495df10a648ddcf7ce118b0e8aa9642a0e2b6dd1fb7259de" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -165,14 +165,14 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", ] [[package]] name = "alloy-network-primitives" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" +checksum = "f31c3c6b71340a1d076831823f09cb6e02de01de5c6630a9631bdb36f947ff80" dependencies = [ "alloy-consensus", "alloy-eips", @@ -183,9 +183,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.15" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6259a506ab13e1d658796c31e6e39d2e2ee89243bcc505ddc613b35732e0a430" +checksum = "788bb18e8f61d5d9340b52143f27771daf7e1dccbaf2741621d2493f9debf52e" dependencies = [ "alloy-rlp", "bytes", @@ -194,7 +194,6 @@ dependencies = [ "derive_more", "foldhash", "hashbrown 0.15.2", - "hex-literal", "indexmap", "itoa", "k256", @@ -211,9 +210,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2dfaddd9a30aa870a78a4e1316e3e115ec1e12e552cbc881310456b85c1f24" +checksum = "5a22c4441b3ebe2d77fa9cf629ba68c3f713eb91779cff84275393db97eddd82" dependencies = [ "alloy-chains", "alloy-consensus", @@ -235,11 +234,11 @@ dependencies = [ "lru", "parking_lot", "pin-project", - "reqwest 0.12.9", + "reqwest 0.12.12", "schnellru", "serde", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tracing", "url", @@ -265,14 +264,14 @@ checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "alloy-rpc-client" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531137b283547d5b9a5cafc96b006c64ef76810c681d606f28be9781955293b6" +checksum = "d06a292b37e182e514903ede6e623b9de96420e8109ce300da288a96d88b7e4b" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -280,7 +279,7 @@ dependencies = [ "alloy-transport-http", "futures", "pin-project", - "reqwest 0.12.9", + "reqwest 0.12.12", "serde", "serde_json", "tokio", @@ -293,9 +292,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" +checksum = "ca445cef0eb6c2cf51cfb4e214fbf1ebd00893ae2e6f3b944c8101b07990f988" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -304,9 +303,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" +checksum = "0938bc615c02421bd86c1733ca7205cc3d99a122d9f9bff05726bd604b76a5c2" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -316,17 +315,17 @@ dependencies = [ "alloy-rlp", "alloy-serde", "alloy-sol-types", - "derive_more", "itertools 0.13.0", "serde", "serde_json", + "thiserror 2.0.10", ] [[package]] name = "alloy-serde" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5851bf8d5ad33014bd0c45153c603303e730acc8a209450a7ae6b4a12c2789e2" +checksum = "ae0465c71d4dced7525f408d84873aeebb71faf807d22d74c4a426430ccd9b55" dependencies = [ "alloy-primitives", "serde", @@ -335,37 +334,37 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e10ca565da6500cca015ba35ee424d59798f2e1b85bc0dd8f81dafd401f029a" +checksum = "9bfa395ad5cc952c82358d31e4c68b27bf4a89a5456d9b27e226e77dac50e4ff" dependencies = [ "alloy-primitives", "async-trait", "auto_impl", "elliptic-curve", "k256", - "thiserror 2.0.9", + "thiserror 2.0.10", ] [[package]] name = "alloy-sol-macro" -version = "0.8.15" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d64f851d95619233f74b310f12bcf16e0cbc27ee3762b6115c14a84809280a" +checksum = "a07b74d48661ab2e4b50bb5950d74dbff5e61dd8ed03bb822281b706d54ebacb" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.15" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf7ed1574b699f48bf17caab4e6e54c6d12bc3c006ab33d58b1e227c1c3559f" +checksum = "19cc9c7f20b90f9be1a8f71a3d8e283a43745137b0837b1a1cb13159d37cad72" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -374,31 +373,31 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.15" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c02997ccef5f34f9c099277d4145f183b422938ed5322dc57a089fe9b9ad9ee" +checksum = "713b7e6dfe1cb2f55c80fb05fd22ed085a1b4e48217611365ed0ae598a74c6ac" dependencies = [ "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "syn-solidity", ] [[package]] name = "alloy-sol-types" -version = "0.8.15" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1174cafd6c6d810711b4e00383037bdb458efc4fe3dbafafa16567e0320c54d8" +checksum = "e3b478bc9c0c4737a04cd976accde4df7eba0bdc0d90ad6ff43d58bc93cf79c1" dependencies = [ "alloy-primitives", "alloy-sol-macro", @@ -407,9 +406,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538a04a37221469cac0ce231b737fd174de2fdfcdd843bdd068cb39ed3e066ad" +checksum = "d17722a198f33bbd25337660787aea8b8f57814febb7c746bc30407bdfc39448" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -417,7 +416,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.9", + "thiserror 2.0.10", "tokio", "tower", "tracing", @@ -427,13 +426,13 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed40eb1e1265b2911512f6aa1dcece9702d078f5a646730c45e39e2be00ac1c" +checksum = "6e1509599021330a31c4a6816b655e34bf67acb1cc03c564e09fd8754ff6c5de" dependencies = [ "alloy-json-rpc", "alloy-transport", - "reqwest 0.12.9", + "reqwest 0.12.12", "serde_json", "tower", "tracing", @@ -442,9 +441,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e428104b2445a4f929030891b3dbf8c94433a8349ba6480946bf6af7975c2f6" +checksum = "6917c79e837aa7b77b7a6dae9f89cbe15313ac161c4d3cfaf8909ef21f3d22d8" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -672,18 +671,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -732,7 +731,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -818,9 +817,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" dependencies = [ "serde", ] @@ -909,9 +908,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.5" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ "shlex", ] @@ -975,9 +974,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.23" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" +checksum = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783" dependencies = [ "clap_builder", "clap_derive", @@ -985,9 +984,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.23" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" +checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121" dependencies = [ "anstream", "anstyle", @@ -997,14 +996,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1103,7 +1102,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.23", + "clap 4.5.26", "criterion-plot", "is-terminal", "itertools 0.10.5", @@ -1250,7 +1249,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "unicode-xid", ] @@ -1283,7 +1282,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1378,7 +1377,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1668,7 +1667,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -1756,9 +1755,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "gloo-timers" @@ -1915,12 +1914,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - [[package]] name = "hmac" version = "0.12.1" @@ -2223,7 +2216,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -2282,7 +2275,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -2445,9 +2438,9 @@ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" @@ -2643,7 +2636,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -2654,9 +2647,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nybbles" -version = "0.3.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a62e678a89501192cc5ebf47dcbc656b608ae5e1c61c9251fe35230f119fe3" +checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" dependencies = [ "alloy-rlp", "const-hex", @@ -2688,9 +2681,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "op-alloy-consensus" -version = "0.8.5" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c698f80ee53e56d1b60a97e9d90ad09788b516c964c9c97fb5927860b812ef0d" +checksum = "442518bf0ef88f4d79409527565b8cdee235c891f2e2a829497caec5ed9d8d1c" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2699,14 +2692,14 @@ dependencies = [ "alloy-serde", "derive_more", "serde", - "thiserror 2.0.9", + "thiserror 2.0.10", ] [[package]] name = "op-alloy-network" -version = "0.8.5" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5771424687f73e70f8dbc7d1f4b404cc2fdac9b4cd14745d7f7065c3422e947" +checksum = "d9e7e9fc656dfa8cc3b6e799da23e100b3d47e31ec6b5a4ed9d44e11f0967ad8" dependencies = [ "alloy-consensus", "alloy-network", @@ -2719,9 +2712,9 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.8.5" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aef2128fe8979596b3a1f79a2454f3e32fd239889a03d50fe686b9a2f30a16" +checksum = "50223d61cad040db6721bcc2d489c924c1691ce3f5e674d4d8776131dab786a0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2766,7 +2759,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cfg-if", "foreign-types", "libc", @@ -2783,7 +2776,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -2893,7 +2886,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.9", + "thiserror 2.0.10", "ucd-trie", ] @@ -2910,7 +2903,7 @@ dependencies = [ "alloy-transport-http", "alloy-trie", "bincode", - "bitflags 2.6.0", + "bitflags 2.7.0", "bitvec", "criterion", "dashmap", @@ -2921,7 +2914,7 @@ dependencies = [ "op-alloy-rpc-types", "rand", "rayon", - "reqwest 0.12.9", + "reqwest 0.12.12", "revm", "revme", "rpmalloc", @@ -2930,7 +2923,7 @@ dependencies = [ "serde_json", "smallvec", "snmalloc-rs", - "thiserror 2.0.9", + "thiserror 2.0.10", "tikv-jemallocator", "tokio", "walkdir", @@ -2945,10 +2938,10 @@ dependencies = [ "alloy-provider", "alloy-rpc-types-eth", "bincode", - "clap 4.5.23", + "clap 4.5.26", "flate2", "pevm", - "reqwest 0.12.9", + "reqwest 0.12.12", "serde_json", "tokio", ] @@ -2965,29 +2958,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -3144,7 +3137,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -3164,7 +3157,7 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags 2.7.0", "lazy_static", "num-traits", "rand", @@ -3184,9 +3177,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -3263,7 +3256,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -3338,9 +3331,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", @@ -3371,6 +3364,7 @@ dependencies = [ "system-configuration 0.6.1", "tokio", "tokio-native-tls", + "tower", "tower-service", "url", "wasm-bindgen", @@ -3381,14 +3375,15 @@ dependencies = [ [[package]] name = "revm" -version = "18.0.0" -source = "git+https://github.com/risechain/revm?rev=94a69feabb941c43d0d554cd8fa689a3d6904274#94a69feabb941c43d0d554cd8fa689a3d6904274" +version = "19.2.0" +source = "git+https://github.com/risechain/revm?rev=ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c#ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c" dependencies = [ "auto_impl", "cfg-if", "dyn-clone", "ethers-core", "ethers-providers", + "once_cell", "revm-interpreter", "revm-precompile", "serde", @@ -3398,8 +3393,8 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "14.0.0" -source = "git+https://github.com/risechain/revm?rev=94a69feabb941c43d0d554cd8fa689a3d6904274#94a69feabb941c43d0d554cd8fa689a3d6904274" +version = "15.0.0" +source = "git+https://github.com/risechain/revm?rev=ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c#ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c" dependencies = [ "revm-primitives", "serde", @@ -3407,8 +3402,8 @@ dependencies = [ [[package]] name = "revm-precompile" -version = "15.0.0" -source = "git+https://github.com/risechain/revm?rev=94a69feabb941c43d0d554cd8fa689a3d6904274#94a69feabb941c43d0d554cd8fa689a3d6904274" +version = "16.0.0" +source = "git+https://github.com/risechain/revm?rev=ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c#ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c" dependencies = [ "aurora-engine-modexp", "blst", @@ -3426,14 +3421,14 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "14.0.0" -source = "git+https://github.com/risechain/revm?rev=94a69feabb941c43d0d554cd8fa689a3d6904274#94a69feabb941c43d0d554cd8fa689a3d6904274" +version = "15.1.0" +source = "git+https://github.com/risechain/revm?rev=ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c#ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c" dependencies = [ "alloy-eip2930", "alloy-eip7702", "alloy-primitives", "auto_impl", - "bitflags 2.6.0", + "bitflags 2.7.0", "bitvec", "c-kzg", "cfg-if", @@ -3445,8 +3440,8 @@ dependencies = [ [[package]] name = "revme" -version = "2.1.0" -source = "git+https://github.com/risechain/revm?rev=94a69feabb941c43d0d554cd8fa689a3d6904274#94a69feabb941c43d0d554cd8fa689a3d6904274" +version = "2.2.0" +source = "git+https://github.com/risechain/revm?rev=ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c#ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c" dependencies = [ "alloy-rlp", "hash-db", @@ -3625,11 +3620,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.42" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "errno", "libc", "linux-raw-sys", @@ -3708,9 +3703,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "rusty-fork" @@ -3760,7 +3755,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -3774,9 +3769,9 @@ dependencies = [ [[package]] name = "schnellru" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" +checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" dependencies = [ "ahash", "cfg-if", @@ -3838,7 +3833,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation", "core-foundation-sys", "libc", @@ -3847,9 +3842,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -3893,29 +3888,29 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "indexmap", "itoa", @@ -4141,7 +4136,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4176,9 +4171,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.91" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -4187,14 +4182,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.15" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219389c1ebe89f8333df8bdfb871f6631c552ff399c23cac02480b6088aad8f0" +checksum = "31e89d8bf2768d277f40573c83a02a099e96d96dd3104e13ea676194e61ac4b0" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4220,7 +4215,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4240,7 +4235,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation", "system-configuration-sys 0.6.0", ] @@ -4273,12 +4268,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -4304,11 +4300,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.9" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" dependencies = [ - "thiserror-impl 2.0.9", + "thiserror-impl 2.0.10", ] [[package]] @@ -4319,18 +4315,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] name = "thiserror-impl" -version = "2.0.9" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4424,9 +4420,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.42.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -4440,13 +4436,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4546,6 +4542,7 @@ dependencies = [ "futures-util", "pin-project-lite", "sync_wrapper 1.0.2", + "tokio", "tower-layer", "tower-service", ] @@ -4581,7 +4578,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -4825,7 +4822,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "wasm-bindgen-shared", ] @@ -4860,7 +4857,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5122,9 +5119,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" dependencies = [ "memchr", ] @@ -5199,7 +5196,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "synstructure", ] @@ -5221,7 +5218,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -5241,7 +5238,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", "synstructure", ] @@ -5262,7 +5259,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] [[package]] @@ -5284,5 +5281,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.91", + "syn 2.0.96", ] diff --git a/Cargo.toml b/Cargo.toml index f03797d1..a8d62bd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,29 +39,29 @@ use_self = "warn" pevm = { path = "crates/pevm", features = ["full"] } # alloy -alloy-chains = "0.1.51" -alloy-consensus = "0.8.3" -alloy-primitives = { version = "0.8.15", features = [ +alloy-chains = "0.1.54" +alloy-consensus = "0.9.2" +alloy-primitives = { version = "0.8.18", features = [ "asm-keccak", "map-fxhash", ] } -alloy-provider = "0.8.3" +alloy-provider = "0.9.2" alloy-rlp = "0.3.10" -alloy-rpc-types-eth = "0.8.3" -alloy-transport = "0.8.3" -alloy-transport-http = "0.8.3" -alloy-trie = "0.7.7" +alloy-rpc-types-eth = "0.9.2" +alloy-transport = "0.9.2" +alloy-transport-http = "0.9.2" +alloy-trie = "0.7.8" # Will remove [revm] with https://github.com/risechain/pevm/issues/382. -revm = { git = "https://github.com/risechain/revm", rev = "94a69feabb941c43d0d554cd8fa689a3d6904274", features = [ +revm = { git = "https://github.com/risechain/revm", rev = "ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c", features = [ "serde", ] } -revme = { git = "https://github.com/risechain/revm", rev = "94a69feabb941c43d0d554cd8fa689a3d6904274" } +revme = { git = "https://github.com/risechain/revm", rev = "ac75f1ef59ecae15238f5a2e94e71c3bcc01d45c" } # OP -op-alloy-consensus = "0.8.5" -op-alloy-network = "0.8.5" -op-alloy-rpc-types = "0.8.5" +op-alloy-consensus = "0.9.2" +op-alloy-network = "0.9.2" +op-alloy-rpc-types = "0.9.2" # Allocators rpmalloc = { version = "0.2.2", features = ["thread_cache", "global_cache"] } @@ -70,20 +70,20 @@ tikv-jemallocator = "0.6.0" bincode = "1.3.3" # We can roll our own but [revm] depends on this anyway. -bitflags = "2.6.0" +bitflags = "2.7.0" bitvec = "1.0.1" -clap = { version = "4.5.23", features = ["derive"] } +clap = { version = "4.5.26", features = ["derive"] } criterion = "0.5.1" dashmap = "6.1.0" flate2 = "1.0.35" hashbrown = "0.15.2" rand = "0.8.5" rayon = "1.10.0" -reqwest = "0.12.9" +reqwest = "0.12.12" rustc-hash = "2.1.0" -serde = "1.0.216" -serde_json = "1.0.134" +serde = "1.0.217" +serde_json = "1.0.135" smallvec = "1.13.2" -thiserror = "2.0.9" -tokio = { version = "1.42.0", features = ["rt-multi-thread"] } +thiserror = "2.0.10" +tokio = { version = "1.43.0", features = ["rt-multi-thread"] } walkdir = "2.5.0" diff --git a/crates/pevm/src/chain/ethereum.rs b/crates/pevm/src/chain/ethereum.rs index 62920305..5212083e 100644 --- a/crates/pevm/src/chain/ethereum.rs +++ b/crates/pevm/src/chain/ethereum.rs @@ -31,13 +31,6 @@ impl PevmEthereum { // TODO: support Ethereum Sepolia and other testnets } -/// Error type for [`PevmEthereum::get_block_spec`]. -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum EthereumBlockSpecError { - /// When [`header.total_difficulty`] is none. - MissingTotalDifficulty, -} - /// Represents errors that can occur when parsing transactions #[derive(Debug, Clone, PartialEq, Eq)] pub enum EthereumTransactionParsingError { @@ -58,7 +51,7 @@ fn get_ethereum_gas_price(tx: &TxEnvelope) -> Result u64 { @@ -80,12 +73,9 @@ impl PevmChain for PevmEthereum { SpecId::CANCUN } else if header.timestamp >= 1681338455 { SpecId::SHANGHAI - } else if (header - .total_difficulty - .ok_or(EthereumBlockSpecError::MissingTotalDifficulty)?) - .saturating_sub(header.difficulty) - >= U256::from(58_750_000_000_000_000_000_000_u128) - { + } + // Checking for total difficulty is more precise but many RPC providers stopped returning it... + else if header.number >= 15537394 { SpecId::MERGE } else if header.number >= 12965000 { SpecId::LONDON diff --git a/crates/pevm/src/compat.rs b/crates/pevm/src/compat.rs index a005fc7a..6031bc5e 100644 --- a/crates/pevm/src/compat.rs +++ b/crates/pevm/src/compat.rs @@ -2,13 +2,13 @@ // Ideally REVM & Alloy would provide all these. use alloy_rpc_types_eth::Header; -use revm::primitives::{BlobExcessGasAndPrice, BlockEnv, U256}; +use revm::primitives::{BlobExcessGasAndPrice, BlockEnv, SpecId, U256}; /// Get the REVM block env of an Alloy block. // https://github.com/paradigmxyz/reth/blob/280aaaedc4699c14a5b6e88f25d929fe22642fa3/crates/primitives/src/revm/env.rs#L23-L48 // TODO: Better error handling & properly test this, especially // [blob_excess_gas_and_price]. -pub(crate) fn get_block_env(header: &Header) -> BlockEnv { +pub(crate) fn get_block_env(header: &Header, spec_id: SpecId) -> BlockEnv { BlockEnv { number: U256::from(header.number), coinbase: header.beneficiary, @@ -17,6 +17,8 @@ pub(crate) fn get_block_env(header: &Header) -> BlockEnv { basefee: U256::from(header.base_fee_per_gas.unwrap_or_default()), difficulty: header.difficulty, prevrandao: Some(header.mix_hash), - blob_excess_gas_and_price: header.excess_blob_gas.map(BlobExcessGasAndPrice::new), + blob_excess_gas_and_price: header.excess_blob_gas.map(|excess_blob_gas| { + BlobExcessGasAndPrice::new(excess_blob_gas, spec_id.is_enabled_in(SpecId::PRAGUE)) + }), } } diff --git a/crates/pevm/src/pevm.rs b/crates/pevm/src/pevm.rs index 89bf2c0a..86792784 100644 --- a/crates/pevm/src/pevm.rs +++ b/crates/pevm/src/pevm.rs @@ -123,7 +123,7 @@ impl Pevm { let spec_id = chain .get_block_spec(&block.header) .map_err(PevmError::BlockSpecError)?; - let block_env = get_block_env(&block.header); + let block_env = get_block_env(&block.header, spec_id); let tx_envs = match &block.transactions { BlockTransactions::Full(txs) => txs .iter() @@ -231,7 +231,7 @@ impl Pevm { } let mut fully_evaluated_results = Vec::with_capacity(block_size); - let mut cumulative_gas_used: u128 = 0; + let mut cumulative_gas_used: u64 = 0; for i in 0..block_size { let mut execution_result = index_mutex!(self.execution_results, i).take().unwrap(); cumulative_gas_used = @@ -439,7 +439,7 @@ pub fn execute_revm_sequential( let mut db = CacheDB::new(StorageWrapper(storage)); let mut evm = build_evm(&mut db, chain, spec_id, block_env, None, true); let mut results = Vec::with_capacity(txs.len()); - let mut cumulative_gas_used: u128 = 0; + let mut cumulative_gas_used: u64 = 0; for tx in txs { *evm.tx_mut() = tx; match evm.transact() { diff --git a/crates/pevm/src/vm.rs b/crates/pevm/src/vm.rs index 0bcd5902..176cda72 100644 --- a/crates/pevm/src/vm.rs +++ b/crates/pevm/src/vm.rs @@ -51,7 +51,7 @@ impl PevmTxExecutionResult { Self { receipt: Receipt { status: result.is_success().into(), - cumulative_gas_used: result.gas_used() as u128, + cumulative_gas_used: result.gas_used(), logs: result.into_logs(), }, state: state @@ -655,7 +655,7 @@ impl<'a, S: Storage, C: PevmChain> Vm<'a, S, C> { tx, U256::from(result_and_state.result.gas_used()), #[cfg(feature = "optimism")] - &evm.context.evm, + &mut evm.context.evm, )?; drop(evm); // release db @@ -715,7 +715,7 @@ impl<'a, S: Storage, C: PevmChain> Vm<'a, S, C> { write_set: &mut WriteSet, tx: &TxEnv, gas_used: U256, - #[cfg(feature = "optimism")] evm_context: &EvmContext, + #[cfg(feature = "optimism")] evm_context: &mut EvmContext, ) -> Result<(), VmExecutionError> { let mut gas_price = if let Some(priority_fee) = tx.gas_priority_fee { std::cmp::min( @@ -750,7 +750,7 @@ impl<'a, S: Storage, C: PevmChain> Vm<'a, S, C> { let Some(enveloped_tx) = &tx.optimism.enveloped_tx else { panic!("[OPTIMISM] Failed to load enveloped transaction."); }; - let Some(l1_block_info) = &evm_context.l1_block_info else { + let Some(l1_block_info) = &mut evm_context.l1_block_info else { panic!("[OPTIMISM] Missing l1_block_info."); }; let l1_cost = l1_block_info.calculate_tx_l1_cost(enveloped_tx, self.spec_id); diff --git a/crates/pevm/tests/common/runner.rs b/crates/pevm/tests/common/runner.rs index 17a2b3f8..7d020b21 100644 --- a/crates/pevm/tests/common/runner.rs +++ b/crates/pevm/tests/common/runner.rs @@ -85,7 +85,7 @@ pub fn test_execute_alloy( ); assert_eq!( - block.header.gas_used as u128, + block.header.gas_used, tx_results .iter() .last() diff --git a/crates/pevm/tests/ethereum/main.rs b/crates/pevm/tests/ethereum/main.rs index 8b2e4a42..0eb0d031 100644 --- a/crates/pevm/tests/ethereum/main.rs +++ b/crates/pevm/tests/ethereum/main.rs @@ -18,12 +18,10 @@ use rayon::iter::{IntoParallelIterator, IntoParallelRefIterator, ParallelIterato use revm::db::PlainAccount; use revm::primitives::ruint::ParseError; use revm::primitives::{ - calc_excess_blob_gas, AccountInfo, AuthorizationList, BlobExcessGasAndPrice, BlockEnv, - Bytecode, TransactTo, TxEnv, KECCAK_EMPTY, U256, -}; -use revme::cmd::statetest::models::{ - Env, SpecName, TestSuite, TestUnit, TransactionParts, TxPartIndices, + calc_excess_blob_gas, AccountInfo, BlobExcessGasAndPrice, BlockEnv, Bytecode, SpecId, + TransactTo, TxEnv, KECCAK_EMPTY, U256, }; +use revme::cmd::statetest::models::{Env, SpecName, Test, TestSuite, TestUnit, TransactionParts}; use revme::cmd::statetest::{ merkle_trie::{log_rlp_hash, state_merkle_trie_root}, utils::recover_address, @@ -37,7 +35,7 @@ use walkdir::{DirEntry, WalkDir}; #[path = "../common/mod.rs"] pub mod common; -fn build_block_env(env: &Env) -> BlockEnv { +fn build_block_env(env: &Env, spec_id: SpecId) -> BlockEnv { BlockEnv { number: env.current_number, coinbase: env.current_coinbase, @@ -49,25 +47,31 @@ fn build_block_env(env: &Env) -> BlockEnv { blob_excess_gas_and_price: if let Some(current_excess_blob_gas) = env.current_excess_blob_gas { - Some(BlobExcessGasAndPrice::new(current_excess_blob_gas.to())) + Some(BlobExcessGasAndPrice::new( + current_excess_blob_gas.to(), + spec_id.is_enabled_in(SpecId::PRAGUE), + )) } else if let (Some(parent_blob_gas_used), Some(parent_excess_blob_gas)) = (env.parent_blob_gas_used, env.parent_excess_blob_gas) { - Some(BlobExcessGasAndPrice::new(calc_excess_blob_gas( - parent_blob_gas_used.to(), - parent_excess_blob_gas.to(), - ))) + Some(BlobExcessGasAndPrice::new( + calc_excess_blob_gas( + parent_blob_gas_used.to(), + parent_excess_blob_gas.to(), + env.parent_target_blobs_per_block + .map(|i| i.to()) + // https://github.com/bluealloy/revm/blob/a2451cdb30bd9d9aaca95f13bd50e2eafb619d8f/crates/specification/src/eip4844.rs#L23 + .unwrap_or(3 * (1 << 17)), + ), + spec_id.is_enabled_in(SpecId::PRAGUE), + )) } else { None }, } } -fn build_tx_env( - path: &Path, - tx: &TransactionParts, - indexes: &TxPartIndices, -) -> Result { +fn build_tx_env(path: &Path, tx: &TransactionParts, test: &Test) -> Result { Ok(TxEnv { caller: if let Some(address) = tx.sender { address @@ -76,33 +80,26 @@ fn build_tx_env( } else { panic!("Failed to parse caller for {path:?}"); }, - gas_limit: tx.gas_limit[indexes.gas].saturating_to(), + gas_limit: tx.gas_limit[test.indexes.gas].saturating_to(), gas_price: tx.gas_price.or(tx.max_fee_per_gas).unwrap_or_default(), transact_to: match tx.to { Some(address) => TransactTo::Call(address), None => TransactTo::Create, }, - value: U256::from_str(&tx.value[indexes.value])?, - data: tx.data[indexes.data].clone(), + value: U256::from_str(&tx.value[test.indexes.value])?, + data: tx.data[test.indexes.data].clone(), nonce: Some(tx.nonce.saturating_to()), chain_id: Some(1), // Ethereum mainnet access_list: tx .access_lists - .get(indexes.data) + .get(test.indexes.data) .and_then(Option::as_deref) .cloned() .unwrap_or_default(), gas_priority_fee: tx.max_priority_fee_per_gas, blob_hashes: tx.blob_versioned_hashes.clone(), max_fee_per_blob_gas: tx.max_fee_per_blob_gas, - authorization_list: tx.authorization_list.as_ref().map(|auth_list| { - AuthorizationList::Recovered( - auth_list - .iter() - .map(|auth| auth.clone().into_recovered()) - .collect(), - ) - }), + authorization_list: test.eip7702_authorization_list().unwrap(), #[cfg(feature = "optimism")] optimism: revm::primitives::OptimismFields::default(), }) @@ -118,7 +115,7 @@ fn run_test_unit(path: &Path, unit: TestUnit) { } tests.into_par_iter().for_each(|test| { - let tx_env = build_tx_env(path, &unit.transaction, &test.indexes); + let tx_env = build_tx_env(path, &unit.transaction, &test); if test.expect_exception.as_deref() == Some("TR_RLP_WRONGVALUE") && tx_env.is_err() { return; } @@ -146,13 +143,15 @@ fn run_test_unit(path: &Path, unit: TestUnit) { ); } + let spec_id = spec_name.to_spec_id(); + match ( test.expect_exception.as_deref(), Pevm::default().execute_revm_parallel( &PevmEthereum::mainnet(), &InMemoryStorage::new(chain_state.clone(), Arc::new(bytecodes), Default::default()), - spec_name.to_spec_id(), - build_block_env(&unit.env), + spec_id, + build_block_env(&unit.env, spec_id), vec![tx_env.unwrap()], NonZeroUsize::MIN, ),