Skip to content

Draft: A new automatic migration test

Context

This test aims to generalise the current manual migration tests made for Tezt or the test_voting.py made using the Python framework.

The purpose is to have a generic Tezt test that can be run for various contexts. The two main targets are:

  • Context created for the sandboxed mode
  • Context up to date with the mainnet chain

To write this test, we had to introduce a new command to print the full network configuration of a nodeL tezos-node config show-network and various wrapper commands for Tezt.

Using this new generic test we can:

  • Run a migration from the n-2 or n-1 protocol to Alpha protocol
  • Decide to bypass the voting procedure and use user-activated upgrades instead to speed up the test

In the CI, we have added four tests using a sandbox context using the parameters described above. And we have added a test for mainnet which: fetch and import a snapshot, change the configuration to activate the two user-activated upgrades and check we are on the alpha protocol.

Manually testing the MR

You can run the test manually for mainnet either with the two user-activated upgrades:

./scripts/migration_test.sh --dont-wait --copy

or by going through the whole voting procedure (takes 1 or 2 days):

./scripts/migration_test.sh --copy

Follow-ups

This test could be enhanced in several ways in various follow-up MRs:

  • By snapshoting the alpha protocol and migrate to this snapshoted protocol
  • By speed-up the baking rate: we could add an option to the bake for command so that we can bake a specific number of blocks
  • By exporting a context before the migration so that we can have a context cached to run the migration on mainnet every time there is a change to the context migration process.

Checklist

Edited by François Thiré

Merge request reports