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(pruning): Record L1 batch root hash in pruning logs #3266

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

slowli
Copy link
Contributor

@slowli slowli commented Nov 12, 2024

What ❔

Records root hashes of the last hard-pruned L1 batch in pruning logs.

Why ❔

This allows to check tree integrity after recovery after pruning.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

@@ -137,6 +188,7 @@ impl PruningDal<'_, '_> {
Ok(())
}

/// Does not insert pruning logs; the caller is responsible to do this!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Subjectively, this change makes sense since the data flow becomes quite complicated otherwise (there are 2 sources of state root hashes). WDYT?

@slowli slowli marked this pull request as ready for review November 12, 2024 18:37
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.

1 participant