From 560080ee1990a14194f4e6da969f5a7e1b95a236 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 13 Jun 2024 23:51:56 +0200 Subject: [PATCH] chore(deps): replace reth-primitives in dns (#8814) --- Cargo.lock | 3 +++ crates/net/dns/Cargo.toml | 5 ++++- crates/net/dns/src/lib.rs | 8 +++++--- crates/net/dns/src/tree.rs | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39814f166922..ffecc04e5bb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6746,12 +6746,15 @@ dependencies = [ name = "reth-dns-discovery" version = "1.0.0-rc.1" dependencies = [ + "alloy-chains", + "alloy-primitives", "alloy-rlp", "data-encoding", "enr", "linked_hash_set", "parking_lot 0.12.3", "rand 0.8.5", + "reth-ethereum-forks", "reth-net-common", "reth-network-peers", "reth-primitives", diff --git a/crates/net/dns/Cargo.toml b/crates/net/dns/Cargo.toml index 7859383014d0..aacba3f88189 100644 --- a/crates/net/dns/Cargo.toml +++ b/crates/net/dns/Cargo.toml @@ -13,11 +13,12 @@ workspace = true [dependencies] # reth -reth-primitives.workspace = true +reth-ethereum-forks.workspace = true reth-net-common.workspace = true reth-network-peers = { workspace = true, features = ["secp256k1"] } # ethereum +alloy-primitives.workspace = true secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery", "serde"] } enr.workspace = true @@ -39,7 +40,9 @@ serde = { workspace = true, optional = true } serde_with = { version = "3.3.0", optional = true } [dev-dependencies] +reth-primitives.workspace = true alloy-rlp.workspace = true +alloy-chains.workspace = true tokio = { workspace = true, features = ["sync", "rt", "rt-multi-thread"] } reth-tracing.workspace = true rand.workspace = true diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index 4edcdbeb3172..432cef45184e 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -22,8 +22,8 @@ use crate::{ pub use config::DnsDiscoveryConfig; use enr::Enr; use error::ParseDnsEntryError; -use reth_network_peers::pk2id; -use reth_primitives::{EnrForkIdEntry, ForkId, NodeRecord}; +use reth_ethereum_forks::{EnrForkIdEntry, ForkId}; +use reth_network_peers::{pk2id, NodeRecord}; use schnellru::{ByLength, LruMap}; use secp256k1::SecretKey; use std::{ @@ -411,9 +411,11 @@ fn convert_enr_node_record(enr: &Enr) -> Option mod tests { use super::*; use crate::tree::TreeRootEntry; + use alloy_chains::Chain; use alloy_rlp::{Decodable, Encodable}; use enr::EnrKey; - use reth_primitives::{Chain, ForkHash, Hardfork, MAINNET}; + use reth_ethereum_forks::{ForkHash, Hardfork}; + use reth_primitives::MAINNET; use secp256k1::rand::thread_rng; use std::{future::poll_fn, net::Ipv4Addr}; diff --git a/crates/net/dns/src/tree.rs b/crates/net/dns/src/tree.rs index 0491be423127..80182b694f80 100644 --- a/crates/net/dns/src/tree.rs +++ b/crates/net/dns/src/tree.rs @@ -21,9 +21,9 @@ use crate::error::{ ParseDnsEntryError::{FieldNotFound, UnknownEntry}, ParseEntryResult, }; +use alloy_primitives::{hex, Bytes}; use data_encoding::{BASE32_NOPAD, BASE64URL_NOPAD}; use enr::{Enr, EnrKey, EnrKeyUnambiguous, EnrPublicKey, Error as EnrError}; -use reth_primitives::{hex, Bytes}; use secp256k1::SecretKey; #[cfg(feature = "serde")] use serde_with::{DeserializeFromStr, SerializeDisplay};