Oxford Initial Snapshot
Snapshot
Generate proto_* snapshot
Checkout the snapshot branch:
git checkout origin/proto-o
Make sure everything is clean and builds:
git clean -dfx
make
Snapshot Oxford:
./scripts/snapshot_alpha.sh oxford_018
Apply the snapshot on top of master:
git stash -u
git fetch
git checkout -b oxford origin/master
git stash pop
git add --all
git commit -m "Protocol: Oxford"
Link the new protocol
Link the protocol components:
./scripts/link_protocol.sh src/proto_018_Proxford
git add --all
git commit -m "Build: Link Oxford"
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 Oxford
Add Oxford 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 Oxford"
Make sure the documentation generator finds the new protocol files: !8214 (e9951b81)
Backports
This merge requests were back-ported to make the build succeed:
Tests
Add Oxford to tezts
Extend tests with references to Oxford like so.
Add encoding samples
cp -r tezt/tests/encoding_samples/alpha tezt/tests/encoding_samples/oxford
Reset regressions
dune exec tezt/tests/main.exe -- regression --reset-regressions
Manual Testing
Download and import a recent mainnet snapshot:
wget https://mainnet-v16-shots.nyc3.digitaloceanspaces.com/mainnet-3703112.rolling
./octez-node snapshot import mainnet-3703112.rolling --no-check
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 bd260d4ac9..a28ad3e535 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");
+ (3703113l, "PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf");
+ (3703114l, "ProxfordLcjScHFgpTURyTjcKR88D5juu1jGgT18pPUoGTVgxiA");
]
(* 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:
Jun 14 17:04:27.801: initializing protocol PtNairobiyss...
Jun 14 17:04:27.802: block at level 3703113 successfully pre-applied in 3.822s
Jun 14 17:04:27.957: the protocol table was updated: protocol PtNairobiyss (level 17) was
Jun 14 17:04:27.957: activated on block BLLVGdmuLzX2f42TYyu8oHoDNkVJpDXpbao5qQMbDQDS6MtgNYj
Jun 14 17:04:27.957: (level 3703113)
Jun 14 17:04:27.958: head is now BLLVGdmuLzX2f42TYyu8oHoDNkVJpDXpbao5qQMbDQDS6MtgNYj (3703113)
Jun 14 17:04:40.720: initializing protocol ProxfordLcjS...
Jun 14 17:04:40.794: block at level 3703114 successfully pre-applied in 2.331s
Jun 14 17:04:41.064: the protocol table was updated: protocol ProxfordLcjS (level 18) was
Jun 14 17:04:41.064: activated on block BMGTE1v26gAwHd9JrJps3u5knYP6ETPiZemdo2hY94b3ZmmSxHz
Jun 14 17:04:41.064: (level 3703114)
Jun 14 17:04:41.067: head is now BMGTE1v26gAwHd9JrJps3u5knYP6ETPiZemdo2hY94b3ZmmSxHz (3703114)
Edited by Ole Krüger