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: scroll parallel state root #100

Merged
merged 9 commits into from
Dec 24, 2024
Merged

Conversation

greged93
Copy link
Collaborator

Adds the parallel state root computation to the state-commitment crate for live syncing root compute.

Signed-off-by: Gregory Edison <gregory.edison1993@gmail.com>
Signed-off-by: Gregory Edison <gregory.edison1993@gmail.com>
Signed-off-by: Gregory Edison <gregory.edison1993@gmail.com>
@greged93 greged93 force-pushed the feat/parallel-state-root branch from a70ce81 to 1414d3d Compare December 21, 2024 11:09
Signed-off-by: Gregory Edison <gregory.edison1993@gmail.com>
Copy link
Collaborator

@frisitano frisitano left a comment

Choose a reason for hiding this comment

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

Looks good. Left a comment inline around packing nibbles. In scroll we use a bit representation for the key so when packing we should use the pack_bits method. I think the reason you don't catch it in the test is because you do not provide a TrieInput when invoking the ParallelStateRoot. Maybe you can add a test which sequentially computes the state root upon updates to state.

crates/scroll/state-commitment/src/root/parallel.rs Outdated Show resolved Hide resolved
crates/scroll/state-commitment/src/root/parallel.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@frisitano frisitano left a comment

Choose a reason for hiding this comment

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

Thanks, looks good! Left one comment about opening an issue for no_std support. LGTM!

.github/assets/check_wasm.sh Show resolved Hide resolved
@frisitano frisitano merged commit 944bfd0 into scroll Dec 24, 2024
45 checks passed
@frisitano frisitano deleted the feat/parallel-state-root branch December 24, 2024 11:24
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