From ca5bc471f39d9762335fc193a830289d0bc842a1 Mon Sep 17 00:00:00 2001 From: romanbrodetskiy Date: Wed, 27 Nov 2024 19:16:00 +0000 Subject: [PATCH] fix(zkevm_circuits): make it compile with newest nightly rust --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/release-please-prepare-branch.yml | 2 +- .github/workflows/release-please.yml | 2 +- Cargo.toml | 8 ++++---- crates/circuit_definitions/rust-toolchain.toml | 2 +- crates/zkevm_circuits/rust-toolchain.toml | 2 +- crates/zkevm_circuits/src/main_vm/opcodes/call_ret.rs | 3 ++- .../src/main_vm/opcodes/call_ret_impl/far_call.rs | 3 ++- crates/zkevm_circuits/src/main_vm/opcodes/log.rs | 10 +++++----- crates/zkevm_test_harness/rust-toolchain.toml | 2 +- rust-toolchain | 2 +- 11 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7dc87ac..af102f4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,8 +23,8 @@ jobs: run: | rustup set profile minimal rustup toolchain install 1.81.0 - rustup toolchain install nightly-2024-08-01 - rustup default nightly-2024-08-01 + rustup toolchain install nightly-2024-11-19 + rustup default nightly-2024-11-19 cargo install cargo-nextest - name: Compile run: cargo build @@ -45,8 +45,8 @@ jobs: - name: Setup rust run: | rustup set profile minimal - rustup toolchain install nightly-2024-08-01 - rustup default nightly-2024-08-01 + rustup toolchain install nightly-2024-11-19 + rustup default nightly-2024-11-19 cargo install cargo-nextest - name: zkevm_test_harness - Main test run: cargo nextest run --release --manifest-path crates/zkevm_test_harness/Cargo.toml --test-threads 2 diff --git a/.github/workflows/release-please-prepare-branch.yml b/.github/workflows/release-please-prepare-branch.yml index a4d411b..f1e402a 100644 --- a/.github/workflows/release-please-prepare-branch.yml +++ b/.github/workflows/release-please-prepare-branch.yml @@ -8,7 +8,7 @@ env: CARGO_TERM_COLOR: "always" CARGO_INCREMENTAL: "0" # Rust version to use. - nightly: nightly-2024-08-01 + nightly: nightly-2024-11-19 name: release-please-update-versions jobs: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 1acb041..14a77fa 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -10,7 +10,7 @@ env: RUSTC_WRAPPER: "sccache" SCCACHE_GHA_ENABLED: "true" # Rust version to use. - nightly: nightly-2024-08-01 + nightly: nightly-2024-11-19 permissions: contents: write diff --git a/Cargo.toml b/Cargo.toml index aaac4f8..446f323 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,8 +28,8 @@ zkevm_test_harness = { version = "=0.150.16", path = "crates/zkevm_test_harness" zkevm-assembly = { version = "=0.150.16", path = "crates/zkEVM-assembly" } # `zksync-crypto` repository -snark_wrapper = "=0.30.9" -bellman = { package = "zksync_bellman", version = "=0.30.9" } -boojum = "=0.30.9" -cs_derive = { package = "zksync_cs_derive", version = "=0.30.9" } +snark_wrapper = "=0.30.10" +bellman = { package = "zksync_bellman", version = "=0.30.10" } +boojum = "=0.30.10" +cs_derive = { package = "zksync_cs_derive", version = "=0.30.10" } diff --git a/crates/circuit_definitions/rust-toolchain.toml b/crates/circuit_definitions/rust-toolchain.toml index bc5d1d6..0d943e1 100644 --- a/crates/circuit_definitions/rust-toolchain.toml +++ b/crates/circuit_definitions/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-08-01" +channel = "nightly-2024-11-19" diff --git a/crates/zkevm_circuits/rust-toolchain.toml b/crates/zkevm_circuits/rust-toolchain.toml index 842bc49..52780ba 100644 --- a/crates/zkevm_circuits/rust-toolchain.toml +++ b/crates/zkevm_circuits/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] # channel = "nightly" -channel = "nightly-2024-08-01" +channel = "nightly-2024-11-19" diff --git a/crates/zkevm_circuits/src/main_vm/opcodes/call_ret.rs b/crates/zkevm_circuits/src/main_vm/opcodes/call_ret.rs index e7267a8..53e54ab 100644 --- a/crates/zkevm_circuits/src/main_vm/opcodes/call_ret.rs +++ b/crates/zkevm_circuits/src/main_vm/opcodes/call_ret.rs @@ -326,7 +326,8 @@ pub(crate) fn apply_calls_and_ret< let is_call_like = >::cast_from_source(inputs[1]); let new_depth = >::cast_from_source(inputs[2]); - let mut query = + let mut query: [F; + as CSAllocatableExt>::INTERNAL_STRUCT_LEN] = [F::ZERO; as CSAllocatableExt>::INTERNAL_STRUCT_LEN]; query.copy_from_slice(&inputs[3..]); use crate::base_structures::vm_state::saved_context::ExecutionContextRecordWitness; diff --git a/crates/zkevm_circuits/src/main_vm/opcodes/call_ret_impl/far_call.rs b/crates/zkevm_circuits/src/main_vm/opcodes/call_ret_impl/far_call.rs index 68af0d5..38abbf8 100644 --- a/crates/zkevm_circuits/src/main_vm/opcodes/call_ret_impl/far_call.rs +++ b/crates/zkevm_circuits/src/main_vm/opcodes/call_ret_impl/far_call.rs @@ -1194,7 +1194,8 @@ where let execute = >::cast_from_source(inputs[0]); let current_depth = >::cast_from_source(inputs[1]); - let mut query = + let mut query: [F; + as CSAllocatableExt>::INTERNAL_STRUCT_LEN] = [F::ZERO; as CSAllocatableExt>::INTERNAL_STRUCT_LEN]; query.copy_from_slice(&inputs[2..]); let query: ExecutionContextRecordWitness = diff --git a/crates/zkevm_circuits/src/main_vm/opcodes/log.rs b/crates/zkevm_circuits/src/main_vm/opcodes/log.rs index 32fa9ec..34d4850 100644 --- a/crates/zkevm_circuits/src/main_vm/opcodes/log.rs +++ b/crates/zkevm_circuits/src/main_vm/opcodes/log.rs @@ -354,7 +354,7 @@ pub(crate) fn apply_log< move |inputs: &[F]| { let is_write = >::cast_from_source(inputs[0]); let execute = >::cast_from_source(inputs[1]); - let mut log_query = + let mut log_query: [F; as CSAllocatableExt>::INTERNAL_STRUCT_LEN] = [F::ZERO; as CSAllocatableExt>::INTERNAL_STRUCT_LEN]; log_query.copy_from_slice(&inputs[2..]); let log_query: LogQueryWitness = @@ -389,7 +389,7 @@ pub(crate) fn apply_log< move |inputs: &[F]| { let is_write = >::cast_from_source(inputs[0]); let execute = >::cast_from_source(inputs[1]); - let mut log_query = + let mut log_query: [F; as CSAllocatableExt>::INTERNAL_STRUCT_LEN] = [F::ZERO; as CSAllocatableExt>::INTERNAL_STRUCT_LEN]; log_query.copy_from_slice(&inputs[2..]); let log_query: LogQueryWitness = @@ -503,7 +503,7 @@ pub(crate) fn apply_log< move |inputs: &[F]| { let is_storage = >::cast_from_source(inputs[0]); let execute = >::cast_from_source(inputs[1]); - let mut log_query = + let mut log_query: [F; as CSAllocatableExt>::INTERNAL_STRUCT_LEN] = [F::ZERO; as CSAllocatableExt>::INTERNAL_STRUCT_LEN]; log_query.copy_from_slice(&inputs[2..]); let log_query: LogQueryWitness = @@ -555,7 +555,7 @@ pub(crate) fn apply_log< cs, move |inputs: &[F]| { let execute_rollback = >::cast_from_source(inputs[0]); - let mut log_query = + let mut log_query: [F; as CSAllocatableExt>::INTERNAL_STRUCT_LEN] = [F::ZERO; as CSAllocatableExt>::INTERNAL_STRUCT_LEN]; log_query.copy_from_slice(&inputs[1..]); let log_query: LogQueryWitness = @@ -621,7 +621,7 @@ pub(crate) fn apply_log< move |inputs: &[F]| { let should_decommit = >::cast_from_source(inputs[0]); - let mut query = + let mut query: [F; as CSAllocatableExt>::INTERNAL_STRUCT_LEN] = [F::ZERO; as CSAllocatableExt>::INTERNAL_STRUCT_LEN]; query.copy_from_slice(&inputs[1..]); let query: DecommitQueryWitness = diff --git a/crates/zkevm_test_harness/rust-toolchain.toml b/crates/zkevm_test_harness/rust-toolchain.toml index 842bc49..52780ba 100644 --- a/crates/zkevm_test_harness/rust-toolchain.toml +++ b/crates/zkevm_test_harness/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] # channel = "nightly" -channel = "nightly-2024-08-01" +channel = "nightly-2024-11-19" diff --git a/rust-toolchain b/rust-toolchain index 03c040b..b3efc43 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-08-01 +nightly-2024-11-19