Skip to content

starknet_os: replace ContractStorageUpdate with new full or partial structs #8225

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

Conversation

TzahiTaub
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @TzahiTaub)


crates/starknet_os/src/io/os_output_types.rs line 43 at r1 (raw file):

            key: wrap_missing_as(iter.next(), "storage key")?,
            new_value: wrap_missing(iter.next(), "storage value")?,
        })

where is this used?

Code quote:

        Ok(Self {
            key: wrap_missing_as(iter.next(), "storage key")?,
            new_value: wrap_missing(iter.next(), "storage value")?,
        })

crates/starknet_os/src/io/os_output.rs line 149 at r1 (raw file):

#[cfg_attr(feature = "deserialize", derive(serde::Deserialize, serde::Serialize))]
#[derive(Debug, PartialEq)]
/// Represents the changes in a contract instance.

Suggestion:

/// Represents the changes in a contract instance, in full output mode (prev values included).

crates/starknet_os/src/io/os_output.rs line 219 at r1 (raw file):

            new_class_hash,
            // Should be similar to the full_output code,only with partial updates.
            storage_changes: vec![],

what's this? where did the partial output go?
this struct also expects full-output only, how can you even get here?

storage_changes: Vec<FullContractStorageUpdate>,

Code quote:

            // Should be similar to the full_output code,only with partial updates.
            storage_changes: vec![],

Copy link
Contributor Author

@TzahiTaub TzahiTaub left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dorimedini-starkware)


crates/starknet_os/src/io/os_output.rs line 219 at r1 (raw file):

Previously, dorimedini-starkware wrote…

what's this? where did the partial output go?
this struct also expects full-output only, how can you even get here?

storage_changes: Vec<FullContractStorageUpdate>,

This is the struct I'm killing slowly. I handle the full output case properly because it is used in crates/starknet_os/src/hints/hint_implementation/stateful_compression/tests.rs . It is deleted in the following PR and replaced with the right implementation.


crates/starknet_os/src/io/os_output_types.rs line 43 at r1 (raw file):

Previously, dorimedini-starkware wrote…

where is this used?

In the next PR


crates/starknet_os/src/io/os_output.rs line 149 at r1 (raw file):

#[cfg_attr(feature = "deserialize", derive(serde::Deserialize, serde::Serialize))]
#[derive(Debug, PartialEq)]
/// Represents the changes in a contract instance.

Nope, this struct is the one that goes to trash - it doesn't have the distinction (it covers both "with no prev" and "with prev").

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)

@TzahiTaub TzahiTaub force-pushed the graphite-base/8225 branch from 8302735 to ad3acfc Compare July 28, 2025 08:27
@TzahiTaub TzahiTaub force-pushed the 07-27-starknet_os_replace_contractstorageupdate_with_new_full_or_partial_structs branch from 0b35d28 to 0dacf3f Compare July 28, 2025 08:27
@TzahiTaub TzahiTaub changed the base branch from graphite-base/8225 to 07-27-starknet_os_add_os_output_types July 28, 2025 08:27
@TzahiTaub TzahiTaub force-pushed the 07-27-starknet_os_replace_contractstorageupdate_with_new_full_or_partial_structs branch from 0dacf3f to cde9375 Compare July 28, 2025 09:14
@TzahiTaub TzahiTaub force-pushed the 07-27-starknet_os_add_os_output_types branch from ad3acfc to 836a41a Compare July 28, 2025 09:14
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)

@TzahiTaub TzahiTaub force-pushed the 07-27-starknet_os_replace_contractstorageupdate_with_new_full_or_partial_structs branch from cde9375 to b050607 Compare July 28, 2025 10:53
@TzahiTaub TzahiTaub force-pushed the 07-27-starknet_os_add_os_output_types branch from 836a41a to ac0b945 Compare July 28, 2025 10:53
@TzahiTaub TzahiTaub changed the base branch from 07-27-starknet_os_add_os_output_types to graphite-base/8225 July 28, 2025 11:03
@TzahiTaub TzahiTaub force-pushed the graphite-base/8225 branch from ac0b945 to 0153185 Compare July 28, 2025 12:09
@TzahiTaub TzahiTaub force-pushed the 07-27-starknet_os_replace_contractstorageupdate_with_new_full_or_partial_structs branch from b050607 to d95f7f7 Compare July 28, 2025 12:09
@graphite-app graphite-app bot changed the base branch from graphite-base/8225 to main-v0.14.0 July 28, 2025 12:09
Copy link

graphite-app bot commented Jul 28, 2025

Merge activity

  • Jul 28, 12:09 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@TzahiTaub TzahiTaub added this pull request to the merge queue Jul 28, 2025
Merged via the queue into main-v0.14.0 with commit 6980c09 Jul 28, 2025
14 of 33 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants