-
Notifications
You must be signed in to change notification settings - Fork 66
OS 0.14.1 audit. #9393
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.0
Are you sure you want to change the base?
OS 0.14.1 audit. #9393
Conversation
Signed-off-by: Dori Medini <[email protected]>
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 all commit messages.
Reviewable status: 0 of 18 files reviewed, all discussions resolved
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 2 of 18 files at r1, 3 of 6 files at r2.
Reviewable status: 5 of 18 files reviewed, 5 unresolved discussions
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 109 at r2 (raw file):
let (local os_outputs: OsOutput*) = alloc(); local initial_txs_range_check_ptr = nondet %{ segments.add_temp_segment() %}; let txs_range_check_ptr = initial_txs_range_check_ptr;
Move right above execute_blocks
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 176 at r2 (raw file):
os_output=final_os_output, replace_keys_with_aliases=TRUE, n_keys=n_keys,
Suggestion:
n_public_keys=
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 489 at r2 (raw file):
key=expected_casm_hash_v2, ); let compiled_class: CompiledClass* = compiled_class_fact.compiled_class;
Consider move to hint
Code quote:
local class_hash;
local expected_casm_hash_v2;
%{ GetClassHashAndCompiledClassHashV2 %}
// Find the compiled class fact using the guessed v2 hash.
static_assert CompiledClassFact.hash == 0;
let (compiled_class_fact: CompiledClassFact*) = find_element(
array_ptr=block_context.compiled_class_facts,
elm_size=CompiledClassFact.SIZE,
n_elms=block_context.n_compiled_class_facts,
key=expected_casm_hash_v2,
);
let compiled_class: CompiledClass* = compiled_class_fact.compiled_class;
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/contract_class/blake_compiled_class_hash.cairo
line 226 at r2 (raw file):
) { let inner_hash_state = hash_init(); hash_entry_points_inner{hash_state=inner_hash_state, range_check_ptr=range_check_ptr}(
Remove in this file
Code quote:
range_check_ptr=range_check_ptr
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/contract_class/blake_compiled_class_hash.cairo
line 246 at r2 (raw file):
// Hash builtins. hash_update_with_nested_hash{hash_state=hash_state, range_check_ptr=range_check_ptr}(
Remove
Code quote:
{hash_state=hash_state, range_check_ptr=range_check_ptr}
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 4 of 18 files at r1, 1 of 6 files at r2.
Reviewable status: 10 of 18 files reviewed, 6 unresolved discussions
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 489 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Consider move to hint
Do it to save the extra full contract hash. Load a new bytecode ptr here
a discussion (no related file):
Check the diff in common as well. (mostly blake)
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: 10 of 18 files reviewed, 6 unresolved discussions
a discussion (no related file):
Previously, Yoni-Starkware (Yoni) wrote…
Check the diff in common as well. (mostly blake)
Take the diff from the prev audited version (e.g. sha bugfix)
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 6 of 18 files at r1, 2 of 6 files at r2.
Reviewable status: all files reviewed, 32 unresolved discussions
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os_config/os_config.cairo
line 30 at r2 (raw file):
func get_starknet_os_config_hash{hash_ptr: HashBuiltin*}(starknet_os_config: StarknetOsConfig*) -> ( starknet_os_config_hash: felt ) {
Add static_assert that the SN OS config struct size is 3. Comment that the "if" should be removed if another optional field is added
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os_config/os_config.cairo
line 60 at r2 (raw file):
) { if (n_keys == 0) { return (public_keys_hash=0);
Use the default constant
Code quote:
ash=0);
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 15 at r2 (raw file):
dw BLAKE2S_FINALIZE_INSTRUCTION; // Increment AP after blake opcode. ap += 1;
Talk to @ilyalesokhin-starkware or @liorgold2 and change the enocding
Suggestion:
func blake_with_opcode_for_single_16_length_word(data: felt*, out: felt*, initial_state: felt*) {
const BLAKE2S_FINALIZE_INSTRUCTION = OFF_MINUS_1 * COUNTER_OFFSET + OFF_MINUS_3 * STATE_OFFSET +
OFF_MINUS_2 * MESSAGE_OFFSET + BLAKE2S_AP_FLAGS * FLAGS_OFFSET + BLAKE2S_FINALIZE_OPCODE_EXT *
OPCODE_EXT_OFFSET;
tempvar counter = 64;
static_assert data == [fp - 5];
[ap] = out;
dw BLAKE2S_FINALIZE_INSTRUCTION;
// Increment AP after blake opcode.
ap += 1;
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 40 at r2 (raw file):
// Encodes a list of felt252s to a list of u32s, each felt is mapped to eight u32s. // Returns the length of the resulting list of u32s. func naive_encode_felt252s_to_u32s(
Clean to support length 1 arrays
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 42 at r2 (raw file):
func naive_encode_felt252s_to_u32s( packed_values_len: felt, packed_values: felt*, unpacked_u32s: felt* ) -> felt {
No need to return the length since it's known from the input.
Code quote:
) -> felt {
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 63 at r2 (raw file):
2 ** (32 * 4) * (out[3] + 2 ** 32 * out[2]) + 2 ** (32 * 6) * (out[1] + 2 ** 32 * out[0]) );
Use felt_from...
Code quote:
assert packed_values[0] = (
(out[7] + (2 ** 32 * out[6])) +
2 ** (32 * 2) * (out[5] + 2 ** 32 * out[4]) +
2 ** (32 * 4) * (out[3] + 2 ** 32 * out[2]) +
2 ** (32 * 6) * (out[1] + 2 ** 32 * out[0])
);
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 72 at r2 (raw file):
// Gets a felt that represent a 256-bit unsigned integer stored as an array of eight 32-bit unsigned integers // represented in little-endian notation. Return the felt representation of the integer modulo prime. func u256_to_felt(u256: felt*) -> felt {
Also document
Suggestion:
felt_from_be_u32s
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 72 at r2 (raw file):
// Gets a felt that represent a 256-bit unsigned integer stored as an array of eight 32-bit unsigned integers // represented in little-endian notation. Return the felt representation of the integer modulo prime. func u256_to_felt(u256: felt*) -> felt {
Change to be. Use also above
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 53 at r2 (raw file):
// Guess the committee's public keys. local public_keys: felt*; local n_keys: felt;
Suggestion:
n_public_keys
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 55 at r2 (raw file):
local n_keys: felt; %{ public_keys = program_input["public_keys"] if program_input["public_keys"] is not None else []
Suggestion:
rogram_input.get("public_keys",[])
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 59 at r2 (raw file):
ids.public_keys = 0 else: ids.public_keys = segments.gen_arg(public_keys)
Suggestion:
ids.public_keys = segments.gen_arg(public_keys)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/block_context.cairo
line 91 at r2 (raw file):
chain_id=nondet %{ os_hints_config.starknet_os_config.chain_id %}, fee_token_address=nondet %{ os_hints_config.starknet_os_config.fee_token_address %}, public_keys_hash=public_keys_hash,
Move outside. Consider changing it to ptr
Code quote:
starknet_os_config=StarknetOsConfig(
chain_id=nondet %{ os_hints_config.starknet_os_config.chain_id %},
fee_token_address=nondet %{ os_hints_config.starknet_os_config.fee_token_address %},
public_keys_hash=public_keys_hash,
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 25 at r2 (raw file):
assert_le_felt(sn_private_keys[0], StarkCurve.ORDER - 1); return validate_private_keys(n_keys=n_keys - 1, sn_private_keys=sn_private_keys + 1);
Suggestion:
sn_private_keys=&sn_private_keys[1]);
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 29 at r2 (raw file):
// Computes the public keys from the private keys by multiplying by the EC group generator. func compute_public_keys{range_check_ptr, ec_op_ptr: EcOpBuiltin*, encrypted_dst: felt*}(
Suggestion:
compute_sn_public_keys
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 29 at r2 (raw file):
// Computes the public keys from the private keys by multiplying by the EC group generator. func compute_public_keys{range_check_ptr, ec_op_ptr: EcOpBuiltin*, encrypted_dst: felt*}(
Merge validate_private_keys into this function
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 52 at r2 (raw file):
alloc_locals; let (public_key) = recover_y(public_keys[0]);
Comment why it's okay to use recover y (can be +-y)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 56 at r2 (raw file):
let (__fp__, _) = get_fp_and_pc(); let (local shared_secret) = ec_mul(m=sn_private_keys[0], p=public_key); // TODO(Avi, 10/9/2025): Switch to naive encoding once the function is available.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 102 at r2 (raw file):
index: felt, encoded_symmetric_key: felt*, blake_output: felt*,
Rename in common as well
Suggestion:
blake_segment
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 108 at r2 (raw file):
return (); } let blake_encoding_start = blake_output;
Suggestion:
blake_input
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 131 at r2 (raw file):
let blake_output = &blake_output[8]; // Calculate blake hash modulo prime. blake_with_opcode_for_single_16_length_word(
Comment why using mod PRIME here is good enough
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 134 at r2 (raw file):
data=blake_encoding_start, out=blake_output, initial_state=initial_state ); let hash = u256_to_felt(u256=blake_output);
Move inside blake_with_opcode_for_single_16_length_word
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 122 at r2 (raw file):
local public_keys: felt*; local n_keys: felt;
Suggestion:
n_public_keys
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 277 at r2 (raw file):
local sn_private_keys: felt*; %{ generate_keys_from_hash(ids.compressed_start, ids.compressed_dst, ids.n_keys) %} validate_private_keys(n_keys=n_keys, sn_private_keys=sn_private_keys);
Suggestion:
validate_sn_private_k
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 292 at r2 (raw file):
let encrypted_dst = &encrypted_dst[1]; with encrypted_dst {
Consider renaming to output_start, output.
Code quote:
encrypted_dst
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 293 at r2 (raw file):
with encrypted_dst { compute_public_keys(n_keys=n_keys, sn_private_keys=sn_private_keys);
Suggestion:
output_sn_public_keys
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 294 at r2 (raw file):
with encrypted_dst { compute_public_keys(n_keys=n_keys, sn_private_keys=sn_private_keys); encrypt_symmetric_key(
Suggestion:
output_encrypted_symmetric_key
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, 32 unresolved discussions (waiting on @ilyalesokhin-starkware, @liorgold2, and @Yoni-Starkware)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/block_context.cairo
line 91 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Move outside. Consider changing it to ptr
More info: we do not need to define it for each block (as all the blocks have the same starknet config).
Changing to pointer to minimize cairo instructions? @Yoni-Starkware
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 131 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Comment why using mod PRIME here is good enough
Please ask @liorgold2
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 489 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Do it to save the extra full contract hash. Load a new bytecode ptr here
More context: we don't use the coupling between the compiled_class_hash_v2 and the compiled class.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 59 at r2 (raw file):
ids.public_keys = 0 else: ids.public_keys = segments.gen_arg(public_keys)
Need to change the hint implementation as well (see load_public_keys_into_memory
).
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, 17 unresolved discussions (waiting on @ilyalesokhin-starkware, @liorgold2, and @Yoni-Starkware)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 59 at r2 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Need to change the hint implementation as well (see
load_public_keys_into_memory
).
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 72 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Change to be. Use also above
Talked to Lior, we will change the encoding to le as well
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 109 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Move right above execute_blocks
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 489 at r2 (raw file):
Previously, noaov1 (Noa Oved) wrote…
More context: we don't use the coupling between the compiled_class_hash_v2 and the compiled class.
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/contract_class/blake_compiled_class_hash.cairo
line 226 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Remove in this file
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/contract_class/blake_compiled_class_hash.cairo
line 246 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Remove
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 277 at r2 (raw file):
local sn_private_keys: felt*; %{ generate_keys_from_hash(ids.compressed_start, ids.compressed_dst, ids.n_keys) %} validate_private_keys(n_keys=n_keys, sn_private_keys=sn_private_keys);
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 293 at r2 (raw file):
with encrypted_dst { compute_public_keys(n_keys=n_keys, sn_private_keys=sn_private_keys);
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 294 at r2 (raw file):
with encrypted_dst { compute_public_keys(n_keys=n_keys, sn_private_keys=sn_private_keys); encrypt_symmetric_key(
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 25 at r2 (raw file):
assert_le_felt(sn_private_keys[0], StarkCurve.ORDER - 1); return validate_private_keys(n_keys=n_keys - 1, sn_private_keys=sn_private_keys + 1);
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 29 at r2 (raw file):
// Computes the public keys from the private keys by multiplying by the EC group generator. func compute_public_keys{range_check_ptr, ec_op_ptr: EcOpBuiltin*, encrypted_dst: felt*}(
Done,
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 56 at r2 (raw file):
let (__fp__, _) = get_fp_and_pc(); let (local shared_secret) = ec_mul(m=sn_private_keys[0], p=public_key); // TODO(Avi, 10/9/2025): Switch to naive encoding once the function is available.
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 53 at r2 (raw file):
// Guess the committee's public keys. local public_keys: felt*; local n_keys: felt;
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 55 at r2 (raw file):
local n_keys: felt; %{ public_keys = program_input["public_keys"] if program_input["public_keys"] is not None else []
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 122 at r2 (raw file):
local public_keys: felt*; local n_keys: felt;
Done.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 176 at r2 (raw file):
os_output=final_os_output, replace_keys_with_aliases=TRUE, n_keys=n_keys,
Done.
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, 17 unresolved discussions (waiting on @ilyalesokhin-starkware, @liorgold2, @noaov1, and @Yoni-Starkware)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 53 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Done.
With this PR:
#9449
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 55 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Done.
With this PR:
#9449
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/aggregator/main.cairo
line 59 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Done.
With this PR:
#9449
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/block_context.cairo
line 91 at r2 (raw file):
Previously, noaov1 (Noa Oved) wrote…
More info: we do not need to define it for each block (as all the blocks have the same starknet config).
Changing to pointer to minimize cairo instructions? @Yoni-Starkware
In PR
#9489
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 15 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Talk to @ilyalesokhin-starkware or @liorgold2 and change the enocding
In PR
#9477
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 42 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
No need to return the length since it's known from the input.
In PR
#9487
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 63 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Use felt_from...
In PR
#9487
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 72 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Also document
In PR
le instead of be
#9487
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 72 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Talked to Lior, we will change the encoding to le as well
In PR:
[https://github.com//pull/9487
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 176 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Done.
With this PR:
#9449
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os.cairo
line 489 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Done.
With This PR:
#9438
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/output.cairo
line 277 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Done.
With this PR:
#9449
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/contract_class/blake_compiled_class_hash.cairo
line 226 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Done.
In PR:
#9489
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/contract_class/blake_compiled_class_hash.cairo
line 246 at r2 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Done.
In PR:
#9489
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, 17 unresolved discussions (waiting on @ilyalesokhin-starkware, @liorgold2, @noaov1, and @Yoni-Starkware)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/encrypt.cairo
line 134 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Move inside blake_with_opcode_for_single_16_length_word
Moving the let hash = u256_to_felt(u256=blake_output);
inside blake\_with\_opcode\_for\_single\_16\_length\_word
is problematic because when we want to write the reference of the output pointer is revoked. It can probably be solved by examining AP-1, as this is where the output is saved; however, I haven't managed to resolve this issue.
Another proposal I have is moving the whole section from // Write encoded symmetric key to Blake output.
to let hash = u256_to_felt(u256=blake_output);
to another function in naive blake and use it inside encrypt inner
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, 17 unresolved discussions (waiting on @ilyalesokhin-starkware, @liorgold2, @noaov1, and @Yoni-Starkware)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os_config/os_config.cairo
line 30 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Add static_assert that the SN OS config struct size is 3. Comment that the "if" should be removed if another optional field is added
In PR
#9502
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/os_config/os_config.cairo
line 60 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Use the default constant
In PR
#9502
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, 17 unresolved discussions (waiting on @ilyalesokhin-starkware, @liorgold2, @noaov1, and @Yoni-Starkware)
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo
line 40 at r2 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Clean to support length 1 arrays
In PR:
https://reviewable.io/reviews/starkware-libs/sequencer/9508
No description provided.