-
Notifications
You must be signed in to change notification settings - Fork 61
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
starknet_os: replace ContractStorageUpdate with new full or partial structs #8225
Conversation
There was a problem hiding this 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![],
There was a problem hiding this 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").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
8302735
to
ad3acfc
Compare
0b35d28
to
0dacf3f
Compare
0dacf3f
to
cde9375
Compare
ad3acfc
to
836a41a
Compare
There was a problem hiding this 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:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
cde9375
to
b050607
Compare
836a41a
to
ac0b945
Compare
ac0b945
to
0153185
Compare
b050607
to
d95f7f7
Compare
Merge activity
|
No description provided.