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

[WIP] Add ability to get merkle root of P-Chain state #2352

Merged
merged 26 commits into from
Dec 1, 2023

Conversation

danlaine
Copy link

@danlaine danlaine commented Nov 21, 2023

Why this should be merged

We will eventually include the merkle root ID in each block. Therefore we need to be able to get the merkle root ID of a diff. Namely, when creating a block, we will calculate what the merkle root ID would be if the block were accepted, and that will be the block's ID. This PR adds the ability to get the merkle root ID of a diff / state.

How this works

Add NewView method to interface, and implement it on state and diff.

How this was tested

TODO.

@danlaine danlaine added storage This involves storage primitives merkledb labels Nov 21, 2023
@danlaine danlaine self-assigned this Nov 21, 2023
@danlaine danlaine marked this pull request as ready for review November 28, 2023 22:05
@danlaine danlaine marked this pull request as draft November 28, 2023 22:08
@danlaine danlaine marked this pull request as ready for review December 1, 2023 22:12
@danlaine danlaine merged commit 093647c into pchain_merkleDB Dec 1, 2023
14 checks passed
@danlaine danlaine deleted the pchain_merkleDB_view branch December 1, 2023 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merkledb storage This involves storage primitives
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant