What key information did the officials reveal about the Sui testnet Wave 2?

Sui Foundation
2023-02-28 15:05:51
Collection
The testnet Wave 2 has significantly outperformed Wave 1 in multiple data metrics, with improvements in large transactions, type parameter inputs, and consensus delays.

Written by: Sui Foundation

Compiled by: Babywhale, Foresight News

The Sui Testnet Wave 2 has successfully concluded, and this testing helped us achieve our goal of enabling staking operations on Sui. The significant activity on the network gives us more confidence that we have taken another critical step in our journey towards launching the mainnet. A big thank you to everyone who participated and helped us make Sui better!

We learned a lot from Wave 2, and we will be releasing a blog series in three parts to review everything from Wave 2. The first blog will cover network aspects, while the following articles will delve deeper into token economics and the Frenemies game.

Statistical Snapshot

During Wave 2, the community set multiple new records over three weeks and 33 epochs of testing.

  • Over 7,000 nodes connected to 41 validators
  • 1.69 million addresses
  • 36.5 million transactions (1.6 times growth compared to Wave 1)
  • 3.24 million NFTs
  • 118,614 contracts deployed (45 times growth compared to Wave 1)
  • 1.34 million SUI staked
  • 7.35 million staking operations processed
  • 67 TPS peaks observed
  • Compared to the first three weeks of January, Sui wallet DAU grew 2.2 times during Wave 2, reaching 171,000, and Sui wallet installations grew over 3 times, reaching 333,000
  • Sui block explorer had 1 million page views and 571,000 unique visitors, setting a historical high
  • The Sui Discord community has over 600,000 members, making it one of the largest web3 communities in the world

It is worth noting that four smart contracts processed over 1 million transactions during Wave 2, accounting for 40% of the total transaction volume in Wave 2:

  • Sui's system objects topped the list, processing over 7.3 million staking-related transactions.
  • The Frenemies game ranked second, completing over 3.5 million transactions in just five days of gameplay.
  • The third most active smart contract is the 8192 game, with the contract address 0x137aebf47cd16956b68633b6f6f00a992d87d9c6, processing over 2 million transactions.
  • The fourth most active smart contract is Sui Capys, with the contract address 0x4c10b61966a34d3bb5c8a8f063e6b7445fc41f93, processing 1.6 million transactions.

Special congratulations to the community project 8192 game for breaking the million transaction mark! We also thank the community project Suiscan for providing data analysis for Wave 2.

These new records and the level of network activity allow us to identify important software updates and further collaborate with the validator and node operator community to enhance our operational capabilities.

Notable Network Updates

Similar to Wave 1, Wave 2 aimed to identify areas for improvement in the Sui infrastructure.

Handling Large Messages or Transactions

As Wave 2 focused on staking, the network experienced a lot of staking and unstaking transactions, which helped us improve our ability to handle large network messages and transactions. Specifically, each pending staking delegation and undelegation transaction generates an event during epoch change. This affects the transaction size of epoch change transactions, as each generated event is part of the transaction effect. In Wave 2, we saw up to 230,000 staking operations in one epoch, making the transaction effect of that epoch change very large.

These oversized transactions can create many issues. If the transaction effect of epoch change becomes too large to be downloaded through the network, the epoch change will fail. If the transaction effect exceeds the maximum JSON RPC response, the transaction cannot be retrieved. Any application attempting to load such large transactions (e.g., Explorer) may risk crashing. Such large transactions may also be computationally too expensive for the network to handle. During Wave 2, our team had to lift some emergency limits to keep the network running smoothly while processing a large number of transactions.

In response to the above situation, we accelerated the addition of protective size limits for objects, packages, and various transaction data (input parameters, transaction effects, events). These limits will help ensure that storage, network, and computational resources are not overwhelmed by oversized transactions on the mainnet.

More Robust Handling of Transaction Type Parameter Inputs

On February 1, we discovered a bug where if a Move module was specified as a transaction input in type parameters, the transaction processing logic could not correctly validate the dependencies of the Move module (i.e., whether the module to which the type belongs has been published). Since Move package releases are done via Byzantine consensus broadcasting fast paths, some validators may learn about the published Move module before others and may disagree on the validity of transactions using this module in type parameters. One such transaction prevented the system from forming the next checkpoint, resulting in many full nodes stopping and validators forking the network. This was the primary reason for the interruption of Wave 2 on February 1.

To keep the testnet running in the presence of submitted transactions with invalid type parameters, our team implemented some emergency fixes:

  • Always check if the module of type parameters has been published;
  • Allow submitted invalid transactions to complete execution by failing;
  • Prevent further transactions with unpublished type parameters from being submitted.

Afterward, we discovered a second bug where the transaction input check logic did not reject inserting contracts that were not Move modules as inputs into type parameters. Since type parameters must be Move modules, the transaction could never complete, and the next checkpoint could not be formed. Similarly, our team had to add emergency fixes to force problematic transactions to fail due to execution errors in order to restore the network.

We added fixes for these two bugs in Sui's codebase: Fix input object generation #7940.

Narwhal Consensus Mechanism Delay Improvements

Similar to Wave 1, the testnet Wave 2 provided a valuable opportunity to further test the Narwhal consensus with 41 decentralized validators. During Wave 2, we took this opportunity to implement several optimizations to reduce consensus delays (parallel submission of consensus to two validators, parallel certificate verification, minheaderdelay parameter, one second minheaderdelay). We are continuously iterating on performance and will soon roll out more optimizations.

Notable Developer Takeaways

While ensuring network stability is a priority, our long-term goal is to make Sui the premier smart contract developer platform, where developers can create the best experiences for Web3.x based on Sui. To this end, we also focused on developer and user friction points during Wave 2.

Token Management

During Wave 2, several factors made it possible for users to encounter token management issues. These issues typically manifested as insufficient gas fee errors or a grayed-out staking button when users appeared to have enough SUI balance to transact.

Due to the active Validator Game on the network, reference gas prices may fluctuate, with larger increases between each epoch than usual. High gas price fluctuations may make the single token value held by users insufficient to cover gas fees. Additionally, the initial reference gas price setting was higher than in Devnet, reducing the likelihood of users holding multiple tokens and depleting their tokens more quickly. Finally, staking operations inherently involve users delegating their existing SUI balance to one or more validators. However, the layout of SUI held by users may not always align with their expected staking operations.

We made several changes during Wave 2 to alleviate this situation:

Other Takeaways from This Round of Testing

Each testnet wave is a combination of tension and excitement. We collaborated with everyone in the Sui community, intentionally pushing the network's staking capabilities to the limit, and in this spirit, we successfully strengthened Sui during the testnet Wave 2.

We are very grateful for the community's active participation, which helped generate high loads and uncover issues. Our next milestone is to launch a permanent testnet for the developer community, which will no longer be temporary, and we look forward to further collaboration at that time.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators