-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Don't assume output builtin is first when counting memory holes (#…
…1811) * Dont asume output builtin is first when counting memory holes * Add changelog entry * Fix + doc * Fix typo
- Loading branch information
Showing
3 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -817,10 +817,14 @@ impl CairoRunner { | |
|
||
/// Count the number of holes present in the segments. | ||
pub fn get_memory_holes(&self) -> Result<usize, MemoryError> { | ||
self.vm.segments.get_memory_holes( | ||
self.vm.builtin_runners.len(), | ||
self.program.builtins.contains(&BuiltinName::output), | ||
) | ||
let output_builtin_index = self | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Yoni-Starkware
|
||
.vm | ||
.builtin_runners | ||
.iter() | ||
.position(|b| b.name() == BuiltinName::output); | ||
self.vm | ||
.segments | ||
.get_memory_holes(self.vm.builtin_runners.len(), output_builtin_index) | ||
} | ||
|
||
/// Check if there are enough trace cells to fill the entire diluted checks. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How do you know that the order of the runners is the initialization order?
You should check that the builtin is included and pass the base here.