diff --git a/.github/workflows/action_tests.yaml b/.github/workflows/action_tests.yaml index 9dc4867d09..64c4b81e4b 100644 --- a/.github/workflows/action_tests.yaml +++ b/.github/workflows/action_tests.yaml @@ -18,6 +18,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: llvm-tools-preview + toolchain: 1.81 - uses: taiki-e/install-action@cargo-llvm-cov - name: Clone monorepo run: just monorepo diff --git a/.github/workflows/book.yaml b/.github/workflows/book.yaml index 7b2464809c..b1d75c7bae 100644 --- a/.github/workflows/book.yaml +++ b/.github/workflows/book.yaml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.81 - name: Setup mdbook run: | cargo install --version 0.4.40 mdbook diff --git a/.github/workflows/client_host.yaml b/.github/workflows/client_host.yaml index 114f0468fd..2e0fbdf8cb 100644 --- a/.github/workflows/client_host.yaml +++ b/.github/workflows/client_host.yaml @@ -24,6 +24,7 @@ jobs: uses: dtolnay/rust-toolchain@stable with: components: llvm-tools-preview + toolchain: 1.81 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true diff --git a/.github/workflows/monorepo_pin_update.yaml b/.github/workflows/monorepo_pin_update.yaml index bbcc5641f7..1b95189fc5 100644 --- a/.github/workflows/monorepo_pin_update.yaml +++ b/.github/workflows/monorepo_pin_update.yaml @@ -17,6 +17,8 @@ jobs: token: ${{ secrets.PAT_TOKEN }} - uses: taiki-e/install-action@just - uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.81 - name: Update Monorepo Commit run: just update-monorepo - name: Create Pull Request diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 81b1e80be8..4b7f5bed84 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,8 @@ jobs: submodules: true - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.81 - name: Commit Cargo.lock run: | git config --local user.email "action@github.com" diff --git a/.github/workflows/rust_ci.yaml b/.github/workflows/rust_ci.yaml index 708a568f37..537d7c6c4d 100644 --- a/.github/workflows/rust_ci.yaml +++ b/.github/workflows/rust_ci.yaml @@ -19,6 +19,8 @@ jobs: - uses: taiki-e/install-action@just - name: Install Rust stable toolchain uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.81 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true @@ -70,6 +72,8 @@ jobs: - uses: taiki-e/install-action@just - name: Install Rust stable toolchain uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.81 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true @@ -94,6 +98,8 @@ jobs: - uses: taiki-e/install-action@just - name: Install Rust stable toolchain uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.81 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true @@ -120,6 +126,8 @@ jobs: - uses: taiki-e/install-action@just - name: Install Rust stable toolchain uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.81 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true @@ -138,6 +146,8 @@ jobs: - uses: taiki-e/install-action@just - name: Install Rust stable toolchain uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.81 - uses: taiki-e/install-action@cargo-hack - uses: Swatinem/rust-cache@v2 with: @@ -154,6 +164,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: llvm-tools-preview + toolchain: 1.81 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 0e8a88da7a..0000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rust-analyzer.rustfmt.extraArgs": [ - "+nightly" - ] -} \ No newline at end of file diff --git a/bin/host/src/single/cfg.rs b/bin/host/src/single/cfg.rs index be1ccf1c29..d7b9abcf88 100644 --- a/bin/host/src/single/cfg.rs +++ b/bin/host/src/single/cfg.rs @@ -124,7 +124,7 @@ impl SingleChainHost { } /// Starts the preimage server, communicating with the client over the provided channels. - async fn start_server(&self, hint: C, preimage: C) -> Result>> + pub async fn start_server(&self, hint: C, preimage: C) -> Result>> where C: Channel + Send + Sync + 'static, { diff --git a/crates/derive/src/attributes/stateful.rs b/crates/derive/src/attributes/stateful.rs index 16fa8e2aa1..06f88ed4e2 100644 --- a/crates/derive/src/attributes/stateful.rs +++ b/crates/derive/src/attributes/stateful.rs @@ -1,4 +1,3 @@ -#![allow(clippy::unnecessary_map_or)] //! The [`AttributesBuilder`] and it's default implementation. use crate::{ diff --git a/crates/derive/src/stages/batch/batch_validator.rs b/crates/derive/src/stages/batch/batch_validator.rs index 6f807b7585..d1ff9499ab 100644 --- a/crates/derive/src/stages/batch/batch_validator.rs +++ b/crates/derive/src/stages/batch/batch_validator.rs @@ -1,4 +1,3 @@ -#![allow(clippy::unnecessary_map_or)] //! Contains the [BatchValidator] stage. use super::NextBatchProvider; diff --git a/crates/derive/src/test_utils/frame_queue.rs b/crates/derive/src/test_utils/frame_queue.rs index 1cb151c0bd..cd0f3df1fc 100644 --- a/crates/derive/src/test_utils/frame_queue.rs +++ b/crates/derive/src/test_utils/frame_queue.rs @@ -31,7 +31,7 @@ impl TestFrameQueueProvider { } /// Sets the origin for the [MockFrameQueueProvider]. - pub const fn set_origin(&mut self, origin: BlockInfo) { + pub fn set_origin(&mut self, origin: BlockInfo) { self.origin = Some(origin); } } diff --git a/crates/interop/src/super_root.rs b/crates/interop/src/super_root.rs index 2b4a3704ba..7340bb2808 100644 --- a/crates/interop/src/super_root.rs +++ b/crates/interop/src/super_root.rs @@ -125,7 +125,7 @@ mod test { ], ); - assert!(super_root.output_roots.is_sorted_by_key(|r| r.chain_id)); + assert!(super_root.output_roots.windows(2).all(|w| w[0].chain_id <= w[1].chain_id)); } #[test] diff --git a/crates/mpt/src/list_walker.rs b/crates/mpt/src/list_walker.rs index 57045532dc..702ec8247c 100644 --- a/crates/mpt/src/list_walker.rs +++ b/crates/mpt/src/list_walker.rs @@ -77,7 +77,7 @@ where /// Takes the inner list of the [OrderedListWalker], returning it and setting the inner list to /// [None]. - pub const fn take_inner(&mut self) -> Option> { + pub fn take_inner(&mut self) -> Option> { self.inner.take() } diff --git a/crates/proof-sdk/proof-interop/src/consolidation.rs b/crates/proof-sdk/proof-interop/src/consolidation.rs index 99dd27307e..72d2fa0d05 100644 --- a/crates/proof-sdk/proof-interop/src/consolidation.rs +++ b/crates/proof-sdk/proof-interop/src/consolidation.rs @@ -40,7 +40,7 @@ where C: CommsClient + Send + Sync, { /// Creates a new [SuperchainConsolidator] with the given providers and [Header]s. - pub const fn new( + pub fn new( boot_info: &'a mut BootInfo, interop_provider: OracleInteropProvider, l2_providers: HashMap>, diff --git a/crates/proof-sdk/proof/src/l2/chain_provider.rs b/crates/proof-sdk/proof/src/l2/chain_provider.rs index e3fd577e42..3756b9c85c 100644 --- a/crates/proof-sdk/proof/src/l2/chain_provider.rs +++ b/crates/proof-sdk/proof/src/l2/chain_provider.rs @@ -39,7 +39,7 @@ impl OracleL2ChainProvider { } /// Sets the L2 chain ID to use for the provider's hints. - pub const fn set_chain_id(&mut self, chain_id: Option) { + pub fn set_chain_id(&mut self, chain_id: Option) { self.chain_id = chain_id; } diff --git a/crates/proof-sdk/std-fpvm/src/channel.rs b/crates/proof-sdk/std-fpvm/src/channel.rs index febd36ab17..d143aa89a0 100644 --- a/crates/proof-sdk/std-fpvm/src/channel.rs +++ b/crates/proof-sdk/std-fpvm/src/channel.rs @@ -69,7 +69,7 @@ struct ReadFuture<'a> { impl<'a> ReadFuture<'a> { /// Create a new [ReadFuture] from a channel and a buffer. - const fn new(channel: FileChannel, buf: &'a mut [u8]) -> Self { + fn new(channel: FileChannel, buf: &'a mut [u8]) -> Self { Self { channel, buf: RefCell::new(buf), read: 0 } } } diff --git a/justfile b/justfile index 6bdde9f250..a0cd370884 100644 --- a/justfile +++ b/justfile @@ -63,7 +63,7 @@ fmt-native-check: # Lint the workspace lint-native: fmt-native-check lint-docs - cargo +nightly clippy --workspace --all --all-features --all-targets -- -D warnings + cargo clippy --workspace --all --all-features --all-targets -- -D warnings # Lint the workspace (mips arch). Currently, only the `kona-std-fpvm` crate is linted for the `cannon` target, as it is the only crate with architecture-specific code. lint-cannon: @@ -72,7 +72,7 @@ lint-cannon: --platform linux/amd64 \ -v `pwd`/:/workdir \ -w="/workdir" \ - ghcr.io/op-rs/kona/cannon-builder:main cargo +nightly clippy -p kona-std-fpvm --all-features -Zbuild-std=core,alloc -- -D warnings + ghcr.io/op-rs/kona/cannon-builder:main cargo clippy -p kona-std-fpvm --all-features -Zbuild-std=core,alloc -- -D warnings # Lint the workspace (risc-v arch). Currently, only the `kona-std-fpvm` crate is linted for the `asterisc` target, as it is the only crate with architecture-specific code. lint-asterisc: @@ -81,7 +81,7 @@ lint-asterisc: --platform linux/amd64 \ -v `pwd`/:/workdir \ -w="/workdir" \ - ghcr.io/op-rs/kona/asterisc-builder:main cargo +nightly clippy -p kona-std-fpvm --all-features -Zbuild-std=core,alloc -- -D warnings + ghcr.io/op-rs/kona/asterisc-builder:main cargo clippy -p kona-std-fpvm --all-features -Zbuild-std=core,alloc -- -D warnings # Lint the Rust documentation lint-docs: diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000000..4cef0b738f --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.81"