Testnet 9.1 released: Upgrade Your Witnet Node/s Now!
Witnet Testnet 9.1 (witnet-rust 0.9.1)
has been released: this article will cover the crucial updates (and what they mean for the network), followed by instructions on how to upgrade.
What’s new?
In order to address the scalability challenges faced during Testnet 9.0b, the new network has had some crucial updates:
- Icing 🧊 — if a node tries to connect to another node and fails (for example, the node is out of consensus or down), it will “freeze” that peer address for 24h. This makes the discovery of healthy peers much more efficient.
- Inbound Sybil rejection 👥 — each node will only accept incoming connections from diverse IP ranges, i.e. a connection from IP
1.2.3.4
will be rejected if it has already established a connection from1.2.5.6
. This guarantees a neutral view of the network consensus, and reduces the risk of your node going down if some unreliable but well-connected nodes fail.
You can hear Adan go into more detail on this on the most recent sprint review here (starting 24:22):
The effect that these security measures will have should be obvious to most users — everything will work as before, but it will be much more resilient.
However, users who run several nodes off the same IP or use a popular VPS IP may see their nodes have a hard time connecting to the network. This is an intended effect: we need to prevent any nodes from becoming too central (and crucial) to the stability of the network.
Decentralization is all about avoiding “single points of failure” — thus having a significant part of the network running off a few machines from a single VPS provider is not a great idea: any minor downtime from that provider could cause a huge disruption in the network, as we saw earlier this month.
Upgrade now! Different setups, different upgrade methods
The process will depend on your setup. Please identify which of the following setups you have:
- I’m running a node on Docker.
- I’m running a node on Docker Compose.
- I’m running a node with systemd.
- I’m running the binary directly from the release or the source code.
- I’m not running a node yet.
Check below for specific instructions corresponding to each setup.
Setup 1: I’m running a node on Docker
So great to hear you’ve been in the community for that long! Upgrading is as easy as it gets:
- Remove the old container. Don’t worry, your private keys won’t disappear:
docker stop witnet_nodedocker rm witnet_node
2. Pull the latest version of the Docker image:
docker pull witnet/witnet-rust
3. Create a 0.9.1 container with the following command (if you changed the persistent storage path in the past, change ~/.witnet-rust-testnet-6
for whatever path you were using):
docker run -d \
--name witnet_node \
--volume ~/.witnet:/.witnet \
--publish 21337:21337 \
--restart always \
witnet/witnet-rust
Voilà! Your 0.9.1 Witnet Testnet node is now up and running. Your master key is safe and your addresses will be the same. This time your balance and reputation score will be lost though, as this is a full network reboot.
Remember that you can always double-check the Witnet version that you are running with this command:
docker exec witnet_node witnet --version
Take into account that Testnet 9.1 has been scheduled for bootstrapping on Jul 14th at 09:00 UTC. If you start your node before that date and time, it will start looking for peers and then it will remain idle until the bootstrapping. Then it will continue operating normally.
If you want to make sure that everything is in order, please take a look at the new “What’s next?” guide in the Witnet protocol documentation.
Warning: if you customized your witnet.toml file, you may need to make those changes again after this upgrade.
Setup 2: I’m already running a node on Docker Compose
Upgrading your Docker Compose setup is even easier. First navigate into the directory where your docker-compose.yaml
file is. For example, if you are using @Bertux integration:
cd witnet-operator-tools/docker/compose/bertux-operator-stable
From there, doing the upgrade is as easy as it gets:
docker-compose down
docker-compose pull
docker-compose up -d
Wasn’t that easy? 😄
If you want to make sure that everything is in order, please take a look at the new “What’s next?” guide in the Witnet protocol documentation.
Warning: if you customized your witnet.toml file, you may need to make those changes again after this upgrade.
Setup 3: I’m running a node with systemd
These are the steps for upgrading if you are using Harsh Jain’s systemd integration (the witnet.sh
installer and management tool):
- Make sure that you have the latest version of the
witnet.sh
file. - Simply run the
upgrade
command, changing the number after-e
with the number of nodes that you are operating:
./witnet.sh upgrade -s 1 -e 10
Remember that you can always double check the Witnet version that you are running with this command:
./witnet.sh run -c "--version"
Voilà! Your nodes should be now up and running on the new Testnet 9.
If you want to make sure that everything is in order, please take a look at the new “What’s next?” guide in the Witnet protocol documentation.
Warning: if you customized your witnet.toml file, you may need to make those changes again after this upgrade.
Setup 4: I’m running the binaries directly or compiling from source
If not using Docker, you just need to download the latest release or build it from the source code. The new release will detect the genesis block, sync to the tip of the chain and start mining as usual. Your master key is safe and your addresses will be the same :)
The only case in which additional steps are needed is if you modified a custom witnet.toml
file. If that’s the case, please make sure you update all the consensus constants so they are the same as in this example. Also, you may need to make sure that your configuration file is located in the same directory as the witnet binary itself.
Regarding the genesis_block.json
, please ensure that it is located in .witnet/config/genesis_block.json
(relative to the witnet binary) . Remember that you can download this file from the release page.
You can always double check the Witnet version that you are running with this command:
witnet --version
If you want to make sure that everything is in order, please take a look at the new “What’s next?” guide in the Witnet protocol documentation.
Warning: if you customized your witnet.toml file, you may need to make those changes again after this upgrade.
Setup 5: I’m not running a node yet
What are you waiting for? Get started in less than 5 minutes!