Witnet-Rust 1.2.1 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.

Adán Sánchez de Pedro
The Witnet Oracle Blog
4 min readApr 24, 2021

--

What happened?

  • Since April 22, 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 April 24, the episode was over and a clear majority chain 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.
  • 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:

This will work best for native binaries or systemd:

My node is OK. What should I do?

Nothing. You are good. Do NOT upgrade to 1.2.1, as that could do more harm than good.

My node is FORKED. What should I do?

You need to upgrade to 1.2.1.

Upgrading to 1.2.1 when using Docker

The 1.2.1 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:

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 2 hours. Progress updates are logged every 30 seconds.

Upgrading to 1.2.1 with native binaries

  1. Download the recovery script from Github onto the system where your node is running.
  2. Make sure the netcat command is installed (you can sudo apt get netcat if unsure).
  3. Give execution permissions to the recovery script (the classic chmod +x wip0013-recovery.sh should work).
  4. Run the script, passing the path to the native witnet binary as the first argument, and the path to your witnet.toml configuration file as the second argument (e.g. ./wip0013-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 2 hours. Progress updates are logged every 30 seconds.

What about the upcoming WIP-0009, WIP-0011 and WIP-0012 upgrades?

This episode was caused by the same reasons as the February 2021 episode, explained in WIP-0010.

Most medium medium term actions mandated by WIP-0010 have been addressed by WIP-0009, WIP-0011, and WIP-0012.

All these protocol improvements are bound to be activated on 28 April 2021 at 9am UTC, so no further action is needed at this time.

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

--

--

Adán Sánchez de Pedro
The Witnet Oracle Blog

@Witnet_io board member, CTO at @StamperyCo, founder of @LoquiIM. Microelectronics aficionado. I write code, give talks, make music, brew beer and laugh a lot.