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

feat(starknet_os): implement hint write_old_block_to_storage #4499

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aner-starkware
Copy link
Contributor

No description provided.

@aner-starkware aner-starkware self-assigned this Feb 26, 2025
@reviewable-StarkWare
Copy link

This change is Reviewable

@aner-starkware aner-starkware force-pushed the aner/hint_get_old_block_number_and_hash branch from 598ca1b to de13c55 Compare February 26, 2025 14:45
@aner-starkware aner-starkware force-pushed the aner/hint_write_old_block_to_storage branch from 435cdab to bea09b5 Compare February 27, 2025 08:13
@aner-starkware aner-starkware force-pushed the aner/hint_get_old_block_number_and_hash branch from 2f822b9 to f5f6e35 Compare February 27, 2025 09:42
@aner-starkware aner-starkware force-pushed the aner/hint_write_old_block_to_storage branch from bea09b5 to 86f0419 Compare February 27, 2025 09:57
@aner-starkware aner-starkware force-pushed the aner/hint_get_old_block_number_and_hash branch from f5f6e35 to e773bb4 Compare February 27, 2025 10:13
@aner-starkware aner-starkware force-pushed the aner/hint_write_old_block_to_storage branch from 86f0419 to d035254 Compare March 4, 2025 08:04
Copy link

github-actions bot commented Mar 4, 2025

Benchmark movements:
full_committer_flow performance improved 😺
full_committer_flow time: [30.316 ms 30.359 ms 30.403 ms]
change: [-3.7842% -3.0663% -2.6128%] (p = 0.00 < 0.05)
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild

@aner-starkware aner-starkware force-pushed the aner/hint_write_old_block_to_storage branch from ee0b4d4 to 26a342b Compare March 4, 2025 09:26
@aner-starkware aner-starkware changed the base branch from aner/hint_get_old_block_number_and_hash to main March 4, 2025 09:27
@aner-starkware aner-starkware force-pushed the aner/hint_write_old_block_to_storage branch from 26a342b to 4abdd91 Compare March 4, 2025 09:37
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 4 of 4 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware)


crates/starknet_os/src/hints/error.rs line 50 at r3 (raw file):

    MemoryError(#[from] MemoryError),
    #[error("Convert {n_bits} bits for {type_name}.")]
    StatelessCompressionOverflow { n_bits: usize, type_name: String },

these are not alphabetized... while you're here can you fix it?

Code quote:

    #[error("Unknown hint string: {0}")]
    UnknownHint(String),
    #[error("The identifier {0:?} has no full name.")]
    IdentifierHasNoFullName(Box<Identifier>),
    #[error("The identifier {0:?} has no members.")]
    IdentifierHasNoMembers(Box<Identifier>),
    #[error(transparent)]
    MathError(#[from] MathError),
    #[error(transparent)]
    MemoryError(#[from] MemoryError),
    #[error("Convert {n_bits} bits for {type_name}.")]
    StatelessCompressionOverflow { n_bits: usize, type_name: String },

crates/starknet_os/src/hints/hint_implementation/execution.rs line 301 at r3 (raw file):

        get_integer_from_var_name(Ids::OldBlockHash.into(), vm, ids_data, ap_tracking)?;

    log::debug!("writing block number: {} -> block hash: {}", old_block_number, old_block_hash);

this is not in the original hint, right? why do you log it?

Code quote:

log::debug!("writing block number: {} -> block hash: {}", old_block_number, old_block_hash);

@aner-starkware
Copy link
Contributor Author

crates/starknet_os/src/hints/hint_implementation/execution.rs line 301 at r3 (raw file):

Previously, dorimedini-starkware wrote…

this is not in the original hint, right? why do you log it?

It's in the Moonsong hint, though.

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: all files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @nimrod-starkware)


crates/starknet_os/src/hints/hint_implementation/execution.rs line 301 at r3 (raw file):

Previously, aner-starkware wrote…

It's in the Moonsong hint, though.

ok, not strictly necessary but nice to have

@aner-starkware
Copy link
Contributor Author

crates/starknet_os/src/hints/error.rs line 50 at r3 (raw file):

Previously, dorimedini-starkware wrote…

these are not alphabetized... while you're here can you fix it?

https://reviewable.io/reviews/starkware-libs/sequencer/4651

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 @nimrod-starkware)

@aner-starkware aner-starkware force-pushed the aner/hint_write_old_block_to_storage branch 2 times, most recently from 3452828 to e530163 Compare March 4, 2025 15:08
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 4 of 4 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)

@aner-starkware aner-starkware force-pushed the aner/hint_write_old_block_to_storage branch from e530163 to 706d7b2 Compare March 4, 2025 15:48
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 4 of 4 files at r8, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)

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.

3 participants