Skip to content

starknet_patricia: derive Serialize and Deserialize for SubTreeHeight#14446

Merged
itamar-starkware merged 1 commit into
mainfrom
starknet_patricia_subtree_height_serde
Jun 11, 2026
Merged

starknet_patricia: derive Serialize and Deserialize for SubTreeHeight#14446
itamar-starkware merged 1 commit into
mainfrom
starknet_patricia_subtree_height_serde

Conversation

@itamar-starkware

Copy link
Copy Markdown
Contributor

No description provided.

itamar-starkware commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@itamar-starkware itamar-starkware marked this pull request as ready for review June 10, 2026 12:32
@itamar-starkware

Copy link
Copy Markdown
Contributor Author

Why this PR exists

Foundation of a 3-PR stack (#14446#14447#14448) whose goal is to persist the OS-input commitment data (StateCommitmentInfos) in apollo_storage.

Storing that type means (de)serializing it through serde. StateCommitmentInfos contains CommitmentInfo, which has a tree_height: SubTreeHeight field — and SubTreeHeight today derives only a feature-gated Deserialize and no Serialize at all. So the structs that embed it can't be serialized for storage.

This PR makes SubTreeHeight derive Serialize + Deserialize unconditionally (matching how HashOutput already does it), so the types that contain it become storable. No behavior change beyond the added trait impls — it just unblocks #14447 / #14448.

@itamar-starkware itamar-starkware requested a review from yoavGrs June 10, 2026 14:00
Comment thread crates/starknet_patricia/src/patricia_merkle_tree/types.rs
@itamar-starkware itamar-starkware force-pushed the starknet_patricia_subtree_height_serde branch from e2df863 to 107091d Compare June 11, 2026 07:09
@itamar-starkware itamar-starkware force-pushed the starknet_patricia_subtree_height_serde branch from 107091d to 737058f Compare June 11, 2026 10:02

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@itamar-starkware itamar-starkware added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit a58fac0 Jun 11, 2026
25 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.

3 participants