Skip to content

Commit fb8fa9b

Browse files
committed
Remove dependancy in cairo pie when collectiog builtin segments info
1 parent 5b08179 commit fb8fa9b

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Cairo-VM Changelog
22

33
#### Upcoming Changes
4+
* fix: Updated the logic for collecting builtin segment data for prover input info, removing dependency on the existence of stop pointers. [#2022](https://github.com/lambdaclass/cairo-vm/pull/2022)
45

56
* fix: Keep None values in memory segments for the prover input info [#2021](https://github.com/lambdaclass/cairo-vm/pull/2021)
67

vm/src/vm/runners/cairo_runner.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,17 +1516,23 @@ impl CairoRunner {
15161516
})
15171517
.collect();
15181518

1519-
let builtins_segments = self
1520-
.get_builtin_segment_info_for_pie()?
1521-
.into_iter()
1522-
.map(|(name, info)| (info.index as usize, name))
1523-
.collect();
1519+
let mut builtins_segments = vec![];
1520+
for builtin in &self.vm.builtin_runners {
1521+
if matches!(builtin, BuiltinRunner::SegmentArena(_) | BuiltinRunner::Output(_)) {
1522+
// Those segments are not treated as builtins by the prover.
1523+
continue;
1524+
}
1525+
let (index, _) = builtin.get_memory_segment_addresses();
1526+
builtins_segments.push(
1527+
(index, builtin.name())
1528+
);
1529+
}
15241530

15251531
Ok(ProverInputInfo {
15261532
relocatable_trace,
15271533
relocatable_memory,
15281534
public_memory_offsets,
1529-
builtins_segments,
1535+
builtins_segments: builtins_segments.into_iter().collect(),
15301536
})
15311537
}
15321538
}

0 commit comments

Comments
 (0)