celestiaorg / celestiaorg/celestia-node

node: Store Migration

Open
#895 0 comments 1 reaction 0 assignees View on GitHub
area:config area:node
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.