All About Transaction Processing

Sui's unique transaction processing, requiring consensus for only shared objects, results in high speed performance.

All About Transaction Processing

Sui delivers faster and more efficient performance than other blockchains due to its hybrid approach to transaction processing. This approach results in a tested rate of up to 297,000 transactions per second. In real world terms, users on Sui experience near instantaneous response in apps and games.

Transactions in the blockchain world underpin how apps work, as many actions in an app set a process in motion involving the Validators and Nodes that make up a network. With Sui's object data model, those transactions involve changes to individual objects. Sometimes those changes simply mean ownership transfer, and sometimes they might entail a fundamental transformation, such as changing an object's appearance.

Most blockchains require that all transactions must be approved by a consensus of Validators. Sui, however, makes this process more efficient by only requiring that certain objects undergo Validator approval. This process of Validator approval maintains a consistent global data state across the network, a key feature of blockchains.

Decentralized Network Transactions

Private networks process transactions on internal servers that implicitly trust each other. Consider, for example, Netflix, and all the video files it maintains. Netflix's infrastructure maintains user account records and authorizes which accounts can view the different files. The various servers in Netflix's data centers trust the accuracy of the account and video file data that other servers pass to them.

Decentralized networks, where independent operators run the servers that support the infrastructure, must approve transactions and disseminate changes to data across the network. On Sui, all the Validators and Nodes share a global data state.

Going back to the Netflix example, if someone minted a video file on Sui as an NFT, then gave it to someone else on the network, all the servers on the network would maintain a record of that ownership change. Just as Netflix's servers register who can view each video, Sui maintains a similar global state. However, in the Sui model, nobody can make an arbitrary change to a file's status. The independently operated servers agree on ownership and other parameters of each file.

Sui's Consensus Mechanism

Sui distinguishes itself from other blockchains by defining two object types: shared and single owner. Multiple people can make changes to a shared object, while only the object owner can make changes to a single owner object. Sui supports two other object types, immutable and object-owned objects, but for the purpose of understanding transactions let's focus on the former two.

A shared object could be a multiplayer game or a shop, where multiple people affect the state of that object. For example, a chess game app would represent the game as a shared object, allowing each player to affect the state of the object as each takes their turns. Each turn a player takes initiates a transaction on the network, which the network Validators need to approve to maintain the integrity of the network's global state.

This process where Validators approve transactions is called consensus. By contrast, on a private network such as in the Netflix example, all transactions are presumed legitimate. On Sui, where anyone can support the network by running a Validator, the consensus system must ensure the legitimacy of transactions to ensure integrity.

As each shared object transaction enters the network, Validators go through a process where they assess whether the transaction should be approved, essentially voting yes or no on it. In the chess game example mentioned above, if a player moves their rook from square h8 to f8, the network Validators vote on whether that move was a legitimate change to the chess game object. If a sufficient number of Validators vote yes, the transaction is approved and the opposing player gets to make their move.

Although this process may sound onerous, in reality it occurs in milliseconds. The chess game players should encounter minimal lag, likely even less than typical Internet lag.

Because Sui only requires shared object transactions to go through consensus, the load on the consensus mechanism is much less than on other blockchains where every transaction must go through consensus.

Tested Performance

The original team behind Sui designed its architecture to be more performant than existing blockchains. The hybrid transaction processing system targets resources where they're needed, optimizing for throughput.

As an initial proof of concept, in 2022 the team demonstrated how a Validator running on an 8-core M1 Macbook Pro could process 120,000 transactions per second at peak traffic.

While that initial number was impressive, additional work and refinement on Sui from the original team and community delivered even better performance. Using an example network with 100 geographically distributed Validators, resembling the now deployed Sui Mainnet, the team saw maximum throughput of 297,000 transactions per second using a 24-core AMD machine with 256GB memory.

Built for Efficiency

Sui's original designers evaluated the architecture and features of other blockchains, considering how they could improve on this work to come up with a more performant network. The need for other blockchains to achieve consensus on every transaction made the consensus mechanism a particular focus for improvement.

However, this consensus mechanism could not work without Sui's object-oriented data model. This object model allows for different types of objects, and frees developers to choose the right object types for their apps.

Check out our tutorial series to learn how to program shared objects on Sui. And learn more about Sui's consensus mechanism, including Narwhal and Bullshark, the high-throughput mempool and consensus engines that process transactions.