[go: up one dir, main page]

Ithaca

Context

Snapshot "Ithaca" protocol.

First two diffs generated with the following commands.

$ git checkout 091a605a8aa9e39fd796268921580c064f4b0b1e # head of proto-i branch
$ ./scripts/snapshot_alpha.sh ithaca_012
$ git add --all
$ git stash
$ git checkout master
$ git stash pop
# resolve conflict in docs/index.rst
$ git add docs/index.rst
$ git checkout -b ithaca
$ git commit -m "Snapshot protocol"
$ dune exec scripts/declare-new-protocol-unit-test/main.exe -- 012 Psithaca
$ ./scripts/link_protocol.sh src/proto_012_Psithaca
$ git add --all
$ git commit -m "Link protocol"

After that added manually a few more diffs that are necessary for correct snapshotting, following !3522 (merged) as example.

Changes to migration code (stitching of Alpha from Ithaca instead of Hangzhou) will be done in a separate MR.

Backports

Note that proto-i branch has the following MRs backported from master after generation of vanity nonce. They are not touching src/proto_alpha/lib_protocol but are required for clean snapshotting and include fixes in baker that we need for correct use of Ithaca.

Manually testing the MR

Import snapshot of mainnet data (Hangzhou), migrate to Ithaca and try to bake a few blocks.

  1. Download and import snapshot.
$ wget https://mainnet.xtz-shots.io/tezos-mainnet-1943300.rolling
$ ./tezos-node snapshot import tezos-mainnet-1943300.rolling --block BLnvNwUBUMXh6j48tsCp2athiBXfvhbD2dHuSR66Umw5mp2AoNh
  1. 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
  1. 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 4b83bf412d..2c5eacf6b8 100644
--- a/src/bin_node/node_config_file.ml
+++ b/src/bin_node/node_config_file.ml
@@ -87,0 +88 @@ let mainnet_user_activated_upgrades =
+    (1943301l, "PsithacaTTq3oumpKDw1pVvRrAtqiK4hKnP3Q4FNrXN9yc6KPhp");
EOF
  1. Build with $ make.

  2. 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 foundation2 --minimal-timestamp |& tee tezos-client.log.1

Observe activation of protocols in the tezos node logs.

Dec 14 23:00:51.564 - validation: initializing protocol PsithacaTTq3...
Dec 14 23:00:51.580 - validator.block: block at level 1943301 successfully pre-applied
Dec 14 23:00:51.580 - validator.block: Request pushed on 2021-12-14T23:00:39.301-00:00, treated in 13.800us, completed in 12.279s 
Dec 14 23:00:52.819 - validator.block: block BLyUip8zZHDtHekjYHnksTzy1vRR3GbstQxawKW2CfLJhMYaUPf successfully validated
Dec 14 23:00:52.819 - validator.block: Request pushed on 2021-12-14T23:00:52.128-00:00, treated in 15.300us, completed in 690ms 
Dec 14 23:00:52.823 - node.store: the protocol table was updated: protocol PsithacaTTq3 (level 12) was
Dec 14 23:00:52.823 - node.store:   activated on block BLyUip8zZHDtHekjYHnksTzy1vRR3GbstQxawKW2CfLJhMYaUPf
Dec 14 23:00:52.823 - node.store:   (level 1943301)
Dec 14 23:00:52.866 - validator.chain: Update current head to BLyUip8zZHDtHekjYHnksTzy1vRR3GbstQxawKW2CfLJhMYaUPf (level 1943301, timestamp 2021-12-14T02:15:24-00:00, fitness 01::000000000013a705), same branch
Dec 14 23:00:52.866 - validator.chain: Request pushed on 2021-12-14T23:00:52.818-00:00, treated in 121us, completed in 47.642ms 
  1. Bake a few more blocks with the following command - just in case. Note that baking account should not be specified. Each block takes ~30 seconds.
$ ./tezos-client -d /tmp/yes-wallet bake for --minimal-timestamp |& tee tezos-client.log.2
Dec 14 23:01:45.001 - 012-Psithaca.baker.actions: block BMX4rsx6B688AKdpUqwfiQiBmjwJVjTLj1Yi2HuXgNQLPE3Hnja injected for
Dec 14 23:01:45.001 - 012-Psithaca.baker.actions:   delegate baker_0 (tz1irJKkXS2DBWkU1NnmFQx1c1L7pbGg4yhk)
Injected block at minimal timestamp
Edited by Fedor Sheremetyev

Merge request reports

Loading