Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Cairo-VM Changelog

#### Upcoming Changes
* BREAKING CHANGE: `get_prover_input_info()` now requires `&mut self` and takes ownershop on the trace instead of cloning it. [#2127](https://github.com/lambdaclass/cairo-vm/pull/2127)

* Refactor: Replaced HashMap with BTreeMap to guarantee deterministic ordering of the data [#2023] (https://github.com/lambdaclass/cairo-vm/pull/2023)

* 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)
Expand Down
14 changes: 7 additions & 7 deletions vm/src/vm/runners/cairo_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,13 +1506,13 @@ impl CairoRunner {

/// Collects relevant information for the prover from the runner, including the
/// relocatable form of the trace, memory, public memory, and built-ins.
pub fn get_prover_input_info(&self) -> Result<ProverInputInfo, ProverInputInfoError> {
/// Takes ownership of the trace from the VM.
pub fn get_prover_input_info(&mut self) -> Result<ProverInputInfo, ProverInputInfoError> {
let relocatable_trace = self
.vm
.trace
.as_ref()
.ok_or(ProverInputInfoError::TraceNotEnabled)?
.clone();
.take()
.ok_or(ProverInputInfoError::TraceNotEnabled)?;

let relocatable_memory = self
.vm
Expand Down Expand Up @@ -5565,7 +5565,7 @@ mod tests {
fn get_prover_input_info() {
let program_content =
include_bytes!("../../../../cairo_programs/proof_programs/common_signature.json");
let runner = crate::cairo_run::cairo_run(
let mut runner = crate::cairo_run::cairo_run(
program_content,
&CairoRunConfig {
trace_enabled: true,
Expand Down Expand Up @@ -5658,7 +5658,7 @@ mod tests {
fn test_output_not_builtin_segment() {
let program_content =
include_bytes!("../../../../cairo_programs/proof_programs/split_felt.json");
let runner = crate::cairo_run::cairo_run(
let mut runner = crate::cairo_run::cairo_run(
program_content,
&CairoRunConfig {
trace_enabled: true,
Expand Down Expand Up @@ -5770,7 +5770,7 @@ mod tests {
layout: LayoutName::all_cairo_stwo,
..Default::default()
};
let runner = crate::cairo_run::cairo_run(program_content, &config, &mut crate::hint_processor::builtin_hint_processor::builtin_hint_processor_definition::BuiltinHintProcessor::new_empty()).unwrap();
let mut runner = crate::cairo_run::cairo_run(program_content, &config, &mut crate::hint_processor::builtin_hint_processor::builtin_hint_processor_definition::BuiltinHintProcessor::new_empty()).unwrap();
let prover_input_info = runner.get_prover_input_info().unwrap();

// Using bincode.
Expand Down
Loading