Skip to content

Commit ae3ffb9

Browse files
klkvrmattsse
andauthored
chore: bump MSRV to 1.86 (paradigmxyz#15863)
Co-authored-by: Matthias Seitz <[email protected]>
1 parent 9d3509c commit ae3ffb9

File tree

11 files changed

+19
-53
lines changed

11 files changed

+19
-53
lines changed

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
- uses: rui314/setup-mold@v1
122122
- uses: dtolnay/rust-toolchain@master
123123
with:
124-
toolchain: "1.85" # MSRV
124+
toolchain: "1.86" # MSRV
125125
- uses: Swatinem/rust-cache@v2
126126
with:
127127
cache-on-failure: true

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[workspace.package]
22
version = "1.3.12"
33
edition = "2021"
4-
rust-version = "1.85"
4+
rust-version = "1.86"
55
license = "MIT OR Apache-2.0"
66
homepage = "https://paradigmxyz.github.io/reth"
77
repository = "https://github.com/paradigmxyz/reth"

Dockerfile.reproducible

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Use the Rust 1.85 image based on Debian Bullseye
2-
FROM rust:1.85-bullseye AS builder
1+
# Use the Rust 1.86 image based on Debian Bullseye
2+
FROM rust:1.86-bullseye AS builder
33

44
# Install specific version of libclang-dev
55
RUN apt-get update && apt-get install -y libclang-dev=1:11.0-51+nmu5

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ When updating this, also update:
8888
- .github/workflows/lint.yml
8989
-->
9090

91-
The Minimum Supported Rust Version (MSRV) of this project is [1.85.0](https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html).
91+
The Minimum Supported Rust Version (MSRV) of this project is [1.86.0](https://blog.rust-lang.org/2025/04/03/Rust-1.86.0/).
9292

9393
See the book for detailed instructions on how to [build from source](https://paradigmxyz.github.io/reth/installation/source.html).
9494

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
msrv = "1.85"
1+
msrv = "1.86"
22
too-large-for-stack = 128
33
doc-valid-idents = [
44
"P2P",

crates/consensus/consensus/src/lib.rs

+3-37
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
extern crate alloc;
1313

14-
use alloc::{fmt::Debug, string::String, sync::Arc, vec::Vec};
14+
use alloc::{fmt::Debug, string::String, vec::Vec};
1515
use alloy_consensus::Header;
1616
use alloy_primitives::{BlockHash, BlockNumber, Bloom, B256, U256};
1717
use reth_execution_types::BlockExecutionResult;
@@ -32,7 +32,7 @@ pub mod test_utils;
3232
/// [`Consensus`] implementation which knows full node primitives and is able to validation block's
3333
/// execution outcome.
3434
#[auto_impl::auto_impl(&, Arc)]
35-
pub trait FullConsensus<N: NodePrimitives>: AsConsensus<N::Block> {
35+
pub trait FullConsensus<N: NodePrimitives>: Consensus<N::Block> {
3636
/// Validate a block considering world state, i.e. things that can not be checked before
3737
/// execution.
3838
///
@@ -48,7 +48,7 @@ pub trait FullConsensus<N: NodePrimitives>: AsConsensus<N::Block> {
4848

4949
/// Consensus is a protocol that chooses canonical chain.
5050
#[auto_impl::auto_impl(&, Arc)]
51-
pub trait Consensus<B: Block>: AsHeaderValidator<B::Header> {
51+
pub trait Consensus<B: Block>: HeaderValidator<B::Header> {
5252
/// The error type related to consensus.
5353
type Error;
5454

@@ -135,40 +135,6 @@ pub trait HeaderValidator<H = Header>: Debug + Send + Sync {
135135
) -> Result<(), ConsensusError>;
136136
}
137137

138-
/// Helper trait to cast `Arc<dyn Consensus>` to `Arc<dyn HeaderValidator>`
139-
pub trait AsHeaderValidator<H>: HeaderValidator<H> {
140-
/// Converts the [`Arc`] of self to [`Arc`] of [`HeaderValidator`]
141-
fn as_header_validator<'a>(self: Arc<Self>) -> Arc<dyn HeaderValidator<H> + 'a>
142-
where
143-
Self: 'a;
144-
}
145-
146-
impl<T: HeaderValidator<H>, H> AsHeaderValidator<H> for T {
147-
fn as_header_validator<'a>(self: Arc<Self>) -> Arc<dyn HeaderValidator<H> + 'a>
148-
where
149-
Self: 'a,
150-
{
151-
self
152-
}
153-
}
154-
155-
/// Helper trait to cast `Arc<dyn FullConsensus>` to `Arc<dyn Consensus>`
156-
pub trait AsConsensus<B: Block>: Consensus<B> {
157-
/// Converts the [`Arc`] of self to [`Arc`] of [`HeaderValidator`]
158-
fn as_consensus<'a>(self: Arc<Self>) -> Arc<dyn Consensus<B, Error = Self::Error> + 'a>
159-
where
160-
Self: 'a;
161-
}
162-
163-
impl<T: Consensus<B>, B: Block> AsConsensus<B> for T {
164-
fn as_consensus<'a>(self: Arc<Self>) -> Arc<dyn Consensus<B, Error = Self::Error> + 'a>
165-
where
166-
Self: 'a,
167-
{
168-
self
169-
}
170-
}
171-
172138
/// Consensus Errors
173139
#[derive(Debug, PartialEq, Eq, Clone, thiserror::Error)]
174140
pub enum ConsensusError {

crates/engine/service/src/service.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ where
9898
let engine_kind =
9999
if chain_spec.is_optimism() { EngineApiKind::OpStack } else { EngineApiKind::Ethereum };
100100

101-
let downloader = BasicBlockDownloader::new(client, consensus.clone().as_consensus());
101+
let downloader = BasicBlockDownloader::new(client, consensus.clone());
102102

103103
let persistence_handle =
104104
PersistenceHandle::<EthPrimitives>::spawn_service(provider, pruner, sync_metrics_tx);

crates/ethereum/cli/src/debug_cmd/execution.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
7575
{
7676
// building network downloaders using the fetch client
7777
let header_downloader = ReverseHeadersDownloaderBuilder::new(config.stages.headers)
78-
.build(client.clone(), consensus.clone().as_header_validator())
78+
.build(client.clone(), consensus.clone())
7979
.into_task_with(task_executor);
8080

8181
let body_downloader = BodiesDownloaderBuilder::new(config.stages.bodies)
82-
.build(client, consensus.clone().as_consensus(), provider_factory.clone())
82+
.build(client, consensus.clone(), provider_factory.clone())
8383
.into_task_with(task_executor);
8484

8585
let stage_conf = &config.stages;

crates/node/builder/src/setup.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ where
4545
{
4646
// building network downloaders using the fetch client
4747
let header_downloader = ReverseHeadersDownloaderBuilder::new(config.headers)
48-
.build(client.clone(), consensus.clone().as_header_validator())
48+
.build(client.clone(), consensus.clone())
4949
.into_task_with(task_executor);
5050

5151
let body_downloader = BodiesDownloaderBuilder::new(config.bodies)
52-
.build(client, consensus.clone().as_consensus(), provider_factory.clone())
52+
.build(client, consensus.clone(), provider_factory.clone())
5353
.into_task_with(task_executor);
5454

5555
let pipeline = build_pipeline(

crates/stages/stages/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
//! # let consensus: Arc<dyn FullConsensus<reth_ethereum_primitives::EthPrimitives, Error = ConsensusError>> = Arc::new(TestConsensus::default());
3939
//! # let headers_downloader = ReverseHeadersDownloaderBuilder::default().build(
4040
//! # Arc::new(TestHeadersClient::default()),
41-
//! # consensus.clone().as_header_validator()
41+
//! # consensus.clone()
4242
//! # );
4343
//! # let provider_factory = create_test_provider_factory();
4444
//! # let bodies_downloader = BodiesDownloaderBuilder::default().build(
4545
//! # Arc::new(TestBodiesClient { responder: |_| Ok((PeerId::ZERO, vec![]).into()) }),
46-
//! # consensus.clone().as_consensus(),
46+
//! # consensus.clone(),
4747
//! # provider_factory.clone()
4848
//! # );
4949
//! # let (tip_tx, tip_rx) = watch::channel(B256::default());

crates/stages/stages/src/sets.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ where
120120
online: OnlineStages::new(
121121
provider,
122122
tip,
123-
consensus.clone().as_consensus(),
123+
consensus.clone(),
124124
header_downloader,
125125
body_downloader,
126126
stages_config.clone(),
@@ -255,7 +255,7 @@ where
255255
provider,
256256
header_downloader,
257257
tip,
258-
consensus.clone().as_header_validator(),
258+
consensus.clone(),
259259
stages_config.etl,
260260
))
261261
.add_stage(bodies)
@@ -276,7 +276,7 @@ where
276276
self.provider,
277277
self.header_downloader,
278278
self.tip,
279-
self.consensus.clone().as_header_validator(),
279+
self.consensus.clone(),
280280
self.stages_config.etl.clone(),
281281
))
282282
.add_stage(BodyStage::new(self.body_downloader))

0 commit comments

Comments
 (0)