Skip to content

Conversation

@Yoni-Starkware
Copy link
Collaborator

…cuted class hashes

@reviewable-StarkWare
Copy link

This change is Reviewable

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 3 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware and @Yoni-Starkware).


a discussion (no related file):
looks like this PR could have been split (field rename at least)


crates/starknet_os_flow_tests/src/utils.rs line 464 at r1 (raw file):

    contracts_trie_root_hashes: RootHashes,
) -> StarknetForestProofs {
    let class_hashes: Vec<ClassHash> = state_maps.declared_contracts.keys().cloned().collect();

why is this enough now?
what about replaced classes?

Code quote:

let class_hashes: Vec<ClassHash> = state_maps.declared_contracts.keys().cloned().collect();

Copy link
Collaborator Author

@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 made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @nimrod-starkware).


crates/starknet_os_flow_tests/src/utils.rs line 464 at r1 (raw file):

Previously, dorimedini-starkware wrote…

why is this enough now?
what about replaced classes?

This was always enough. The compiled_class_hashes is not enough since it's not maintained by all state readers.

declared_contracts is updated upon every access to contract classes.

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 and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware).


crates/starknet_os_flow_tests/src/utils.rs line 464 at r1 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

This was always enough. The compiled_class_hashes is not enough since it's not maintained by all state readers.

declared_contracts is updated upon every access to contract classes.

so it's a bad field name...?
maybe it was needed on 0.14.1 branch to support migration?

Copy link
Collaborator Author

@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 made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware).


crates/starknet_os_flow_tests/src/utils.rs line 464 at r1 (raw file):

Previously, dorimedini-starkware wrote…

so it's a bad field name...?
maybe it was needed on 0.14.1 branch to support migration?

compiled_class_hashes holds hashes of newly declared contracts, and potentially reads of existing one (depending on reader)

declared_contracts is a boolean mapping and is mantained by the blockifier, so every executed class should be there.

The issue with compiled_class_hashes is really annoying. We didn't want to obligate nodes to be familiar with compiled class hashes. That's why we needed to add the additional delcare mapping

@Yoni-Starkware Yoni-Starkware added this pull request to the merge queue Jan 4, 2026
Copy link
Collaborator Author

@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 made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware).


a discussion (no related file):

Previously, dorimedini-starkware wrote…

looks like this PR could have been split (field rename at least)

Sorry, noted for next PRs

Merged via the queue into main with commit d630dac Jan 4, 2026
13 checks passed
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.

4 participants