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

jmt: allow incremental tree overwrites for a given version #110

Merged
merged 7 commits into from
Mar 23, 2024

Conversation

erwanor
Copy link
Member

@erwanor erwanor commented Mar 13, 2024

Context:
Performing offline state migrations without incrementing the tree version: penumbra-zone/penumbra#3506.

This PR adds:

  • TreeCache::new_overwrite gated behind a migration feature. This method instantiate a TreeCache against a root node key defined at the current version of the tree (rather than the previous one).
  • JellyfishMerkleTree::append_value_set gated behind a migration feature. This method appends key/values against the current tree (using new_overwrite) and return the corresponding node batch.

We validated this approach in penumbra-zone/penumbra#4053

@erwanor erwanor marked this pull request as ready for review March 21, 2024 14:47
@erwanor erwanor requested a review from hdevalence March 21, 2024 14:49
@conorsch
Copy link
Contributor

Also performed implicit validation of behavior here, by testing a combination of penumbra-zone/penumbra#4053 & penumbra-zone/penumbra#4055.

Copy link
Member

@hdevalence hdevalence left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me!

@erwanor erwanor merged commit ac42856 into main Mar 23, 2024
10 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