diff --git a/Cargo.lock b/Cargo.lock index bb06adac6ca3..ebc0c4e0bbe1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,23 +262,6 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-node-bindings" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27444ea67d360508753022807cdd0b49a95c878924c9c5f8f32668b7d7768245" -dependencies = [ - "alloy-genesis", - "alloy-primitives", - "k256", - "rand", - "serde_json", - "tempfile", - "thiserror 1.0.69", - "tracing", - "url", -] - [[package]] name = "alloy-primitives" version = "0.8.12" @@ -892,7 +875,6 @@ dependencies = [ "alloy-json-abi", "alloy-json-rpc", "alloy-network", - "alloy-node-bindings", "alloy-primitives", "alloy-provider", "alloy-pubsub", diff --git a/Cargo.toml b/Cargo.toml index b2008ad5b64d..f5ec94b906bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -203,7 +203,6 @@ alloy-transport = { version = "0.6.4", default-features = false } alloy-transport-http = { version = "0.6.4", default-features = false } alloy-transport-ipc = { version = "0.6.4", default-features = false } alloy-transport-ws = { version = "0.6.4", default-features = false } -alloy-node-bindings = { version = "0.6.4", default-features = false } ## alloy-core alloy-dyn-abi = "0.8.11" diff --git a/crates/anvil/Cargo.toml b/crates/anvil/Cargo.toml index 39a8bc649dcb..b3389d2eccae 100644 --- a/crates/anvil/Cargo.toml +++ b/crates/anvil/Cargo.toml @@ -117,7 +117,6 @@ alloy-rpc-client = { workspace = true, features = ["pubsub"] } alloy-transport-ipc = { workspace = true, features = ["mock"] } alloy-provider = { workspace = true, features = ["txpool-api"] } alloy-transport-ws.workspace = true -alloy-node-bindings.workspace = true alloy-json-rpc.workspace = true alloy-pubsub.workspace = true foundry-test-utils.workspace = true diff --git a/crates/anvil/tests/it/anvil.rs b/crates/anvil/tests/it/anvil.rs index b5ed0c85312f..65eeac70baf7 100644 --- a/crates/anvil/tests/it/anvil.rs +++ b/crates/anvil/tests/it/anvil.rs @@ -2,11 +2,9 @@ use alloy_consensus::EMPTY_ROOT_HASH; use alloy_eips::BlockNumberOrTag; -use alloy_node_bindings::utils::run_with_tempdir; -use alloy_primitives::{Address, U256}; +use alloy_primitives::Address; use alloy_provider::Provider; use anvil::{spawn, EthereumHardfork, NodeConfig}; -use std::time::Duration; #[tokio::test(flavor = "multi_thread")] async fn test_can_change_mining_mode() { @@ -120,33 +118,3 @@ async fn test_cancun_fields() { assert!(block.header.blob_gas_used.is_some()); assert!(block.header.excess_blob_gas.is_some()); } - -#[tokio::test(flavor = "multi_thread")] -#[cfg(not(windows))] -async fn test_cache_path() { - run_with_tempdir("custom-anvil-cache", |tmp_dir| async move { - let cache_path = tmp_dir.join("cache"); - let (api, _handle) = spawn( - NodeConfig::test() - .with_cache_path(Some(cache_path.clone())) - .with_max_persisted_states(Some(5_usize)) - .with_blocktime(Some(Duration::from_millis(1))), - ) - .await; - - api.anvil_mine(Some(U256::from(1000)), None).await.unwrap(); - - // sleep to ensure the cache is written - tokio::time::sleep(Duration::from_secs(2)).await; - - assert!(cache_path.exists()); - assert!(cache_path.read_dir().unwrap().count() > 0); - - // Clean the directory, this is to prevent an error when temp_dir is dropped. - let _ = std::fs::remove_dir_all(cache_path); - - //sleep to ensure OS file handles are released - tokio::time::sleep(Duration::from_secs(1)).await; - }) - .await; -}