|
1 | 1 | ## Cairo-VM Changelog |
2 | 2 |
|
3 | 3 | #### Upcoming Changes |
| 4 | +* 0.11 Support |
| 5 | + * Layouts update [#874](https://github.com/lambdaclass/cairo-rs/pull/874) |
| 6 | + * Keccak builtin updated [#873](https://github.com/lambdaclass/cairo-rs/pull/873), [#883](https://github.com/lambdaclass/cairo-rs/pull/883) |
| 7 | + * Changes to `ec_op` [#876](https://github.com/lambdaclass/cairo-rs/pull/876) |
| 8 | + * Poseidon builtin [#875](https://github.com/lambdaclass/cairo-rs/pull/875) |
| 9 | + * Renamed Felt to Felt252 [#899](https://github.com/lambdaclass/cairo-rs/pull/899) |
| 10 | + * Added SegmentArenaBuiltinRunner [#913](https://github.com/lambdaclass/cairo-rs/pull/913) |
| 11 | + * Added `program_segment_size` argument to `verify_secure_runner` & `run_from_entrypoint` [#928](https://github.com/lambdaclass/cairo-rs/pull/928) |
| 12 | + * Added dynamic layout [#879](https://github.com/lambdaclass/cairo-rs/pull/879) |
| 13 | + * `get_segment_size` was exposed [#934](https://github.com/lambdaclass/cairo-rs/pull/934) |
| 14 | + |
| 15 | +#### [0.3.0-rc1] - 2023-04-13 |
| 16 | +* Derive Deserialize for ExecutionResources [#922](https://github.com/lambdaclass/cairo-rs/pull/922) |
| 17 | +* Remove builtin names from VirtualMachine.builtin_runners [#921](https://github.com/lambdaclass/cairo-rs/pull/921) |
| 18 | +* Implemented hints on common/ec.cairo [#888](https://github.com/lambdaclass/cairo-rs/pull/888) |
| 19 | +* Changed `Memory.insert` argument types [#902](https://github.com/lambdaclass/cairo-rs/pull/902) |
| 20 | +* feat: implemented `Deserialize` on Program by changing builtins field type to enum [#896](https://github.com/lambdaclass/cairo-rs/pull/896) |
| 21 | +* Effective size computation from the VM exposed [#887](https://github.com/lambdaclass/cairo-rs/pull/887) |
| 22 | +* Wasm32 Support! [#828](https://github.com/lambdaclass/cairo-rs/pull/828), [#893](https://github.com/lambdaclass/cairo-rs/pull/893) |
| 23 | +* `MathError` added for math operation [#855](https://github.com/lambdaclass/cairo-rs/pull/855) |
| 24 | +* Check for overflows in relocatable operations [#859](https://github.com/lambdaclass/cairo-rs/pull/859) |
| 25 | +* Use `Relocatable` instead of `&MaybeRelocatable` in `load_data` and `get_range`[#860](https://github.com/lambdaclass/cairo-rs/pull/860) [#867](https://github.com/lambdaclass/cairo-rs/pull/867) |
| 26 | +* Memory-related errors moved to `MemoryError` [#854](https://github.com/lambdaclass/cairo-rs/pull/854) |
| 27 | + * Removed unused error variants |
| 28 | + * Moved memory-related error variants to `MemoryError` |
| 29 | + * Changed memory getters to return `MemoryError` instead of `VirtualMachineError` |
| 30 | + * Changed all memory-related errors in hint from `HintError::Internal(VmError::...` to `HintError::Memory(MemoryError::...` |
| 31 | +* feat: Builder pattern for `VirtualMachine` [#820](https://github.com/lambdaclass/cairo-rs/pull/820) |
| 32 | +* Simplified `Memory::get` return type to `Option` [#852](https://github.com/lambdaclass/cairo-rs/pull/852) |
| 33 | +* Improved idenitifier variable error handling [#851](https://github.com/lambdaclass/cairo-rs/pull/851) |
| 34 | +* `CairoRunner::write_output` now prints missing and relocatable values [#853](https://github.com/lambdaclass/cairo-rs/pull/853) |
| 35 | +* `VirtualMachineError::FailedToComputeOperands` error message expanded [#848](https://github.com/lambdaclass/cairo-rs/pull/848) |
| 36 | +* Builtin names made public [#849](https://github.com/lambdaclass/cairo-rs/pull/849) |
| 37 | +* `secure_run` flag moved to `CairoRunConfig` struct [#832](https://github.com/lambdaclass/cairo-rs/pull/832) |
| 38 | +* `vm_core` error types revised and iimplemented `AddAssign` for `Relocatable` [#837](https://github.com/lambdaclass/cairo-rs/pull/837) |
| 39 | +* `to_bigint` and `to_biguint` deprecated [#757](https://github.com/lambdaclass/cairo-rs/pull/757) |
| 40 | +* `Memory` moved into `MemorySegmentManager` [#830](https://github.com/lambdaclass/cairo-rs/pull/830) |
| 41 | + * To reduce the complexity of the VM's memory and enforce proper usage (as the memory and its segment manager are now a "unified" entity) |
| 42 | + * Removed `memory` field from `VirtualMachine` |
| 43 | + * Added `memory` field to `MemorySegmentManager` |
| 44 | + * Removed `Memory` argument from methods where `MemorySegmentManager` is also an argument |
| 45 | + * Added test macro `segments` (an extension of the `memory` macro) |
| 46 | +* `Display` trait added to Memory struct [#812](https://github.com/lambdaclass/cairo-rs/pull/812) |
| 47 | +* feat: Extensible VirtualMachineError and removed PartialEq trait [#783](https://github.com/lambdaclass/cairo-rs/pull/783) |
| 48 | + * `VirtualMachineError::Other(anyhow::Error)` was added to allow to returning custom errors when using `cairo-rs` |
| 49 | + * The `PartialEq` trait was removed from the `VirtualMachineError` enum |
| 50 | +* VM hooks added as a conditional feature [#761](https://github.com/lambdaclass/cairo-rs/pull/761) |
| 51 | + * Cairo-rs based testing tools such as cairo-foundry or those built by FuzzingLabs need access to the state of the VM at specific points during the execution. |
| 52 | + * This PR adds the possibility for users of the cairo-rs lib to execute their custom additional code during the program execution. |
| 53 | + * The Rust "feature" mechanism was used in order to guarantee that this ability is only available when the lib user needs it, and is not compiled when it's not required. |
| 54 | + * Three hooks were created: |
| 55 | + * before the first step |
| 56 | + * before each step |
| 57 | + * after each step |
| 58 | +* ExecutionResource operations: add and substract [#774](https://github.com/lambdaclass/cairo-rs/pull/774), multiplication [#908](https://github.com/lambdaclass/cairo-rs/pull/908) , and `AddAssign` [#914](https://github.com/lambdaclass/cairo-rs/pull/914) |
| 59 | + |
4 | 60 |
|
5 | 61 | * Implement hints on uint384 lib (Part 2) [#971](https://github.com/lambdaclass/cairo-rs/pull/971) |
6 | 62 |
|
|
169 | 225 | * `Memory::relocate_memory` now moves data in the temporary memory relocated by a relocation rule to the real memory |
170 | 226 | * Aditional Notes: |
171 | 227 | * When relocating temporary memory produces clashes with pre-existing values in the real memory, an InconsistentMemory error is returned instead of keeping the last inserted value. This differs from the original implementation. |
172 | | - |
| 228 | + |
173 | 229 | * Restrict addresses to Relocatable + fix some error variants used in signature.rs [#792](https://github.com/lambdaclass/cairo-rs/pull/792) |
174 | 230 | * Public Api Changes: |
175 | 231 | * Change `ValidationRule` inner type to `Box<dyn Fn(&Memory, &Relocatable) -> Result<Vec<Relocatable>, MemoryError>>`. |
|
211 | 267 |
|
212 | 268 | * Use CairoArg enum instead of Any in CairoRunner::run_from_entrypoint [#686](https://github.com/lambdaclass/cairo-rs/pull/686) |
213 | 269 | * Public Api changes: |
214 | | - * Remove `Result` from `MaybeRelocatable::mod_floor`, it now returns a `MaybeRelocatable` |
| 270 | + * Remove `Result` from `MaybeRelocatable::mod_floor`, it now returns a `MaybeRelocatable` |
215 | 271 | * Add struct `CairoArg` |
216 | 272 | * Change `arg` argument of `CairoRunner::run_from_entrypoint` from `Vec<&dyn Any>` to `&[&CairoArg]` |
217 | 273 | * Remove argument `typed_args` from `CairoRunner::run_from_entrypoint` |
218 | 274 | * Remove no longer used method `gen_typed_arg` from `VirtualMachine` & `MemorySegmentManager` |
219 | 275 | * Add methods `MemorySegmentManager::gen_cairo_arg` & `MemorySegmentManager::write_simple_args` as typed counterparts to `MemorySegmentManager::gen_arg` & `MemorySegmentManager::write_arg` |
220 | | - |
| 276 | + |
221 | 277 | #### [0.1.1] - 2023-01-11 |
222 | 278 |
|
223 | 279 | * Add input file contents to traceback [#666](https://github.com/lambdaclass/cairo-rs/pull/666/files) |
|
231 | 287 | * `VirtualMachineError`s produced by `HintProcessor::execute_hint()` will be wrapped in a `VirtualMachineError::Hint` error containing their hint_index |
232 | 288 | * `get_location()` now receives an an optional usize value `hint_index`, used to obtain hint locations |
233 | 289 | * Default implementation of compile_hint [#680](https://github.com/lambdaclass/cairo-rs/pull/680) |
234 | | - * Internal changes: |
235 | | - * Make the `compile_hint` implementation which was in the `BuiltinHintProcessor` the default implementation in the trait. |
| 290 | + * Internal changes: |
| 291 | + * Make the `compile_hint` implementation which was in the `BuiltinHintProcessor` the default implementation in the trait. |
236 | 292 | * Add new error type `HintError` [#676](https://github.com/lambdaclass/cairo-rs/pull/676) |
237 | 293 | * Public Api changes: |
238 | 294 | * `HintProcessor::execute_hint()` now returns a `HintError` instead of a `VirtualMachineError` |
|
242 | 298 | * `DictManager`, its dictionaries, and all dict module hints implemented in rust now use `MaybeRelocatable` for keys and values instead of `BigInt` |
243 | 299 | * Add helper functions that allow extracting ids variables as `MaybeRelocatable`: `get_maybe_relocatable_from_var_name` & `get_maybe_relocatable_from_reference` |
244 | 300 | * Change inner value type of dict-related `HintError` variants to `MaybeRelocatable` |
245 | | - |
| 301 | + |
246 | 302 | * Implement `substitute_error_message_attribute_references` [#689] (https://github.com/lambdaclass/cairo-rs/pull/689) |
247 | 303 | * Public Api changes: |
248 | 304 | * Remove `error_message_attributes` field from `VirtualMachine`, and `VirtualMachine::new` |
|
253 | 309 |
|
254 | 310 | #### [0.1.0] - 2022-12-30 |
255 | 311 | * Add traceback to VmException [#657](https://github.com/lambdaclass/cairo-rs/pull/657) |
256 | | - * Public API changes: |
| 312 | + * Public API changes: |
257 | 313 | * `traceback` field added to `VmException` struct |
258 | 314 | * `pub fn from_vm_error(runner: &CairoRunner, error: VirtualMachineError, pc: usize) -> Self` is now `pub fn from_vm_error(runner: &CairoRunner, vm: &VirtualMachine, error: VirtualMachineError) -> Self` |
259 | 315 | * `pub fn get_location(pc: &usize, runner: &CairoRunner) -> Option<Location>` is now `pub fn get_location(pc: usize, runner: &CairoRunner) -> Option<Location>` |
|
0 commit comments