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 1eadc6a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
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" }

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 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 1eadc6a

Please sign in to comment.