Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump to rust version 1.83 #1857

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-09-15
toolchain: nightly-2024-10-11
components: rustfmt
- name: run rustfmt
run: cargo +nightly-2024-09-15 fmt --all -- --check
run: cargo +nightly-2024-10-11 fmt --all -- --check

toml:
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
REGISTRY: ghcr.io
FULL_REF: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
# This must match the entry in rust-toolchain.toml at the repository root
RUSTUP_TOOLCHAIN: "1.81.0"
RUSTUP_TOOLCHAIN: "1.83.0"

jobs:
upload-binaries:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
RUSTFLAGS: "-D warnings -D unreachable-pub --cfg tokio_unstable"

# This must match the entry in rust-toolchain.toml at the repository root
RUSTUP_TOOLCHAIN: "1.81.0"
RUSTUP_TOOLCHAIN: "1.83.0"
on:
pull_request:
merge_group:
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-bridge-contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-bridge-contracts"
version = "0.1.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
4 changes: 4 additions & 0 deletions crates/astria-bridge-withdrawer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [1.0.1] - 2024-11-01

### Changed

- Bump MSRV to 1.83.0 [#1857](https://github.com/astriaorg/astria/pull/1857).

### Fixed

- Set `batch_total_settled_value` metric to 0 when no withdrawals are settled [#1778](https://github.com/astriaorg/astria/pull/1768)
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-bridge-withdrawer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-bridge-withdrawer"
version = "1.0.1"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/astriaorg/astria"
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-build-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-build-info"
version = "0.1.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions crates/astria-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Bump MSRV to 1.83.0 [#1857](https://github.com/astriaorg/astria/pull/1857).
- Update `idna` dependency to resolve cargo audit warning [#1869](https://github.com/astriaorg/astria/pull/1869).
- Remove default values from `--sequencer.chain-id` and `--sequencer-url` arguments
[#1792](https://github.com/astriaorg/astria/pull/1792)
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-cli"
version = "0.5.1"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/astriaorg/astria"
Expand Down
1 change: 1 addition & 0 deletions crates/astria-composer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Bump MSRV to 1.83.0 [#1857](https://github.com/astriaorg/astria/pull/1857).
- Bump penumbra dependencies [#1740](https://github.com/astriaorg/astria/pull/1740).

## [1.0.0-rc.2] - 2024-10-23
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-composer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-composer"
version = "1.0.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/astriaorg/astria"
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-composer/src/executor/bundle_factory/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum SizedBundleError {

pub(super) struct SizedBundleReport<'a>(pub(super) &'a SizedBundle);

impl<'a> Serialize for SizedBundleReport<'a> {
impl Serialize for SizedBundleReport<'_> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand Down Expand Up @@ -277,7 +277,7 @@ pub(super) struct NextFinishedBundle<'a> {
bundle_factory: &'a mut BundleFactory,
}

impl<'a> NextFinishedBundle<'a> {
impl NextFinishedBundle<'_> {
pub(super) fn pop(self) -> SizedBundle {
self.bundle_factory
.finished
Expand Down
1 change: 1 addition & 0 deletions crates/astria-conductor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Bump MSRV to 1.83.0 [#1857](https://github.com/astriaorg/astria/pull/1857).
- Bump penumbra dependencies [#1740](https://github.com/astriaorg/astria/pull/1740).

## [1.0.0-rc.2] - 2024-10-23
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-conductor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-conductor"
version = "1.0.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/astriaorg/astria"
Expand Down
6 changes: 4 additions & 2 deletions crates/astria-conductor/src/block_cache.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! A cache of sequencer blocks that are only yielded in sequential order.

Check warning on line 1 in crates/astria-conductor/src/block_cache.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.

Check warning on line 1 in crates/astria-conductor/src/block_cache.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.
use std::{
collections::BTreeMap,
future::Future,
Expand Down Expand Up @@ -105,7 +105,9 @@
pub(crate) enum Error {
#[error("block at sequencer height {height} already in cache")]
Occupied { height: u64 },
#[error("block too old: expect sequencer height {current_height} or newer, got {block_height}")]
#[error(
"block too old: expect sequencer height {current_height} or newer, got {block_height}"
)]
Old {
block_height: u64,
current_height: u64,
Expand All @@ -120,7 +122,7 @@
}
}

impl<'a, T> Future for NextBlock<'a, T> {
impl<T> Future for NextBlock<'_, T> {
type Output = Option<T>;

fn poll(
Expand Down
10 changes: 4 additions & 6 deletions crates/astria-conductor/src/celestia/block_verifier.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::collections::HashMap;

Check warning on line 1 in crates/astria-conductor/src/celestia/block_verifier.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.

Check warning on line 1 in crates/astria-conductor/src/celestia/block_verifier.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.

use astria_core::crypto::{
Signature,
Expand Down Expand Up @@ -529,11 +529,9 @@
&tendermint::chain::Id::try_from("test-chain-g3ejvw").unwrap(),
);
assert!(result.is_err());
assert!(
result
.unwrap_err()
.to_string()
.contains("commit voting power is less than 2/3 of total voting power")
);
assert!(result
.unwrap_err()
.to_string()
.contains("commit voting power is less than 2/3 of total voting power"));
}
}
6 changes: 3 additions & 3 deletions crates/astria-conductor/src/celestia/reporting.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Various newtype-wrappers to emit serde-serialized tracing event fields.

Check warning on line 1 in crates/astria-conductor/src/celestia/reporting.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.

Check warning on line 1 in crates/astria-conductor/src/celestia/reporting.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.
use serde::ser::{
Serialize,
SerializeSeq,
Expand All @@ -12,7 +12,7 @@
};

pub(super) struct ReportReconstructedBlocks<'a>(pub(super) &'a ReconstructedBlocks);
impl<'a> Serialize for ReportReconstructedBlocks<'a> {
impl Serialize for ReportReconstructedBlocks<'_> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand All @@ -26,7 +26,7 @@
}

struct ReportReconstructedBlocksSeq<'a>(&'a [ReconstructedBlock]);
impl<'a> Serialize for ReportReconstructedBlocksSeq<'a> {
impl Serialize for ReportReconstructedBlocksSeq<'_> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand All @@ -40,7 +40,7 @@
}

struct ReportReconstructedBlock<'a>(&'a ReconstructedBlock);
impl<'a> Serialize for ReportReconstructedBlock<'a> {
impl Serialize for ReportReconstructedBlock<'_> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand Down
2 changes: 2 additions & 0 deletions crates/astria-conductor/src/executor/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::collections::HashMap;

Check warning on line 1 in crates/astria-conductor/src/executor/mod.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.

Check warning on line 1 in crates/astria-conductor/src/executor/mod.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.

use astria_core::{
execution::v1::{
Expand Down Expand Up @@ -153,6 +153,8 @@
Ok(())
}

// TODO(https://github.com/astriaorg/astria/issues/1858): box the large variant to avoid large error size
#[expect(clippy::result_large_err, reason = "should be fixed")]
pub(crate) fn try_send_firm_block(
&self,
block: ReconstructedBlock,
Expand Down
4 changes: 2 additions & 2 deletions crates/astria-conductor/src/sequencer/reporting.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use astria_core::{

Check warning on line 1 in crates/astria-conductor/src/sequencer/reporting.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.

Check warning on line 1 in crates/astria-conductor/src/sequencer/reporting.rs

View workflow job for this annotation

GitHub Actions / Code Freeze

Code Freeze in Effect - Bypassed

This file is under code freeze.
primitive::v1::RollupId,
sequencerblock::v1::block::{
FilteredSequencerBlock,
Expand All @@ -13,7 +13,7 @@
};

pub(super) struct ReportFilteredSequencerBlock<'a>(pub(super) &'a FilteredSequencerBlock);
impl<'a> Serialize for ReportFilteredSequencerBlock<'a> {
impl Serialize for ReportFilteredSequencerBlock<'_> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand All @@ -27,7 +27,7 @@

struct ReportRollups<'a>(&'a IndexMap<RollupId, RollupTransactions>);

impl<'a> Serialize for ReportRollups<'a> {
impl Serialize for ReportRollups<'_> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-config"
version = "0.1.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/astriaorg/astria"
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-core-address/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl<TFormat, TBytes, TPrefix> Builder<TFormat, TBytes, TPrefix> {
}
}

impl<'a, 'b, TFormat, TBytesIter> Builder<TFormat, WithBytes<'a, TBytesIter>, WithPrefix<'b>>
impl<TFormat, TBytesIter> Builder<TFormat, WithBytes<'_, TBytesIter>, WithPrefix<'_>>
where
TBytesIter: IntoIterator<Item = u8>,
TBytesIter::IntoIter: ExactSizeIterator,
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-core-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-core-crypto"
version = "0.1.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/astriaorg/astria"
Expand Down
1 change: 1 addition & 0 deletions crates/astria-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Bump MSRV to 1.83.0 [#1857](https://github.com/astriaorg/astria/pull/1857).
- Move `astria_core::crypto` to `astria-core-crypto` and reexport
`astria_core_crypto as crypto` (this change is transparent)
[#1800](https://github.com/astriaorg/astria/pull/1800/).
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-core"
version = "0.1.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/astriaorg/astria"
Expand Down
3 changes: 2 additions & 1 deletion crates/astria-core/src/generated/mod.rs

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

10 changes: 5 additions & 5 deletions crates/astria-core/src/primitive/v1/asset/denom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ impl From<TracePrefixed> for Denom {
}
}

impl<'a> From<&'a IbcPrefixed> for Denom {
impl From<&IbcPrefixed> for Denom {
fn from(value: &IbcPrefixed) -> Self {
Self::IbcPrefixed(*value)
}
}

impl<'a> From<&'a TracePrefixed> for Denom {
impl From<&TracePrefixed> for Denom {
fn from(value: &TracePrefixed) -> Self {
Self::TracePrefixed(value.clone())
}
Expand All @@ -117,7 +117,7 @@ impl From<TracePrefixed> for IbcPrefixed {
}
}

impl<'a> From<&'a TracePrefixed> for IbcPrefixed {
impl From<&TracePrefixed> for IbcPrefixed {
fn from(value: &TracePrefixed) -> Self {
value.to_ibc_prefixed()
}
Expand All @@ -129,13 +129,13 @@ impl From<Denom> for IbcPrefixed {
}
}

impl<'a> From<&'a Denom> for IbcPrefixed {
impl From<&Denom> for IbcPrefixed {
fn from(value: &Denom) -> Self {
value.to_ibc_prefixed()
}
}

impl<'a> From<&'a IbcPrefixed> for IbcPrefixed {
impl From<&IbcPrefixed> for IbcPrefixed {
fn from(value: &IbcPrefixed) -> Self {
*value
}
Expand Down
20 changes: 2 additions & 18 deletions crates/astria-core/src/primitive/v1/u128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,8 @@
use crate::generated::astria::primitive::v1::Uint128;
impl From<u128> for Uint128 {
fn from(primitive: u128) -> Self {
let [
h0,
h1,
h2,
h3,
h4,
h5,
h6,
h7,
l0,
l1,
l2,
l3,
l4,
l5,
l6,
l7,
] = primitive.to_be_bytes();
let [h0, h1, h2, h3, h4, h5, h6, h7, l0, l1, l2, l3, l4, l5, l6, l7] =
primitive.to_be_bytes();
let lo = u64::from_be_bytes([l0, l1, l2, l3, l4, l5, l6, l7]);
let hi = u64::from_be_bytes([h0, h1, h2, h3, h4, h5, h6, h7]);
Self {
Expand Down
6 changes: 0 additions & 6 deletions crates/astria-core/src/protocol/genesis/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ impl Protobuf for GenesisAppState {
type Error = GenesisAppStateError;
type Raw = raw::GenesisAppState;

// TODO (https://github.com/astriaorg/astria/issues/1580): remove this once Rust is upgraded to/past 1.83
#[expect(
clippy::allow_attributes,
clippy::allow_attributes_without_reason,
reason = "false positive on `allowed_fee_assets` due to \"allow\" in the name"
)]
fn try_from_raw_ref(raw: &Self::Raw) -> Result<Self, Self::Error> {
let Self::Raw {
address_prefixes,
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-eyre/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-eyre"
version = "0.1.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion crates/astria-grpc-mock-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-grpc-mock-test"
version = "0.1.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
3 changes: 2 additions & 1 deletion crates/astria-grpc-mock-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#[expect(
clippy::allow_attributes,
clippy::allow_attributes_without_reason,
reason = "cannot prevent generated files from having allow attributes"
clippy::needless_lifetimes,
reason = "cannot prevent generated files from having allow attributes or specific lifetimes"
)]
pub mod health {
include!("generated/grpc.health.v1.rs");
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-grpc-mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "astria-grpc-mock"
version = "0.1.0"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.83.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
Loading
Loading