Witnet-Rust 1.1.3 Critical Upgrade is live. Update NOW if your node is forked!
After the recent episode of chain rollbacks, some nodes are forked and will need this update to keep up with the rest of the network.
What happened?
- Since February 20, the Witnet network suffered an unfortunate episode of poor superblock consensus leading to a high chain reorganization / rollback rate and multi-hour confirmation times.
- By February 22, the episode was over and a clear majority chain (~80%) had emerged.
- As a consequence, some minority of nodes in the network ended up consolidating superblocks that did not belong to the leading block chain.
- Because of how finality works on Witnet, there is no easy way for those nodes to reconcile their forked chain state with the leading block chain.
- Forked nodes require a critical upgrade that fixes their local chain state.
- Sheikah wallets are not affected. The public backend was paused for a while, and then resumed once the network stability was recovered.
- For more info, read the full post-mortem document.
How do I check if my node is forked?
Here is a one-liner that will let you know instantly.
This is for Docker:
docker exec witnet_node sh -c "witnet node blockchain --epoch 248839 --limit 2 2>&1 | grep -q '#248921 had digest 7556670d' && echo 'Your node seems to be OK' || echo 'Oh no! Your node is forked'"
This will work best for native binaries or systemd:
./witnet node blockchain --epoch 248839 --limit 2 2>&1 | grep -q '#248921 had digest 7556670d' && echo 'Your node seems to be OK' || echo 'Oh no! Your node is forked'
My node is OK. What should I do?
Nothing. You are good. Do NOT upgrade to 1.1.3
, as that could do more harm than good.
My node is FORKED. What should I do?
You need to upgrade to 1.1.3
.
Upgrading to 1.1.3
when using Docker
The 1.1.3
version of the witnet/witnet-rust
docker image contains a recovery script that will automatically sanitize your local chain state.
To apply the upgrade, simply follow the same steps as with any other witnet-rust upgrade:
# 1. Stop your container.$ docker stop witnet_node# 2. Remove your container. Don't panic, this won't delete your keys # or anything, as long as you are using docker volume bindings
# for persistence (that is the enabled in the default witnet-rust
# installation instructions).$ docker rm witnet_node# 3. Pull the latest version of the docker image.$ docker pull witnet/witnet-rust# 4. Reconstruct the container using the same command that you used # when you originally started your node. If you used the default
# one-liner as provided in the witnet documentation, simply use
# the one below. If you customized anything (ports, volumes,
# etc.), don't forget to reproduce the same customizations here.$ docker run -d \
--name witnet_node \
--volume ~/.witnet:/.witnet \
--publish 21337:21337 \
--restart always \
witnet/witnet-rust
The recovery script inside the new docker container will automatically connect to your local node, troubleshoot any issues and make sure it synchronizes to the leading chain. The entire process should normally take no more than 1h. Progress updates are logged every 30 seconds.
Upgrading to 1.1.3 with native binaries
- Download the recovery script from Github onto the system where your node is running.
- Make sure the
netcat
command is installed (you cansudo apt get netcat
if unsure). - Give execution permissions to the recovery script (the classic
chmod +x wip0010-recovery.sh
should work). - Run the script, passing the path to the native
witnet
binary as the first argument, and the path to yourwitnet.toml
configuration file as the second argument (e.g../wip0010-recovery.sh ./witnet ~/.witnet/config/witnet.toml
)
The recovery script inside the new docker container will connect to your local node, troubleshoot any issues and make sure it synchronizes to the leading chain. The entire process should normally take no more than 1h. Progress updates are logged every 30 seconds.
What about the upcoming WIP-0009 upgrade?
An immediate witnet-rust 1.2.0
release introducing the changes in WIP-009 was originally planned to go out in the coming days, and those changes would be activated on March 16.
Given the criticality of this upgrade and the need for further improvements to prevent episodes like this from happening again, it is yet to be decided whether the activation date for WIP-0009 is postponed. Stay tuned!
About Witnet
Witnet is a next-generation decentralized oracle that leverages state-of-the-art cryptographic and crypto-economic techniques to provide smart contracts with secure data inputs. In exchange for WIT tokens, Witnet’s network of permissionless oracle nodes retrieve, attest and deliver information to smart contracts in a tamper-resistant and decentralized way.
👇 Discover more 👇
Run a Node | Website | Blog | Twitter | Discord | YouTube | Telegram | GitHub