[go: up one dir, main page]

Upgrade snapshot import for raw and tar

What

This is an upgrade procedure which would increase the snapshot version from 7 to 8 and it would consist in upgrading the format of the offsets in the cemented_blocks_files from a 32-bit format to a 64-bit format. The reasoning behind this is to improve the upgrade procedure of the store overall, meaning that the node operators will not need to import the snapshot and then do a storage upgrade command, but this will be included in the snapshot import command.

Why

This is a goal of the following milestone.

How

The upgrade is done for both the Tar and Raw versions of the snapshots. The main point where the upgrade happens is at the copying part of the cycles, where instead of simply copying the information, we also upgrade the offsets, if that is the case.

Manually testing the MR

To test the tar snapshot change, you need to download a snapshot (https://snapshots.us.tzinit.org/), then do the snapshot import command from master and from this branch, and compare the sizes of the cemented files. The ones done in this branch should have more bytes (more precisely 4 * NB_blocks more bytes) and then the node should run normally.

To test the raw snapshot change, you would need to do the step above (for the tar), then the running node that you have will need to export snapshot in a raw format. Then, you can import this raw snapshot in the same manner and you can test the same properties as before.

Edited by Gabriel Moise

Merge request reports

Loading