Jakarta
Context
Snapshot "Jakarta" protocol.
First two diffs generated with the following commands.
$ git checkout 1ba0fc6e798061519d955f2eed2cf6d21e70b4c8 # head of proto-j branch
$ ./scripts/snapshot_alpha.sh jakarta_013
$ git add --all
$ git stash
$ git checkout master
$ git stash pop
# resolve conflict in docs/index.rst
$ git add --all
$ git checkout -b jakarta
$ git commit -m "Protocol: Jakarta"
$ dune exec scripts/declare-new-protocol-unit-test/main.exe -- 013 PtJakart
$ ./scripts/link_protocol.sh src/proto_013_PtJakart
$ git add --all
$ git commit -m "Build: link Jakarta"
After that added manually a few more diffs that are necessary for correct snapshotting, following !4056 (merged) as example.
Created .ocamlformat-ignore
file for the new protocol.
$ src/tooling/lint.sh --update-ocamlformat
Updated tests_python/tests_alpha/protocol.py
to test stitching from Ithaca for now (until migration code is updated), and added RPC docs generation. Changes to migration code (stitching of Alpha from Jakarta) will be done in a separate MR.
Updated Tezt tests, adding encoding samples and updating regression tests.
$ cp -r tezt/tests/encoding_samples/alpha tezt/tests/encoding_samples/jakarta
$ dune exec tezt/tests/main.exe -- encoding regression --reset-regressions
Backports
Note that theproto-j
branch includes the following backports, added after branching off master
:
- !4987 (merged) Update gas model of consume_add_message
- !4992 (merged) Update gas model for Tx_rollup_commitment_repr.Full.compact
- !4993 (merged) Carbonate rejection in TORU
- !4994 (merged) Final constants value for mainnet in TORU
- !4996 (merged) Normalise views in RPCs
- !5007 (merged) Bigger inboxes in TORU
Manually testing the MR
Import snapshot of mainnet (Ithaca), migrate to Jakarta and bake a few blocks.
- Download and import snapshot.
$ wget https://mainnet.xtz-shots.io/mainnet-2263761.rolling
$ ./tezos-node snapshot import mainnet-2263761.rolling --block BKjE8tBzRBxMsqQR7X7DqXei56AJBQbxDWH2Uevekr49zAM8t6H
- Create "yes wallet", patch node to accept fake signatures.
$ dune exec scripts/yes-wallet/yes_wallet.exe -- create from context ~/.tezos-node in /tmp/yes-wallet --active-bakers-only
$ patch -p1 < scripts/yes-node.patch
- Configure protocol override in the next level.
$ patch -p1 <<EOF
diff --git a/src/bin_node/node_config_file.ml b/src/bin_node/node_config_file.ml
index 3534901ec2..3b4f60a293 100644
--- a/src/bin_node/node_config_file.ml
+++ b/src/bin_node/node_config_file.ml
@@ -89,0 +90 @@ let mainnet_user_activated_upgrades =
+ (2263762l, "PtJakartaiDz69SfDDLXJSiuZqTSeSKRDbKVZC8MNzJnvRjvnGw");
EOF
-
Build with
$ make
. -
Run tezos node in one terminal, bake migration blocks with tezos client in another terminal.
$ ./tezos-node run --synchronisation-threshold 0 --connections 0 --rpc-addr localhost |& tee tezos-node.log
$ ./tezos-client -d /tmp/yes-wallet bake for --minimal-timestamp |& tee tezos-client.log
Observe activation of protocols in the tezos node logs.
Apr 10 19:15:12.183 - node.protocol: 013-PtJakart: Patching KT1CT7S2b9hXNRxRrEcany9sak1qe4aaFAZJ...
Apr 10 19:16:28.913 - node.protocol: 013-PtJakart: Contract KT1CT7S2b9hXNRxRrEcany9sak1qe4aaFAZJ successfully patched
Apr 10 19:16:28.913 - node.protocol: 013-PtJakart: Patching KT1D68BvUm9N1fcq6uaZnyZvmBkBvj9biyPu...
Apr 10 19:16:28.913 - node.protocol: 013-PtJakart: Contract KT1D68BvUm9N1fcq6uaZnyZvmBkBvj9biyPu successfully patched
...
Apr 10 19:16:28.921 - node.protocol: 013-PtJakart: Patching KT1MzfYSbq18fYr4f44aQRoZBQN72BAtiz5j...
Apr 10 19:16:28.921 - node.protocol: 013-PtJakart: Contract KT1MzfYSbq18fYr4f44aQRoZBQN72BAtiz5j successfully patched
Apr 10 19:16:28.921 - validation: initializing protocol PtJakartaiDz...
Apr 10 19:16:28.925 - validator.block: block at level 2263762 successfully pre-applied
Apr 10 19:16:28.925 - validator.block: Request pushed on 2022-04-10T19:15:10.665-00:00, treated in 30us, completed in 1min18s
Apr 10 19:16:29.337 - validator.block: block BLD1G8kF7rf5aZWV1CJbmqsNL7YoKUM6Zt6ro7cXTMTyi7ocCxE successfully validated
Apr 10 19:16:29.337 - validator.block: Request pushed on 2022-04-10T19:16:29.140-00:00, treated in 28.209us, completed in 196ms
Apr 10 19:16:29.342 - node.store: the protocol table was updated: protocol PtJakartaiDz (level 13) was
Apr 10 19:16:29.342 - node.store: activated on block BLD1G8kF7rf5aZWV1CJbmqsNL7YoKUM6Zt6ro7cXTMTyi7ocCxE
Apr 10 19:16:29.342 - node.store: (level 2263762)
Apr 10 19:16:29.371 - validator.chain: Update current head to BLD1G8kF7rf5aZWV1CJbmqsNL7YoKUM6Zt6ro7cXTMTyi7ocCxE (level 2263762, timestamp 2022-04-08T15:24:29-00:00, fitness 02::00228ad2::::ffffffff::00000000), same branch
Apr 10 19:16:29.371 - validator.chain: Request pushed on 2022-04-10T19:16:29.336-00:00, treated in 272us, completed in 34.54ms
- Bake a few more blocks with the same tezos-client command - just in case.