Skip to content

Commit

Permalink
fix(zkevm_circuits): make it compile with newest nightly rust
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBrodetski committed Nov 28, 2024
1 parent fb09cb3 commit ca5bc47
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please-prepare-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

2 changes: 1 addition & 1 deletion crates/circuit_definitions/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-08-01"
channel = "nightly-2024-11-19"
2 changes: 1 addition & 1 deletion crates/zkevm_circuits/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
# channel = "nightly"
channel = "nightly-2024-08-01"
channel = "nightly-2024-11-19"
3 changes: 2 additions & 1 deletion crates/zkevm_circuits/src/main_vm/opcodes/call_ret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ pub(crate) fn apply_calls_and_ret<
let is_call_like = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[1]);
let new_depth = <u32 as WitnessCastable<F, F>>::cast_from_source(inputs[2]);

let mut query =
let mut query: [F;
<ExecutionContextRecord<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN] =
[F::ZERO; <ExecutionContextRecord<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN];
query.copy_from_slice(&inputs[3..]);
use crate::base_structures::vm_state::saved_context::ExecutionContextRecordWitness;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,8 @@ where
let execute = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[0]);
let current_depth = <u32 as WitnessCastable<F, F>>::cast_from_source(inputs[1]);

let mut query =
let mut query: [F;
<ExecutionContextRecord<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN] =
[F::ZERO; <ExecutionContextRecord<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN];
query.copy_from_slice(&inputs[2..]);
let query: ExecutionContextRecordWitness<F> =
Expand Down
10 changes: 5 additions & 5 deletions crates/zkevm_circuits/src/main_vm/opcodes/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ pub(crate) fn apply_log<
move |inputs: &[F]| {
let is_write = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[0]);
let execute = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[1]);
let mut log_query =
let mut log_query: [F; <LogQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN] =
[F::ZERO; <LogQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN];
log_query.copy_from_slice(&inputs[2..]);
let log_query: LogQueryWitness<F> =
Expand Down Expand Up @@ -389,7 +389,7 @@ pub(crate) fn apply_log<
move |inputs: &[F]| {
let is_write = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[0]);
let execute = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[1]);
let mut log_query =
let mut log_query: [F; <LogQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN] =
[F::ZERO; <LogQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN];
log_query.copy_from_slice(&inputs[2..]);
let log_query: LogQueryWitness<F> =
Expand Down Expand Up @@ -503,7 +503,7 @@ pub(crate) fn apply_log<
move |inputs: &[F]| {
let is_storage = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[0]);
let execute = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[1]);
let mut log_query =
let mut log_query: [F; <LogQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN] =
[F::ZERO; <LogQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN];
log_query.copy_from_slice(&inputs[2..]);
let log_query: LogQueryWitness<F> =
Expand Down Expand Up @@ -555,7 +555,7 @@ pub(crate) fn apply_log<
cs,
move |inputs: &[F]| {
let execute_rollback = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[0]);
let mut log_query =
let mut log_query: [F; <LogQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN] =
[F::ZERO; <LogQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN];
log_query.copy_from_slice(&inputs[1..]);
let log_query: LogQueryWitness<F> =
Expand Down Expand Up @@ -621,7 +621,7 @@ pub(crate) fn apply_log<
move |inputs: &[F]| {
let should_decommit = <bool as WitnessCastable<F, F>>::cast_from_source(inputs[0]);

let mut query =
let mut query: [F; <DecommitQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN] =
[F::ZERO; <DecommitQuery<F> as CSAllocatableExt<F>>::INTERNAL_STRUCT_LEN];
query.copy_from_slice(&inputs[1..]);
let query: DecommitQueryWitness<F> =
Expand Down
2 changes: 1 addition & 1 deletion crates/zkevm_test_harness/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
# channel = "nightly"
channel = "nightly-2024-08-01"
channel = "nightly-2024-11-19"
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2024-08-01
nightly-2024-11-19

0 comments on commit ca5bc47

Please sign in to comment.