[go: up one dir, main page]

Proto: Migration from Nairobi to Alpha

Reference MR for Mumbai: !7428 (merged)


Context

  1. Remove references to Mumbai and replace them with Nairobi within the protocol

  2. Update the constants representation by copying from the Proto Nairobi

    Also:

    • Use constants from previous protocol if available
  3. Update Tezt tests to migrate from Nairobi

Manual testing

Import a recent rolling node snapshot.

wget https://mainnet-v16.xtz-shots.io/mainnet-3384776.rolling
./octez-node snapshot import mainnet-3384776.rolling --block BLk819t5YtJFbTWnX1jofymmwH5x4xHnZ7iPTmd9mGMbvYRsNve

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 8ffaf35e98..66eabcfdf6 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");
+    (3384777l, "PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf");
+    (3384778l, "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK");
   ]

 (* END_PATCHING_ZONE_FOR_MAINNET_USER_ACTIVATED_UPGRADES *)
EOF
make

Run the following in one 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 Nairobi:

./octez-client -d /tmp/yes-wallet bake for --minimal-timestamp

You should see something like this in the node logs to show Nairobi activation:

Apr 19 17:16:41.786: initializing protocol PtNairobiyss...
Apr 19 17:16:41.795: block at level 3384777 successfully pre-applied in 3.533s
Apr 19 17:16:42.056: the protocol table was updated: protocol PtNairobiyss (level 17) was
Apr 19 17:16:42.056:   activated on block BLnpLp9HfAVfxjHLqHg2hyAQMXPiiP4FiENoyJFMus1gmfMvRXB
Apr 19 17:16:42.056:   (level 3384777)
Apr 19 17:16:42.058: head is now BLnpLp9HfAVfxjHLqHg2hyAQMXPiiP4FiENoyJFMus1gmfMvRXB (3384777)

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:

Apr 19 17:17:02.611: initializing protocol ProtoALphaAL...
Apr 19 17:17:02.649: block at level 3384778 successfully pre-applied in 77.860ms
Apr 19 17:17:02.703: the protocol table was updated: protocol ProtoALphaAL (level 18) was
Apr 19 17:17:02.703:   activated on block BM8rikjx9JUysPMSbeW21ZqqTtLjKsZrUJFekKgDC7AYH5noQqG
Apr 19 17:17:02.704:   (level 3384778)
Apr 19 17:17:02.705: head is now BM8rikjx9JUysPMSbeW21ZqqTtLjKsZrUJFekKgDC7AYH5noQqG (3384778)
Edited by Ole Krüger

Merge request reports

Loading