5

This question is in relation to the upcoming 004 (aka Athens) protocol change. Provided that it passes the last Promotion_vote phase, specifically and technically, what happens to the binaries on my server/laptop/docker?

I downloaded and compiled the 003 source myself and produced the necessary binaries. According to "what I've heard", I do not have to repeat this process due to the self-amending nature of the chain and the protocol.

Does the node binary (and baker/endorser/accuser binaries) itself have some ability to download the proposal code and recompile when it passes? How exactly does that work?

4

The node self updates. The client/baker/endorser/accuser don't.

In order to participate to the chain after that the protocol changes (if it changes) to Athen, you'll have to download/compile/install by yourselves the "client" binaries for this protocol! They are independent from "clients" for the previous protocols.

The _004_Pt24m4xi softwares (as well as the updated tezos-client able to "speak" Pt24m4xi protocol) are already available today in the repository and the docker images. To avoid interruption of baking activities, you have to have started the _004_Pt24m4xi baker/endorser/accuser daemon in advance of the switch. You can do it at anytime, they will quietly wait for the node to switch to Pt24m4xi protocol. Similarly, _003_PsddFKi3 daemons will quietly stop participating as soon as the protocol changes; No need to be there to kill them...

The tezos-node software carries a smarter mechanism because it can automatically continue to validate blocks without any "manual" update even if the protocol changes!

Tezos protocol comes with self amendment. That means that, under some given rules (the one of a vote), a valid block of the current tezos protocol (PsddFKi3) can legitimately declares "next block must be in a different protocol (Pt24m4xi)". At that point, if (hopefully when ;-) ) someone manages to produce a valid block in the new protocol Pt24m4xi, it propagates through the network and your node receives it. Your node will consider it as a valid candidate (as it is in the correct protocol) but, still, it has to validate it carefully. There are 2 options to do so:

1/ Your tezos-node has been compiled with protocol Pt24m4xi embedded "statically" so it knows how to validate the block and does it. This is the "you recompiled by yourself since protocol Pt24m4xi has been integrated into the code base" scenario.

2/ tezos-node has no clue about Pt24m4xi. In this case, it sends a message to the peer from which it received the block in the Pt24m4xi protocol saying "Hey you, you send me a block in the protocol Pt24m4xi, it means that (if you're an honest participant) you validated it. Therefore, you must know about Pt24m4xi! Please send me the source code of Pt24m4xi."

(If the peer doesn't, it is kicked.) If the peer does, the node checks that what it downloaded is the correct protocol by checking that the hash of the code source is the one announced, it compiles the received source code, dynamically links the produced library to itself and use it to validated the just received block. This is the "you didn't touch your tezos-node in a while" scenario. Your node will still keep following and validating the chain!

4
  • So there's an ocaml compiler built-in to the tezos-node binary to compile new libraries? Even if I've never installed anything related to ocaml (ie: compiled binaries on machine X and copied only binaries to machine Y for running), this mechanism can still function?
    – utdrmac
    Apr 14 '19 at 23:44
  • You might want to mention that if you are running a node before the April 8th build, it will fail to compile the new protocol, so unfortunately people will need to upgrade their node manually this time. Apr 15 '19 at 0:10
  • @LukeYoungblood was their an announcement to that regard ? Could you please link to the relevant gitlab ticket if it exists ?
    – Ezy
    Apr 15 '19 at 1:17
  • Yes, a minimal OCaml compiler is embedded in tezos-node binary. Apr 15 '19 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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