You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Filter implicit arguments from return value in cairo1-run crate [#1775](https://github.com/lambdaclass/cairo-vm/pull/1775)
6
8
7
9
* feat(BREAKING): Serialize inputs into output segment in cairo1-run crate:
Copy file name to clipboardExpand all lines: cairo1-run/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,15 +61,15 @@ The cairo1-run cli supports the following optional arguments:
61
61
62
62
*`--memory_file <MEMORY_FILE>`: Receives the name of a file and outputs the relocated memory into it
63
63
64
-
*`--proof_mode`: Runs the program in proof_mode. Only allows `Array<felt252>` as return value.
64
+
*`--proof_mode`: Runs the program in proof_mode. Only allows `Array<felt252>` as return and input value.
65
65
66
66
*`--air_public_input <AIR_PUBLIC_INPUT>`: Receives the name of a file and outputs the AIR public inputs into it. Can only be used if proof_mode is also enabled.
67
67
68
68
*`--air_private_input <AIR_PRIVATE_INPUT>`: Receives the name of a file and outputs the AIR private inputs into it. Can only be used if proof_mode, trace_file & memory_file are also enabled.
69
69
70
70
*`--cairo_pie_output <CAIRO_PIE_OUTPUT>`: Receives the name of a file and outputs the Cairo PIE into it. Can only be used if proof_mode, is not enabled.
71
71
72
-
*`--append_return_values`: Adds extra instructions to the program in order to append the return values to the output builtin's segment. This is the default behaviour for proof_mode. Only allows `Array<felt252>` as return value.
72
+
*`--append_return_values`: Adds extra instructions to the program in order to append the return and input values to the output builtin's segment. This is the default behaviour for proof_mode. Only allows `Array<felt252>` as return and input value.
/// Should be true if either air_public_input or cairo_pie_output are needed
90
90
/// Sets builtins stop_ptr by calling `final_stack` on each builtin
91
91
pubfinalize_builtins:bool,
92
-
/// Appends return values to the output segment. This is performed by default when running in proof_mode
92
+
/// Appends the return and input values to the output segment. This is performed by default when running in proof_mode
93
93
pubappend_return_values:bool,
94
94
}
95
95
@@ -108,10 +108,18 @@ impl Default for Cairo1RunConfig<'_> {
108
108
}
109
109
}
110
110
111
-
// Runs a Cairo 1 program
112
-
// Returns the runner after execution + the return values + the serialized return values (if serialize_output is enabled)
113
-
// The return values will contain the memory values just as they appear in the VM, after removing the PanicResult enum (if present).
114
-
// Except if either the flag append_return_values or proof_mode are enabled, in which case the return values will consist of its serialized form: [array_len, array[0], array[1], ..., array[array_len -1]]
111
+
implCairo1RunConfig<'_>{
112
+
// Returns true if the flags in the config enable adding the output builtin and
113
+
// copying input and output values into it's segment
114
+
fncopy_to_output(&self) -> bool{
115
+
self.append_return_values || self.proof_mode
116
+
}
117
+
}
118
+
119
+
/// Runs a Cairo 1 program
120
+
/// Returns the runner after execution + the return values + the serialized return values (if serialize_output is enabled)
121
+
/// The return values will contain the memory values just as they appear in the VM, after removing the PanicResult enum (if present).
122
+
/// Except if either the flag append_return_values or proof_mode are enabled, in which case the return values will consist of its serialized form: [array_len, array[0], array[1], ..., array[array_len -1]]
0 commit comments