flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

Require either a root snapshot file, or Dynamic Startup flags

Open jordanschalm opened this issue 9 months ago • 1 comments

The current Dynamic Startup behaviour is based on precedence:

  • if the state is bootstrapped, we ignore the root snapshot file and Dynamic Startup flags
  • else if a root snapshot file is provided, we use that and ignore Dynamic Startup flags
  • else we use Dynamic Startup flags

Since Dynamic Startup is now more frequently used by existing operators, who already have a root snapshot file (from the spork), this arrangement leads to operators attempting to use Dynamic Startup, but inadvertently bootstrapping from an old root snapshot file instead.

This PR:

  • Requires that strictly one of either a root snapshot file or Dynamic Startup flags are provided. If both are provided, we will exit and force the operator to indicate which bootstapping path they would like to use.
  • Logs the root block ID and height after a successful Dynamic Startup
  • Removes unused snapshot utilities (since merging the Protocol KVStore branch, a snapshot for any block can be used as a root snapshot).

jordanschalm avatar May 16 '24 18:05 jordanschalm

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 55.60%. Comparing base (c4d25c7) to head (a0e67e7). Report is 12 commits behind head on master.

Files Patch % Lines
cmd/dynamic_startup.go 0.00% 11 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5938      +/-   ##
==========================================
- Coverage   55.61%   55.60%   -0.02%     
==========================================
  Files        1128     1128              
  Lines       88928    88947      +19     
==========================================
- Hits        49458    49455       -3     
- Misses      34758    34778      +20     
- Partials     4712     4714       +2     
Flag Coverage Δ
unittests 55.60% <0.00%> (-0.02%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 16 '24 18:05 codecov-commenter