Nairobi Initial Snapshot
Snapshot
Generate proto_* snapshot
Checkout the snapshot branch:
git checkout origin/proto-n
Make sure everything is clean and builds:
git clean -dfx
make
Snapshot nairobi:
./scripts/snapshot_alpha.sh nairobi_017
Apply the snapshot on top of master:
git stash -u
git fetch
git checkout -b nairobi origin/master
git stash pop
git add --all
git commit -m "Protocol: Nairobi"
Link the new protocol
Link the protocol components:
./scripts/link_protocol.sh src/proto_017_PtNairob
git add --all
git commit -m "Build: Link Nairobi"
Fix formatting
Update the .ocamlformat files:
./scripts/lint.sh --update-ocamlformat
Fix formatting errors:
make fmt-ocaml # May be run again to check if it worked
git commit -am "Fix OCaml formatting"
Add SCORU protocol migration message
See: !8214 (293caca5)
Generate documentation for Nairobi
Add Nairobi to the documentation generator like so: !8214 (1a53d282)
Generate RPC documentation:
make -C docs rpc-protocols
git add docs
git commit -m "Docs: RPCs for Nairobi"
Make sure the documentation generator finds the new protocol files: !8214 (e9951b81)
Add the new protocol to the table of contents: !8214 (730200fd)
Backports
This merge requests were back-ported to make the build succeed:
- !7751 (merged)
- Partially revert !8143 (merged) (changes proto env in incompatible way) + add morally similar changes for V9 that compile
- !8138 (merged)
- !7854 (merged)
- !8237 (merged)
- !7932 (merged)
- !8067 (merged)
- !8164 (merged)
- !8212 (merged)
Manual Testing
Download and import a recent mainnet snapshot:
wget https://mainnet-v16.xtz-shots.io/mainnet-3294653.rolling
./octez-node snapshot import mainnet-3294653.rolling --block BLRbkj5PMUPsB8jVutJfCjkMcwiuHqXNGaGGQnnjC8iMR9obpj8
Make 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
Configure node to activate Mumbai then Nairobi:
git apply <<EOF
diff --git a/src/lib_node_config/config_file.ml b/src/lib_node_config/config_file.ml
index 8ffaf35e98..1c63145bb1 100644
--- a/src/lib_node_config/config_file.ml
+++ b/src/lib_node_config/config_file.ml
@@ -87,6 +87,7 @@ let mainnet_user_activated_upgrades =
[
(28082l, "PsYLVpVvgbLhAhoqAkMFUo6gudkJ9weNXhUYCiLDzcUpFpkk8Wt");
(204761l, "PsddFKi32cMJ2qPjf43Qv5GDWLDPZb3T3bF6fLKiF5HtvHNU7aP");
+ (3294654l, "PtNairobi9MxcBmKF7avFwkUohUu9KuxHt3w9cBmJ7ULqPD7cY5");
]
(* END_PATCHING_ZONE_FOR_MAINNET_USER_ACTIVATED_UPGRADES *)
EOF
Rebuild everything:
make
Run the node in one terminal window:
./octez-node run --synchronisation-threshold 0 --connections 0 --rpc-addr localhost
Bake a block in another terminal:
./octez-client -d /tmp/yes-wallet bake for --minimal-timestamp
Observe the log in the node:
Apr 3 17:46:49.585: initializing protocol PtNairobi9Mx...
Apr 3 17:46:49.594: block at level 3294654 successfully pre-applied in 4.94s
Apr 3 17:46:49.741: the protocol table was updated: protocol PtNairobi9Mx (level 17) was
Apr 3 17:46:49.741: activated on block BLyBFWwHznPDYFpSwA9BGLpEYSxoX3xpDEynskbiJDHgh3g6YDa
Apr 3 17:46:49.741: (level 3294654)
Apr 3 17:46:49.744: head is now BLyBFWwHznPDYFpSwA9BGLpEYSxoX3xpDEynskbiJDHgh3g6YDa (3294654)