Skip to content

Commit 9ad4783

Browse files
Enable_using_secure_run_in_proof_mode
1 parent b818326 commit 9ad4783

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

vm/src/vm/runners/cairo_runner.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,13 +1014,22 @@ impl CairoRunner {
10141014
pub fn get_builtin_segments_info(&self) -> Result<Vec<(usize, usize)>, RunnerError> {
10151015
let mut builtin_segment_info = Vec::new();
10161016

1017+
let proof_mode = self.is_proof_mode();
1018+
10171019
for builtin in &self.vm.builtin_runners {
10181020
let (index, stop_ptr) = builtin.get_memory_segment_addresses();
10191021

1020-
builtin_segment_info.push((
1021-
index,
1022-
stop_ptr.ok_or_else(|| RunnerError::NoStopPointer(Box::new(builtin.name())))?,
1023-
));
1022+
if proof_mode {
1023+
// proof‐mode: only push if `stop_ptr` is Some
1024+
if let Some(stop_ptr) = stop_ptr {
1025+
builtin_segment_info.push((index, stop_ptr));
1026+
}
1027+
} else {
1028+
// non‐proof mode: error if `stop_ptr` is None
1029+
let stop_ptr =
1030+
stop_ptr.ok_or_else(|| RunnerError::NoStopPointer(Box::new(builtin.name())))?;
1031+
builtin_segment_info.push((index, stop_ptr));
1032+
}
10241033
}
10251034

10261035
Ok(builtin_segment_info)

0 commit comments

Comments
 (0)