Bump snapshot version to prevent incompatible v17 imports
Context
Fixes #6318 (closed)
This MR bumps the export snapshot version from 5
to 6
.
It also fixes some bad error messages like:
Failed to read snapshot file <file>. The provided file is inconsistent or is from Octez 12 (or before) and it cannot be imported anymore.
that occurs when importing a snapshot on a v17 node with a version greater than its current supported one (e.g., 6 vs. 5). It also fixes an issue where the error catcher tries to close a file that was not yet open and thus overwrote the actual informative error message:
The version of the snapshot file 6 is not compatible with the node. Only the following versions can be imported: 3, 4, 5."
Manually testing the MR
- Export a snapshot on master using this patch
- Import this snapshot on v17 using this patch: see that it does not fail with an obscure irmin error message
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR