Skip to content

Conversation

meship-starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@meship-starkware meship-starkware marked this pull request as ready for review October 5, 2025 06:53
Copy link
Collaborator Author

meship-starkware commented Oct 5, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yoni-Starkware reviewed 3 of 5 files at r1, all commit messages.
Reviewable status: 3 of 5 files reviewed, 3 unresolved discussions


crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo line 6 at r1 (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 felt_from_le_u32s(u256: felt*) -> felt {

Suggestion:

u32s

crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo line 9 at r1 (raw file):

    let hash = u256[7] * 2 ** 224 + u256[6] * 2 ** 192 + u256[5] * 2 ** 160 + u256[4] * 2 ** 128 +
        u256[3] * 2 ** 96 + u256[2] * 2 ** 64 + u256[1] * 2 ** 32 + u256[0];
    return hash;

Suggestion:

    let value = u256[7] * 2 ** 224 + u256[6] * 2 ** 192 + u256[5] * 2 ** 160 + u256[4] * 2 ** 128 +
        u256[3] * 2 ** 96 + u256[2] * 2 ** 64 + u256[1] * 2 ** 32 + u256[0];
    return value;

crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/naive_blake.cairo line 97 at r1 (raw file):

    );
    let (local blake_output: felt*) = alloc();
    blake_with_opcode(len=8 * data_len, data=encoded_data, out=blake_output);

Define encoded_data_len (with let)

Code quote:

8 * data_len

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