BandChain V2.4 Upgrade

“Delivering 10X throughput with this biggest upgrade to date”

BandChain V2.4 Upgrade

“Delivering 10X throughput with this biggest upgrade to date”

Since the launch of Laozi-testnet-6 last week, and having enabled the latest IBC version, we are now so excited to announce that we are ready for the next BandChain 2.4 upgrade to our community! This significant latest upgrade to our chain will impose fundamental changes to multiple things — one of which is how gas is calculated on the BandChain. This results in an improved user experience as well as throughput time on our network. Before going through the details of this latest upgrade, let us provide you with a brief recap of the current version.

In our previous version, Owasm (Oracle WebAssembly) utilized the ‘inject gas’ technique to calculate the amount of gas that would be used to run a Wasm script. An Oracle Script (OS) leverages this technique that inputs a gas consumption function into the Wasm code; there was no inherent mechanism that can be used to calculate gas innately in the OS itself.

Although secure, this workaround technique in our previous version meant that the BandChain was operating less efficiently than it could be. This is due to the fact that the gas consumption function, injected into the Wasm OS code, would in turn call the gas function on the host environment which could, in an anomalous case, lead to delays. Therefore, to handle these anomaly cases, we have had to lower our gas limit and gas multiplier. This was holding us back from reaching our full potential.


Chain 2.4 Version Upgrade Achievements

With this upgrade, we use the new Metering Middleware from Wasmer, a fast and secure WebAssembly runtime, to calculate gas consumption instead of using the ‘inject gas’ technique. This transition allows the OS to efficiently calculate gas consumption in a manner that is not only more methodical, but also structurally more sound. There are 4 major advantages in doing this:

  1. More streamlined code interaction as the Middleware is on the same level as Owasm code
  2. Total elimination of any risk to modifications of the Wasm code
  3. Customizable Metering Middleware that allows for a more flexible gas consumption calculation
  4. Ultimately a much faster network

In addition, as we fine-tuned the Metering Middleware, we are able to achieve a reliable formula whereby we can accurately calculate the execution time based on gas calculated. This is also applicable to all instructions on the BandChain as well as those imported from the host environment. Above all, these improvements on the key elements of the BandChain has led to a much faster network.


Increased Throughput by at least 10X

This improved efficiency also comes from minimizing the required gas as we are able to decrease the required work range threshold when calculating the required gas for a particular work. The graph below illustrates this massive achievement.

To put this into perspective, we are able to reduce the time taken to run the same task from the worst case scenario of 0.4 seconds to 0.03 seconds. The new optimal throughput is over 10X of the previous version and equates to a throughput speed that is 2–3 times faster than the industry average for upgrades.


Increased Request Throughput by Increasing Block Gas Limit

In our recent benchmark experiment, it was shown that an average Cosmos module use-case consumes 50 million Cosmos SDK gas per second. As such, we set the BandChain parameters to match this i.e. BandChain block gas limit has been increased by 6.25 times from 8Mn (limited by the aforementioned infinite loop scenario) to 50Mn. Given that our blocktime is 3 seconds, split into 1.5 seconds for consensus time between nodes and 1 second for transaction execution time, we are able to achieve a safety cushion of 0.5 seconds spare. All of this is crucial as it ensures the timely delivery and execution of data (no longer than the 3 seconds block time), and faster than the protocol designed by our users.

We can also illustrate this improved throughput into improved gas requirements by observing the table below:

In conclusion, we were able to reach an astonishing amount of owasm throughput at 12–20 times faster in Oracle Script #3 (Band Standard Dataset (Crypto)), the most popular oracle scripts in our chain.

*CAUTION**

As mentioned, in previous versions we injected the consume gas function directly into wasm script. This means that once BandChain is upgraded to v. 2.4 we will need to re-deploy existing oracle scripts. Otherwise, they may consume more gas as shown below.


Other Upgrades to the BandChain

“Improved functionality with an additional suite of features that help to make the chain more well-rounded”

Fully Support Statesync: this new feature will help developers set up new nodes on the BandChain more easily.

This newest iteration of the BandChain will have an added extension of snapshot that syncs our Data Sources (DS) and Oracle Script (OS) files at the sync state. This was not possible previously and we did not fully support statesync across the nodes since our DS and OS files were not included in the state.This ultimately allows new validators to join the Band ecosystem more easily and seamlessly.

IBC V3: further consolidation of our oracle price feed in the Cosmos Ecosystem.

Our upgraded IBC version from V1 to V3 allow CosmWasm contract from other chains to request our price oracle directly through Cosmos IBC (Inter-Blockchain Communication).

ICA (InterChain Account): the BandChain will now support the InterChain account standard, therefore allowing users to send transactions from other networks via IBC.

In this upgrade, we have added the InterChain account host module onto the BandChain. This will bring more functionality and use cases to the Band Ecosystem as users can send any messages or transactions to our chain without the need to have an account on our chain. More details can be found from https://interchainacademy.cosmos.network/academy/3-ibc/6-ica.html


About Band Protocol

Band Protocol is a cross-chain data oracle platform with the aspiration to build high-quality suites of web3 development products. The flagship oracle solution aggregates and connects real-world data and APIs to smart contracts, enabling smart contract applications such as DeFi, prediction markets, and games to be built on-chain without relying on the single point of failure of a centralized oracle. Band Protocol is backed by a strong network of stakeholders including Sequoia Capital, one of the top venture capital firms in the world, and the leading cryptocurrency exchange, Binance.

Website | Whitepaper | Telegram | Twitter | Medium| Youtube |Reddit | Github