I am learning the Tezos economic protocol self-amending feature and I've gone through a lot of well-done documentation, like:
- overview of Tezos node architecture, with the distinction between economic protocol and shell (https://tezos.gitlab.io/shell/the_big_picture.html)
- detailed description of economic protocol https://tezos.gitlab.io/active/protocol.html
- detailed description of protocol environment, the API for allowing economic protocol and shell interacting (https://tezos.gitlab.io/shell/protocol_environment.html)
- the governance process (https://tezos.gitlab.io/active/voting.html)
- the release system (https://tezos.gitlab.io/releases/releases.html)
and many other online resources here and there.
I have understood the role and the responsibility of the economic protocol (I would summaryze it as the blockchain consensus layer) and I found also the governance process very clear and neat, going through the 5 periods of proposal, exploration, cooldown, promotion and eventually adoption.
What I am still struggling to get is the very final step of the economic protocol self-amending. The documentation states "Adoption period: On-chain nothing specific happens during this period except on the very last block (see below). Off-chain the developers release tools that include support for the soon-to-be activated protocol, other actors (bakers, indexers, etc.) update their infrastructure to support the newly released tools, smart-contract developers start working with soon-to-be-available features, etc. At the very end of the period, the proposal is activated. This means that the last block of the period is still interpreted by the current economic protocol, but the first block after the period is interpreted by the new economic protocol (the one that was voted in).".
But how does a node actually upgrades, at a low level?
- Are binary files for the new economic protocol downloaded? Or is source code downloaded and compiled? If yes, where is this downloaded from?
- Who/what triggers this upgrade activity? Is this a manual user operation, or is it the shell?
- Given a new economic protocol XYZ being active, what are the steps my node go through to get it actually running on my machine?
I'd like to have a basic description of how this final part of the upgrade is performed, possibly with some documentation link for additional reference.