post icon indicating copy to clipboard operation
post copied to clipboard

Add versioning to PoST data directory via postdata_metadata.json file

Open fasmat opened this issue 1 year ago • 1 comments

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:

  • A missing NonceValue is added if Nonce is present.
  • The ScryptParams that were used to generate the PoST data were added to the metadata file.

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:

  • NodeId and CommitmentATX are now hex encoded instead of base64 (closes #203 and closes #163); For this we would also need to update libpostrs @poszu

fasmat avatar Aug 03 '23 14:08 fasmat

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%> (ø)

codecov[bot] avatar Sep 12 '23 07:09 codecov[bot]