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

fix(zkevm_circuits): make zkevm_circuits compile with newest nightly rust #77

Merged
merged 4 commits into from
Dec 4, 2024
Merged
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
10 changes: 5 additions & 5 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 All @@ -55,7 +55,7 @@ jobs:
- name: Api tests
run: cargo nextest run --release --manifest-path crates/circuit_sequencer_api/Cargo.toml
- name: Definitions test
run: cargo nextest run --release --manifest-path crates/circuit_definitions/Cargo.toml
run: cargo nextest run --release --no-tests=pass --manifest-path crates/circuit_definitions/Cargo.toml
- name: Kzg tests
run: cargo nextest run --release --manifest-path crates/kzg/Cargo.toml

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"
1 change: 1 addition & 0 deletions crates/circuit_definitions/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(clippy::drop_ref)]
#![allow(incomplete_features)]
#![feature(array_chunks)]
#![feature(stmt_expr_attributes)]
#![feature(generic_const_exprs)]
Expand Down
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
Loading