Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
426 changes: 250 additions & 176 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -502,18 +502,18 @@ bytes = { version = "1.5", default-features = false }
cfg-if = "1.0"
clap = "4"
dashmap = "6.0"
derive_more = { version = "1", default-features = false, features = ["full"] }
derive_more = { version = "2", default-features = false, features = ["full"] }
dirs-next = "2.0.0"
dyn-clone = "1.0.17"
eyre = "0.6"
fdlimit = "0.3.0"
generic-array = "0.14"
humantime = "2.1"
humantime-serde = "1.1"
itertools = { version = "0.13", default-features = false }
itertools = { version = "0.14", default-features = false }
linked_hash_set = "0.1"
modular-bitfield = "0.11.2"
notify = { version = "6.1.1", default-features = false, features = ["macos_fsevent"] }
notify = { version = "8.0.0", default-features = false, features = ["macos_fsevent"] }
nybbles = { version = "0.3.0", default-features = false }
once_cell = { version = "1.19", default-features = false, features = ["critical-section"] }
parking_lot = "0.12"
Expand All @@ -528,7 +528,7 @@ serde_with = { version = "3", default-features = false, features = ["macros"] }
sha2 = { version = "0.10", default-features = false }
shellexpand = "3.0.0"
smallvec = "1"
strum = { version = "0.26", default-features = false }
strum = { version = "0.27", default-features = false }
syn = "2.0"
thiserror = { version = "2.0.0", default-features = false }
tracing = "0.1.0"
Expand Down Expand Up @@ -569,7 +569,7 @@ tower = "0.4"
tower-http = "0.6"

# p2p
discv5 = "0.8.0"
discv5 = "0.9"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
discv5 = "0.9"
discv5 = "0.9.1"

if-addrs = "0.13"

# rpc
Expand All @@ -587,9 +587,9 @@ jsonwebtoken = "9"
proptest-arbitrary-interop = "0.1.0"

# crypto
enr = { version = "0.12.1", default-features = false }
enr = { version = "0.13", default-features = false }
k256 = { version = "0.13", default-features = false, features = ["ecdsa"] }
secp256k1 = { version = "0.29", default-features = false, features = ["global-context", "recovery"] }
secp256k1 = { version = "0.30", default-features = false, features = ["global-context", "recovery"] }

# for eip-4844
c-kzg = "1.0.0"
Expand All @@ -607,13 +607,13 @@ proptest-derive = "0.5"
serial_test = { default-features = false, version = "3" }
similar-asserts = { version = "1.5.0", features = ["serde"] }
tempfile = "3.8"
test-fuzz = "6"
rstest = "0.23.0"
test-fuzz = "7"
rstest = "0.24.0"

# allocators
tikv-jemalloc-ctl = "0.6"
tikv-jemallocator = "0.6"
tracy-client = "0.17.3"
tracy-client = "0.18.0"
snmalloc-rs = { version = "0.3.7", features = ["build_cc"] }

# TODO: When we build for a windows target on an ubuntu runner, crunchy tries to
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/commands/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ serde.workspace = true
serde_json.workspace = true
tracing.workspace = true
backon.workspace = true
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
secp256k1 = { workspace = true, features = ["global-context", "std", "recovery"] }

# io
fdlimit.workspace = true
Expand All @@ -77,7 +77,7 @@ toml = { workspace = true, features = ["display"] }
# tui
comfy-table = "7.0"
crossterm = "0.28.0"
ratatui = { version = "0.28", default-features = false, features = ["crossterm"] }
ratatui = { version = "0.29", default-features = false, features = ["crossterm"] }

# reth test-vectors
proptest = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ reth-network-peers = { workspace = true, features = ["secp256k1"] }
alloy-primitives = { workspace = true, features = ["rand"] }
alloy-rlp = { workspace = true, features = ["derive"] }
discv5.workspace = true
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery", "serde"] }
secp256k1 = { workspace = true, features = ["global-context", "std", "recovery", "serde"] }
enr.workspace = true

# async/futures
Expand Down
4 changes: 2 additions & 2 deletions crates/net/discv4/src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl Message {
// Serialize the signature and append it to the signature bytes
let (rec, sig) = signature.serialize_compact();
sig_bytes.extend_from_slice(&sig);
sig_bytes.put_u8(rec.to_i32() as u8);
sig_bytes.put_u8(i32::from(rec) as u8);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

sig_bytes.unsplit(payload);

// Calculate the hash of the signature bytes and append it to the datagram
Expand Down Expand Up @@ -156,7 +156,7 @@ impl Message {
}

let signature = &packet[32..96];
let recovery_id = RecoveryId::from_i32(packet[96] as i32)?;
let recovery_id = RecoveryId::try_from(packet[96] as i32)?;
let recoverable_sig = RecoverableSignature::from_compact(signature, recovery_id)?;

// recover the public key
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv5/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ metrics.workspace = true
[dev-dependencies]
reth-tracing.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }
secp256k1 = { workspace = true, features = ["rand-std"] }
secp256k1 = { workspace = true, features = ["std", "rand"] }
8 changes: 2 additions & 6 deletions crates/net/discv5/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ pub async fn lookup(
mod test {
use super::*;
use ::enr::{CombinedKey, EnrKey};
use rand::thread_rng;
use reth_chainspec::MAINNET;
use secp256k1::rand::thread_rng;
use tracing::trace;

fn discv5_noop() -> Discv5 {
Expand Down Expand Up @@ -729,16 +729,12 @@ mod test {
node_1.with_discv5(|discv5| discv5.send_ping(node_2_enr.clone())).await.unwrap();

// verify node_1:discv5 is connected to node_2:discv5 and vv
let event_2_v5 = stream_2.recv().await.unwrap();
let event_1_v5 = stream_1.recv().await.unwrap();

assert!(matches!(
event_1_v5,
discv5::Event::SessionEstablished(node, socket) if node == node_2_enr && socket == node_2_enr.udp4_socket().unwrap().into()
));
assert!(matches!(
event_2_v5,
discv5::Event::SessionEstablished(node, socket) if node == node_1_enr && socket == node_1_enr.udp4_socket().unwrap().into()
));
Comment on lines -738 to -741
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an internal discv5 event change so this established event is no longer emitted


// verify node_1 is in KBuckets of node_2:discv5
let event_2_v5 = stream_2.recv().await.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions crates/net/dns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ reth-tokio-util = { workspace = true, features = ["time"] }

# ethereum
alloy-primitives.workspace = true
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery", "serde"] }
secp256k1 = { workspace = true, features = ["global-context", "std", "recovery", "serde"] }
enr.workspace = true

# async/futures
tokio = { workspace = true, features = ["io-util", "net", "time"] }
tokio-stream.workspace = true

# trust-dns
hickory-resolver = { version = "0.25.0-alpha.4" }
hickory-resolver = { version = "0.25.0-alpha.5" }

# misc
data-encoding = "2"
Expand Down
2 changes: 1 addition & 1 deletion crates/net/ecies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ byteorder.workspace = true
rand.workspace = true
ctr = "0.9.2"
digest = "0.10.5"
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
secp256k1 = { workspace = true, features = ["global-context", "std", "recovery", "rand"] }
concat-kdf = "0.1.0"
sha2.workspace = true
sha3 = "0.10.5"
Expand Down
4 changes: 2 additions & 2 deletions crates/net/ecies/src/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ impl ECIES {

let mut sig_bytes = [0u8; 65];
sig_bytes[..64].copy_from_slice(&sig);
sig_bytes[64] = rec_id.to_i32() as u8;
sig_bytes[64] = i32::from(rec_id) as u8;

let id = pk2id(&self.public_key);

Expand Down Expand Up @@ -479,7 +479,7 @@ impl ECIES {
let sigdata = data.get_next::<[u8; 65]>()?.ok_or(ECIESErrorImpl::InvalidAuthData)?;
let signature = RecoverableSignature::from_compact(
&sigdata[..64],
RecoveryId::from_i32(sigdata[64] as i32)?,
RecoveryId::try_from(sigdata[64] as i32)?,
)?;
let remote_id = data.get_next()?.ok_or(ECIESErrorImpl::InvalidAuthData)?;
self.remote_id = Some(remote_id);
Expand Down
2 changes: 1 addition & 1 deletion crates/net/eth-wire/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test-fuzz.workspace = true
tokio = { workspace = true, features = ["rt", "rt-multi-thread"] }
tokio-util = { workspace = true, features = ["io", "codec"] }
rand.workspace = true
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
secp256k1 = { workspace = true, features = ["global-context", "std", "recovery"] }

arbitrary = { workspace = true, features = ["derive"] }
proptest.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/net/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ rustc-hash.workspace = true
thiserror.workspace = true
parking_lot.workspace = true
rand.workspace = true
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
secp256k1 = { workspace = true, features = ["global-context", "std", "recovery"] }
derive_more.workspace = true
schnellru.workspace = true
itertools.workspace = true
Expand Down Expand Up @@ -96,6 +96,7 @@ alloy-consensus.workspace = true
serial_test.workspace = true
tempfile.workspace = true
url.workspace = true
secp256k1 = { workspace = true, features = ["rand"] }

## Benchmarks
pprof = { workspace = true, features = ["criterion", "flamegraph"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/node/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tokio = { workspace = true, features = ["sync", "macros", "time", "rt-multi-thre
tokio-stream.workspace = true

## crypto
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
secp256k1 = { workspace = true, features = ["global-context", "std", "recovery"] }

## misc
aquamarine.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/node/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ shellexpand.workspace = true
tracing.workspace = true

# crypto
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
secp256k1 = { workspace = true, features = ["global-context", "std", "recovery"] }

# async
futures.workspace = true
Expand Down
5 changes: 1 addition & 4 deletions crates/node/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ eyre.workspace = true
tikv-jemalloc-ctl = { workspace = true, optional = true, features = ["stats"] }

[target.'cfg(target_os = "linux")'.dependencies]
procfs = "0.16.0"
procfs = "0.17.0"

[dev-dependencies]
reqwest.workspace = true
Expand All @@ -40,6 +40,3 @@ workspace = true

[features]
jemalloc = ["dep:tikv-jemalloc-ctl"]

[build-dependencies]
vergen = { version = "8.0.0", features = ["build", "cargo", "git", "gitcl"] }
4 changes: 2 additions & 2 deletions crates/optimism/chainspec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use alloy_genesis::Genesis;
use alloy_primitives::{B256, U256};
pub use base::BASE_MAINNET;
pub use base_sepolia::BASE_SEPOLIA;
use derive_more::{Constructor, Deref, Display, From, Into};
use derive_more::{Constructor, Deref, From, Into};
pub use dev::OP_DEV;
pub use op::OP_MAINNET;
pub use op_sepolia::OP_SEPOLIA;
Expand Down Expand Up @@ -215,7 +215,7 @@ impl EthChainSpec for OpChainSpec {
self.inner.prune_delete_limit()
}

fn display_hardforks(&self) -> Box<dyn Display> {
fn display_hardforks(&self) -> Box<dyn core::fmt::Display> {
Box::new(ChainSpec::display_hardforks(self))
}

Expand Down
1 change: 1 addition & 0 deletions crates/optimism/primitives/src/transaction/signed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use alloy_rlp::Header;
use core::{
hash::{Hash, Hasher},
mem,
ops::Deref,
};
use derive_more::{AsRef, Deref};
use op_alloy_consensus::{
Expand Down
4 changes: 2 additions & 2 deletions crates/primitives-traits/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ mod impl_secp256k1 {
msg: &[u8; 32],
) -> Result<Address, Error> {
let sig =
RecoverableSignature::from_compact(&sig[0..64], RecoveryId::from_i32(sig[64] as i32)?)?;
RecoverableSignature::from_compact(&sig[0..64], RecoveryId::try_from(sig[64] as i32)?)?;

let public = SECP256K1.recover_ecdsa(&Message::from_digest(*msg), &sig)?;
Ok(public_key_to_address(public))
Expand All @@ -97,7 +97,7 @@ mod impl_secp256k1 {
let signature = Signature::new(
U256::try_from_be_slice(&data[..32]).expect("The slice has at most 32 bytes"),
U256::try_from_be_slice(&data[32..64]).expect("The slice has at most 32 bytes"),
rec_id.to_i32() != 0,
i32::from(rec_id) != 0,
);
Ok(signature)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/codecs/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ workspace = true
proc-macro = true

[dependencies]
convert_case = "0.6.0"
convert_case = "0.7.0"
proc-macro2.workspace = true
quote.workspace = true
syn.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ thiserror.workspace = true
tempfile = { workspace = true, optional = true }
derive_more.workspace = true
rustc-hash = { workspace = true, optional = true }
sysinfo = { version = "0.32", default-features = false, features = ["system"] }
sysinfo = { version = "0.33", default-features = false, features = ["system"] }
parking_lot = { workspace = true, optional = true }

# arbitrary utils
Expand Down
10 changes: 6 additions & 4 deletions crates/storage/db/src/lockfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl ProcessUID {
system.refresh_processes_specifics(
sysinfo::ProcessesToUpdate::Some(&[pid2]),
true,
ProcessRefreshKind::new(),
ProcessRefreshKind::nothing(),
);
system.process(pid2).map(|process| Self { pid, start_time: process.start_time() })
}
Expand Down Expand Up @@ -141,9 +141,11 @@ impl ProcessUID {

/// Whether a process with this `pid` and `start_time` exists.
fn is_active(&self) -> bool {
System::new_with_specifics(RefreshKind::new().with_processes(ProcessRefreshKind::new()))
.process(self.pid.into())
.is_some_and(|p| p.start_time() == self.start_time)
System::new_with_specifics(
RefreshKind::nothing().with_processes(ProcessRefreshKind::nothing()),
)
.process(self.pid.into())
.is_some_and(|p| p.start_time() == self.start_time)
}

/// Writes `pid` and `start_time` to a file.
Expand Down
1 change: 0 additions & 1 deletion crates/storage/libmdbx-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ read-tx-timeouts = ["dep:dashmap"]
pprof = { workspace = true, features = ["flamegraph", "frame-pointer", "criterion"] }
criterion.workspace = true
rand.workspace = true
rand_xorshift = "0.3"
tempfile.workspace = true

[[bench]]
Expand Down
11 changes: 5 additions & 6 deletions crates/storage/libmdbx-rs/benches/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
mod utils;

use criterion::{criterion_group, criterion_main, Criterion};
use rand::{prelude::SliceRandom, SeedableRng};
use rand_xorshift::XorShiftRng;
use rand::{prelude::SliceRandom, rngs::StdRng, SeedableRng};
use reth_libmdbx::{ffi::*, ObjectLength, WriteFlags};
use std::{hint::black_box, ptr};
use utils::*;
Expand All @@ -15,7 +14,7 @@ fn bench_get_rand(c: &mut Criterion) {
let db = txn.open_db(None).unwrap();

let mut keys: Vec<String> = (0..n).map(get_key).collect();
keys.shuffle(&mut XorShiftRng::from_seed(Default::default()));
keys.shuffle(&mut StdRng::from_seed(Default::default()));

c.bench_function("bench_get_rand", |b| {
b.iter(|| {
Expand All @@ -35,7 +34,7 @@ fn bench_get_rand_raw(c: &mut Criterion) {
let db = txn.open_db(None).unwrap();

let mut keys: Vec<String> = (0..n).map(get_key).collect();
keys.shuffle(&mut XorShiftRng::from_seed(Default::default()));
keys.shuffle(&mut StdRng::from_seed(Default::default()));

let dbi = db.dbi();

Expand Down Expand Up @@ -71,7 +70,7 @@ fn bench_put_rand(c: &mut Criterion) {
let db = txn.commit_and_rebind_open_dbs().unwrap().2.remove(0);

let mut items: Vec<(String, String)> = (0..n).map(|n| (get_key(n), get_data(n))).collect();
items.shuffle(&mut XorShiftRng::from_seed(Default::default()));
items.shuffle(&mut StdRng::from_seed(Default::default()));

c.bench_function("bench_put_rand", |b| {
b.iter(|| {
Expand All @@ -88,7 +87,7 @@ fn bench_put_rand_raw(c: &mut Criterion) {
let (_dir, env) = setup_bench_db(0);

let mut items: Vec<(String, String)> = (0..n).map(|n| (get_key(n), get_data(n))).collect();
items.shuffle(&mut XorShiftRng::from_seed(Default::default()));
items.shuffle(&mut StdRng::from_seed(Default::default()));

let dbi = env.begin_ro_txn().unwrap().open_db(None).unwrap().dbi();

Expand Down
Loading
Loading