Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
816 changes: 473 additions & 343 deletions Cargo.lock

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -438,69 +438,69 @@ reth-ress-protocol = { path = "crates/ress/protocol" }
reth-ress-provider = { path = "crates/ress/provider" }

# revm
revm = { version = "21.0.0", default-features = false }
revm-bytecode = { version = "2.0.0", default-features = false }
revm-database = { version = "2.0.0", default-features = false }
revm-state = { version = "2.0.0", default-features = false }
revm-primitives = { version = "17.0.0", default-features = false }
revm-interpreter = { version = "17.0.0", default-features = false }
revm-inspector = { version = "2.0.0", default-features = false }
revm-context = { version = "2.0.0", default-features = false }
revm-context-interface = { version = "2.0.0", default-features = false }
revm-database-interface = { version = "2.0.0", default-features = false }
op-revm = { version = "2.0.0", default-features = false }
revm-inspectors = "0.18.0"
revm = { version = "22.0.0", default-features = false }
revm-bytecode = { version = "3.0.0", default-features = false }
revm-database = { version = "3.0.0", default-features = false }
revm-state = { version = "3.0.0", default-features = false }
revm-primitives = { version = "18.0.0", default-features = false }
revm-interpreter = { version = "18.0.0", default-features = false }
revm-inspector = { version = "3.0.0", default-features = false }
revm-context = { version = "3.0.0", default-features = false }
revm-context-interface = { version = "3.0.0", default-features = false }
revm-database-interface = { version = "3.0.0", default-features = false }
op-revm = { version = "3.0.0", default-features = false }
revm-inspectors = "0.19.0"

# eth
alloy-chains = { version = "0.1.68", default-features = false }
alloy-dyn-abi = "0.8.25"
alloy-eip2124 = { version = "0.1.0", default-features = false }
alloy-evm = { version = "0.3.2", default-features = false }
alloy-primitives = { version = "0.8.25", default-features = false, features = ["map-foldhash"] }
alloy-chains = { version = "0.2.0", default-features = false }
alloy-dyn-abi = "1.0.0"
alloy-eip2124 = { version = "0.2.0", default-features = false }
alloy-evm = { version = "0.4.0", default-features = false }
alloy-primitives = { version = "1.0.0", default-features = false, features = ["map-foldhash"] }
alloy-rlp = { version = "0.3.10", default-features = false, features = ["core-net"] }
alloy-sol-types = { version = "0.8.25", default-features = false }
alloy-trie = { version = "0.7.9", default-features = false }

alloy-hardforks = "0.1.4"

alloy-consensus = { version = "0.13.0", default-features = false }
alloy-contract = { version = "0.13.0", default-features = false }
alloy-eips = { version = "0.13.0", default-features = false }
alloy-genesis = { version = "0.13.0", default-features = false }
alloy-json-rpc = { version = "0.13.0", default-features = false }
alloy-network = { version = "0.13.0", default-features = false }
alloy-network-primitives = { version = "0.13.0", default-features = false }
alloy-node-bindings = { version = "0.13.0", default-features = false }
alloy-provider = { version = "0.13.0", features = ["reqwest"], default-features = false }
alloy-pubsub = { version = "0.13.0", default-features = false }
alloy-rpc-client = { version = "0.13.0", default-features = false }
alloy-rpc-types = { version = "0.13.0", features = ["eth"], default-features = false }
alloy-rpc-types-admin = { version = "0.13.0", default-features = false }
alloy-rpc-types-anvil = { version = "0.13.0", default-features = false }
alloy-rpc-types-beacon = { version = "0.13.0", default-features = false }
alloy-rpc-types-debug = { version = "0.13.0", default-features = false }
alloy-rpc-types-engine = { version = "0.13.0", default-features = false }
alloy-rpc-types-eth = { version = "0.13.0", default-features = false }
alloy-rpc-types-mev = { version = "0.13.0", default-features = false }
alloy-rpc-types-trace = { version = "0.13.0", default-features = false }
alloy-rpc-types-txpool = { version = "0.13.0", default-features = false }
alloy-serde = { version = "0.13.0", default-features = false }
alloy-signer = { version = "0.13.0", default-features = false }
alloy-signer-local = { version = "0.13.0", default-features = false }
alloy-transport = { version = "0.13.0" }
alloy-transport-http = { version = "0.13.0", features = ["reqwest-rustls-tls"], default-features = false }
alloy-transport-ipc = { version = "0.13.0", default-features = false }
alloy-transport-ws = { version = "0.13.0", default-features = false }
alloy-sol-types = { version = "1.0.0", default-features = false }
alloy-trie = { version = "0.8.0", default-features = false }

alloy-hardforks = "0.2.0"

alloy-consensus = { version = "0.14.0", default-features = false }
alloy-contract = { version = "0.14.0", default-features = false }
alloy-eips = { version = "0.14.0", default-features = false }
alloy-genesis = { version = "0.14.0", default-features = false }
alloy-json-rpc = { version = "0.14.0", default-features = false }
alloy-network = { version = "0.14.0", default-features = false }
alloy-network-primitives = { version = "0.14.0", default-features = false }
alloy-node-bindings = { version = "0.14.0", default-features = false }
alloy-provider = { version = "0.14.0", features = ["reqwest"], default-features = false }
alloy-pubsub = { version = "0.14.0", default-features = false }
alloy-rpc-client = { version = "0.14.0", default-features = false }
alloy-rpc-types = { version = "0.14.0", features = ["eth"], default-features = false }
alloy-rpc-types-admin = { version = "0.14.0", default-features = false }
alloy-rpc-types-anvil = { version = "0.14.0", default-features = false }
alloy-rpc-types-beacon = { version = "0.14.0", default-features = false }
alloy-rpc-types-debug = { version = "0.14.0", default-features = false }
alloy-rpc-types-engine = { version = "0.14.0", default-features = false }
alloy-rpc-types-eth = { version = "0.14.0", default-features = false }
alloy-rpc-types-mev = { version = "0.14.0", default-features = false }
alloy-rpc-types-trace = { version = "0.14.0", default-features = false }
alloy-rpc-types-txpool = { version = "0.14.0", default-features = false }
alloy-serde = { version = "0.14.0", default-features = false }
alloy-signer = { version = "0.14.0", default-features = false }
alloy-signer-local = { version = "0.14.0", default-features = false }
alloy-transport = { version = "0.14.0" }
alloy-transport-http = { version = "0.14.0", features = ["reqwest-rustls-tls"], default-features = false }
alloy-transport-ipc = { version = "0.14.0", default-features = false }
alloy-transport-ws = { version = "0.14.0", default-features = false }

# op
alloy-op-evm = { version = "0.3.2", default-features = false }
alloy-op-hardforks = "0.1.2"
op-alloy-rpc-types = { version = "0.12.2", default-features = false }
op-alloy-rpc-types-engine = { version = "0.12.2", default-features = false }
op-alloy-network = { version = "0.12.2", default-features = false }
op-alloy-consensus = { version = "0.12.2", default-features = false }
op-alloy-rpc-jsonrpsee = { version = "0.12.2", default-features = false }
op-alloy-flz = { version = "0.12.0", default-features = false }
alloy-op-evm = { version = "0.4.0", default-features = false }
alloy-op-hardforks = "0.2.0"
op-alloy-rpc-types = { version = "0.13.0", default-features = false }
op-alloy-rpc-types-engine = { version = "0.13.0", default-features = false }
op-alloy-network = { version = "0.13.0", default-features = false }
op-alloy-consensus = { version = "0.13.0", default-features = false }
op-alloy-rpc-jsonrpsee = { version = "0.13.0", default-features = false }
op-alloy-flz = { version = "0.13.0", default-features = false }

# misc
aquamarine = "0.6"
Expand Down Expand Up @@ -530,7 +530,7 @@ nybbles = { version = "0.3.0", default-features = false }
once_cell = { version = "1.19", default-features = false, features = ["critical-section"] }
parking_lot = "0.12"
paste = "1.0"
rand = "0.8.5"
rand = "0.9"
rayon = "1.7"
rustc-hash = { version = "2.0", default-features = false }
schnellru = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/util/src/load_secret_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use thiserror::Error;

/// Convenience function to create a new random [`SecretKey`]
pub fn rng_secret_key() -> SecretKey {
SecretKey::new(&mut rand::thread_rng())
SecretKey::new(&mut rand::rng())
}

/// Errors returned by loading a [`SecretKey`], including IO errors.
Expand Down
7 changes: 6 additions & 1 deletion crates/engine/invalid-block-hooks/src/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ where
let state = state_provider.witness(Default::default(), hashed_state.clone())?;

// Write the witness to the output directory.
let response = ExecutionWitness { state, codes: Default::default(), keys: state_preimages };
let response = ExecutionWitness {
state,
codes: Default::default(),
keys: state_preimages,
..Default::default()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prep for #15608

};
let re_executed_witness_path = self.save_file(
format!("{}_{}.witness.re_executed.json", block.number(), block.hash()),
&response,
Expand Down
5 changes: 2 additions & 3 deletions crates/ethereum/primitives/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ use alloy_eips::{
};
use alloy_evm::{FromRecoveredTx, FromTxWithEncoded};
use alloy_primitives::{
bytes::BufMut, keccak256, Address, Bytes, ChainId, PrimitiveSignature as Signature, TxHash,
TxKind, B256, U256,
bytes::BufMut, keccak256, Address, Bytes, ChainId, Signature, TxHash, TxKind, B256, U256,
};
use alloy_rlp::{Decodable, Encodable};
use core::hash::{Hash, Hasher};
Expand Down Expand Up @@ -621,7 +620,7 @@ impl<'a> arbitrary::Arbitrary<'a> for TransactionSigned {
let mut transaction = Transaction::arbitrary(u)?;

let secp = secp256k1::Secp256k1::new();
let key_pair = secp256k1::Keypair::new(&secp, &mut rand::thread_rng());
let key_pair = secp256k1::Keypair::new(&secp, &mut rand::rng());
let signature = reth_primitives_traits::crypto::secp256k1::sign_message(
B256::from_slice(&key_pair.secret_bytes()[..]),
transaction.signature_hash(),
Expand Down
50 changes: 25 additions & 25 deletions crates/net/discv4/src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,19 +594,19 @@ mod tests {
use alloy_primitives::hex;
use assert_matches::assert_matches;
use enr::EnrPublicKey;
use rand::{thread_rng, Rng, RngCore};
use rand::{rng, Rng, RngCore};
use reth_ethereum_forks::ForkHash;

#[test]
fn test_endpoint_ipv_v4() {
let mut rng = thread_rng();
let mut rng = rng();
for _ in 0..100 {
let mut ip = [0u8; 4];
rng.fill_bytes(&mut ip);
let msg = NodeEndpoint {
address: IpAddr::V4(ip.into()),
tcp_port: rng.gen(),
udp_port: rng.gen(),
tcp_port: rng.random(),
udp_port: rng.random(),
};

let decoded = NodeEndpoint::decode(&mut alloy_rlp::encode(msg).as_slice()).unwrap();
Expand All @@ -616,14 +616,14 @@ mod tests {

#[test]
fn test_endpoint_ipv_64() {
let mut rng = thread_rng();
let mut rng = rng();
for _ in 0..100 {
let mut ip = [0u8; 16];
rng.fill_bytes(&mut ip);
let msg = NodeEndpoint {
address: IpAddr::V6(ip.into()),
tcp_port: rng.gen(),
udp_port: rng.gen(),
tcp_port: rng.random(),
udp_port: rng.random(),
};

let decoded = NodeEndpoint::decode(&mut alloy_rlp::encode(msg).as_slice()).unwrap();
Expand All @@ -633,7 +633,7 @@ mod tests {

#[test]
fn test_ping_message() {
let mut rng = thread_rng();
let mut rng = rng();
for _ in 0..100 {
let mut ip = [0u8; 16];
rng.fill_bytes(&mut ip);
Expand All @@ -651,15 +651,15 @@ mod tests {

#[test]
fn test_ping_message_with_enr() {
let mut rng = thread_rng();
let mut rng = rng();
for _ in 0..100 {
let mut ip = [0u8; 16];
rng.fill_bytes(&mut ip);
let msg = Ping {
from: rng_endpoint(&mut rng),
to: rng_endpoint(&mut rng),
expire: 0,
enr_sq: Some(rng.gen()),
enr_sq: Some(rng.random()),
};

let decoded = Ping::decode(&mut alloy_rlp::encode(&msg).as_slice()).unwrap();
Expand All @@ -669,14 +669,14 @@ mod tests {

#[test]
fn test_pong_message() {
let mut rng = thread_rng();
let mut rng = rng();
for _ in 0..100 {
let mut ip = [0u8; 16];
rng.fill_bytes(&mut ip);
let msg = Pong {
to: rng_endpoint(&mut rng),
echo: rng.gen(),
expire: rng.gen(),
echo: rng.random(),
expire: rng.random(),
enr_sq: None,
};

Expand All @@ -687,15 +687,15 @@ mod tests {

#[test]
fn test_pong_message_with_enr() {
let mut rng = thread_rng();
let mut rng = rng();
for _ in 0..100 {
let mut ip = [0u8; 16];
rng.fill_bytes(&mut ip);
let msg = Pong {
to: rng_endpoint(&mut rng),
echo: rng.gen(),
expire: rng.gen(),
enr_sq: Some(rng.gen()),
echo: rng.random(),
expire: rng.random(),
enr_sq: Some(rng.random()),
};

let decoded = Pong::decode(&mut alloy_rlp::encode(&msg).as_slice()).unwrap();
Expand All @@ -705,7 +705,7 @@ mod tests {

#[test]
fn test_hash_mismatch() {
let mut rng = thread_rng();
let mut rng = rng();
let msg = rng_message(&mut rng);
let (secret_key, _) = SECP256K1.generate_keypair(&mut rng);
let (buf, _) = msg.encode(&secret_key);
Expand All @@ -722,10 +722,10 @@ mod tests {

#[test]
fn neighbours_max_ipv4() {
let mut rng = thread_rng();
let mut rng = rng();
let msg = Message::Neighbours(Neighbours {
nodes: std::iter::repeat_with(|| rng_ipv4_record(&mut rng)).take(16).collect(),
expire: rng.gen(),
expire: rng.random(),
});
let (secret_key, _) = SECP256K1.generate_keypair(&mut rng);

Expand All @@ -736,13 +736,13 @@ mod tests {

#[test]
fn neighbours_max_nodes() {
let mut rng = thread_rng();
let mut rng = rng();
for _ in 0..1000 {
let msg = Message::Neighbours(Neighbours {
nodes: std::iter::repeat_with(|| rng_ipv6_record(&mut rng))
.take(SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS)
.collect(),
expire: rng.gen(),
expire: rng.random(),
});
let (secret_key, _) = SECP256K1.generate_keypair(&mut rng);

Expand All @@ -753,7 +753,7 @@ mod tests {
nodes: std::iter::repeat_with(|| rng_ipv6_record(&mut rng))
.take(SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS - 1)
.collect(),
expire: rng.gen(),
expire: rng.random(),
};
neighbours.nodes.push(rng_ipv4_record(&mut rng));
let msg = Message::Neighbours(neighbours);
Expand All @@ -764,7 +764,7 @@ mod tests {

#[test]
fn test_encode_decode_message() {
let mut rng = thread_rng();
let mut rng = rng();
for _ in 0..100 {
let msg = rng_message(&mut rng);
let (secret_key, pk) = SECP256K1.generate_keypair(&mut rng);
Expand Down Expand Up @@ -816,7 +816,7 @@ mod tests {
builder.build(&key).unwrap()
};

let enr_response = EnrResponse { request_hash: rng.gen(), enr };
let enr_response = EnrResponse { request_hash: rng.random(), enr };

let mut buf = Vec::new();
enr_response.encode(&mut buf);
Expand Down
Loading
Loading