Skip to content

Commit 6cea57f

Browse files
authored
Merge branch 'main' into yairv/sort_ecdsa_and_mod_builtins_private_inputs_by_idx
2 parents 068538a + e5c079c commit 6cea57f

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

CHANGELOG.md

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

33
#### Upcoming Changes
4+
* fix: [#1868](https://github.com/lambdaclass/cairo-vm/pull/1855):
5+
* Adds logic to include the 3 new builtins in `builtin_segments` when serializing the output cairo pie's metadata.
6+
47
* fix: [#1855](https://github.com/lambdaclass/cairo-vm/pull/1855):
58
* Adds logic to skip pedersen additional data comparison when checking pie compatibility.
69

710
#### [2.0.0-rc0] - 2024-10-22
811

12+
* fix: [#1864](https://github.com/lambdaclass/cairo-vm/pull/1864):
13+
* Runner: include data from constants segment to the bytecode when assembling program
14+
915
* chore: bump `cairo-lang-` dependencies to 2.9.0-dev.0 [#1858](https://github.com/lambdaclass/cairo-vm/pull/1858/files)
1016

1117
* chore: update Rust required version to 1.81.0 [#1857](https://github.com/lambdaclass/cairo-vm/pull/1857)

cairo1-run/src/cairo_run.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,14 @@ pub fn cairo_run_program(
204204
cairo_run_config.copy_to_output(),
205205
);
206206

207-
let data: Vec<MaybeRelocatable> = instructions
208-
.flat_map(|inst| inst.assemble().encode())
209-
.map(|x| Felt252::from(&x))
210-
.map(MaybeRelocatable::from)
207+
// The bytecode includes all program instructions plus entry/footer,
208+
// plus data from the constants segments.
209+
let data: Vec<MaybeRelocatable> = casm_program
210+
.assemble_ex(&entry_code.instructions, &libfunc_footer)
211+
.bytecode
212+
.into_iter()
213+
.map(Into::<Felt252>::into)
214+
.map(Into::<MaybeRelocatable>::into)
211215
.collect();
212216

213217
let program = if cairo_run_config.proof_mode {

vm/src/vm/runners/cairo_pie.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,9 @@ pub(super) mod serde_impl {
763763
BuiltinName::ec_op,
764764
BuiltinName::keccak,
765765
BuiltinName::poseidon,
766+
BuiltinName::range_check96,
767+
BuiltinName::add_mod,
768+
BuiltinName::mul_mod,
766769
];
767770

768771
for name in BUILTIN_ORDERED_LIST {

0 commit comments

Comments
 (0)