Use this page for updating the zend daemon directly from source
- Upgrading the zend daemon
- For Secure Nodes, restart the Secure Node Tracker
NOTE: These steps assume you have built from source previously, be sure to install the dependencies for your distribution if not - https://github.com/ZencashOfficial/zen/blob/master/README.md
Description | Command | |
---|---|---|
Upgrading the zend daemon | ||
1 | Change (cd) to the 'horizen' directory | NOTE: this may be 'zencash' on older installations from source cd ~/horizen |
2 | Remove (rm) the original 'zen' directory | rm -r zen |
3 | Clone the github repository | git clone https://github.com/ZencashOfficial/zen.git |
4 | Change (cd) to the 'zen' directory | cd zen |
5 | Build and wait for completion... | ./zcutil/build.sh -j$(nproc) |
6 | Download the required parameters for zend NOTE: This will only download parameters that are missing | ./zcutil/fetch-params.sh |
7 | Stop zend and enforce a 30 second wait before the next command to ensure zend has fully shutdown | If zen-cli and zend have previously been copied to /usr/bin/ zen-cli stop && sleep 30 If zen-cli and zend have not previously been copied to /usr/bin/ ./src/zen-cli stop && sleep 30 |
8 | Copy zend and zen-cli to the /usr/bin/ directory | sudo cp src/{zen-cli,zend} /usr/bin/ |
9 | Start zend with the --rescan flag to start re-scanning the blockchain NOTE: Re-scanning may take quite some time, sometimes up to an hour or more (depends on node performance)
| zend --rescan |
10 | After the re-scan is complete, the updated zend version will be displayed, the following output will be shown, with the versions in bold NOTE: You may see the error as in the example if zend has not completed it's rescan, this is normal. Re-enter the last command periodically to check it's status ***CHECK FOR "version": 2001850, after ~Jul 5, 2019,***NOTE: Zend version 2.0.17 will deprecate at block #555555, approximately Jul 23, 2019 | zen-cli getnetworkinfo | grep version Not Finished Re-Scanning zenops@node01:~$ zen-cli getnetworkinfo | grep version Desired Output zenops@node01:~$ zen-cli getnetworkinfo | grep version |
11 | Stop the current instance of zend running with the --rescan flag | zen-cli stop |
12 | Start zend monitoring services after the upgrade has been completed | For installations using systemd (assumes the unit file is named 'zend.service') sudo systemctl start zend For installations using monit sudo monit start zend For installations manually running zend zend |
Restarting zentracker | ||
13 | Restart the Node Tracker after zend has started | For installations using systemd (assumes the unit file is named 'zentracker.service') sudo systemctl restart zentracker For installations using pm2 (assumes the tracker is running as the only or first process, numbered 0) pm2 restart 0 |