spacemeshos / post

Spacemesh POST protocol implementation
MIT License
19 stars 20 forks source link

Add versioning to PoST data directory via postdata_metadata.json file #211

Open fasmat opened 1 year ago

fasmat commented 1 year ago

Description

This introduces versioning to PoST data (closes #210 ). The version is stored inside the postdata_metadata.json file. If no version is present Version 0 is assumed which will be migrated to version 1.

Version 1 has the following changes over Version 0:

These additions allow changes to how the data is stored on disk and allow for smooth migrations from an older version of PoST to a newer version.

TODO:

codecov[bot] commented 1 year ago

Codecov Report

Merging #211 (2971af2) into develop (fdb2b5b) will decrease coverage by 1.5%. The diff coverage is 53.7%.

@@            Coverage Diff            @@
##           develop    #211     +/-   ##
=========================================
- Coverage     68.6%   67.2%   -1.5%     
=========================================
  Files           28      29      +1     
  Lines         1862    1974    +112     
=========================================
+ Hits          1279    1328     +49     
- Misses         435     485     +50     
- Partials       148     161     +13     
Files Changed Coverage Δ
shared/post_metadata.go 28.9% <17.2%> (-37.8%) :arrow_down:
initialization/migrate_metadata.go 57.5% <57.5%> (ø)
initialization/initialization.go 75.7% <81.2%> (-0.4%) :arrow_down:
config/config.go 58.9% <100.0%> (+1.4%) :arrow_up:
oracle/oracle.go 78.2% <100.0%> (ø)
verifying/verifying_options.go 48.2% <100.0%> (ø)