Skip to content

Commit

Permalink
Sort_ecdsa_and_mod_builtins_private_inputs_by_idx
Browse files Browse the repository at this point in the history
  • Loading branch information
YairVaknin-starkware committed Oct 14, 2024
1 parent 3fb0344 commit 09fa5d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#### Upcoming Changes

* fix: [#1851](https://github.com/lambdaclass/cairo-vm/pull/1851):
* Fix unsorted signature and mod builtin outputs in air_private_input.

* feat(BREAKING): [#1824](https://github.com/lambdaclass/cairo-vm/pull/1824)[#1838](https://github.com/lambdaclass/cairo-vm/pull/1838):
* Add support for dynamic layout
* CLI change(BREAKING): The flag `cairo_layout_params_file` must be specified when using dynamic layout.
Expand Down
2 changes: 2 additions & 0 deletions vm/src/vm/runners/builtin_runner/modulo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ impl ModBuiltinRunner {
});
}

instances.sort_by_key(|input| input.index);

vec![PrivateInput::Mod(ModInput {
instances,
zero_value_address: relocation_table
Expand Down
4 changes: 4 additions & 0 deletions vm/src/vm/runners/builtin_runner/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ impl SignatureBuiltinRunner {
}))
}
}
private_inputs.sort_by_key(|input| match input {
PrivateInput::Signature(sig) => sig.index,
_ => unreachable!(),

Check warning on line 243 in vm/src/vm/runners/builtin_runner/signature.rs

View check run for this annotation

Codecov / codecov/patch

vm/src/vm/runners/builtin_runner/signature.rs#L242-L243

Added lines #L242 - L243 were not covered by tests
});
private_inputs
}
}
Expand Down

0 comments on commit 09fa5d8

Please sign in to comment.