An examination of the potential for blockchain scalability and smart contract development to be enhanced by Sui’s object-centric model and the Move language
The Sui blockchain has emerged as a novel layer-1 (L1) protocol that integrates advanced technologies to resolve common layer-1 trade-offs. Cointelegraph Research delves into the specifics of this blockchain novice.
Sui employs the Move programming language, which was developed with an emphasis on access control and asset representation. This article investigates Sui’s object-centric data storage model, its prospective advantages over traditional account-based paradigms, and its implications for transaction processing.
In particular, the Diem blockchain is a significant source of inspiration for the object-oriented paradigm of SUI Sui, which employs the Move programming language for smart contracts.
A type system that was specifically designed for asset management and access control enforcement was implemented in Move. Sui Move expands upon this foundation by employing an object-centric data storage paradigm that employs objects as primitives rather than accounts.
Sui’s object model handles assets (as well as smart contracts) as complex objects, in contrast to the traditional account model, which involves the modification of balances, and the UTXO model, which involves transactions with straightforward inputs and outputs. In Sui, transactions accept objects as inputs and transform them into output objects.
The hash of the most recent transaction that generated each object is recorded. This method is conceptually comparable to the UTXO model but is more general and powerful. The following is a comparison of the models.
The object-oriented model is interconnected with Move’s utilization of linear logic, enabling secure software creation. Resources representing digital assets are safeguarded from accidental destruction or duplication through linear logic, occasionally referred to as resource logic.
Sui Move’s semantics guarantee that the asset’s state is updated in a manner that corresponds to the transaction’s outcome when a transaction involving an asset is executed. This involves consuming the asset in its previous state and producing it in its new state.
Additionally, defined access controls and permissions can be applied to objects in Sui, improving security and asset utilization control following a transaction. This mitigates the prevalent vulnerabilities in account-based chains, which enable reentrancy attacks. A reentrancy exploit occurs when a function repeatedly executes actions that should only occur once by making an external call to another contract before updating its state.
This can result in unauthorized modifications to the contract’s status, such as withdrawing excessive funds. This type of error is impossible in Sui due to the explicit and atomic nature of ownership transfers. The linear type system of Move guarantees that a resource cannot be repurposed unless it is expressly reassigned after it has been relocated.
In contrast, the conventional account-based model employed by Solidity necessitates that developers implement additional checks to prevent the occurrence of such flaws. For instance, adhering to the checks-effects-interactions pattern is imperative to prevent reentrancy assaults. All state-changing operations (effects) must occur after all tests but before any interactions (external calls).
This method, frequently called optimistic accounting, guarantees that state variables are updated before any external interactions.
Although the object-centric model does not inherently improve security, it can expedite the development process and facilitate secure code writing. Even though smart contracts on Ethereum can be formally verified to achieve high levels of security, this procedure can be complex and expensive.
Solidity’s semantics are notoriously unintuitive, complicating the process of developers analyzing the code’s behavior. This increases the probability of the introduction of security vulnerabilities and subtle flaws.
SUI Move is a member of a family of languages that endeavor to facilitate the development of secure smart contracts by incorporating sensible financial primitives into the language’s semantics from the outset. Another example is the Transaction Execution Approval Language (TEAL) of the Algorand blockchain, which employs a stateless execution model to guarantee the atomicity and security of transactions.
Sui’s object-centric model is especially beneficial for managing intricate assets, such as non-fungible tokens (NFTs). In Ethereum, NFTs are associated with smart contract addresses, necessitating intricate contract calls and state modifications, increasing costs and potential security risks.
For example, the transfer of an NFT in Ethereum necessitates executing a function within the ERC-721 smart contract, which generates events and modifies the state.
Multiple phases and gas fees are associated with each operation in this process. Conversely, Sui’s object paradigm enables each NFT to be regarded as a unique entity with intrinsic properties and permissions. The primitives of the Move language are closely aligned with the behavior of NFTs, whereas in Ethereum, this behavior must be implemented, which increases overhead and creates space for error.
Blockchain performance and object orientation
Sharding and parallelization on the SUI blockchain are simplified by the object-oriented model. SUI obtains a time-to-finality of approximately 390 milliseconds when combined with a recent update to the Sui consensus mechanism.
This could enable a throughput that surpasses 100,000 transactions per second. The following is a comparison of Sui with other prominent layer-1 blockchains.
Database sharding on account-based chains versus SUI
The infamous trade-off between scalability, security, and decentralization is one of the most pressing concerns for blockchains. Sharding, which enables the partitioning of the blockchain database, is regarded as a solution to this issue.
Sharding is partitioning the state by account addresses in account-based architectures. Each shard is responsible for managing a unique set of addresses, and the shard that contains the account’s data is responsible for processing transactions.
Nevertheless, this encounters a variety of obstacles. For example, Polkadot necessitates that the balance and state of each account be synchronized and updated across fragments (Parachains). The regular synchronization of each shard with the global state introduces latency and complexity, making it difficult to maintain consistency across numerous shards.
Inter-shard messaging and coordination are necessary for transactions that involve accounts on distinct shards, which results in a delay in transaction finality and an increase in computational overhead. As with Zilliqa, this has resulted in outages on such blockchains.
Sui’s object-centric model circumvents numerous complications by considering each object an autonomous state unit. Objects can be processed and managed independently without necessitating global state synchronization, and multiple transactions can be processed concurrently without synchronization across fragments.
This minimizes the necessity for intricate cross-shard communication and enables more plain and efficient parallel processing.
We have parallelized transaction processing on SUI. Parallelization executes multiple operations simultaneously and enhances processing performance by utilizing concurrent execution threads.
State access method (or deterministic execution) and optimistic execution are the two primary parallelization methods. Transactions declare which segments of the state they will access using the state access mechanism employed by Sui and Solana. This enables the system to identify independent transactions that can be executed concurrently.
This method guarantees predictable results and eliminates the necessity for re-executing transactions, thereby facilitating the operation of dynamic gas fee markets that regulate congested state locations.
On the other hand, optimistic execution, implemented by networks such as Monad and Aptos, initially implies that all transactions are autonomous and retrospectively execute conflicting transactions. While developers may find it easier to use, it can result in computational inefficiencies.
Sui accomplishes state access parallelization through its object-centric model. Naturally, operations on one object do not affect or delay operations on another, thereby enabling them to be processed concurrently. The partitioning of the database of transactions is facilitated by the same structural features, which also simplify parallelized processing on a single node.
In conclusion,
In summary, in conjunction with the object-centric model of the Sui blockchain, the Move programming language effectively resolves numerous critical deficiencies of conventional layer-1 blockchains. Scalability and latency are considerably improved by the capacity to process transactions in parallel.
The potential to reduce the risk of errors and security vulnerabilities is achieved by employing linear logic and capability-based security to ensure robust resource management and access control.
In addition, Sui’s method of managing intricate assets, including NFTs, streamlines interactions and enhances efficiency compared to conventional account-based models. Sui is a significant development in blockchain technology due to these attributes.
The consensus mechanism of the Sui blockchain will be the subject of our forthcoming article, which will investigate its evolution and the advantages it offers. Sui utilizes a consensus protocol precisely engineered to function with its object-centric model.
We will examine the intricacies of Sui’s consensus mechanism, such as its fault tolerance and throughput optimization methods, to ascertain how these components contribute to its infrastructure.
Additionally, we will compare Sui’s consensus approach to those of other prominent blockchains, including Ethereum, Polkadot, and Solana, to identify its distinctive features and areas in which it may excel or encounter challenges.