Skip to content

Commit

Permalink
updated toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
ohad-starkware committed Dec 18, 2024
1 parent f1cbcef commit 3b9c330
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 29 deletions.
27 changes: 10 additions & 17 deletions stwo_cairo_prover/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions stwo_cairo_prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ version = "0.1.1"
edition = "2021"

[workspace.dependencies]
bytemuck = { version = "1.16.3", features = ["derive"] }
bytemuck = { version = "1.20.0", features = ["derive"] }
cairo-lang-casm = "2.7.1"
# TODO(yuval): Use an official version, not a specific commit.
cairo-vm = { git = "https://github.com/lambdaclass/cairo-vm", rev = "3fb0344c", features = [
Expand All @@ -33,7 +33,7 @@ serde = "1.0.207"
serde_json = "1.0.1"
sonic-rs = "0.3.10"
# TODO(ShaharS): take stwo version from the source repository.
stwo-prover = { git = "https://github.com/starkware-libs/stwo", rev = "060f0e4", features = [
stwo-prover = { git = "https://github.com/starkware-libs/stwo", rev = "172cd35", features = [
"parallel",
] }
thiserror = "1.0.63"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ pub struct SubComponentInputs
{pub memory_address_to_id_inputs: [Vec<memory_address_to_id::InputType>; 3],pub memory_id_to_big_inputs: [Vec<memory_id_to_big::InputType>; 3],pub range_check_19_inputs: [Vec<range_check_19::InputType>; 28],pub range_check_9_9_inputs: [Vec<range_check_9_9::InputType>; 28],pub verify_instruction_inputs: [Vec<verify_instruction::InputType>; 1],}

#[allow(clippy::useless_conversion)]

#[allow(unused_variables)]
#[allow(clippy::double_parens)]
#[allow(non_snake_case)]
Expand Down
2 changes: 1 addition & 1 deletion stwo_cairo_prover/crates/prover/src/input/plain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn input_from_finished_runner(runner: CairoRunner, dev_mode: bool) -> CairoI
.filter_map(|(i, v)| {
v.map(|v| MemEntry {
addr: i as u64,
val: bytemuck::cast_slice(&v.to_bytes_le()).try_into().unwrap(),
val: bytemuck::cast(v.to_bytes_le()),
})
});
let trace = runner.relocated_trace.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions stwo_cairo_prover/crates/prover/src/input/vm_import/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl From<RelocatedTraceEntry> for TraceEntry {
}

pub struct TraceIter<'a, R: Read>(pub &'a mut R);
impl<'a, R: Read> Iterator for TraceIter<'a, R> {
impl<R: Read> Iterator for TraceIter<'_, R> {
type Item = TraceEntry;

fn next(&mut self) -> Option<Self::Item> {
Expand All @@ -110,7 +110,7 @@ pub struct MemEntry {
}

pub struct MemEntryIter<'a, R: Read>(pub &'a mut R);
impl<'a, R: Read> Iterator for MemEntryIter<'a, R> {
impl<R: Read> Iterator for MemEntryIter<'_, R> {
type Item = MemEntry;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion stwo_cairo_prover/crates/prover/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(array_methods, portable_simd, iter_array_chunks, array_chunks)]
#![feature(trait_upcasting, portable_simd, iter_array_chunks, array_chunks)]
// TODO(Ohad): remove.
#![allow(clippy::too_many_arguments)]

Expand Down
2 changes: 1 addition & 1 deletion stwo_cairo_prover/crates/prover_types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#![feature(portable_simd, array_methods)]
#![feature(portable_simd)]
pub mod cpu;
pub mod simd;
6 changes: 3 additions & 3 deletions stwo_cairo_prover/crates/prover_types/src/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl PackedUInt16 {
// Safe because UInt16 is u16.
unsafe {
Self {
value: Simd::from_array(transmute(arr)),
value: Simd::from_array(transmute::<[UInt16; 16], [u16; 16]>(arr)),
}
}
}
Expand Down Expand Up @@ -151,7 +151,7 @@ impl PackedUInt32 {
// Safe because UInt32 is u32.
unsafe {
Self {
simd: Simd::from_array(transmute(arr)),
simd: Simd::from_array(transmute::<[UInt32; 16], [u32; 16]>(arr)),
}
}
}
Expand Down Expand Up @@ -279,7 +279,7 @@ impl PackedUInt64 {
// Safe because UInt64is u64.
unsafe {
Self {
value: Simd::from_array(transmute(arr)),
value: Simd::from_array(transmute::<[UInt64; 16], [u64; 16]>(arr)),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion stwo_cairo_prover/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-04"
channel = "nightly-2024-12-16"

0 comments on commit 3b9c330

Please sign in to comment.