Skip to content
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

feat(starknet_patricia,starknet_committer): stop using custom CompiledClassHash type #4005

Open
wants to merge 1 commit into
base: 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type
Choose a base branch
from

Conversation

dorimedini-starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@dorimedini-starkware dorimedini-starkware marked this pull request as ready for review February 6, 2025 11:27
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from 24c6121 to 1600d5f Compare February 6, 2025 11:29
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from 3e23729 to 57f6553 Compare February 6, 2025 11:29
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from 1600d5f to e9b4681 Compare February 6, 2025 11:35
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from 57f6553 to bb71885 Compare February 6, 2025 11:35
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from e9b4681 to 5c5c2af Compare February 6, 2025 11:42
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from bb71885 to de524e4 Compare February 6, 2025 11:42
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from 5c5c2af to 0848939 Compare February 6, 2025 11:44
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from de524e4 to 8bfff93 Compare February 6, 2025 11:44
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from 0848939 to 5d0eaaa Compare February 6, 2025 13:32
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from 8bfff93 to ddac21a Compare February 6, 2025 13:32
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from 5d0eaaa to d97391c Compare February 6, 2025 13:42
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from ddac21a to 40b45c6 Compare February 6, 2025 13:42
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from d97391c to d75a24c Compare February 6, 2025 14:00
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from 40b45c6 to 6ea4684 Compare February 6, 2025 14:01
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from d75a24c to 6743852 Compare February 6, 2025 15:32
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from 6ea4684 to f7b5c78 Compare February 6, 2025 15:32
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from 6743852 to 513011d Compare February 6, 2025 15:53
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from f7b5c78 to 3cf33b1 Compare February 6, 2025 15:53
Copy link
Collaborator Author

@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.

Reviewable status: 0 of 17 files reviewed, all discussions resolved


crates/starknet_patricia/src/patricia_merkle_tree/node_data/leaf_impls.rs line 0 at r1 (raw file):
problem:

  1. the CompiledClassHash is defined in starknet_api
  2. the Storage traits DBObject, Deserializable are defined in starknet_patricia (for the commitment computation abstraction)
  3. the starknet_committer requires the CompiledClassHash implement these traits.

we can't implement (2) for (1) in starknet_committer... we can implement it in starknet_patricia, but that hurts the separation (the generic patricia crate is now "aware" that the compiled class hash can be a leaf type)...

hopefully we will be able to remove these storage traits in the future if we work with other APIs..?

Copy link
Collaborator Author

@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.

Reviewable status: 0 of 17 files reviewed, all discussions resolved


a discussion (no related file):
py side

Copy link
Collaborator Author

@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.

Reviewable status: 0 of 17 files reviewed, all discussions resolved


crates/starknet_patricia/src/patricia_merkle_tree/node_data/leaf_impls.rs line at r1 (raw file):

Previously, dorimedini-starkware wrote…

problem:

  1. the CompiledClassHash is defined in starknet_api
  2. the Storage traits DBObject, Deserializable are defined in starknet_patricia (for the commitment computation abstraction)
  3. the starknet_committer requires the CompiledClassHash implement these traits.

we can't implement (2) for (1) in starknet_committer... we can implement it in starknet_patricia, but that hurts the separation (the generic patricia crate is now "aware" that the compiled class hash can be a leaf type)...

hopefully we will be able to remove these storage traits in the future if we work with other APIs..?

this PR should wait until this stack is merged, after which we will be able to implement storage related traits directly in the starknet_api crate.
Should probably be gated behind a patricia_storage feature though

@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_nonce_type branch from 513011d to 4988bc6 Compare February 11, 2025 20:37
@dorimedini-starkware dorimedini-starkware force-pushed the 02-06-feat_starknet_patricia_starknet_committer_stop_using_custom_compiledclasshash_type branch from 3cf33b1 to 566e7e6 Compare February 11, 2025 20:37
Copy link

Artifacts upload workflows:

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.

2 participants