Skip to content

Commit

Permalink
chore: bump compiler to 2.7.0 and vm to 1.0.0-rc6 (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoni-Starkware authored Aug 5, 2024
1 parent ff11dd7 commit 40b9492
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 67 deletions.
112 changes: 56 additions & 56 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ byteorder = "1.4.3"
bytes = "1"
cached = "0.44.0"
cairo-felt = "0.9.1"
cairo-lang-casm = "2.7.0-rc.3"
cairo-lang-runner = "2.7.0-rc.3"
cairo-lang-sierra = "=2.7.0-rc.3"
cairo-lang-starknet-classes = "2.7.0-rc.3"
cairo-lang-utils = "2.7.0-rc.3"
cairo-vm = "=1.0.0-rc5"
cairo-lang-casm = "2.7.0"
cairo-lang-runner = "2.7.0"
cairo-lang-sierra = "=2.7.0"
cairo-lang-starknet-classes = "2.7.0"
cairo-lang-utils = "2.7.0"
cairo-vm = "=1.0.0-rc6"
camelpaste = "0.1.0"
chrono = "0.4.26"
clap = "4.3.10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ impl<'a> DeprecatedSyscallHintProcessor<'a> {
vm: &mut VirtualMachine,
) -> DeprecatedSyscallResult<Relocatable> {
let signature = &self.context.tx_context.tx_info.signature().0;
let signature = signature.iter().map(|&x| MaybeRelocatable::from(x)).collect();
let signature: Vec<MaybeRelocatable> =
signature.iter().map(|&x| MaybeRelocatable::from(x)).collect();
let signature_segment_start_ptr = self.read_only_segments.allocate(vm, &signature)?;

Ok(signature_segment_start_ptr)
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/entry_point_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn register_visited_pcs(
// after it.
// TODO(lior): Avoid unnecessary relocation once the VM has a non-relocated `get_trace()`
// function.
runner.relocate_trace(&[1, 1 + program_segment_size].into())?;
runner.relocate_trace(&[1, 1 + program_segment_size])?;
for trace_entry in runner.relocated_trace.as_ref().expect("Relocated trace not found") {
let pc = trace_entry.pc;
if pc < 1 {
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/execution_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl ReadOnlySegments {
pub fn allocate(
&mut self,
vm: &mut VirtualMachine,
data: &Vec<MaybeRelocatable>,
data: &[MaybeRelocatable],
) -> Result<Relocatable, MemoryError> {
let start_ptr = vm.add_memory_segment();
self.0.push(ReadOnlySegment { start_ptr, length: data.len() });
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/syscalls/hint_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ impl<'a> SyscallHintProcessor<'a> {
vm: &mut VirtualMachine,
data: &[Felt],
) -> SyscallResult<(Relocatable, Relocatable)> {
let data = data.iter().map(|&x| MaybeRelocatable::from(x)).collect();
let data: Vec<MaybeRelocatable> = data.iter().map(|&x| MaybeRelocatable::from(x)).collect();
let data_segment_start_ptr = self.read_only_segments.allocate(vm, &data)?;
let data_segment_end_ptr = (data_segment_start_ptr + data.len())?;
Ok((data_segment_start_ptr, data_segment_end_ptr))
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl<T: SyscallResponse> SyscallResponse for SyscallResponseWrapper<T> {
let revert_reason_start = vm.add_memory_segment();
let revert_reason_end = vm.load_data(
revert_reason_start,
&error_data.into_iter().map(Into::into).collect(),
&error_data.into_iter().map(Into::into).collect::<Vec<MaybeRelocatable>>(),
)?;

// Write the start and end pointers of the error data.
Expand Down

0 comments on commit 40b9492

Please sign in to comment.