Skip to content

storage: add version to each DB #1822

@melekes

Description

@melekes

Feature Request

Summary

Add a version to each DB, so if/when the schema changes, we can rely on it

Problem Definition

Currently, the DBs (block, evidence, state, light) are not versioned. If the schema changes, there's no way to check what version you're running besides parsing data. In #1814, I will have to assume the data format, but that's not ideal from multiple perspectives.

Proposal

Add a version key-value pair to each DB (e.g., version=1). Upon a startup, check that the version in the code matches the one from the DB. If no version is found, assume 1 (initial version).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions