Proto: keep AI launch cycle when stitching from a predecessor with AI
When stitching from a protocol where AI was already active (such as alpha's predecessor), AI launch cycle should remain unchanged.
This MR checks this in a migration test and fixes an issue in alpha introduced in !15211 (aa910b80)
Note: This issue is not present in Q. (More accurately, it can be triggered in Q only if adaptive_issuance_force_activation=true and we migrate from P to Q, but adaptive_issuance_force_activation is false on mainnet and all testnets, so it is not a problem)
The problem in !15211 (merged) was assuming that the desired behavior was always the one when adaptive_issuance_force_activation = true, which is correct when stitching from Genesis (as in most tests), but not when stitching from a protocol which already has AI. This would have been visible on a test network that does the Q -> alpha activation, but there is no such test network yet.
Manually testing the MR
CI
In particular:
dune exec tezt/tests/main.exe -- -f tezt/tests/protocol_migration.ml
All tests in this file except the last one should fail before the last commit, and succeed after it.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) - [N/A] Document any change to the user interface, including configuration parameters (see node configuration)
-
Provide automatic testing (see the testing guide). - [N/A (the bug has never been released)] 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).