Aleph Zero Blog

Testnet Update: Transitioning to Ink! 4.0 Beta Smart Contracts

Jan 12, 2023

The Aleph Zero team has just released a new version of Aleph Node featuring ink! 4.0.0-beta smart contracts, among other upgrades. The preparation process involving all external validators begins today, with the update itself scheduled for January 19th. Continue reading to learn more about what this means for the network and Testnet validators!

We are proud to introduce the timeline for a major testnet update. The Aleph Node 9.0 version brings lots of important improvements, most notably:

  • a new version of pallet contracts supporting ink! release 4.0.0-beta;
  • a major Substrate update that brings a new weight system (V2).
  • a new networking layer used by validators to communicate with each other;
  • an updated version of AlephBFT consensus featuring a new justification system.

That last point is the reason why the upgrade process will be a bit different this time. The previous version of Aleph Node will not be compatible with the chain after the upgrade; all node operators need to update their setup to ensure their nodes will be compatible with the network. We would like to stress the importance of timely following the procedure described below to ensure a smooth transition.

Update Timeline

Here is the timeline of the testnet update process (we’ll go into greater detail later in the article): 

  • Jan 12th – a new binary with r-9.0 tag is available for download; aleph-node-runner gets updated accordingly;
  • Jan 12-18th – update window: all nodes need to update to r-9.0;
  • Jan 19th – after ensuring that the transition went smoothly, the Testnet runtime and AlephBFT version are updated.

January 12th, 2023

On this day, the Aleph Zero team releases the new Aleph Node binary (r-9.0 tag) and corresponding changes in the aleph-node-runner. Validators can now download the new version and update their nodes, as described below.

January 12-18th, 2023 

During this timeframe, all the validators are required to upgrade their nodes, and the core team will do so with Foundation nodes as well. 

Here are the exact steps that should be undertaken to complete the process safely: 

1. Wait for a session to start.

2. Make sure you’re not on the session committee in this session.

3. Perform the update. This will give you a comfortable window to update your node without the risk of disrupting block production.

  • The update procedure is the same as usual: aleph-node-runner users must stop their docker containers and re-run the script (please pay close attention to the output of the script and look for any errors)
  • Users building from source will need to build and start a binary from tag r-9.0 in the aleph-node repository.

4. In both cases, please make sure that your node started without problems by examining the logs. In case of any issues, we are here to answer your questions.

All node operators will have six days to update their nodes. In case of technical challenges, please remember that members of the core team are available on relevant Discord channels.

January 19th, 2023 

On this day, we will publish the final reminder for community node owners to perform the update by the last deadline. Then we proceed to update the chain logic (runtime) and AlephBFT consensus version. Failing to have your node updated by that time will result in the node not being compatible with the network and therefore crashing.

As always, we are thrilled to announce another update and will continue to deliver new features to the Testnet. As we roll out the latest upgrades, be sure to follow our social media channels (Telegram, Discord) on how the update is unfolding! 

What Does the Update Mean for Smart Contract Developers?

The upcoming update will feature two major changes that influence the way smart contracts operate on the Aleph Zero blockchain: the WASM execution engine (pallet-contracts) will be upgraded to a version supporting ink! 4.0.0-beta and the weight system of the whole chain will switch to using Weights V2.

While the upgrade of pallet-contracts is fully backward compatible (already deployed contracts written in ink! 3.4 will stay on the chain and remain functional), the weight system upgrade turns out to be more problematic. Unfortunately, none of the current smart contract tools capable of interacting with Weights V2 are able to communicate with ink! 3.4 smart contracts. In consequence, unless you are using some custom solution and compose contract calls manually, your contracts already deployed to Aleph Zero Testnet will stop being operational.

We encourage all smart contract developers to migrate their contracts to ink! 4 and redeploy them to the Testnet. Most of the coding work required for the migration is quite mechanical, and we prepared a quick summary with basic guidelines to help you with that transition. We would greatly appreciate your feedback or improvement suggestions.

To ensure support for interactions with contracts using the new weight system, we will be phasing out tab in our web wallet and replacing it with Contracts UI. This new smart contracts manager provides the same functionality as the old version while ensuring proper Weights V2 handling and largely improving user experience and aesthetics.

For those of you who still need your old ink! 3.4-based smart contracts to be operational before you fully migrate to ink! 4, we prepared a dedicated temporary environment that will keep running the previous version of the Testnet for the next couple of weeks. You can access it using: web wallet, RPC and WS endpoints, and faucet.

The Way Forward for Aleph Zero Smart Contracts

The update will be performed to test the newest version of ink! 4.0 beta on the Testnet, which puts us closer to releasing smart contracts on the Mainnet. 

The most optimistic scenario is that once ink! 4.0 beta proves smooth operations on the Testnet for a number of weeks, and we will be able to push it to the Mainnet. However, as this is still a beta version and not a production release, different challenges are not out of the equation. 

The core Aleph Zero team is in close contact with most of the ecosystem developers and seeks to ensure that the ecosystem applications can launch on a platform that’s ready to accommodate their needs. We expect and are getting ready for intense testing of ink! 4.0 beta over the next weeks. 

Please note that we will only release the smart contracts on the Mainnet if they are up to our and our developers’ community’s highest standards.