-
Notifications
You must be signed in to change notification settings - Fork 550
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
replace Root with Root_(hash, common) in persistent database #16650
replace Root with Root_(hash, common) in persistent database #16650
Conversation
… need Root_hash can run faster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some grammatical suggestions, but overall looks good! How was this tested dynamically against loading a pre-hard fork db?
In hard forks, `Root` should be replaced by `(Root_hash, Root_common)`; | ||
For now, we try to replace `Root` with `(Root_hash, Root_common)` when: | ||
1. initializing a new DB; | ||
2. trying to moving the root; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trying to move the root.
(* TODO: | ||
In hard forks, `Root` should be replaced by `(Root_hash, Root_common)`; | ||
For now, we try to replace `Root` with `(Root_hash, Root_common)` when: | ||
1. initializing a new DB; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initializing a new DB.
For now, 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` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to query root
or root_hash
.
2. trying to moving the root; | ||
3. trying to query `root` or `root_hash` | ||
The reason for this is `Root_common` is too big(250MB+), and most of the time | ||
we just need the hash. Reading the whole Root result in efficiency problems, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize we and use a semi colon instead of a comma.
!ci-nightly-me |
Hello @svv232 The plan for testing is to have a persistent database that only has George told me to implement something similar to |
ok sure! I was just looking for confirmation that this is indeed backwards compatible. It seems okay to me, but having evidence from dynamic testing is pretty nice. How were you testing this by hand against your local db? I will be convinced to approve if this is indeed the case. I will also be convinced if you show the tool output if you already have it with an old db with just root. |
!ci-nightly-me |
@svv232 I'm testing this in https://github.com/glyh/mina/tree/persistent_frontier_test_destructive And Using the data from https://storage.googleapis.com/o1labs-ci-test-data/dump_2025_02-13-07-54-53.tar.gz So What I do is:
EDIT: |
!ci-build-me |
I assume I should relocated this PR in |
Reopen as requested by @dkijania |
!ci-build-me |
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:root
orroot_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.