Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS upgrade: v0.13.3 #465

Merged
merged 8 commits into from
Jan 23, 2025
Merged

OS upgrade: v0.13.3 #465

merged 8 commits into from
Jan 23, 2025

Conversation

ftheirs
Copy link
Collaborator

@ftheirs ftheirs commented Jan 17, 2025

OS upgrade to v0.13.3: This PR enables SNOS to process blocks from the latests OS version.

The implementation was split in 2 big features: minimal changes to process new blocks and compression related function.
First part consists of: #453
Second part consists of: #454, #455, #464 and #466

Since there were some changes in the serialization step from the OS, the reference PIE that was used for testing before, was replaced and some extra PIEs were added.

The PIEs from November and December provided by Starkware were compared with the ones that generates SNOS and all of them match.
Due to a time constrain, a random sample from all the provided PIEs were tested:
PIEs from November 2024: 12,819 ✅
PIEs from December 2024: 2,528 ✅

Issue Number: N/A

Type

  • feature
  • bugfix
  • dev (no functional changes, no API changes)
  • fmt (formatting, renaming)
  • build
  • docs
  • testing

Description

Breaking changes?

  • yes
  • no

ftheirs and others added 4 commits December 31, 2024 09:27
* update cairo-lang to v0.13.3

* expect Starknet v0.13.3 version

* set_state_updates_start & set_compressed_start

* update deserialize OS output

* hint implementation: set_n_updates_small

* disable test until we get a reference PIE with the new OS version

* set full_output for integration tests

* deserialize output fix tests

* update sequencer address

* fix CI: bump cairo-lang to v0.13.3

* clippy

* bump cairo-lang

* fix tests

* fix use_kzg_da global variable

* add hint test

* fix is_s_updates_small

* add tests for set_compressed_start and set_state_updates_start

* fix StarknetGeneralConfig

* add test with reference PIEs
* feat: add the log2_ceil hint

* simplify log2 function

* clean up unimplemented.rs

---------

Co-authored-by: whichqua <[email protected]>
* feat: add dict manager and get offset hints for v0.13.3

* use TOTAL_N_BUCKETS from constants

* handle error

* rename dict to compression

* compression constants

* change unimplemented.rs description

* clippy

---------

Co-authored-by: whichqua <[email protected]>
@ftheirs ftheirs changed the title Os v0 13 3 Os v0_13_3 Jan 17, 2025
@ftheirs ftheirs changed the title Os v0_13_3 OSv0_13_3 Jan 17, 2025
@ftheirs ftheirs changed the title OSv0_13_3 OS v0_13_3 Jan 17, 2025
@ftheirs ftheirs changed the title OS v0_13_3 OS v0.13.3 Jan 17, 2025
@ftheirs ftheirs changed the title OS v0.13.3 OS upgrade: v0.13.3 Jan 17, 2025
Copy link
Collaborator

@whichqua whichqua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested some minor changes

crates/starknet-os/src/io/output.rs Outdated Show resolved Hide resolved
crates/starknet-os/src/hints/output.rs Outdated Show resolved Hide resolved
crates/starknet-os/src/hints/output.rs Outdated Show resolved Hide resolved
ftheirs and others added 3 commits January 20, 2025 17:42
* compression hint

* set_decompressed_dst hint

* use log2 from math.rs

* add test get_n_elms_per_felt

* fix: handle `full_output` compression correctly (#461)

* fix: handle kzg compression correctly

* lint: clippy and fmt

* fix: replace unwrap with expect for get_index

* add: docs and tests for the compression module

* remove unused constant

---------

Co-authored-by: Geoffrey Mureithi <[email protected]>
* feat: decompress the output to state diff

* chore: replace unwraps with expect
@ftheirs ftheirs marked this pull request as ready for review January 21, 2025 14:53
Copy link
Collaborator

@HermanObst HermanObst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@whichqua whichqua merged commit e4599fe into main Jan 23, 2025
5 checks passed
@whichqua whichqua deleted the os_v0_13_3 branch January 23, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants