Blockchains revolutionized decentralized applications, allowing efficient execution of transactions across a network. However, interaction with applications on traditional blockchain platforms often face a limitation to scale – sequential transaction execution. The Ethereum Virtual Machine (EVM), processes transactions one at a time, hindering efficiency and scalability.
Sequential execution models imply that even independent transactions, such as payments between entirely different users, cannot occur simultaneously. Networks using these models suffer from diminished throughput during periods of high demand. Sui overcomes these limitations by enabling concurrent processing of multiple transactions, known as parallel execution.
Parallel processing is indispensable to meet the needs of enterprise level infrastructure, common from leading technology companies such as Apple, Netflix, and Facebook. Earlier blockchain architecture did not handle the demands of mass throughput. For a blockchain to meet enterprise demands and be globally useful, parallelization is required.
Parallelization improves scalability, reduces latency
Transaction parallelization enables the processing of multiple transactions simultaneously by utilizing multiple computing resources concurrently. This results in better scalability, allowing for increased throughput as hardware resources are scaled up during periods of high demand.
In Sui, validator nodes can dynamically allocate more computational power to handle additional transaction loads, enhancing the scalability of the network and so improving the overall user experience. Through increased transaction processing efficiency and reduced congestion, a network employing parallelization may necessitate less gas for transaction processing, resulting in lower transaction fees.
Providing multiple transaction processing channels ensures swift confirmation of transactions, even during increased network loads. Picture a one-lane road expanded to a multi-lane highway – more traffic can move through, reducing wait times and fuel costs from idling in traffic. Similarly parallelization in a blockchain eliminates the need for transactions to wait extended times for confirmation or pay excessive fees for prioritization of standard use transactions. Shorter confirmation times contribute to quicker transaction finality and pave the way for latency-sensitive applications, such as games or auctions.
Approaches to parallel execution
The two most prevalent methods for parallelizing transactions on a monolithic blockchain are a state access method or executing optimistically. The state access method proactively identifies transactions' access to specific parts of the blockchain's state, making it easy to declare independence and execute specific transactions in parallel. In contrast, the optimistic model assumes all transactions are independent initially, only to retrospectively verify this assumption and re-execute transactions that are not parallelizable.
Both methods are currently utilized in blockchains. Networks like Monad and Aptos implement optimistic parallelization, whereas Sui and Solana utilize state access methods. Optimistic methods are advantageous for their simplicity, requiring less effort from developers in defining transactions. However, executing optimistically introduces the potential for transaction conflicts and other inefficiencies during retrospective verification. State access methods, though requiring a bit more effort from developers, offer more predictable outcomes and avoid latency impacts from retroactive verification.
State access methods also enable more dynamic gas fee markets. Because dependencies are declared upfront, transactions involved in a highly congested part of the blockchain state can be treated differently than others. For instance, a highly popular NFT mint may generate massive amounts of transaction requests in a short timeframe. A network employing a state access method can identify blockchain state hotspots, such as the NFT minting contract, and rate-limit, and even charge more for transactions involving hotspots.
This allows standard transactions to proceed smoothly, while transactions related to the minting process are prioritized separately based on the the total gas associated with the transactions. On Sui, transactions are included into a checkpoint on a first-come-first-serve basis, but within the checkpoint are ordered based on gas provided. This creates a dynamic that allows for those interested in paying to have priority within a checkpoint without unfairy excluding transactions from a checkpoint that are not offering additional gas so long as they meet the minimum requirements. Achieving this level of granularity is not as easily feasible with optimistic parallel execution.
Parallelization in Sui
Sui uses a state access method for transaction parallelization and its object-centric data model ensures clarity in state access. Each object exists independently, and every object involved in a transaction must be declared in that transaction. As long as a transaction doesn't interact with an object used in another transaction simultaneously, they are parallelizable. Additionally, transactions not involving a shared object bypass consensus entirely.
To illustrate, consider Alice owning an NFT, represented as an object in Sui with Alice as the object's owner. When Alice transfers this NFT to Bob, the transaction, categorized as an owned object transaction, bypasses the consensus process. However, if Alice mints an NFT through a smart contract involving a shared object, such as a minting contract, it must undergo consensus and sequencing.
Although transactions involving that shared object must be ordered and executed in sequence, the series of transactions related to this NFT mint object can run in parallel to transactions involving other objects. When other users conduct payment transactions or trade on a DEX, they remain unaffected by users rushing to access a specific object, such as an NFT minting contract.
Pulling it together
Smart contract platforms opened diverse possibilities for application builders, yet traditional platforms often face limitations with sequential transaction execution. The choice between state access methods and optimistic execution in blockchain design is nuanced, with both approaches in use. Sui leverages its object-oriented data model to implement transaction parallelization via state access, enhancing scalability while reducing latency and fees.