WASM: Upgrade the WASM PVM when migrating to proto alpha
Context
Prior to this patch, only newly originated smart rollups would benefit
from improvements brought by a new protocol. Now, when the WASM PVM
receives a `Protocol_migration` internal messages, it decodes its
payload in order to check if it needs to upgrade to a new revision.
This way, already existing smart rollups can benefit from new features
and improvements added in a more recent protocol.
This patch also introduces a test to check the consistency between the
naming scheme of the protocols, which have to be defined in two
places: `proto_*/lib_protocol/raw_context.ml` and
`lib_scoru_wasm/constants.ml`. Some instructions to update the test
when a new protocol is snapshot are also provided, to make the life of
developers doing the snapshot easier.
Manually testing the MR
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
Edited by Thomas Letan