Fix store reconstruction
This MR aims to fix an issue when reconstructing a full storage after a snapshot import. Indeed, when importing a snapshot, we set the resulting context hash of the blocks of the floating block store to Context_hash.zero (this is fine as the context associated to it is not stored and cannot be queried as below the savepoint). However, after a reconstruction, these context hashes were not updated in the table maintained by the store, and thus, pointing to a wrong context hash (ie. Context_hash.zero).
This MR aims to update the resulting context hash of the blocks from the floating store while reconstructing them.
Manually testing the MR
Bake ~50 blocks, export a snapshot, import it with --reconstruct, query the metadata of blocks from 20 to 30. That should trigger the error without the patch.
Or run dune exec tezt/tests/main.exe -- --title "Alpha: storage reconstruction" on branch vicall@migrate_storage_reconstruction_test that is a new test that actually triggered the error
Closes
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.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR