Manual upgrade
Learn how to manually upgrade your nodes.
prerequisites
1. Upgrade Daodst version
Before upgrading Daodst version. Stop your daodst instance with Ctrl/Cmd+C
.
Next, upgrade the software to the desired release version. Check out Daodst release page Details about each release.
⚠️ NOTE : Make sure the version installed matches the version required for the network you are running (mainnet or testnet).
cd blockchain
git fetch --all && git checkout <new_version>
make install
📣 Tip : If you have trouble at this step, please check that you have the latest stable version of Golang installed.
Verify that you have successfully installed Daodst on your system using the version
command:
$ stcd version --long
name: daodst
server_name: daodst
version: 3.0.0
commit:
build_tags:
go: go version go1.20 darwin/amd64
...
📣 Tip: If there is a software version mismatch, check your $PATH
to make sure the correct stcd
is running.
2. Replace Genesis file
📣 Tip : You can find the latest genesis.json
file for mainnet or testnet in the following repositories:
- Mainnet: github.com/daodst/mainnet
- Testnet: github.com/daodst/testnets
Save the new genesis as new_genesis.json
. Then, replace the old genesis.json
located in the config/
directory with new_genesis.json
:
cd $install_path/.stcd/config
cp -f genesis.json new_genesis.json
mv new_genesis.json genesis.json
📣 Tips:
We recommend using sha256sum
to check the hash of the origin of the download against the expected origin.
cd ~/.stcd/config
echo "<expected_hash> genesis.json" | sha256sum -c
:::
3. Data reset
⚠️ Note : If the version you want to upgrade requires a data reset (hard fork), please check here. If this is not the case, you can skip to Reboot.
Delete obsolete files and reset data:
rm $install_path/.stcd/config/addrbook.json
stcd tendermint unsafe-reset-all --home $install_path/.stcd
Your node is now in pristine state, while keeping the original priv_validator.json
and config.toml
. If you previously set up any sentinel nodes or full nodes, your nodes will still attempt to connect to them, but may fail if they have not been upgraded.
🚨 IMPORTANT 🚨
Make sure each node has a unique priv_validator.json
. DO NOT copy priv_validator.json
from old nodes to multiple new nodes.
Running two nodes with the same priv_validator.json
will result in you double signing.
4. Restart the node
To restart a node after a new genesis update, use the daemon
command:
stcd daemon