Software Updates
The Algorand node software is upgraded from time to time, and some of these updates may contain a consensus protocol upgrade. When there is no protocol upgrade, it is not be necessary to upgrade the node software, but it may be desirable to do so to take advantage of new features and/or bug fixes.
However, when a new version of algod
contains a protocol upgrade, an important process is kicked off in which online accounts effectively vote for or against a new protocol with the blocks they propose. These protocol upgrade voting periods last 10,000 rounds, and each block produced counts as one vote.
When the network is in a voting period, additional details can be seen in the output of running goal node status
:
Last committed block: 46248141Time since last block: 2.3sSync Time: 0.0sLast consensus protocol: https://github.com/algorandfoundation/specs/tree/925a46433742afb0b51bb939354bd907fa88bf95Next consensus protocol: https://github.com/algorandfoundation/specs/tree/925a46433742afb0b51bb939354bd907fa88bf95Round for next consensus protocol: 46248142Next consensus protocol supported: trueLast Catchpoint:Consensus upgrade state: VotingYes votes: 3No votes: 2097Votes remaining: 7900Yes votes required: 9000Vote window close round: 46256042Genesis ID: mainnet-v1.0Genesis hash: wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=
The new protocol is activated if 90% of the votes—9000 blocks within the 10,000 block range—are in favor of the new protocol. If the new protocol is not activated, the voting period ends and the network continues to run on the current protocol. If a new protocol is approved, it will be activated after a cooldown period that may range from 10,000-150,000 rounds (or more, in special circumstances). At this point, all nodes must be running the new protocol. If a node is not running the new protocol, it will be kicked offline and unable to participate in consensus until it is upgraded.
Updating Node Software
Node software updates can be automated, but node runners are encouraged to read release notes to be aware of changes included in new versions of algod
and decide if and when updating is appropriate for their situation.
Linux - Package Manager Install
The RPM or Debian packages in the package repository are updated automatically, but this does not mean that the node installation on your local machine is updated automatically. Depending on your Linux distribution and version, you may have or need to install unattended-upgrades
to handle automatic updates.
Linux or MacOS - Update Script Install
If your node was installed using the updater script, follow this approach. You can check for and install the latest updates by running the following at any time from within your node directory:
./update.sh -d ~/node/data
Note that the -d
argument has to be specified when updating. It will query S3 for available builds and see if there are newer builds than the currently installed version. To force an update, run:
./update.sh -i -c stable -d ~/node/data
If there is a newer version, it will be downloaded and unpacked. The node will shutdown, the binaries and data files will be archived, and the new binaries will be installed. If any part of the process fails, the node will restore the previous version (bin
and data
) and restart the node. If it succeeds, the new version is started. The automatic start can be disabled by adding the -n
option.
Setting up a schedule to automatically check for and install updates can be done with CRON.
crontab -e
Add a line that looks like this (run update.sh
every hour, on the half-hour, of every day), where user
is the name of the account used to install / run the node:
30 * * * * /home/user/node/update.sh -d /home/user/node/data >/home/user/node/update.log 2>&1