-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Store v2 Migration #18603
Comments
The lazy way i have in mind is to start storev2 with iavlv0/1 and iavlv2. In this approach there are two ways to rebuild current state. A) Iavlv0/1 is used as the tree for the node while SS and SC is populated in parallel. Once the state is moved over, if there is a way to know this in the code base we would close the old database and continue with storev2 ss and sc. There could be more ways but i see these as two possible ways for doing it in a lazy fashion. Out of band migration for archive nodes is also possible but less complex as we can tell node operators with larger databases to run a side process to do the migration then restart the node once the migration has completed. This could take a very long time for archive nodes |
Assuming the new binary is backward compatible, we could just seamlessly migrate to the new binary first without enabling storeV2, so the new binary will still run iavl v0/v1 backend, any node later can just turn on the configuration to switch to storeV2 and do a state sync to finish the switch to storeV2 at any time, since state snapshot are completely the same and compatible. |
this is fine for validators, it is better ux to automate all of it. Leaving it to node operators will make it so that some dont migrate and will be forced to do it once we deprecate the migration step. In order to avoid maintaining v1/v0 integration for a long time we should not make it optional |
Importing the snapshot is slower than directly sync the latest state, I am a little worried if it may lead to delays due to load the snapshot after binary switching. |
So after speaking with @cool-develope we've proposing the following:
In summary, store v2 will use v0/v1 and v2 in conjunction, with some checkpoint |
we can't process new blocks against SC until state sync, since the tree is not constructed yet. |
@tac0turtle I think we can close this, the only missing feature is #19438, this is a little tricky this time and will figure out later |
Context
When store v2 nears completion, we'll need to devise a strategy for existing applications to migrate from store v1 to store v2. Specifically, the state that exists in store v1 is not compatible with store v2 as the latter uses a btree (SQLite) to index and store data in SC. In addition, we'll need to populate SS with data as the node syncs/migrates.
This issue is to track various proposals and approaches to migration and come to consensus on one. One such proposal is to utilize state sync and have a node populate SS and SC backends. However, this has potential characteristics of degraded performance.
Another idea is to sync latest state and then retroactively sync historical state in the background.
Tasks
cc @kocubinski @tac0turtle @cool-develope @yzang2019
Tasks
The text was updated successfully, but these errors were encountered: