Skip to content

Conversation

@amosStarkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Copy link
Collaborator Author

amosStarkware commented Jan 13, 2026

@amosStarkware amosStarkware self-assigned this Jan 13, 2026
@amosStarkware amosStarkware requested a review from yoavGrs January 13, 2026 09:24
@amosStarkware amosStarkware marked this pull request as ready for review January 13, 2026 09:24
@amosStarkware amosStarkware force-pushed the 01-13-apollo_batcher_use_genesis_block_hash_for_hash_of_block_9 branch from e0a0fc4 to 4cb0f64 Compare January 13, 2026 10:32
@amosStarkware amosStarkware changed the title apollo_batcher: use genesis block hash for hash of block 9 apollo_batcher: set parent hash to BlockHash::GENESIS for genesis block Jan 13, 2026
@amosStarkware amosStarkware changed the title apollo_batcher: set parent hash to BlockHash::GENESIS for genesis block apollo_batcher: use genesis block hash for hash of block 9 Jan 13, 2026
@amosStarkware amosStarkware changed the title apollo_batcher: use genesis block hash for hash of block 9 apollo_batcher: use genesis block hash for hash of block 0 Jan 13, 2026
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @yoavGrs).


crates/starknet_api/src/block.rs line 281 at r2 (raw file):

impl BlockHash {
    // TODO(Amos): Use this anywhere the genesis block hash is used.
    pub const GENESIS: Self = Self(StarkHash::ZERO);

genesis block is block zero, which has a "real" hash; StarkHash::ZERO is the "hash of it's parent"

Suggestion:

pub const GENESIS_PARENT_HASH: Self = Self(StarkHash::ZERO);

Copy link
Collaborator Author

@amosStarkware amosStarkware left a comment

Choose a reason for hiding this comment

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

@amosStarkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @yoavGrs).


crates/starknet_api/src/block.rs line 281 at r2 (raw file):

Previously, dorimedini-starkware wrote…

genesis block is block zero, which has a "real" hash; StarkHash::ZERO is the "hash of it's parent"

are you sure?
here GENESIS_HASH is the hash of block -1

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @yoavGrs).


crates/starknet_api/src/block.rs line 281 at r2 (raw file):

Previously, amosStarkware wrote…

are you sure?
here GENESIS_HASH is the hash of block -1

hmmm... seems misnamed there, IMO.
see here: "genesis hash" is the parent hash of the "first block hash".
genesis block is block zero.
I would rename here, maybe ask whoever wrote the original GENESIS_HASH constant if that' what they meant?
(also may be worth replacing all usages of the existing GENESIS_HASH with your new const

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @yoavGrs).


crates/starknet_api/src/block.rs line 281 at r2 (raw file):

Previously, dorimedini-starkware wrote…

hmmm... seems misnamed there, IMO.
see here: "genesis hash" is the parent hash of the "first block hash".
genesis block is block zero.
I would rename here, maybe ask whoever wrote the original GENESIS_HASH constant if that' what they meant?
(also may be worth replacing all usages of the existing GENESIS_HASH with your new const

(not in this PR of course)

@amosStarkware amosStarkware force-pushed the 01-13-apollo_batcher_use_genesis_block_hash_for_hash_of_block_9 branch from 4cb0f64 to f9a81fb Compare January 13, 2026 12:14
Copy link
Collaborator Author

@amosStarkware amosStarkware left a comment

Choose a reason for hiding this comment

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

@amosStarkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @yoavGrs).


crates/starknet_api/src/block.rs line 281 at r2 (raw file):

Previously, dorimedini-starkware wrote…

(not in this PR of course)

Done.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 2 files and all commit messages, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yoavGrs).

@amosStarkware amosStarkware added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main-v0.14.1-committer with commit d6cde97 Jan 13, 2026
22 of 24 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants