diff --git a/Cargo.lock b/Cargo.lock index c7eca223b..f1ee55cb3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,7 +133,7 @@ dependencies = [ [[package]] name = "alloy-consensus" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-eips", "alloy-primitives", @@ -166,7 +166,7 @@ dependencies = [ [[package]] name = "alloy-eips" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -185,7 +185,7 @@ dependencies = [ [[package]] name = "alloy-genesis" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "alloy-serde", @@ -208,7 +208,7 @@ dependencies = [ [[package]] name = "alloy-json-rpc" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "serde", @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "alloy-network" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-eips", @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "alloy-node-bindings" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -279,7 +279,7 @@ dependencies = [ [[package]] name = "alloy-provider" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-eips", "alloy-json-rpc", @@ -329,7 +329,7 @@ dependencies = [ [[package]] name = "alloy-rpc-client" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -349,7 +349,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-eips", @@ -371,7 +371,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "alloy-serde", @@ -381,7 +381,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-eips", @@ -401,7 +401,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "alloy-rpc-types", @@ -413,7 +413,7 @@ dependencies = [ [[package]] name = "alloy-serde" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "serde", @@ -423,7 +423,7 @@ dependencies = [ [[package]] name = "alloy-signer" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "async-trait", @@ -436,7 +436,7 @@ dependencies = [ [[package]] name = "alloy-signer-wallet" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-network", @@ -511,7 +511,7 @@ dependencies = [ [[package]] name = "alloy-transport" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-json-rpc", "base64 0.22.0", @@ -529,7 +529,7 @@ dependencies = [ [[package]] name = "alloy-transport-http" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=4e22b9e#4e22b9e1de80f1b1cc5dfdcd9461d44b27cf27ca" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -7944,7 +7944,7 @@ dependencies = [ [[package]] name = "revm-inspectors" version = "0.1.0" -source = "git+https://github.com/paradigmxyz/evm-inspectors?rev=848d568#848d5688d0c499c538b9a78b423a7061525aa580" +source = "git+https://github.com/paradigmxyz/evm-inspectors?rev=3d2077e#3d2077ee665046c256448a8bd90d8e93ea85de56" dependencies = [ "alloy-primitives", "alloy-rpc-types", diff --git a/Cargo.toml b/Cargo.toml index ab330d87e..28b0692dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -282,7 +282,7 @@ reth-testing-utils = { path = "testing/testing-utils" } # revm revm = { version = "8.0.0", features = ["std", "secp256k1"], default-features = false } revm-primitives = { version = "3.1.0", features = ["std"], default-features = false } -revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "848d568" } +revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "3d2077e" } # eth alloy-chains = "0.1.15" @@ -291,20 +291,20 @@ alloy-dyn-abi = "0.7.1" alloy-sol-types = "0.7.1" alloy-rlp = "0.3.4" alloy-trie = "0.3.1" -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e", default-features = false, features = [ +alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false, features = [ "reqwest", ] } -alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "4e22b9e" } -alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } -alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "4e22b9e" } +alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "ca54552" } +alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } +alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552" } # misc auto_impl = "1" diff --git a/crates/blockchain-tree/src/blockchain_tree.rs b/crates/blockchain-tree/src/blockchain_tree.rs index eee4163c7..09f829c7e 100644 --- a/crates/blockchain-tree/src/blockchain_tree.rs +++ b/crates/blockchain-tree/src/blockchain_tree.rs @@ -1285,8 +1285,8 @@ mod tests { revm_primitives::AccountInfo, stage::StageCheckpoint, Account, Address, ChainSpecBuilder, Genesis, GenesisAccount, Header, Signature, - Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559, TxKind, - Withdrawals, B256, MAINNET, + Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559, Withdrawals, B256, + MAINNET, }; use reth_provider::{ test_utils::{ @@ -1465,7 +1465,7 @@ mod tests { chain_id: chain_spec.chain.id(), nonce, gas_limit: 21_000, - to: TxKind::Call(Address::ZERO), + to: Address::ZERO.into(), max_fee_per_gas: EIP1559_INITIAL_BASE_FEE as u128, ..Default::default() }), diff --git a/crates/consensus/common/src/validation.rs b/crates/consensus/common/src/validation.rs index c6e4e0aee..b67d40e98 100644 --- a/crates/consensus/common/src/validation.rs +++ b/crates/consensus/common/src/validation.rs @@ -202,7 +202,7 @@ mod tests { use reth_primitives::{ hex_literal::hex, proofs, Account, Address, BlockBody, BlockHash, BlockHashOrNumber, BlockNumber, Bytes, ChainSpecBuilder, Signature, Transaction, TransactionSigned, TxEip4844, - TxKind, Withdrawal, Withdrawals, U256, + Withdrawal, Withdrawals, U256, }; use reth_provider::AccountReader; use std::ops::RangeBounds; @@ -313,7 +313,7 @@ mod tests { max_priority_fee_per_gas: 0x28f000fff, max_fee_per_blob_gas: 0x7, gas_limit: 10, - to: TxKind::Call(Address::default()), + to: Address::default().into(), value: U256::from(3_u64), input: Bytes::from(vec![1, 2]), access_list: Default::default(), diff --git a/crates/net/network/tests/it/connect.rs b/crates/net/network/tests/it/connect.rs index 1ff59bf40..7b9c785eb 100644 --- a/crates/net/network/tests/it/connect.rs +++ b/crates/net/network/tests/it/connect.rs @@ -1,7 +1,7 @@ //! Connection tests use alloy_node_bindings::Geth; -use alloy_provider::{admin::AdminApi, ProviderBuilder}; +use alloy_provider::{ext::AdminApi, ProviderBuilder}; use futures::StreamExt; use reth_discv4::Discv4Config; use reth_eth_wire::DisconnectReason; @@ -320,9 +320,8 @@ async fn test_incoming_node_id_blacklist() { let geth = Geth::new().data_dir(temp_dir).disable_discovery().authrpc_port(0).spawn(); let geth_endpoint = SocketAddr::new([127, 0, 0, 1].into(), geth.port()); - let provider = ProviderBuilder::new() - .on_http(format!("http://{geth_endpoint}").parse().unwrap()) - .unwrap(); + let provider = + ProviderBuilder::new().on_http(format!("http://{geth_endpoint}").parse().unwrap()); // get the peer id we should be expecting let enr = provider.node_info().await.unwrap().enr; @@ -375,9 +374,8 @@ async fn test_incoming_connect_with_single_geth() { let temp_dir = tempfile::tempdir().unwrap().into_path(); let geth = Geth::new().data_dir(temp_dir).disable_discovery().authrpc_port(0).spawn(); let geth_endpoint = SocketAddr::new([127, 0, 0, 1].into(), geth.port()); - let provider = ProviderBuilder::new() - .on_http(format!("http://{geth_endpoint}").parse().unwrap()) - .unwrap(); + let provider = + ProviderBuilder::new().on_http(format!("http://{geth_endpoint}").parse().unwrap()); // get the peer id we should be expecting let enr = provider.node_info().await.unwrap().enr; @@ -438,9 +436,8 @@ async fn test_outgoing_connect_with_single_geth() { let geth_socket = SocketAddr::new([127, 0, 0, 1].into(), geth_p2p_port); let geth_endpoint = SocketAddr::new([127, 0, 0, 1].into(), geth.port()).to_string(); - let provider = ProviderBuilder::new() - .on_http(format!("http://{geth_endpoint}").parse().unwrap()) - .unwrap(); + let provider = + ProviderBuilder::new().on_http(format!("http://{geth_endpoint}").parse().unwrap()); // get the peer id we should be expecting let enr = provider.node_info().await.unwrap().enr; @@ -485,9 +482,8 @@ async fn test_geth_disconnect() { let geth_socket = SocketAddr::new([127, 0, 0, 1].into(), geth_p2p_port); let geth_endpoint = SocketAddr::new([127, 0, 0, 1].into(), geth.port()).to_string(); - let provider = ProviderBuilder::new() - .on_http(format!("http://{geth_endpoint}").parse().unwrap()) - .unwrap(); + let provider = + ProviderBuilder::new().on_http(format!("http://{geth_endpoint}").parse().unwrap()); // get the peer id we should be expecting let enr = provider.node_info().await.unwrap().enr; diff --git a/crates/optimism/evm/src/execute.rs b/crates/optimism/evm/src/execute.rs index c56c7622e..a77f42205 100644 --- a/crates/optimism/evm/src/execute.rs +++ b/crates/optimism/evm/src/execute.rs @@ -539,7 +539,7 @@ mod tests { use super::*; use reth_primitives::{ b256, Account, Address, Block, ChainSpecBuilder, Signature, StorageKey, StorageValue, - Transaction, TransactionSigned, TxEip1559, TxKind, BASE_MAINNET, + Transaction, TransactionSigned, TxEip1559, BASE_MAINNET, }; use reth_revm::{ database::StateProviderDatabase, test_utils::StateProviderTest, L1_BLOCK_CONTRACT, @@ -609,7 +609,7 @@ mod tests { chain_id: chain_spec.chain.id(), nonce: 0, gas_limit: 21_000, - to: TxKind::Call(addr), + to: addr.into(), ..Default::default() }), Signature::default(), @@ -618,7 +618,7 @@ mod tests { let tx_deposit = TransactionSigned::from_transaction_and_signature( Transaction::Deposit(reth_primitives::TxDeposit { from: addr, - to: TxKind::Call(addr), + to: addr.into(), gas_limit: 21_000, ..Default::default() }), @@ -689,7 +689,7 @@ mod tests { chain_id: chain_spec.chain.id(), nonce: 0, gas_limit: 21_000, - to: TxKind::Call(addr), + to: addr.into(), ..Default::default() }), Signature::default(), @@ -698,7 +698,7 @@ mod tests { let tx_deposit = TransactionSigned::from_transaction_and_signature( Transaction::Deposit(reth_primitives::TxDeposit { from: addr, - to: TxKind::Call(addr), + to: addr.into(), gas_limit: 21_000, ..Default::default() }), diff --git a/crates/primitives/src/transaction/eip1559.rs b/crates/primitives/src/transaction/eip1559.rs index 06cbc129c..5da0cd881 100644 --- a/crates/primitives/src/transaction/eip1559.rs +++ b/crates/primitives/src/transaction/eip1559.rs @@ -243,7 +243,7 @@ mod tests { chain_id: 1, nonce: 0x42, gas_limit: 44386, - to: TxKind::Call( hex!("6069a6c32cf691f5982febae4faf8a6f3ab2f0f6").into()), + to: TxKind::Call(hex!("6069a6c32cf691f5982febae4faf8a6f3ab2f0f6").into()), value: U256::ZERO, input: hex!("a22cb4650000000000000000000000005eee75727d804a2b13038928d36f8b188945a57a0000000000000000000000000000000000000000000000000000000000000000").into(), max_fee_per_gas: 0x4a817c800, diff --git a/crates/primitives/src/transaction/eip2930.rs b/crates/primitives/src/transaction/eip2930.rs index b0d1291e8..0604a7888 100644 --- a/crates/primitives/src/transaction/eip2930.rs +++ b/crates/primitives/src/transaction/eip2930.rs @@ -225,7 +225,7 @@ mod tests { nonce: 0, gas_price: 1, gas_limit: 2, - to: TxKind::Call(Address::default()), + to: Address::default().into(), value: U256::from(3), input: Bytes::from(vec![1, 2]), access_list: Default::default(), diff --git a/crates/primitives/src/transaction/legacy.rs b/crates/primitives/src/transaction/legacy.rs index f2440e13c..448662a24 100644 --- a/crates/primitives/src/transaction/legacy.rs +++ b/crates/primitives/src/transaction/legacy.rs @@ -190,7 +190,7 @@ mod tests { nonce: 0x18, gas_price: 0xfa56ea00, gas_limit: 119902, - to: TxKind::Call( hex!("06012c8cf97bead5deae237070f9587f8e7a266d").into()), + to: TxKind::Call(hex!("06012c8cf97bead5deae237070f9587f8e7a266d").into()), value: U256::from(0x1c6bf526340000u64), input: hex!("f7d8c88300000000000000000000000000000000000000000000000000000000000cee6100000000000000000000000000000000000000000000000000000000000ac3e1").into(), }); diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index f401b0ef6..7b79a85a2 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -1866,9 +1866,7 @@ mod tests { nonce: 2, gas_price: 1000000000, gas_limit: 100000, - to: TxKind::Call( - Address::from_str("d3e8763675e4c425df46cc3b5c0f6cbdac396046").unwrap(), - ), + to: Address::from_str("d3e8763675e4c425df46cc3b5c0f6cbdac396046").unwrap().into(), value: U256::from(1000000000000000u64), input: Bytes::default(), }); @@ -1888,9 +1886,7 @@ mod tests { nonce: 1u64, gas_price: 1000000000, gas_limit: 100000u64, - to: TxKind::Call(Address::from_slice( - &hex!("d3e8763675e4c425df46cc3b5c0f6cbdac396046")[..], - )), + to: Address::from_slice(&hex!("d3e8763675e4c425df46cc3b5c0f6cbdac396046")[..]).into(), value: U256::from(693361000000000u64), input: Default::default(), }); @@ -1909,9 +1905,7 @@ mod tests { nonce: 3, gas_price: 2000000000, gas_limit: 10000000, - to: TxKind::Call(Address::from_slice( - &hex!("d3e8763675e4c425df46cc3b5c0f6cbdac396046")[..], - )), + to: Address::from_slice(&hex!("d3e8763675e4c425df46cc3b5c0f6cbdac396046")[..]).into(), value: U256::from(1000000000000000u64), input: Bytes::default(), }); @@ -1931,9 +1925,7 @@ mod tests { max_priority_fee_per_gas: 1500000000, max_fee_per_gas: 1500000013, gas_limit: 21000, - to: TxKind::Call(Address::from_slice( - &hex!("61815774383099e24810ab832a5b2a5425c154d5")[..], - )), + to: Address::from_slice(&hex!("61815774383099e24810ab832a5b2a5425c154d5")[..]).into(), value: U256::from(3000000000000000000u64), input: Default::default(), access_list: Default::default(), @@ -1953,9 +1945,7 @@ mod tests { nonce: 15, gas_price: 2200000000, gas_limit: 34811, - to: TxKind::Call(Address::from_slice( - &hex!("cf7f9e66af820a19257a2108375b180b0ec49167")[..], - )), + to: Address::from_slice(&hex!("cf7f9e66af820a19257a2108375b180b0ec49167")[..]).into(), value: U256::from(1234), input: Bytes::default(), }); @@ -2242,9 +2232,7 @@ mod tests { nonce: 2, gas_price: 1000000000, gas_limit: 100000, - to: TxKind::Call( - Address::from_str("d3e8763675e4c425df46cc3b5c0f6cbdac396046").unwrap(), - ), + to: Address::from_str("d3e8763675e4c425df46cc3b5c0f6cbdac396046").unwrap().into(), value: U256::from(1000000000000000u64), input: Bytes::from(input), }); @@ -2291,9 +2279,7 @@ mod tests { nonce: 2, gas_price: 1000000000, gas_limit: 100000, - to: TxKind::Call( - Address::from_str("d3e8763675e4c425df46cc3b5c0f6cbdac396046").unwrap(), - ), + to: Address::from_str("d3e8763675e4c425df46cc3b5c0f6cbdac396046").unwrap().into(), value: U256::from(1000000000000000u64), input: Bytes::from(vec![3u8; 64]), }); diff --git a/crates/revm/src/optimism/processor.rs b/crates/revm/src/optimism/processor.rs index bd68023be..01ec2efde 100644 --- a/crates/revm/src/optimism/processor.rs +++ b/crates/revm/src/optimism/processor.rs @@ -206,7 +206,7 @@ mod tests { }; use reth_primitives::{ b256, Account, Address, Block, ChainSpecBuilder, Header, Signature, StorageKey, - StorageValue, Transaction, TransactionSigned, TxEip1559, TxKind, BASE_MAINNET, + StorageValue, Transaction, TransactionSigned, TxEip1559, BASE_MAINNET, }; use revm::L1_BLOCK_CONTRACT; use std::{collections::HashMap, str::FromStr, sync::Arc}; @@ -278,7 +278,7 @@ mod tests { chain_id: chain_spec.chain.id(), nonce: 0, gas_limit: 21_000, - to: TxKind::Call(addr), + to: addr.into(), ..Default::default() }), Signature::default(), @@ -287,7 +287,7 @@ mod tests { let tx_deposit = TransactionSigned::from_transaction_and_signature( Transaction::Deposit(reth_primitives::TxDeposit { from: addr, - to: TxKind::Call(addr), + to: addr.into(), gas_limit: 21_000, ..Default::default() }), @@ -352,7 +352,7 @@ mod tests { chain_id: chain_spec.chain.id(), nonce: 0, gas_limit: 21_000, - to: TxKind::Call(addr), + to: addr.into(), ..Default::default() }), Signature::default(), @@ -361,7 +361,7 @@ mod tests { let tx_deposit = TransactionSigned::from_transaction_and_signature( Transaction::Deposit(reth_primitives::TxDeposit { from: addr, - to: TxKind::Call(addr), + to: addr.into(), gas_limit: 21_000, ..Default::default() }), diff --git a/crates/revm/src/processor.rs b/crates/revm/src/processor.rs index e6a85b77d..c22272abc 100644 --- a/crates/revm/src/processor.rs +++ b/crates/revm/src/processor.rs @@ -466,7 +466,7 @@ mod tests { bytes, constants::{BEACON_ROOTS_ADDRESS, EIP1559_INITIAL_BASE_FEE, SYSTEM_ADDRESS}, keccak256, Account, Bytes, ChainSpecBuilder, ForkCondition, Signature, Transaction, - TxEip1559, TxKind, MAINNET, + TxEip1559, MAINNET, }; use revm::{Database, TransitionState}; use std::collections::HashMap; @@ -855,7 +855,7 @@ mod tests { chain_id, nonce: 1, gas_limit: 21_000, - to: TxKind::Call(Address::ZERO), + to: Address::ZERO.into(), max_fee_per_gas: EIP1559_INITIAL_BASE_FEE as u128, ..Default::default() }), diff --git a/crates/rpc/rpc-types-compat/src/transaction/mod.rs b/crates/rpc/rpc-types-compat/src/transaction/mod.rs index a441c4c29..6a35429c5 100644 --- a/crates/rpc/rpc-types-compat/src/transaction/mod.rs +++ b/crates/rpc/rpc-types-compat/src/transaction/mod.rs @@ -1,9 +1,7 @@ //! Compatibility functions for rpc `Transaction` type. use alloy_rpc_types::request::{TransactionInput, TransactionRequest}; -use reth_primitives::{ - BlockNumber, TransactionSignedEcRecovered, TxKind as PrimitiveTransactionKind, TxType, B256, -}; +use reth_primitives::{BlockNumber, TransactionSignedEcRecovered, TxKind, TxType, B256}; use reth_rpc_types::Transaction; use signature::from_primitive_signature; pub use typed::*; @@ -45,8 +43,8 @@ fn fill( let signed_tx = tx.into_signed(); let to = match signed_tx.kind() { - PrimitiveTransactionKind::Create => None, - PrimitiveTransactionKind::Call(to) => Some(*to), + TxKind::Create => None, + TxKind::Call(to) => Some(*to), }; #[allow(unreachable_patterns)] diff --git a/crates/rpc/rpc/src/eth/api/call.rs b/crates/rpc/rpc/src/eth/api/call.rs index 7066f7372..191406f96 100644 --- a/crates/rpc/rpc/src/eth/api/call.rs +++ b/crates/rpc/rpc/src/eth/api/call.rs @@ -443,6 +443,7 @@ where Ok(AccessListWithGasUsed { access_list, gas_used }) } + /// Executes the requests again after an out of gas error to check if the error is gas related /// or not #[inline] diff --git a/crates/rpc/rpc/src/eth/api/server.rs b/crates/rpc/rpc/src/eth/api/server.rs index c2be79a10..7ba1539b8 100644 --- a/crates/rpc/rpc/src/eth/api/server.rs +++ b/crates/rpc/rpc/src/eth/api/server.rs @@ -429,8 +429,6 @@ where #[cfg(test)] mod tests { - use jsonrpsee::types::error::INVALID_PARAMS_CODE; - use crate::{ eth::{ cache::EthStateCache, gas_oracle::GasPriceOracle, FeeHistoryCache, @@ -438,6 +436,7 @@ mod tests { }, EthApi, }; + use jsonrpsee::types::error::INVALID_PARAMS_CODE; use reth_evm_ethereum::EthEvmConfig; use reth_interfaces::test_utils::{generators, generators::Rng}; use reth_network_api::noop::NoopNetwork; diff --git a/crates/storage/codecs/src/alloy/txkind.rs b/crates/storage/codecs/src/alloy/txkind.rs index 220384bdd..e1dffa15b 100644 --- a/crates/storage/codecs/src/alloy/txkind.rs +++ b/crates/storage/codecs/src/alloy/txkind.rs @@ -21,7 +21,7 @@ impl Compact for TxKind { 0 => (TxKind::Create, buf), 1 => { let (addr, buf) = Address::from_compact(buf, buf.len()); - (TxKind::Call(addr), buf) + (addr.into(), buf) } _ => { unreachable!("Junk data in database: unknown TransactionKind variant",) diff --git a/crates/transaction-pool/src/test_utils/gen.rs b/crates/transaction-pool/src/test_utils/gen.rs index 2e3c71828..5c335e5d6 100644 --- a/crates/transaction-pool/src/test_utils/gen.rs +++ b/crates/transaction-pool/src/test_utils/gen.rs @@ -306,7 +306,7 @@ impl TransactionBuilder { /// Sets the recipient or contract address for the transaction, mutable reference version. pub fn set_to(&mut self, to: Address) -> &mut Self { - self.to = TxKind::Call(to); + self.to = to.into(); self } diff --git a/crates/transaction-pool/src/test_utils/mock.rs b/crates/transaction-pool/src/test_utils/mock.rs index 7eda40e58..8e265e7ba 100644 --- a/crates/transaction-pool/src/test_utils/mock.rs +++ b/crates/transaction-pool/src/test_utils/mock.rs @@ -213,7 +213,7 @@ impl MockTransaction { nonce: 0, gas_price: 0, gas_limit: 0, - to: TxKind::Call(Address::random()), + to: Address::random().into(), value: Default::default(), input: Default::default(), size: Default::default(), @@ -229,7 +229,7 @@ impl MockTransaction { max_fee_per_gas: MIN_PROTOCOL_BASE_FEE as u128, max_priority_fee_per_gas: MIN_PROTOCOL_BASE_FEE as u128, gas_limit: 0, - to: TxKind::Call(Address::random()), + to: Address::random().into(), value: Default::default(), input: Bytes::new(), accesslist: Default::default(), @@ -247,7 +247,7 @@ impl MockTransaction { max_priority_fee_per_gas: MIN_PROTOCOL_BASE_FEE as u128, max_fee_per_blob_gas: DATA_GAS_PER_BLOB as u128, gas_limit: 0, - to: TxKind::Call(Address::random()), + to: Address::random().into(), value: Default::default(), input: Bytes::new(), accesslist: Default::default(), @@ -272,7 +272,7 @@ impl MockTransaction { hash: B256::random(), sender: Address::random(), nonce: 0, - to: TxKind::Call(Address::random()), + to: Address::random().into(), gas_limit: 0, input: Bytes::new(), value: Default::default(),