Thanks to visit codestin.com
Credit goes to github.com

Skip to content

replace Root with Root_(hash, common) in persistent database#16656

Merged
glyh merged 2 commits into
compatiblefrom
corvo/persistent-frontier-split-key-root
Feb 21, 2025
Merged

replace Root with Root_(hash, common) in persistent database#16656
glyh merged 2 commits into
compatiblefrom
corvo/persistent-frontier-split-key-root

Conversation

@glyh
Copy link
Copy Markdown
Member

@glyh glyh commented Feb 21, 2025

This is the same PR as #16650 , just from a branch in upstream so CI is happy.


This is a follow up for #16624

This PR only contains patch to be merged into compatible. It's compatible because we try to replace Root with (Root_hash, Root_common) when:

  1. initializing a new DB;
  2. trying to moving the root;
  3. trying to query root or root_hash

That means attempting to perform transactions on old persistence database, the bottleneck will occur once and not after.

Here's the PR for the testcase.

@svv232
Copy link
Copy Markdown
Member

svv232 commented Feb 21, 2025

these are the same commits as https://github.com/MinaProtocol/mina/pull/16650/commits, therefore i will approve

@glyh
Copy link
Copy Markdown
Member Author

glyh commented Feb 21, 2025

!ci-build-me

@glyh glyh merged commit 5b01bd0 into compatible Feb 21, 2025
@glyh glyh deleted the corvo/persistent-frontier-split-key-root branch February 21, 2025 13:08
| Ok root ->
(* automatically split Root into (Root_hash, Root_common) *)
Batch.with_batch t.db ~f:(fun batch ->
let hash = Root_data.Minimal.Stable.Latest.hash root in
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be cool to remove the existing Root key as well

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