1

What's the best way for a baker that has around 20-50 blocks every cycle to bootstrap with a fresh copy of the chain? Apart from making sure the baker does not bootstrap when block rights are upcoming, I'm looking for best practices to ensure last cycle nonces are able to be revealed.

The use case is baker has been running since Octez 13 without bootstrapping. Now baker wants to bootstrap when updating to Octez 16.1. The baker is not migrating to a new server and not reinstalling from scrach. The contents of ~/.tezos-client will remain the same.

Is the best method to make sure nonces are not lost to bootstrap with a snapshot that's at least 5-6 days old?

1 Answer 1

2

Yes, it's currently the safest course of action. In order to minimize the baker's down time, I'd recommend to:

  1. Locally export a snapshot on a block that is far enough in the past (20.000 blocks is far enough), or, alternatively, download one from a external provider -- be mindful of the snapshot's block level;

  2. Upgrade your octez-node and octez-baker-XXX binaries to Octez v16 -- if it was not already done;

  3. Import the snapshot using the octez-node v16 binary in a different directory. E.g.:

    ./octez-node snapshot import <snapshot-file> --data-dir /tmp/v16-mainnet-node

  4. Start a v16 node on the same server (using a different net port) that uses the freshly created v16 directory -- and without stopping the existing node. E.g.:

    ./octez-node run --net-addr localhost:9733 --data-dir /tmp/v16-mainnet-node

  5. Wait for the v16 node to be fully synced;

  6. Stop both nodes, backup your existing directory mv $HOME/.tezos-node $HOME/old-tezos-node, swap it with the new v16 node mv /tmp/v16-mainnet-node $HOME/.tezos-node, delete its configuration and copy your previous one rm $HOME/.tezos-node/config.json; cp $HOME/old-tezos-node/config.json $HOME/.tezos-node/config.json.

  7. Restart both node and baker and you should be good to go.

As a side-node, there is plans to remove this annoying history constraint in the future. In the meantime, we have to go through this painful process.

Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.