Proto: Migrate from Mumbai
Reference MR for Lima: !6504 (merged)
Context
-
Remove references to Lima and replace them with Mumbai within the protocol
-
Update the constants representation by copying from the Proto Mumbai
Also:
- Remove code related to block time reduction
- Use constants from previous protocol if available
-
Update Tezt tests to migrate from Mumbai
-
Update Python tests to migrate from Mumbai
Manual testing
Import a recent rolling node snapshot.
wget https://mainnet-v15.xtz-shots.io/mainnet-3066445.rolling
./octez-node snapshot import mainnet-3066445.rolling --block BLjV4aKB4vzKALmtrKEuBYCuoBUkJNZJ1ojm6NqXNoNTwwF9snc
Patch the files for yes wallet/node.
dune exec devtools/yes_wallet/yes_wallet.exe -- create from context ~/.tezos-node in /tmp/yes-wallet --active-bakers-only
patch -p1 < scripts/yes-node.patch
Patch the node configutation such that it upgrades the protocol.
git apply <<EOF
diff --git a/src/lib_node_config/config_file.ml b/src/lib_node_config/config_file.ml
index 1bf7c2cf50..4f90140a1a 100644
--- a/src/lib_node_config/config_file.ml
+++ b/src/lib_node_config/config_file.ml
@@ -87,6 +87,8 @@ let mainnet_user_activated_upgrades =
[
(28082l, "PsYLVpVvgbLhAhoqAkMFUo6gudkJ9weNXhUYCiLDzcUpFpkk8Wt");
(204761l, "PsddFKi32cMJ2qPjf43Qv5GDWLDPZb3T3bF6fLKiF5HtvHNU7aP");
+ (3066446l, "PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc");
+ (3066447l, "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK");
]
(* END_PATCHING_ZONE_FOR_MAINNET_USER_ACTIVATED_UPGRADES *)
EOF
make
Run the following in on terminal to start the node.
./octez-node run --synchronisation-threshold 0 --connections 0 --rpc-addr localhost
Run this in another terminal to bake the block migrating to Mumbai:
./octez-client -d /tmp/yes-wallet bake for --minimal-timestamp
You should see something like this in the node logs to show Mumbai activation:
Jan 18 14:31:07.615 - validation: initializing protocol PtMumbaiiFFE...
Jan 18 14:31:07.616 - validator.block: block at level 3066446 successfully pre-applied:
Jan 18 14:31:07.616 - validator.block: Request pushed on 2023-01-18T14:31:04.312-00:00, treated in 12us, completed in 3.304s
Jan 18 14:31:07.805 - validator.block: prechecked block BMKiPQv55DvC37YymzNtnXzsUqzPJDoH181WGsAFRaAo11xjoLi
Jan 18 14:31:07.824 - validator.block: block BMKiPQv55DvC37YymzNtnXzsUqzPJDoH181WGsAFRaAo11xjoLi validated
Jan 18 14:31:07.824 - validator.block: Request pushed on 2023-01-18T14:31:07.767-00:00, treated in 7us, completed in 56.507ms
Jan 18 14:31:07.888 - node.store: the protocol table was updated: protocol PtMumbaiiFFE (level 16) was
Jan 18 14:31:07.888 - node.store: activated on block BMKiPQv55DvC37YymzNtnXzsUqzPJDoH181WGsAFRaAo11xjoLi
Jan 18 14:31:07.888 - node.store: (level 3066446)
Run this to bake the block migrating to Alpha:
./octez-client -d /tmp/yes-wallet bake for --minimal-timestamp
You should see something like this in the node logs to show Alpha activation:
Jan 18 14:31:39.702 - validation: initializing protocol ProtoALphaAL...
Jan 18 14:31:39.702 - validator.block: block at level 3066447 successfully pre-applied:
Jan 18 14:31:39.702 - validator.block: Request pushed on 2023-01-18T14:31:39.579-00:00, treated in 13us, completed in 123ms
Jan 18 14:31:40.064 - validator.block: prechecked block BKseCXc7Yjfdo2AY5FA9axULQcTDeVuHdACz9XPJqyWr8dSpbie
Jan 18 14:31:40.066 - validator.block: block BKseCXc7Yjfdo2AY5FA9axULQcTDeVuHdACz9XPJqyWr8dSpbie validated
Jan 18 14:31:40.066 - validator.block: Request pushed on 2023-01-18T14:31:40.026-00:00, treated in 10us, completed in 39.785ms
Jan 18 14:31:40.123 - node.store: the protocol table was updated: protocol ProtoALphaAL (level 17) was
Jan 18 14:31:40.123 - node.store: activated on block BKseCXc7Yjfdo2AY5FA9axULQcTDeVuHdACz9XPJqyWr8dSpbie
Jan 18 14:31:40.123 - node.store: (level 3066447)
Edited by Ole Krüger