diff --git a/Cargo.lock b/Cargo.lock index c86b4d84c5..ddb68b7f9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,42 +67,83 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58047cc851e58c26224521d1ecda466e3d746ebca0274cd5427aa660a88c353" +checksum = "7198a527b4c4762cb88d54bcaeb0428f4298b72552c9c8ec4af614b4a4990c59" dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.2.0", + "alloy-serde", "c-kzg", "serde", ] +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "rand", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d319bb544ca6caeab58c39cea8921c55d924d4f68f2c60f24f914673f9a74a" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "k256", + "rand", + "serde", +] + [[package]] name = "alloy-eips" -version = "0.2.1" -source = "git+https://github.com/alloy-rs/alloy?rev=fd159f6#fd159f6985058d2480fb89f63315e35680a07956" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "159eab0e4e15b88571f55673af37314f4b8f17630dc1b393c3d70f2128a1d494" dependencies = [ + "alloy-eip2930", + "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.2.1", + "alloy-serde", "arbitrary", "c-kzg", - "k256", "once_cell", - "rand", "serde", "sha2", ] +[[package]] +name = "alloy-json-abi" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "299d2a937b6c60968df3dad2a988b0f0e03277b344639a4f7a31bd68e6285e59" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + [[package]] name = "alloy-json-rpc" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e76a9feec2352c78545d1a37415699817bae8dc41654bd1bfe57d6cdd5433bd" +checksum = "f7733446dd531f8eb877331fea02f6c40bdbb47444a17dc3464bf75319cc073a" dependencies = [ "alloy-primitives", + "alloy-sol-types", "serde", "serde_json", "thiserror", @@ -111,16 +152,17 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3223d71dc78f464b2743418d0be8b5c894313e272105a6206ad5e867d67b3ce2" +checksum = "b80851d1697fc4fa2827998e3ee010a3d1fc59c7d25e87070840169fcf465832" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-json-rpc", + "alloy-network-primitives", "alloy-primitives", "alloy-rpc-types-eth", - "alloy-serde 0.2.0", + "alloy-serde", "alloy-signer", "alloy-sol-types", "async-trait", @@ -129,11 +171,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-network-primitives" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76a2336889f3d0624b18213239d27f4f34eb476eb35bef22f6a8cc24e0c0078" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + [[package]] name = "alloy-primitives" -version = "0.7.7" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" +checksum = "a767e59c86900dd7c3ce3ecef04f3ace5ac9631ee150beb8b7d22f7fa3bbb2d7" dependencies = [ "alloy-rlp", "arbitrary", @@ -142,7 +195,6 @@ dependencies = [ "const-hex", "derive_arbitrary", "derive_more", - "ethereum_ssz", "getrandom", "hex-literal", "itoa", @@ -158,15 +210,16 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29da7457d853cb8199ec04b227d5d2ef598be3e59fc2bbad70c8be213292f32" +checksum = "f2d2a195caa6707f5ce13905794865765afc6d9ea92c3a56e3a973c168d703bc" dependencies = [ "alloy-chains", "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-network", + "alloy-network-primitives", "alloy-primitives", "alloy-rpc-client", "alloy-rpc-types-eth", @@ -183,6 +236,7 @@ dependencies = [ "reqwest 0.12.5", "serde", "serde_json", + "thiserror", "tokio", "tracing", "url", @@ -212,9 +266,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a9e609524fa31c2c70eb24c0da60796809193ad4787a6dfe6d0db0d3ac112d" +checksum = "ed31cdba2b23d71c555505b06674f8e7459496abfd7f4875d268434ef5a99ee6" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -233,15 +287,16 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "605fa8462732bb8fd0645a9941e12961e079d45ae6a44634c826f8229c187bdf" +checksum = "c0ba05d6ee4db0d89113294a614137940f79abfc2c40a9a3bee2995660358776" dependencies = [ "alloy-consensus", "alloy-eips", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.2.0", + "alloy-serde", "alloy-sol-types", "itertools 0.13.0", "serde", @@ -251,19 +306,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c5b9057acc02aee1b8aac2b5a0729cb0f73d080082c111313e5d1f92a96630" -dependencies = [ - "alloy-primitives", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-serde" -version = "0.2.1" -source = "git+https://github.com/alloy-rs/alloy?rev=fd159f6#fd159f6985058d2480fb89f63315e35680a07956" +checksum = "bfd260ede54f0b53761fdd04133acc10ae70427f66a69aa9590529bbd066cd58" dependencies = [ "alloy-primitives", "arbitrary", @@ -273,9 +318,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37f10592696f4ab8b687d5a8ab55e998a14ea0ca5f8eb20ad74a96ad671bb54a" +checksum = "7b5193ee6b370b89db154d7dc40c6a8e6ce11213865baaf2b418a9f2006be762" dependencies = [ "alloy-primitives", "async-trait", @@ -287,9 +332,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.7" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" +checksum = "183bcfc0f3291d9c41a3774172ee582fb2ce6eb6569085471d8f225de7bb86fc" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -301,9 +346,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.7.7" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" +checksum = "71c4d842beb7a6686d04125603bc57614d5ed78bf95e4753274db3db4ba95214" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -319,9 +364,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.7.7" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" +checksum = "1306e8d3c9e6e6ecf7a39ffaf7291e73a5f655a2defd366ee92c2efebcdf7fee" dependencies = [ "const-hex", "dunce", @@ -332,12 +377,23 @@ dependencies = [ "syn-solidity", ] +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4691da83dce9c9b4c775dd701c87759f173bd3021cbf2e60cde00c5fe6d7241" +dependencies = [ + "serde", + "winnow 0.6.18", +] + [[package]] name = "alloy-sol-types" -version = "0.7.7" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" +checksum = "577e262966e92112edbd15b1b2c0947cc434d6e8311df96d3329793fe8047da9" dependencies = [ + "alloy-json-abi", "alloy-primitives", "alloy-sol-macro", "const-hex", @@ -346,9 +402,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0590afbdacf2f8cca49d025a2466f3b6584a016a8b28f532f29f8da1007bae" +checksum = "454220c714857cf68af87d788d1f0638ad8766268b94f6a49fed96cbc2ab382c" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -365,9 +421,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d8f1eefa8cb9e7550740ee330feba4fed303a77ad3085707546f9152a88c380" +checksum = "377f2353d7fea03a2dba6b9ffbb7d610402c040dd5700d1fae8b9ec2673eed9b" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -1041,11 +1097,12 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.5.3" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" dependencies = [ "cfg-if", + "crossbeam-utils", "hashbrown", "lock_api", "once_cell", @@ -1292,17 +1349,6 @@ dependencies = [ "uint", ] -[[package]] -name = "ethereum_ssz" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3627f83d8b87b432a5fad9934b4565260722a141a2c40f371f8080adec9425" -dependencies = [ - "ethereum-types", - "itertools 0.10.5", - "smallvec", -] - [[package]] name = "ethers-contract" version = "2.0.14" @@ -1445,7 +1491,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ - "arbitrary", "byteorder", "rand", "rustc-hex", @@ -2822,13 +2867,13 @@ dependencies = [ [[package]] name = "proptest-derive" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf16337405ca084e9c78985114633b6827711d22b9e6ef6c6c0d665eb3f0b6e" +checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.70", ] [[package]] @@ -3880,9 +3925,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.7" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" +checksum = "284c41c2919303438fcf8dede4036fd1e82d4fc0fbb2b279bd2a1442c909ca92" dependencies = [ "paste", "proc-macro2", @@ -4156,7 +4201,7 @@ checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -4283,7 +4328,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ - "arbitrary", "byteorder", "crunchy", "hex", @@ -4683,6 +4727,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index 7a9e558994..426d6e403f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,3 @@ debug = true [profile.ethtests] inherits = "test" opt-level = 3 - -[patch.crates-io] -alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "fd159f6" } \ No newline at end of file diff --git a/bins/revm-test/Cargo.toml b/bins/revm-test/Cargo.toml index 0dd649091b..04a4421061 100644 --- a/bins/revm-test/Cargo.toml +++ b/bins/revm-test/Cargo.toml @@ -9,8 +9,8 @@ bytes = "1.7" hex = "0.4" revm = { path = "../../crates/revm", version = "13.0.0", default-features=false } microbench = "0.5" -alloy-sol-macro = "0.7.7" -alloy-sol-types = "0.7.7" +alloy-sol-macro = "0.8.0" +alloy-sol-types = "0.8.0" regex = "1.10.6" eyre = "0.6.12" diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 3669b16059..18eb6c0e71 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -22,8 +22,8 @@ rust_2018_idioms = "deny" all = "warn" [dependencies] -alloy-eips = { version = "0.2", default-features = false, features = ["k256"] } -alloy-primitives = { version = "0.7.7", default-features = false, features = [ +alloy-eips = { version = "0.3", default-features = false, features = ["k256"] } +alloy-primitives = { version = "0.8.0", default-features = false, features = [ "rlp", ] } hashbrown = "0.14" diff --git a/crates/revm/Cargo.toml b/crates/revm/Cargo.toml index 2eaae45a32..f35eeb307e 100644 --- a/crates/revm/Cargo.toml +++ b/crates/revm/Cargo.toml @@ -49,12 +49,12 @@ ethers-providers = { version = "2.0", optional = true } ethers-core = { version = "2.0", optional = true } # alloydb -alloy-provider = { version = "0.2", optional = true, default-features = false } -alloy-eips = { version = "0.2", optional = true, default-features = false } -alloy-transport = { version = "0.2", optional = true, default-features = false } +alloy-provider = { version = "0.3", optional = true, default-features = false } +alloy-eips = { version = "0.3", optional = true, default-features = false } +alloy-transport = { version = "0.3", optional = true, default-features = false } [dev-dependencies] -alloy-sol-types = { version = "0.7.7", default-features = false, features = [ +alloy-sol-types = { version = "0.8.0", default-features = false, features = [ "std", ] } ethers-contract = { version = "2.0.14", default-features = false } @@ -64,7 +64,7 @@ indicatif = "0.17" reqwest = { version = "0.12" } rstest = "0.22.0" -alloy-provider = "0.2" +alloy-provider = "0.3" [features] default = ["std", "c-kzg", "secp256k1", "portable", "blst"] diff --git a/crates/revm/src/db/alloydb.rs b/crates/revm/src/db/alloydb.rs index 1caf4151be..f03685282f 100644 --- a/crates/revm/src/db/alloydb.rs +++ b/crates/revm/src/db/alloydb.rs @@ -3,7 +3,10 @@ use crate::{ primitives::{AccountInfo, Address, Bytecode, B256, U256}, }; use alloy_eips::BlockId; -use alloy_provider::{Network, Provider}; +use alloy_provider::{ + network::{BlockResponse, HeaderResponse}, + Network, Provider, +}; use alloy_transport::{Transport, TransportError}; use std::future::IntoFuture; use tokio::runtime::{Handle, Runtime}; @@ -129,7 +132,7 @@ impl> DatabaseRef for AlloyD .get_block_by_number(number.into(), false), )?; // SAFETY: If the number is given, the block is supposed to be finalized, so unwrapping is safe. - Ok(B256::new(*block.unwrap().header.hash.unwrap())) + Ok(B256::new(*block.unwrap().header().hash())) } fn code_by_hash_ref(&self, _code_hash: B256) -> Result {