Proto: preserve SCORU constants in migration
Context
Currently SCORU is disabled on Mondaynet because migration from Kathmandu to Alpha resets sc_rollup_enable protocol constant to false. Here we change migration to preserve SCORU constants that exist both in Kathmandu and in Alpha.
Note that stake_amount is still reset because default value has changed (compare proto_014_PtKathma and proto_alpha default parameters).
Manually testing the MR
Use mockup mode to start with Kathmandu and SCORU enabled, then migrate to Alpha and check that sc_rollup_enable flag is still true.
$ sed 's$"sc_rollup_enable": false$"sc_rollup_enable": true$' src/proto_014_PtKathma/parameters/test-parameters.json > /tmp/parameters.json
$ ./tezos-client --mode mockup --base-dir /tmp/mockup --protocol PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg create mockup --protocol-constants /tmp/parameters.json
$ ./tezos-client --mode mockup --base-dir /tmp/mockup rpc get /chains/main/blocks/head/context/constants | jq .sc_rollup_enable
true
$ ./tezos-client --mode mockup --base-dir /tmp/mockup migrate mockup to ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK
Migration successful.
$ ./tezos-client --mode mockup --base-dir /tmp/mockup rpc get /chains/main/blocks/head/context/constants | jq .sc_rollup_enable
true
Before the change (e.g. on master branch) last command was printing false.
Edited by Fedor Sheremetyev