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

EPIC: key refactor migration #675

Closed
tac0turtle opened this issue Feb 2, 2023 · 2 comments
Closed

EPIC: key refactor migration #675

tac0turtle opened this issue Feb 2, 2023 · 2 comments

Comments

@tac0turtle
Copy link
Member

In the storage working group we discussed how the migration of IAVL will work in the future when we do merge the node key refactor.

the paths I suggested in the call were:

1

This path includes having the old tree format and the new format and assumes the upgrade will not be handled in a coordinated way.

The state sync snapshot, using the old format, would be downloaded. Imported into the old tree because the format is in a post-order format, but the new design requires pre-order. The old tree will export in pre-order form and then import into the new tree. This will allow a node to update using state sync.

2

This approach assumes either a coordinated upgrade or ability to download a snapshot. This approach will export the old version using preorder and import it into the tree. This approach is simple, but it only applies to current state, historical state should be handled

Historical State:

historical state should be handled outside of current state upgrade. This would be up to the application and an issue will land in there to coordinate how to best handle this and potentially leave it up to the operator.

@cool-develope
Copy link
Collaborator

We can migrate through the following steps (assume the available version range is [fromVersion, toVersion]):

  • Import and Export the snapshot for the fromVersion
  • Get changesets and update the tree for the forwarding versions using func (t *ImmutableTree) TraverseStateChanges(startVersion, endVersion int64, fn func(version int64, changeSet *ChangeSet) error) error

@tac0turtle
Copy link
Member Author

closing this as it has been implemented

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

No branches or pull requests

2 participants