-
Notifications
You must be signed in to change notification settings - Fork 58
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
starknet_os: add messages load_into to the aggregator load output hint #8266
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 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
}
}
8a67d17
to
3a2a132
Compare
beaa03c
to
6281eec
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.
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?
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 1 of 3 files at r1.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
6281eec
to
985fcf6
Compare
3a2a132
to
859a918
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 3 of 3 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
985fcf6
to
858676b
Compare
859a918
to
e779328
Compare
Merge activity
|
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)
No description provided.