-
Notifications
You must be signed in to change notification settings - Fork 65
starknet_os: encrypt data availability #9235
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
base: main-v0.14.1
Are you sure you want to change the base?
Conversation
e543d9c
to
ac81606
Compare
7efa734
to
d2ec44a
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: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @Yoni-Starkware)
crates/starknet_os/src/hints/enum_definition.rs
line 826 at r2 (raw file):
), ( SetEncryptedStart,
Note that adding a new hint will break the unused hint test in python, so you will need to open a pyside PR as well
d2ec44a
to
f73dd0e
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.
@Yoni-Starkware reviewed 1 of 5 files at r1.
Reviewable status: 1 of 5 files reviewed, 3 unresolved discussions (waiting on @einat-starkware and @noaov1)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 267 at r2 (raw file):
if (n_keys == 0) { return (da_start=compressed_start, da_end=compressed_dst); }
Suggestion:
if (n_keys == 0) {
// No public keys - skip the state updates encryption.
return (da_start=compressed_start, da_end=compressed_dst);
}
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 278 at r2 (raw file):
# Assign a temporary segment, to be relocated into the output segment. ids.encrypted_start = segments.add_temp_segment() %}
Move this hint right above the use in encrypted_dst
Suggestion:
local encrypted_start: felt*;
%{
if use_kzg_da:
ids.encrypted_start = segments.add()
else:
# Assign a temporary segment, to be relocated into the output segment.
ids.encrypted_start = segments.add_temp_segment()
%}
let encrypted_dst = encrypted_start;
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: 1 of 5 files reviewed, 5 unresolved discussions (waiting on @einat-starkware and @noaov1)
crates/starknet_os/src/hints/hint_implementation/output.rs
line 147 at r2 (raw file):
x if x == Felt::ZERO => Ok(false), _ => Err(OsHintError::BooleanIdExpected { id: Ids::UseKzgDa, felt: use_kzg_da_felt }), }?;
Please share this code (felt_to_bool)
Code quote:
let use_kzg_da = match use_kzg_da_felt {
x if x == Felt::ONE => Ok(true),
x if x == Felt::ZERO => Ok(false),
_ => Err(OsHintError::BooleanIdExpected { id: Ids::UseKzgDa, felt: use_kzg_da_felt }),
}?;
crates/starknet_os/src/hints/hint_implementation/output.rs
line 149 at r2 (raw file):
}?; if use_kzg_da || n_keys > Felt::ZERO {
Extract the insert_value_from_var_name
outside the if-else. Also in the other hint
0c94207
to
d1f6b58
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: 1 of 5 files reviewed, 3 unresolved discussions (waiting on @einat-starkware and @Yoni-Starkware)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 278 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Move this hint right above the use in
encrypted_dst
Done.
crates/starknet_os/src/hints/hint_implementation/output.rs
line 147 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Please share this code (felt_to_bool)
Done.
ac81606
to
4369b9c
Compare
Artifacts upload workflows: |
4369b9c
to
aca0107
Compare
Benchmark movements: No major performance changes detected. |
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.
@Yoni-Starkware reviewed 1 of 1 files at r2, 3 of 3 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @einat-starkware and @noaov1)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 278 at r2 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Done.
Move this entire block above with encrypted_dst {...
(non blocking)
No description provided.