On the morning of November 21, 2024, between approximately 1:15 and 3:45 am PT, Sui Mainnet suffered a complete network halt. All validators were stuck in a crash loop, preventing all transaction processing.

What happened?

An assert! in congestion control code (described below) erroneously caused validators to crash if the estimated execution cost was zero. All of the following conditions had to be met for this edge case to trigger:

  • Congestion control configured to use TotalGasBudgetWithCap mode.
    • This was briefly enabled in protocol version 63 before being reverted, and then enabled again with the accumulating scheduler in protocol version 68.
  • The network receiving a transaction with both:
    • a mutable shared object input
    • zero MoveCall commands

As soon as the network received a transaction with this shape, all validators crashed.

What is congestion control?

The Sui network’s object-based architecture allows us to process many different user transactions massively in parallel, in a way that’s not possible on most other networks. However, if multiple transactions are all writing to the same shared object, they must execute in sequential order, and there is a limit to how many transactions we can process that touch that specific object.

Congestion control, the system that limits the rate of transactions writing to a single shared object, prevents the network from becoming overloaded with checkpoints that take too long to execute.

We recently upgraded our congestion control system to improve shared object utilization by more accurately estimating the complexity of a transaction. The code for the new mode, TotalGasBudgetWithCap, had a bug that caused this issue.

How did we fix it?

Once we identified the issue, the fix to the code was straightforward (PR #20365). This code fix was shipped to Mainnet in v1.37.4 and Testnet in v1.38.1. Thanks to an overwhelming response from our validators, it took only 15 minutes from the time the fix was released until the Sui network was back up and running.

What have we learned?

  • Our incident detection and response systems are working well. Automated alerts fired to oncall engineers at the same time we heard reports of issues from the community, and we quickly had all hands on deck to diagnose and fix the issue. Thanks to swift work from the incredible community of Sui validators, the network was back online almost immediately after the fix became available.
  • In an effort to prevent future bugs of this nature, we’ll be working on shoring up our testing systems to generate a wider variety of adversarial transactions like the one that triggered the crash.
  • In an effort to reduce incident response time even further, we’ll be working on improvements to our build workflows to make debug and release binaries available more quickly. A significant portion of the outage time was spent waiting for the release to build.
Author

Sui Foundation

High-performance blockchain delivering the full stack for a new global economy.

Read more like this

Revolut Accelerates Sui Blockchain Education and Adoption

Revolut's Learn program allows users to earn rewards while learning about Sui.

2min read
Sui Foundation

Introducing the Decentralized Seal Key Server, Now live on Testnet

Seal's encryption layer now supports distributed key management across independent operators, with no changes to how you build

4min read
Sam Blackshear

Sui Unveils SuiHub Taipei to Fuel Innovation at the Heart of Asia’s Tech Ecosystem

Taipei becomes the latest city to join Sui’s expanding global network of community-led hubs.

1min read
Sui Foundation

Cryptography in Sui

As we launch Sui, we want to share our best practices on cryptography in Sui and why we support certain algorithms and primitives.

3min read
Kostas Chalkias

Sui Wallet Updates and Related Tools

In addition to a refreshed look, you’ll find several refined features that will improve how you use and interact with the wallet.

3min read
Sui Foundation

All About Sponsored Transactions

Among Sui Move innovations, sponsored transactions removes a huge hurdle in onboarding users unfamiliar with Web3 conventions.

3min read
Sam Blackshear