diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a9c629ece..ee2df2fd7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: rustfmt - toolchain: nightly-2024-01-04 + toolchain: nightly-2024-03-10 - uses: Swatinem/rust-cache@v2 - run: scripts/rust_fmt.sh --check @@ -38,7 +38,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: clippy - toolchain: nightly-2024-01-04 + toolchain: nightly-2024-03-10 - uses: Swatinem/rust-cache@v2 - run: scripts/clippy.sh @@ -48,7 +48,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2024-01-04 + toolchain: nightly-2024-03-10 - uses: Swatinem/rust-cache@v2 - run: ./scripts/test_avx.sh @@ -58,9 +58,9 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2024-01-04 + toolchain: nightly-2024-03-10 - uses: Swatinem/rust-cache@v2 - - run: cargo +nightly-2024-01-04 test + - run: cargo +nightly-2024-03-10 test udeps: runs-on: ubuntu-latest @@ -69,7 +69,7 @@ jobs: - uses: dtolnay/rust-toolchain@master name: "Rust Toolchain Setup" with: - toolchain: nightly-2024-01-04 + toolchain: nightly-2024-03-10 - uses: Swatinem/rust-cache@v2 id: "cache-cargo" - if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} @@ -78,19 +78,18 @@ jobs: wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz cargo-udeps-*/cargo-udeps udeps env: - RUSTUP_TOOLCHAIN: nightly-2024-01-04 - + RUSTUP_TOOLCHAIN: nightly-2024-03-10 all-tests: runs-on: ubuntu-latest needs: - - clippy - - format - - run-tests - - run-avx-tests - - udeps + - clippy + - format + - run-tests + - run-avx-tests + - udeps steps: - - name: Decide whether all the needed jobs succeeded or failed - uses: re-actors/alls-green@v1.2.2 - with: - jobs: ${{ toJSON(needs) }} + - name: Decide whether all the needed jobs succeeded or failed + uses: re-actors/alls-green@v1.2.2 + with: + jobs: ${{ toJSON(needs) }} diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 8098727db..fdb65c093 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -12,12 +12,12 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: rustfmt - toolchain: nightly-2024-01-04 + toolchain: nightly-2024-03-10 - uses: Swatinem/rust-cache@v2 - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo +nightly-2024-01-04 llvm-cov --codecov --output-path codecov.json + run: cargo +nightly-2024-03-10 llvm-cov --codecov --output-path codecov.json env: RUSTFLAGS: "-C target-feature=+avx512f" - name: Upload coverage to Codecov diff --git a/rust-toolchain.toml b/rust-toolchain.toml index a0f1a930e..984e57270 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-01-04" +channel = "nightly-2024-03-10" diff --git a/scripts/clippy.sh b/scripts/clippy.sh index 8361cd25d..af80b0e90 100755 --- a/scripts/clippy.sh +++ b/scripts/clippy.sh @@ -1,3 +1,3 @@ #!/bin/bash -cargo +nightly-2024-01-04 clippy "$@" --all-targets --all-features -- -D warnings -D future-incompatible \ +cargo +nightly-2024-03-10 clippy "$@" --all-targets --all-features -- -D warnings -D future-incompatible \ -D nonstandard-style -D rust-2018-idioms -D unused diff --git a/scripts/rust_fmt.sh b/scripts/rust_fmt.sh index e4223f999..60faeb3c6 100755 --- a/scripts/rust_fmt.sh +++ b/scripts/rust_fmt.sh @@ -1,3 +1,3 @@ #!/bin/bash -cargo +nightly-2024-01-04 fmt --all -- "$@" +cargo +nightly-2024-03-10 fmt --all -- "$@" diff --git a/scripts/test_avx.sh b/scripts/test_avx.sh index d911a2479..b8745dfd2 100755 --- a/scripts/test_avx.sh +++ b/scripts/test_avx.sh @@ -1,4 +1,4 @@ #!/bin/bash # Can be used as a drop in replacement for `cargo test` with avx512f flag on. # For example, `./scripts/test_avx.sh` will run all tests(not only avx). -RUSTFLAGS="-Awarnings -C target-cpu=native -C target-feature=+avx512f -C opt-level=2" cargo +nightly-2024-01-04 test "$@" +RUSTFLAGS="-Awarnings -C target-cpu=native -C target-feature=+avx512f -C opt-level=2" cargo +nightly-2024-03-10 test "$@" diff --git a/src/core/fri.rs b/src/core/fri.rs index e1aefe869..447c08b6f 100644 --- a/src/core/fri.rs +++ b/src/core/fri.rs @@ -746,7 +746,7 @@ impl> FriLayerVerifier { let mut all_subline_evals = Vec::new(); // Group queries by the subline they reside in. - for subline_queries in queries.group_by(|a, b| a >> FOLD_STEP == b >> FOLD_STEP) { + for subline_queries in queries.chunk_by(|a, b| a >> FOLD_STEP == b >> FOLD_STEP) { let subline_start = (subline_queries[0] >> FOLD_STEP) << FOLD_STEP; let subline_end = subline_start + (1 << FOLD_STEP); @@ -816,7 +816,7 @@ impl> FriLayerProver { // Group queries by the subline they reside in. // TODO(andrew): Explain what a "subline" is at the top of the module. - for query_group in queries.group_by(|a, b| a >> FOLD_STEP == b >> FOLD_STEP) { + for query_group in queries.chunk_by(|a, b| a >> FOLD_STEP == b >> FOLD_STEP) { let subline_start = (query_group[0] >> FOLD_STEP) << FOLD_STEP; let subline_end = subline_start + (1 << FOLD_STEP); diff --git a/src/lib.rs b/src/lib.rs index 4ee4907df..dfa90cd87 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,13 +1,12 @@ #![feature( array_chunks, - iter_array_chunks, exact_size_is_empty, + get_many_mut, + int_roundings, is_sorted, + iter_array_chunks, new_uninit, - slice_group_by, - stdsimd, - get_many_mut, - int_roundings + stdarch_x86_avx512 )] pub mod commitment_scheme; pub mod core;