celestiaorg / celestiaorg/celestia-node
node: Store Migration
- Dominant language
- Go
- Stars
- 996
- Forks
- 1.1k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 34
Description
When we add a new field to node's config, we usually get into trouble where the node's existing config is not filled with the default values leading the program to panic with zero values for the newly introduced field. To fundamentally solve the problem we are leaning towards versioning for the Node’s store(~/.celestia), accompanied by Migration.
Once binary starts, it writes its version to the store. If the version is already there, it checks for the mismatch. If so, the migration process inits empty config fields with default values and/or removes deprecated fields. The migration process can also be extended further to solve KVEngine and serialization format changes.
Contributor guide
Assessment
This issue has not been assessed yet.