Skip to content

starknet_os: only hash public key if not 0 #8717

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

Open
wants to merge 1 commit into
base: main-v0.14.1
Choose a base branch
from

Conversation

einat-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@einat-starkware einat-starkware marked this pull request as ready for review August 20, 2025 11:50
Copy link
Contributor Author

einat-starkware commented Aug 20, 2025

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

@einat-starkware einat-starkware changed the base branch from einat/potc_privacy/os_hints_config to graphite-base/8717 August 20, 2025 11:52
@einat-starkware einat-starkware force-pushed the einat/potc_privacy/config_hash_backwards_compatibility branch from 7cd4bed to 3710f16 Compare August 20, 2025 11:52
@einat-starkware einat-starkware changed the base branch from graphite-base/8717 to main-v0.14.1 August 20, 2025 11:52
@einat-starkware einat-starkware force-pushed the einat/potc_privacy/config_hash_backwards_compatibility branch from 3710f16 to 83efe5b Compare August 20, 2025 12:04
Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

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

@noaov1 reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avi-starkware)


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

const STARKNET_OS_CONFIG_VERSION = 'StarknetOsConfig3';
// The pedersen hash of 0, 0.

Note that we also add the length to the hash (i.e. we calculate hash(hash(0,0),2)

Suggestion:

// The pedersen hash of data = [0, 0].

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

    // The (L2) address of the fee token contract.
    fee_token_address: felt,
    // The hash of POTC's public key. Default key is 0, 0 for SN environment.

Suggestion:

    // The hash of the public key used to decrypt the state diff. 
    // The default key is the elliptic-curve point (x = 0, y = 0), as used in StarkNet environments.

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