diff --git a/Cargo.lock b/Cargo.lock index 3d13a0132..3ab202d1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ dependencies = [ [[package]] name = "alloy-consensus" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-eips 0.1.0", "alloy-primitives", @@ -171,7 +171,7 @@ dependencies = [ [[package]] name = "alloy-eips" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -203,7 +203,7 @@ dependencies = [ [[package]] name = "alloy-genesis" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-primitives", "alloy-serde 0.1.0", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "alloy-json-rpc" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-primitives", "serde", @@ -238,13 +238,14 @@ dependencies = [ [[package]] name = "alloy-network" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-consensus 0.1.0", "alloy-eips 0.1.0", "alloy-json-rpc", "alloy-primitives", "alloy-rpc-types-eth 0.1.0", + "alloy-serde 0.1.0", "alloy-signer", "alloy-sol-types", "async-trait", @@ -256,7 +257,7 @@ dependencies = [ [[package]] name = "alloy-node-bindings" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -298,7 +299,7 @@ dependencies = [ [[package]] name = "alloy-provider" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-chains", "alloy-consensus 0.1.0", @@ -308,9 +309,9 @@ dependencies = [ "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", + "alloy-rpc-types-admin", "alloy-rpc-types-engine", "alloy-rpc-types-eth 0.1.0", - "alloy-rpc-types-trace", "alloy-transport", "alloy-transport-http", "alloy-transport-ws", @@ -333,7 +334,7 @@ dependencies = [ [[package]] name = "alloy-pubsub" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -373,7 +374,7 @@ dependencies = [ [[package]] name = "alloy-rpc-client" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -396,7 +397,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-rpc-types-engine", "alloy-rpc-types-eth 0.1.0", @@ -413,10 +414,21 @@ dependencies = [ "alloy-serde 0.1.1", ] +[[package]] +name = "alloy-rpc-types-admin" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" +dependencies = [ + "alloy-genesis", + "alloy-primitives", + "serde", + "serde_json", +] + [[package]] name = "alloy-rpc-types-anvil" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-primitives", "alloy-serde 0.1.0", @@ -426,7 +438,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types-beacon" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-eips 0.1.0", "alloy-primitives", @@ -439,7 +451,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-consensus 0.1.0", "alloy-eips 0.1.0", @@ -457,11 +469,10 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-consensus 0.1.0", "alloy-eips 0.1.0", - "alloy-genesis", "alloy-primitives", "alloy-rlp", "alloy-serde 0.1.0", @@ -496,7 +507,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth 0.1.0", @@ -506,11 +517,25 @@ dependencies = [ ] [[package]] -name = "alloy-serde" +name = "alloy-rpc-types-txpool" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-primitives", + "alloy-rpc-types-eth 0.1.0", + "alloy-serde 0.1.0", + "serde", +] + +[[package]] +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" +dependencies = [ + "alloy-primitives", + "arbitrary", + "proptest", + "proptest-derive", "serde", "serde_json", ] @@ -528,7 +553,7 @@ dependencies = [ [[package]] name = "alloy-signer" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-primitives", "async-trait", @@ -539,9 +564,9 @@ dependencies = [ ] [[package]] -name = "alloy-signer-wallet" +name = "alloy-signer-local" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-consensus 0.1.0", "alloy-network", @@ -630,7 +655,7 @@ dependencies = [ [[package]] name = "alloy-transport" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -647,7 +672,7 @@ dependencies = [ [[package]] name = "alloy-transport-http" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -661,7 +686,7 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -679,7 +704,7 @@ dependencies = [ [[package]] name = "alloy-transport-ws" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" +source = "git+https://github.com/alloy-rs/alloy?rev=6cb3713#6cb3713a14c047cd5fcf17b99d27055341c41aaf" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -2323,6 +2348,7 @@ dependencies = [ "futures-util", "reth", "reth-node-ethereum", + "reth-rpc-types", ] [[package]] @@ -6777,7 +6803,7 @@ dependencies = [ "alloy-network", "alloy-rpc-types 0.1.0", "alloy-signer", - "alloy-signer-wallet", + "alloy-signer-local", "eyre", "futures-util", "jsonrpsee", @@ -8000,10 +8026,13 @@ version = "1.0.0-rc.1" dependencies = [ "alloy-primitives", "alloy-rpc-types 0.1.0", + "alloy-rpc-types-admin", "alloy-rpc-types-anvil", "alloy-rpc-types-beacon", "alloy-rpc-types-engine", "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", + "alloy-serde 0.1.0", "arbitrary", "bytes", "jsonrpsee-types", @@ -8356,7 +8385,7 @@ dependencies = [ [[package]] name = "revm-inspectors" version = "0.1.0" -source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=52f632e#52f632e66404b9d6bfd474eeef3ff65d58167f2e" +source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=6bbf303#6bbf3033ba0119531de69cbddad1f4b89dfa2c4a" dependencies = [ "alloy-primitives", "alloy-rpc-types 0.1.0", diff --git a/Cargo.toml b/Cargo.toml index 61d08cf9e..01122427c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -344,7 +344,7 @@ revm = { version = "9.0.0", features = [ revm-primitives = { version = "4.0.0", features = [ "std", ], default-features = false } -revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "52f632e" } +revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "6bbf303" } # eth alloy-chains = "0.1.15" @@ -353,33 +353,36 @@ alloy-dyn-abi = "0.7.2" alloy-sol-types = "0.7.2" alloy-rlp = "0.3.4" alloy-trie = "0.4" -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false, features = [ +alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false, features = [ "eth", ] } -alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false, features = [ +alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-rpc-types-admin = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-rpc-types-txpool = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-serde = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false, features = [ "reqwest", ] } -alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "00d81d7" } -alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7" } -alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", features = [ +alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "6cb3713" } +alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-signer-local = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713" } +alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", features = [ "reqwest-rustls-tls", ], default-features = false } -alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } -alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } +alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } +alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "6cb3713", default-features = false } # misc auto_impl = "1" diff --git a/crates/e2e-test-utils/Cargo.toml b/crates/e2e-test-utils/Cargo.toml index 77a5676ab..c062bec4b 100644 --- a/crates/e2e-test-utils/Cargo.toml +++ b/crates/e2e-test-utils/Cargo.toml @@ -29,7 +29,7 @@ tokio.workspace = true tokio-stream.workspace = true serde_json.workspace = true alloy-signer.workspace = true -alloy-signer-wallet = { workspace = true, features = ["mnemonic"] } +alloy-signer-local = { workspace = true, features = ["mnemonic"] } alloy-rpc-types.workspace = true alloy-network.workspace = true alloy-consensus = { workspace = true, features = ["kzg"] } diff --git a/crates/e2e-test-utils/src/transaction.rs b/crates/e2e-test-utils/src/transaction.rs index 8fe7efd0e..b278c9636 100644 --- a/crates/e2e-test-utils/src/transaction.rs +++ b/crates/e2e-test-utils/src/transaction.rs @@ -1,9 +1,9 @@ use alloy_consensus::{ BlobTransactionSidecar, SidecarBuilder, SimpleCoder, TxEip4844Variant, TxEnvelope, }; -use alloy_network::{eip2718::Encodable2718, EthereumSigner, TransactionBuilder}; +use alloy_network::{eip2718::Encodable2718, EthereumWallet, TransactionBuilder}; use alloy_rpc_types::{TransactionInput, TransactionRequest}; -use alloy_signer_wallet::LocalWallet; +use alloy_signer_local::PrivateKeySigner; use eyre::Ok; use reth_primitives::{hex, Address, Bytes, U256}; @@ -13,19 +13,22 @@ pub struct TransactionTestContext; impl TransactionTestContext { /// Creates a static transfer and signs it, returning bytes - pub async fn transfer_tx(chain_id: u64, wallet: LocalWallet) -> TxEnvelope { + pub async fn transfer_tx(chain_id: u64, wallet: PrivateKeySigner) -> TxEnvelope { let tx = tx(chain_id, None, 0); Self::sign_tx(wallet, tx).await } /// Creates a static transfer and signs it, returning bytes - pub async fn transfer_tx_bytes(chain_id: u64, wallet: LocalWallet) -> Bytes { + pub async fn transfer_tx_bytes(chain_id: u64, wallet: PrivateKeySigner) -> Bytes { let signed = Self::transfer_tx(chain_id, wallet).await; signed.encoded_2718().into() } /// Creates a tx with blob sidecar and sign it - pub async fn tx_with_blobs(chain_id: u64, wallet: LocalWallet) -> eyre::Result { + pub async fn tx_with_blobs( + chain_id: u64, + wallet: PrivateKeySigner, + ) -> eyre::Result { let mut tx = tx(chain_id, None, 0); let mut builder = SidecarBuilder::::new(); @@ -40,13 +43,16 @@ impl TransactionTestContext { } /// Signs an arbitrary TransactionRequest using the provided wallet - pub async fn sign_tx(wallet: LocalWallet, tx: TransactionRequest) -> TxEnvelope { - let signer = EthereumSigner::from(wallet); + pub async fn sign_tx(wallet: PrivateKeySigner, tx: TransactionRequest) -> TxEnvelope { + let signer = EthereumWallet::from(wallet); tx.build(&signer).await.unwrap() } /// Creates a tx with blob sidecar and sign it, returning bytes - pub async fn tx_with_blobs_bytes(chain_id: u64, wallet: LocalWallet) -> eyre::Result { + pub async fn tx_with_blobs_bytes( + chain_id: u64, + wallet: PrivateKeySigner, + ) -> eyre::Result { let signed = Self::tx_with_blobs(chain_id, wallet).await?; Ok(signed.encoded_2718().into()) @@ -54,12 +60,12 @@ impl TransactionTestContext { pub async fn optimism_l1_block_info_tx( chain_id: u64, - wallet: LocalWallet, + wallet: PrivateKeySigner, nonce: u64, ) -> Bytes { let l1_block_info = Bytes::from_static(&hex!("7ef9015aa044bae9d41b8380d781187b426c6fe43df5fb2fb57bd4466ef6a701e1f01e015694deaddeaddeaddeaddeaddeaddeaddeaddead000194420000000000000000000000000000000000001580808408f0d18001b90104015d8eb900000000000000000000000000000000000000000000000000000000008057650000000000000000000000000000000000000000000000000000000063d96d10000000000000000000000000000000000000000000000000000000000009f35273d89754a1e0387b89520d989d3be9c37c1f32495a88faf1ea05c61121ab0d1900000000000000000000000000000000000000000000000000000000000000010000000000000000000000002d679b567db6187c0c8323fa982cfb88b74dbcc7000000000000000000000000000000000000000000000000000000000000083400000000000000000000000000000000000000000000000000000000000f4240")); let tx = tx(chain_id, Some(l1_block_info), nonce); - let signer = EthereumSigner::from(wallet); + let signer = EthereumWallet::from(wallet); tx.build(&signer).await.unwrap().encoded_2718().into() } diff --git a/crates/e2e-test-utils/src/wallet.rs b/crates/e2e-test-utils/src/wallet.rs index e841e7cd7..f8a4230ee 100644 --- a/crates/e2e-test-utils/src/wallet.rs +++ b/crates/e2e-test-utils/src/wallet.rs @@ -1,9 +1,9 @@ use alloy_signer::Signer; -use alloy_signer_wallet::{coins_bip39::English, LocalWallet, MnemonicBuilder}; +use alloy_signer_local::{coins_bip39::English, MnemonicBuilder, PrivateKeySigner}; /// One of the accounts of the genesis allocations. pub struct Wallet { - pub inner: LocalWallet, + pub inner: PrivateKeySigner, pub inner_nonce: u64, pub chain_id: u64, amount: usize, @@ -27,7 +27,7 @@ impl Wallet { self.derivation_path.as_deref().unwrap_or("m/44'/60'/0'/0/") } - pub fn gen(&self) -> Vec { + pub fn gen(&self) -> Vec { let builder = MnemonicBuilder::::default().phrase(TEST_MNEMONIC); // use the derivation path diff --git a/crates/ethereum/evm/src/execute.rs b/crates/ethereum/evm/src/execute.rs index 0013a0c66..42b1b0c13 100644 --- a/crates/ethereum/evm/src/execute.rs +++ b/crates/ethereum/evm/src/execute.rs @@ -1312,7 +1312,7 @@ mod tests { let request = requests.first().unwrap(); let withdrawal_request = request.as_withdrawal_request().unwrap(); assert_eq!(withdrawal_request.source_address, sender_address); - assert_eq!(withdrawal_request.validator_public_key, validator_public_key); + assert_eq!(withdrawal_request.validator_pubkey, validator_public_key); assert_eq!(withdrawal_request.amount, u64::from_be_bytes(withdrawal_amount.into())); } diff --git a/crates/evm/execution-types/src/execution_outcome.rs b/crates/evm/execution-types/src/execution_outcome.rs index aebc8d45b..be9fd67b1 100644 --- a/crates/evm/execution-types/src/execution_outcome.rs +++ b/crates/evm/execution-types/src/execution_outcome.rs @@ -377,7 +377,7 @@ mod tests { }), Request::WithdrawalRequest(WithdrawalRequest { source_address: Address::from([1; 20]), - validator_public_key: FixedBytes::<48>::from([10; 48]), + validator_pubkey: FixedBytes::<48>::from([10; 48]), amount: 72, }), ])]; diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index b41d3db54..ee8d4acdd 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -82,7 +82,7 @@ reth-transaction-pool = { workspace = true, features = ["test-utils"] } # alloy deps for testing against nodes alloy-node-bindings.workspace = true -alloy-provider.workspace = true +alloy-provider= { workspace = true, features = ["admin-api"] } # misc serial_test.workspace = true diff --git a/crates/revm/src/state_change.rs b/crates/revm/src/state_change.rs index d181cf474..7305a0c06 100644 --- a/crates/revm/src/state_change.rs +++ b/crates/revm/src/state_change.rs @@ -319,14 +319,14 @@ where let mut source_address = Address::ZERO; data.copy_to_slice(source_address.as_mut_slice()); - let mut validator_public_key = FixedBytes::<48>::ZERO; - data.copy_to_slice(validator_public_key.as_mut_slice()); + let mut validator_pubkey = FixedBytes::<48>::ZERO; + data.copy_to_slice(validator_pubkey.as_mut_slice()); let amount = data.get_u64(); withdrawal_requests.push(Request::WithdrawalRequest(WithdrawalRequest { source_address, - validator_public_key, + validator_pubkey, amount, })); } diff --git a/crates/rpc/rpc-types/Cargo.toml b/crates/rpc/rpc-types/Cargo.toml index 7ef018868..648b8b24f 100644 --- a/crates/rpc/rpc-types/Cargo.toml +++ b/crates/rpc/rpc-types/Cargo.toml @@ -19,6 +19,9 @@ alloy-rpc-types = { workspace = true, features = ["jsonrpsee-types"] } alloy-rpc-types-anvil.workspace = true alloy-rpc-types-trace.workspace = true alloy-rpc-types-beacon.workspace = true +alloy-rpc-types-admin.workspace = true +alloy-rpc-types-txpool.workspace = true +alloy-serde.workspace = true alloy-rpc-types-engine = { workspace = true, features = ["jsonrpsee-types"] } # misc diff --git a/crates/rpc/rpc-types/src/lib.rs b/crates/rpc/rpc-types/src/lib.rs index a8d266648..3d239d1f9 100644 --- a/crates/rpc/rpc-types/src/lib.rs +++ b/crates/rpc/rpc-types/src/lib.rs @@ -22,6 +22,9 @@ pub use alloy_rpc_types::serde_helpers; // Ethereum specific rpc types coming from alloy. pub use alloy_rpc_types::*; +// Ethereum specific serde types coming from alloy. +pub use alloy_serde::*; + pub mod trace { //! RPC types for trace endpoints and inspectors. pub use alloy_rpc_types_trace::*; @@ -33,6 +36,12 @@ pub use alloy_rpc_types_anvil as anvil; // re-export beacon pub use alloy_rpc_types_beacon as beacon; +// re-export admin +pub use alloy_rpc_types_admin as admin; + +// re-export txpool +pub use alloy_rpc_types_txpool as txpool; + // Ethereum specific rpc types related to typed transaction requests and the engine API. pub use eth::{ engine, diff --git a/crates/rpc/rpc-types/src/net.rs b/crates/rpc/rpc-types/src/net.rs index b434bcbf8..eb77ac792 100644 --- a/crates/rpc/rpc-types/src/net.rs +++ b/crates/rpc/rpc-types/src/net.rs @@ -1,4 +1,4 @@ -use alloy_rpc_types::admin::EthProtocolInfo; +use alloy_rpc_types_admin::EthProtocolInfo; use serde::{Deserialize, Serialize}; /// The status of the network being ran by the local node. diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index ac1c56322..b2d524a63 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -1,7 +1,7 @@ use crate::{ eth::{ error::{EthApiError, EthResult}, - revm_utils::{prepare_call_env, EvmOverrides}, + revm_utils::prepare_call_env, EthTransactions, }, result::{internal_rpc_err, ToRpcResult}, @@ -20,6 +20,7 @@ use reth_provider::{ use reth_revm::database::StateProviderDatabase; use reth_rpc_api::DebugApiServer; use reth_rpc_types::{ + state::EvmOverrides, trace::geth::{ BlockTraceResult, FourByteFrame, GethDebugBuiltInTracerType, GethDebugTracerType, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, NoopFrame, TraceResult, diff --git a/crates/rpc/rpc/src/eth/api/call.rs b/crates/rpc/rpc/src/eth/api/call.rs index a58559131..d0fb52b25 100644 --- a/crates/rpc/rpc/src/eth/api/call.rs +++ b/crates/rpc/rpc/src/eth/api/call.rs @@ -6,7 +6,6 @@ use crate::{ revm_utils::{ apply_state_overrides, build_call_evm_env, caller_gas_allowance, cap_tx_gas_limit_with_caller_allowance, get_precompiles, prepare_call_env, - EvmOverrides, }, EthTransactions, }, @@ -20,8 +19,8 @@ use reth_provider::{ }; use reth_revm::database::StateProviderDatabase; use reth_rpc_types::{ - state::StateOverride, AccessListWithGasUsed, Bundle, EthCallResponse, StateContext, - TransactionRequest, + state::{EvmOverrides, StateOverride}, + AccessListWithGasUsed, Bundle, EthCallResponse, StateContext, TransactionRequest, }; use reth_transaction_pool::TransactionPool; use revm::{ diff --git a/crates/rpc/rpc/src/eth/api/server.rs b/crates/rpc/rpc/src/eth/api/server.rs index 3d3ceeb6c..41c68da48 100644 --- a/crates/rpc/rpc/src/eth/api/server.rs +++ b/crates/rpc/rpc/src/eth/api/server.rs @@ -6,7 +6,6 @@ use crate::{ eth::{ api::{EthApi, EthTransactions}, error::EthApiError, - revm_utils::EvmOverrides, }, result::{internal_rpc_err, ToRpcResult}, }; @@ -21,9 +20,11 @@ use reth_provider::{ }; use reth_rpc_api::EthApiServer; use reth_rpc_types::{ - serde_helpers::JsonStorageKey, state::StateOverride, AccessListWithGasUsed, - AnyTransactionReceipt, BlockOverrides, Bundle, EIP1186AccountProofResponse, EthCallResponse, - FeeHistory, Header, Index, RichBlock, StateContext, SyncStatus, TransactionRequest, Work, + serde_helpers::JsonStorageKey, + state::{EvmOverrides, StateOverride}, + AccessListWithGasUsed, AnyTransactionReceipt, BlockOverrides, Bundle, + EIP1186AccountProofResponse, EthCallResponse, FeeHistory, Header, Index, RichBlock, + StateContext, SyncStatus, TransactionRequest, Work, }; use reth_transaction_pool::TransactionPool; use tracing::trace; diff --git a/crates/rpc/rpc/src/eth/api/transactions.rs b/crates/rpc/rpc/src/eth/api/transactions.rs index 52efa4c34..8829a0434 100644 --- a/crates/rpc/rpc/src/eth/api/transactions.rs +++ b/crates/rpc/rpc/src/eth/api/transactions.rs @@ -3,7 +3,7 @@ use crate::{ eth::{ api::pending_block::PendingBlockEnv, error::{EthApiError, EthResult, RpcInvalidTransactionError, SignError}, - revm_utils::{prepare_call_env, EvmOverrides}, + revm_utils::prepare_call_env, utils::recover_raw_transaction, }, EthApi, EthApiSpec, @@ -26,6 +26,7 @@ use reth_provider::{ }; use reth_revm::database::StateProviderDatabase; use reth_rpc_types::{ + state::EvmOverrides, transaction::{ EIP1559TransactionRequest, EIP2930TransactionRequest, EIP4844TransactionRequest, LegacyTransactionRequest, diff --git a/crates/rpc/rpc/src/eth/revm_utils.rs b/crates/rpc/rpc/src/eth/revm_utils.rs index 8041087f2..560c3eeb6 100644 --- a/crates/rpc/rpc/src/eth/revm_utils.rs +++ b/crates/rpc/rpc/src/eth/revm_utils.rs @@ -10,7 +10,7 @@ use reth_primitives::{ TransactionSignedEcRecovered, TxHash, TxKind, B256, U256, }; use reth_rpc_types::{ - state::{AccountOverride, StateOverride}, + state::{AccountOverride, EvmOverrides, StateOverride}, BlockOverrides, TransactionRequest, }; #[cfg(feature = "optimism")] @@ -27,64 +27,6 @@ use revm::{ use std::cmp::min; use tracing::trace; -/// Helper type that bundles various overrides for EVM Execution. -/// -/// By `Default`, no overrides are included. -#[derive(Debug, Clone, Default)] -pub struct EvmOverrides { - /// Applies overrides to the state before execution. - pub state: Option, - /// Applies overrides to the block before execution. - /// - /// This is a `Box` because less common and only available in debug trace endpoints. - pub block: Option>, -} - -impl EvmOverrides { - /// Creates a new instance with the given overrides - pub const fn new(state: Option, block: Option>) -> Self { - Self { state, block } - } - - /// Creates a new instance with the given state overrides. - pub const fn state(state: Option) -> Self { - Self { state, block: None } - } - - /// Creates a new instance with the given block overrides. - pub const fn block(block: Option>) -> Self { - Self { state: None, block } - } - - /// Returns `true` if the overrides contain state overrides. - pub const fn has_state(&self) -> bool { - self.state.is_some() - } - - /// Returns `true` if the overrides contain block overrides. - pub const fn has_block(&self) -> bool { - self.block.is_some() - } - - /// Adds state overrides to an existing instance. - pub fn with_state(mut self, state: StateOverride) -> Self { - self.state = Some(state); - self - } - - /// Adds block overrides to an existing instance. - pub fn with_block(mut self, block: Box) -> Self { - self.block = Some(block); - self - } -} - -impl From> for EvmOverrides { - fn from(state: Option) -> Self { - Self::state(state) - } -} - /// Helper type to work with different transaction types when configuring the EVM env. /// /// This makes it easier to handle errors. diff --git a/crates/rpc/rpc/src/trace.rs b/crates/rpc/rpc/src/trace.rs index 589a30372..fdbf7163b 100644 --- a/crates/rpc/rpc/src/trace.rs +++ b/crates/rpc/rpc/src/trace.rs @@ -1,6 +1,6 @@ use crate::eth::{ error::{EthApiError, EthResult}, - revm_utils::{prepare_call_env, EvmOverrides}, + revm_utils::prepare_call_env, utils::recover_raw_transaction, EthTransactions, }; @@ -12,7 +12,7 @@ use reth_provider::{BlockReader, ChainSpecProvider, EvmEnvProvider, StateProvide use reth_revm::database::StateProviderDatabase; use reth_rpc_api::TraceApiServer; use reth_rpc_types::{ - state::StateOverride, + state::{EvmOverrides, StateOverride}, trace::{ filter::TraceFilter, opcode::{BlockOpcodeGas, TransactionOpcodeGas}, diff --git a/examples/custom-inspector/Cargo.toml b/examples/custom-inspector/Cargo.toml index d2dc4ba14..0e71af297 100644 --- a/examples/custom-inspector/Cargo.toml +++ b/examples/custom-inspector/Cargo.toml @@ -8,5 +8,6 @@ license.workspace = true [dependencies] reth.workspace = true reth-node-ethereum.workspace = true +reth-rpc-types.workspace = true clap = { workspace = true, features = ["derive"] } futures-util.workspace = true \ No newline at end of file diff --git a/examples/custom-inspector/src/main.rs b/examples/custom-inspector/src/main.rs index b0fe4fbb8..c1aae0227 100644 --- a/examples/custom-inspector/src/main.rs +++ b/examples/custom-inspector/src/main.rs @@ -21,13 +21,11 @@ use reth::{ interpreter::{Interpreter, OpCode}, Database, Evm, EvmContext, Inspector, }, - rpc::{ - compat::transaction::transaction_to_call_request, - eth::{revm_utils::EvmOverrides, EthTransactions}, - }, + rpc::{compat::transaction::transaction_to_call_request, eth::EthTransactions}, transaction_pool::TransactionPool, }; use reth_node_ethereum::node::EthereumNode; +use reth_rpc_types::state::EvmOverrides; fn main() { Cli::::parse()