Skip to content

Commit

Permalink
chore(deps): bump ethers to 2.0.14, enr to 0.10, unpin discv5 (#6634)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 6, 2024
1 parent 914b165 commit b66f54d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 28 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Expand Up @@ -203,12 +203,8 @@ alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "975a52
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "975a52a" }

# TODO: Remove
ethers-core = { version = "2.0", default-features = false }
ethers-providers = { version = "2.0", default-features = false }

discv5 = { git = "https://github.com/sigp/discv5", rev = "f289bbd4c57d499bb1bdb393af3c249600a1c662" }
# Fork of rust-igd with ipv6 support
igd-next = "0.14.3"
ethers-core = { version = "2.0.14", default-features = false }
ethers-providers = { version = "2.0.14", default-features = false }

# js
boa_engine = "0.17"
Expand Down Expand Up @@ -255,6 +251,10 @@ futures = "0.3.26"
pin-project = "1.0.12"
futures-util = "0.3.25"

# p2p
discv5 = "0.4"
igd-next = "0.14.3"

# rpc
jsonrpsee = { version = "0.20" }
jsonrpsee-core = { version = "0.20" }
Expand All @@ -266,7 +266,7 @@ secp256k1 = { version = "0.27.0", default-features = false, features = [
"rand-std",
"recovery",
] }
enr = { version = "0.9", default-features = false, features = ["k256"] }
enr = { version = "0.10", default-features = false, features = ["k256"] }

# for eip-4844
c-kzg = "0.4.2"
Expand Down
4 changes: 2 additions & 2 deletions crates/net/discv4/src/lib.rs
Expand Up @@ -37,7 +37,7 @@ use discv5::{
},
ConnectionDirection, ConnectionState,
};
use enr::{Enr, EnrBuilder};
use enr::Enr;
use parking_lot::Mutex;
use proto::{EnrRequest, EnrResponse, EnrWrapper};
use reth_primitives::{
Expand Down Expand Up @@ -533,7 +533,7 @@ impl Discv4Service {

// for EIP-868 construct an ENR
let local_eip_868_enr = {
let mut builder = EnrBuilder::new("v4");
let mut builder = Enr::builder();
builder.ip(local_node_record.address);
if local_node_record.address.is_ipv4() {
builder.udp4(local_node_record.udp_port);
Expand Down
6 changes: 3 additions & 3 deletions crates/net/discv4/src/proto.rs
Expand Up @@ -549,7 +549,7 @@ mod tests {
test_utils::{rng_endpoint, rng_ipv4_record, rng_ipv6_record, rng_message},
DEFAULT_DISCOVERY_PORT, SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS,
};
use enr::{EnrBuilder, EnrPublicKey};
use enr::EnrPublicKey;
use rand::{thread_rng, Rng, RngCore};
use reth_primitives::{hex, ForkHash};

Expand Down Expand Up @@ -780,7 +780,7 @@ mod tests {
let fork_id: ForkId = ForkId { hash: ForkHash([220, 233, 108, 45]), next: 0u64 };

let enr = {
let mut builder = EnrBuilder::new("v4");
let mut builder = Enr::builder();
builder.ip(ip.into());
builder.tcp4(tcp);
let mut buf = Vec::new();
Expand Down Expand Up @@ -879,7 +879,7 @@ mod tests {
let tcp = 3000;

let enr = {
let mut builder = EnrBuilder::new("v4");
let mut builder = Enr::builder();
builder.ip(ip.into());
builder.tcp4(tcp);
EnrWrapper::new(builder.build(&key).unwrap())
Expand Down
6 changes: 3 additions & 3 deletions crates/net/dns/src/lib.rs
Expand Up @@ -412,7 +412,7 @@ mod tests {
use crate::tree::TreeRootEntry;
use alloy_chains::Chain;
use alloy_rlp::Encodable;
use enr::{EnrBuilder, EnrKey};
use enr::EnrKey;
use reth_primitives::{Hardfork, MAINNET};
use secp256k1::rand::thread_rng;
use std::{future::poll_fn, net::Ipv4Addr};
Expand Down Expand Up @@ -459,7 +459,7 @@ mod tests {
LinkEntry { domain: "nodes.example.org".to_string(), pubkey: secret_key.public() };
resolver.insert(link.domain.clone(), root.to_string());

let mut builder = EnrBuilder::new("v4");
let mut builder = Enr::builder();
let mut buf = Vec::new();
let fork_id = MAINNET.hardfork_fork_id(Hardfork::Frontier).unwrap();
fork_id.encode(&mut buf);
Expand Down Expand Up @@ -528,7 +528,7 @@ mod tests {
// await recheck timeout
tokio::time::sleep(config.recheck_interval).await;

let enr = EnrBuilder::new("v4").build(&secret_key).unwrap();
let enr = Enr::empty(&secret_key).unwrap();
resolver.insert(format!("{}.{}", root.enr_root.clone(), link.domain), enr.to_base64());

let event = poll_fn(|cx| service.poll(cx)).await;
Expand Down
2 changes: 0 additions & 2 deletions deny.toml
Expand Up @@ -88,8 +88,6 @@ unknown-registry = "warn"
unknown-git = "deny"
allow-git = [
# TODO: remove, see ./Cargo.toml
"https://github.com/bluealloy/revm",
"https://github.com/alloy-rs/alloy",
"https://github.com/paradigmxyz/evm-inspectors",
"https://github.com/sigp/discv5",
]

0 comments on commit b66f54d

Please sign in to comment.