Skip to content

starknet_os: add messages load_into to the aggregator load output hint #8266

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

@TzahiTaub TzahiTaub self-assigned this Jul 28, 2025
@TzahiTaub TzahiTaub marked this pull request as ready for review July 28, 2025 13:33
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 3 files at r1, all commit messages.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @TzahiTaub)


crates/starknet_os/src/hints/hint_implementation/aggregator_utils.rs line 17 at r1 (raw file):

pub(crate) trait ToMaybeRelocatables {
    fn to_maybe_relocatables(&self) -> Vec<MaybeRelocatable>;
}

a bit too general... no?
or will you implement this for other types?

Suggestion:

pub(crate) trait FlattenMessage {
    fn flatten(&self) -> Vec<MaybeRelocatable>;
}

crates/starknet_os/src/hints/hint_implementation/aggregator_utils.rs line 45 at r1 (raw file):

        res
    }
}

where can i see how messages are flattened originally? on the py side?

Code quote:

impl ToMaybeRelocatables for MessageToL1 {
    fn to_maybe_relocatables(&self) -> Vec<MaybeRelocatable> {
        let mut res = Vec::<MaybeRelocatable>::with_capacity(
            MESSAGE_TO_L1_CONST_FIELD_SIZE + self.payload.0.len(),
        );
        res.push(Felt::from(self.from_address).into());
        res.push(Felt::from(self.to_address).into());
        res.push(Felt::from(self.payload.0.len()).into());
        res.extend(self.payload.0.iter().map(|felt| felt.into()));
        res
    }
}

impl ToMaybeRelocatables for MessageToL2 {
    fn to_maybe_relocatables(&self) -> Vec<MaybeRelocatable> {
        let mut res = Vec::<MaybeRelocatable>::with_capacity(
            MESSAGE_TO_L2_CONST_FIELD_SIZE + self.payload.0.len(),
        );
        res.push(Felt::from(self.from_address).into());
        res.push(Felt::from(self.to_address).into());
        res.push((self.nonce.0).into());
        res.push((self.selector.0).into());
        res.push(Felt::from(self.payload.0.len()).into());
        res.extend(self.payload.0.iter().map(|felt| felt.into()));
        res
    }
}

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: 2 of 3 files reviewed, all discussions resolved (waiting on @TzahiTaub)


crates/starknet_os/src/hints/hint_implementation/aggregator_utils.rs line 17 at r1 (raw file):

Previously, dorimedini-starkware wrote…

a bit too general... no?
or will you implement this for other types?

Yes, will implement for other types. See here


crates/starknet_os/src/hints/hint_implementation/aggregator_utils.rs line 45 at r1 (raw file):

Previously, dorimedini-starkware wrote…

where can i see how messages are flattened originally? on the py side?

L1 + similar code in the deprecated syscalls.
L2

@TzahiTaub TzahiTaub changed the base branch from 07-27-starknet_os_initial_impl_of_the_aggregator_get_os_output_hint to graphite-base/8266 July 31, 2025 21:25
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 1 of 3 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)

@TzahiTaub TzahiTaub force-pushed the 07-28-starknet_os_add_messages_load_into_to_the_aggregator_load_output_hint branch from 6281eec to 985fcf6 Compare August 6, 2025 06:18
@TzahiTaub TzahiTaub force-pushed the graphite-base/8266 branch from 3a2a132 to 859a918 Compare August 6, 2025 06:18
@TzahiTaub TzahiTaub changed the base branch from graphite-base/8266 to 07-27-starknet_os_initial_impl_of_the_aggregator_get_os_output_hint August 6, 2025 06:18
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 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)

@TzahiTaub TzahiTaub changed the base branch from 07-27-starknet_os_initial_impl_of_the_aggregator_get_os_output_hint to graphite-base/8266 August 6, 2025 08:23
@TzahiTaub TzahiTaub force-pushed the 07-28-starknet_os_add_messages_load_into_to_the_aggregator_load_output_hint branch from 985fcf6 to 858676b Compare August 6, 2025 08:38
@TzahiTaub TzahiTaub force-pushed the graphite-base/8266 branch from 859a918 to e779328 Compare August 6, 2025 08:38
@graphite-app graphite-app bot changed the base branch from graphite-base/8266 to main-v0.14.0 August 6, 2025 08:38
Copy link

graphite-app bot commented Aug 6, 2025

Merge activity

  • Aug 6, 8:38 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

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 added this pull request to the merge queue Aug 6, 2025
Merged via the queue into main-v0.14.0 with commit 63f9765 Aug 6, 2025
23 of 30 checks passed
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