Skip to content

Commit a36797f

Browse files
authored
Initial release process document (#959)
* Initial release process document * Added github release step * Updated the godblessed changelog with the past two months of relevant PRs * Address PR comments
1 parent 6ddd419 commit a36797f

File tree

3 files changed

+101
-7
lines changed

3 files changed

+101
-7
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Description of the pull request changes and motivation.
1111
- [ ] This change requires new documentation.
1212
- [ ] Documentation has been added/updated.
1313
- [ ] CHANGELOG has been updated.
14+

CHANGELOG.md

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

33
#### 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+
460

561
* Implement hints on uint384 lib (Part 2) [#971](https://github.com/lambdaclass/cairo-rs/pull/971)
662

@@ -169,7 +225,7 @@
169225
* `Memory::relocate_memory` now moves data in the temporary memory relocated by a relocation rule to the real memory
170226
* Aditional Notes:
171227
* 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+
173229
* Restrict addresses to Relocatable + fix some error variants used in signature.rs [#792](https://github.com/lambdaclass/cairo-rs/pull/792)
174230
* Public Api Changes:
175231
* Change `ValidationRule` inner type to `Box<dyn Fn(&Memory, &Relocatable) -> Result<Vec<Relocatable>, MemoryError>>`.
@@ -211,13 +267,13 @@
211267

212268
* Use CairoArg enum instead of Any in CairoRunner::run_from_entrypoint [#686](https://github.com/lambdaclass/cairo-rs/pull/686)
213269
* 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`
215271
* Add struct `CairoArg`
216272
* Change `arg` argument of `CairoRunner::run_from_entrypoint` from `Vec<&dyn Any>` to `&[&CairoArg]`
217273
* Remove argument `typed_args` from `CairoRunner::run_from_entrypoint`
218274
* Remove no longer used method `gen_typed_arg` from `VirtualMachine` & `MemorySegmentManager`
219275
* Add methods `MemorySegmentManager::gen_cairo_arg` & `MemorySegmentManager::write_simple_args` as typed counterparts to `MemorySegmentManager::gen_arg` & `MemorySegmentManager::write_arg`
220-
276+
221277
#### [0.1.1] - 2023-01-11
222278

223279
* Add input file contents to traceback [#666](https://github.com/lambdaclass/cairo-rs/pull/666/files)
@@ -231,8 +287,8 @@
231287
* `VirtualMachineError`s produced by `HintProcessor::execute_hint()` will be wrapped in a `VirtualMachineError::Hint` error containing their hint_index
232288
* `get_location()` now receives an an optional usize value `hint_index`, used to obtain hint locations
233289
* 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.
236292
* Add new error type `HintError` [#676](https://github.com/lambdaclass/cairo-rs/pull/676)
237293
* Public Api changes:
238294
* `HintProcessor::execute_hint()` now returns a `HintError` instead of a `VirtualMachineError`
@@ -242,7 +298,7 @@
242298
* `DictManager`, its dictionaries, and all dict module hints implemented in rust now use `MaybeRelocatable` for keys and values instead of `BigInt`
243299
* Add helper functions that allow extracting ids variables as `MaybeRelocatable`: `get_maybe_relocatable_from_var_name` & `get_maybe_relocatable_from_reference`
244300
* Change inner value type of dict-related `HintError` variants to `MaybeRelocatable`
245-
301+
246302
* Implement `substitute_error_message_attribute_references` [#689] (https://github.com/lambdaclass/cairo-rs/pull/689)
247303
* Public Api changes:
248304
* Remove `error_message_attributes` field from `VirtualMachine`, and `VirtualMachine::new`
@@ -253,7 +309,7 @@
253309

254310
#### [0.1.0] - 2022-12-30
255311
* Add traceback to VmException [#657](https://github.com/lambdaclass/cairo-rs/pull/657)
256-
* Public API changes:
312+
* Public API changes:
257313
* `traceback` field added to `VmException` struct
258314
* `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`
259315
* `pub fn get_location(pc: &usize, runner: &CairoRunner) -> Option<Location>` is now `pub fn get_location(pc: usize, runner: &CairoRunner) -> Option<Location>`

RELEASE.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Release Process
2+
- [ ] Pull latest from `main` branch.
3+
`git checkout main && git pull origin main`
4+
- [ ] Determine release version string dependending on whether changes included
5+
in changelog are API breaking, it's a release candidate, etc.
6+
The release string should have the format "vX.Y.Z", with a possible
7+
trailing "-rcN" and follow [semantic versioning](https://semver.org/).
8+
- [ ] Checkout branch named `release-N` where N is the version string.
9+
`git checkout -b release-N`
10+
- [ ] Update the version field in the package entry of `Cargo.toml` files.
11+
- The versions must be the same.
12+
- There are 4 relevant `Cargo.toml` files in the repo:
13+
- `Cargo.toml`: update the version string.
14+
- `cairo-vm-cli/Cargo.toml`: update the version string and also the `cairo-vm` dependency version to match the above.
15+
- `felt/Cargo.toml`: update the version string.
16+
- `deps/parse-hyperlinks/Cargo.toml`: this vendored dependency needs its version bumped, but does not need to match the other crate versions.
17+
- [Here](https://github.com/lambdaclass/cairo-rs/pull/948/files) is an example pull request with these changes.
18+
- [ ] Run `cargo update` and `git add Cargo.lock`
19+
- [ ] Update `CHANGELOG.md`:
20+
- Verify that the changelog is up to date.
21+
- Add a title with the release version string just below the `Upcoming Changes` section.
22+
- [ ] Commit your changes, push your branch, and create a pull request.
23+
- [ ] Merge after CI and review passes.
24+
- [ ] Pull latest from `main` again.
25+
- [ ] Tag commit with version string and push tag.
26+
`git tag -a <version string> -m "Release..."`
27+
- [ ] Watch the `publish` workflow run in Github Actions.
28+
- [ ] Verify all the crates are available on crates.io with the correct versions.
29+
- [cairo-vm](https://crates.io/crates/cairo-vm)
30+
- [cairo-felt](https://crates.io/crates/cairo-felt)
31+
- [cairo-take-until-unbalanced](https://crates.io/crates/cairo-take_until_unbalanced)
32+
- [ ] Create a release in Github.
33+
- Select the recently created tag.
34+
- Set the title to the version string.
35+
- If it is a release candidate, mark it as a draft release.
36+
- [ ] Announce release through corresponding channels.
37+

0 commit comments

Comments
 (0)