From 782dc8892c36c4000a8786c929a368d45f72f3ff Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 15 Aug 2025 17:34:29 +0800 Subject: [PATCH 1/8] fix(network): off by one error in getting next header --- crates/net/network/src/eth_requests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/net/network/src/eth_requests.rs b/crates/net/network/src/eth_requests.rs index d9ab711ea0d..492bf8bd55e 100644 --- a/crates/net/network/src/eth_requests.rs +++ b/crates/net/network/src/eth_requests.rs @@ -116,7 +116,8 @@ where match direction { HeadersDirection::Rising => { - if let Some(next) = number.checked_add(skip) { + if let Some(next) = number.checked_add(1).and_then(|n| n.checked_add(skip)) + { block = next.into() } else { break From 410b44fb2e227f9ab85fddcad77ec29b53bbe7d3 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 15 Aug 2025 17:59:06 +0800 Subject: [PATCH 2/8] fix CI --- crates/primitives/Cargo.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 67fae820d93..1e60c04eff3 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -39,8 +39,6 @@ alloy-rlp.workspace = true alloy-eips = { workspace = true, features = ["arbitrary"] } alloy-genesis.workspace = true -arbitrary = { workspace = true, features = ["derive"] } - proptest-arbitrary-interop.workspace = true proptest.workspace = true reth-codecs.workspace = true From 16b5e5337b27c4135f94f0cd2bcba66d59c55c2f Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 15 Aug 2025 18:08:51 +0800 Subject: [PATCH 3/8] fix CI --- crates/primitives/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 47ae3683434..4e254dc4318 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -56,7 +56,7 @@ pub use transaction::{PooledTransactionsElementEcRecovered, TransactionSignedEcR pub use reth_ethereum_forks::*; #[cfg(any(test, feature = "arbitrary"))] -pub use arbitrary; +use arbitrary as _; #[cfg(feature = "c-kzg")] pub use c_kzg as kzg; From 5ff257f074650c466dbe447634e1960b9e8b63b0 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 15 Aug 2025 18:24:37 +0800 Subject: [PATCH 4/8] fix CI --- crates/primitives/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 4e254dc4318..d090f7d0b49 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -56,6 +56,7 @@ pub use transaction::{PooledTransactionsElementEcRecovered, TransactionSignedEcR pub use reth_ethereum_forks::*; #[cfg(any(test, feature = "arbitrary"))] +#[allow(unused_imports)] use arbitrary as _; #[cfg(feature = "c-kzg")] From c978dd882a849cea07b511cefef9ec0e0b0171d3 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 15 Aug 2025 18:28:19 +0800 Subject: [PATCH 5/8] fix CI --- crates/primitives/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index d090f7d0b49..053c74b6e22 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -55,7 +55,6 @@ pub use transaction::{PooledTransactionsElementEcRecovered, TransactionSignedEcR // Re-exports pub use reth_ethereum_forks::*; -#[cfg(any(test, feature = "arbitrary"))] #[allow(unused_imports)] use arbitrary as _; From 9d71364b693fef1ec5988e94d604234b517a5398 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 15 Aug 2025 18:30:34 +0800 Subject: [PATCH 6/8] fix CI --- crates/primitives/Cargo.toml | 2 ++ crates/primitives/src/lib.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 1e60c04eff3..63adab049eb 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -45,6 +45,8 @@ reth-codecs.workspace = true criterion.workspace = true +arbitrary = "1" + [features] default = ["c-kzg", "alloy-compat", "std", "reth-codec", "secp256k1"] std = [ diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 053c74b6e22..d090f7d0b49 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -55,6 +55,7 @@ pub use transaction::{PooledTransactionsElementEcRecovered, TransactionSignedEcR // Re-exports pub use reth_ethereum_forks::*; +#[cfg(any(test, feature = "arbitrary"))] #[allow(unused_imports)] use arbitrary as _; From e8c011e4d4e1e2383ed9f9e03ba67ade499162a3 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 15 Aug 2025 18:44:25 +0800 Subject: [PATCH 7/8] revert --- crates/primitives/Cargo.toml | 2 -- crates/primitives/src/lib.rs | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 63adab049eb..1e60c04eff3 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -45,8 +45,6 @@ reth-codecs.workspace = true criterion.workspace = true -arbitrary = "1" - [features] default = ["c-kzg", "alloy-compat", "std", "reth-codec", "secp256k1"] std = [ diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index d090f7d0b49..47ae3683434 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -56,8 +56,7 @@ pub use transaction::{PooledTransactionsElementEcRecovered, TransactionSignedEcR pub use reth_ethereum_forks::*; #[cfg(any(test, feature = "arbitrary"))] -#[allow(unused_imports)] -use arbitrary as _; +pub use arbitrary; #[cfg(feature = "c-kzg")] pub use c_kzg as kzg; From 3f04d5e40d5be56cb52844c49d809f9d7405f2ac Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Fri, 15 Aug 2025 18:45:48 +0800 Subject: [PATCH 8/8] revert --- crates/primitives/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 1e60c04eff3..67fae820d93 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -39,6 +39,8 @@ alloy-rlp.workspace = true alloy-eips = { workspace = true, features = ["arbitrary"] } alloy-genesis.workspace = true +arbitrary = { workspace = true, features = ["derive"] } + proptest-arbitrary-interop.workspace = true proptest.workspace = true reth-codecs.workspace = true