Shardeum's transaction-level consensus, dynamic state sharding, and linear scalability will ensure the network achieves not only parallel but also atomic and cross-shard transaction execution.

What is Composability in Blockchain?

Note: We have a separate blog dedicated to discussing what composability is, especially from a blockchain perspective. However, let's summarize it here to make it easier for you to understand and connect the various discussion points we will cover in this blog about the importance of atomic and cross-shard composability in public blockchain networks.

Composability is a powerful concept in blockchain that allows developers to combine and integrate smart contracts, decentralized applications (dapps), and disparate networks to create innovative and complex systems. This encourages rapid development, as existing building blocks can be reused, reducing time and effort.

Source: How does composability work?

While this proposition seems to be a boon for smart contract platforms, its success largely depends on the robustness of the platform's underlying protocol layer in terms of security, scalability, communications, storage, and DX. While composability looks at how a system works from the inside and how its parts can be rearranged to create new functions, its success also depends on several external factors to strengthen its usability such as security audits and thorough testing. This essentially makes ‘composability’ a feature that determines the success or failure of a blockchain platform.

What is Atomicity in Blockchain?

Atomicity and atomic composability are closely related. Atomicity refers to the indivisible or all-or-nothing nature of a transaction or operation. In other words, this means that a transaction is either fully executed or not executed at all, without any partial or intermediate status. If any part of a transaction fails or experiences an error, the entire transaction will be rolled back or rolled back, to ensure that the system remains in a consistent state. You will see atomicity as part of the ACID (Atomicity, Consistency, Isolation, Durability) concept in computer and data science.

Source: erainnovator.com/acid-properties-in-dbms/

What is Atomic Composability in Blockchain?

Atomic composability refers to the ability to combine and execute multiple operations or transactions in distributed database systems such as blockchains and DAGs in a way that they all succeed or fail together usually within the boundaries of a single shard or blockchain. This extends the concept of atomicity to composability of operations in the blockchain context.

Similar to how blockchain networks use consensus mechanisms to establish agreements regarding the validity and ordering of transactions, blockchains use specialized mechanisms such as messaging protocols, coordinators, and routing to uphold composability in these networks. This is a technical level detail that we will learn more about in the next section. However, at a functional level, it should be emphasized that blockchains can ensure atomic composability only if they have perfect design/deployment of consensus mechanisms, smart contracts, scalability, transaction verification and roll back mechanisms. In other words, they must have strong fundamentals in the form of protocols and application layers.

Source | What is atomic composability, and how does composability work?

As mentioned previously, atomic composability is usually achieved within a single partition, cluster, or blockchain. However, ensuring atomic composability becomes more complex when dealing with multiple partitions and states, such as in sharding networks.

Sharding is a way to increase the scalability of distributed systems, such as blockchain, by dividing data into smaller, easier to manage chunks called shards. Sharding does not necessarily harm composability, but it has the potential to limit the ability of different parts of the system to communicate and interact with each other. Sharding introduces complexity to network architecture and implementation and often requires mechanisms for cross-shard communication and composability. Sharding can also result in uneven distribution of data and transactions across shards due to a lack of optimal design and testing, or in other words, a solid protocol layer. Before understanding how cross-shard composability can be achieved, let's take a quick look at what cross-sharding itself means?

Cross-Shard Composability in Blockchain Systems

Source | What is cross-shard composability: The importance of cross-shard composability

In blockchain technology, sharding is a way to divide a network into smaller, more manageable parts called shards. Each shard contains a share of the network's total data and transactions, allowing for more efficient processing and higher throughput. By dividing the network in this way, nodes only need to process data in their assigned shards, reducing computational load and improving overall performance.

Cross-shard composability refers to the ability of different shards in a blockchain network to interact seamlessly. Since each shard operates independently, cross-shard composability requires implementing protocols and mechanisms such as universal account systems, messaging protocols, or implementing side chains or bridges to connect different shards. This will allow moving data and assets between shards, as well as maintaining consistent state across all shards. By enabling cross-shard composability, blockchain networks can process more transactions and achieve higher throughput without sacrificing security or decentralization.

Key Considerations for Achieving Cross-Shard Composability in Blockchain Networks

Cross Shard Transactions

A cross-shard transaction is a single transaction involving multiple shards in a blockchain network. These transactions are critical to achieving scalability and enabling more complex smart contracts. Cross-shard transactions require mechanisms to ensure atomicity, consistency, isolation, and durability (ACID) across shards.

The Need for Composability

Composability is critical to enabling cross-shard composability and ensuring seamless interactions between smart contracts and transactions across different shards. Without composability, blockchain networks will be limited to operating within their shards, reducing their utility and adoption.

Two-Phase Commit Protocol for Cross-Shard Transactions

The Two-Phase Commit Protocol is a mechanism to ensure atomicity in cross-shard transactions. This protocol involves a coordinator initiating a transaction and communicating with all involved shards to ensure that they are ready to commit. If all shards agree, the transaction is committed; otherwise, the transaction will be cancelled.

Routing Transactions Across Shards

Routing is a mechanism used to direct cross-shard transactions to the appropriate shard. This involves identifying the shards involved in the transaction and determining the optimal route to execute the transaction. This is achieved through routing tables and messaging protocols that enable cross-shard composability communication between shards.

Coordinator in Cross Shard Composability

The coordinator manages transactions across shards and ensures their atomicity, consistency, isolation, and durability. They facilitate communication between the shards involved in a transaction and are critical to achieving cross-shard composability. The coordinator initiates cross-shard transactions, communicates with all involved shards to ensure that they are ready to commit, and performs a two-phase commit protocol to ensure atomicity. Coordinators also maintain status information about transactions and communicate with other coordinators if transactions span multiple blockchain networks.

Keep in mind, Coordinators can also introduce centralization into the blockchain network, reducing security and decentralization. They also require additional computing resources and can introduce latency into transaction processing. Additionally, a single point of failure can arise if the coordinator fails or is compromised.

Ensuring Composability Between Shards

To ensure or enable composability between shards in a blockchain network, it is essential to create protocols and mechanisms for communication and transfer of assets between different shards. This involves implementing routing mechanisms to direct transactions to the appropriate shards and creating a universal account system that can be accessed by all shards.

Additionally, it requires the use of messaging protocols, such as inter-shard communication (ISC), to enable communication between shards. Maintaining a consistent state is also important to ensure consistency between all shards involved.

Metadata Management in Cross Shard Transactions

In cross-shard transactions, metadata refers to information related to the transaction but not included in the payload. Metadata can include transaction state, routing information, and other data necessary to ensure atomicity, consistency, isolation, and durability in cross-shard transactions.

Metadata management involves designing protocols and mechanisms to store, access, and update metadata across all shards. This includes implementing a metadata storage system that is accessible to all involved shards, establishing metadata standards and formats, and ensuring that metadata is protected and secured to prevent unauthorized access or manipulation.

Shardeum Achieves Parallel Transaction Execution with Atomic & Cross-Shard Composability

About Shardeum

Shardeum is a layer 1 blockchain network with an EVM-based smart contract platform that scales linearly to maintain permanently low transaction costs, along with decentralization and high security. Transactions are sorted by time on Shardeum (first come first serve) to maintain chronological consistency. Verification and consensus of transactions is done individually, i.e. it is done at the transaction level, not at the block level as you see in typical blockchain networks. Shardeum uses a unique/combined consensus mechanism — Proof of Quorum and Proof of Stake.

While we know how Proof of Stake works in general, Proof of Quorum allows Shardeum to generate a receipt indicating that the majority of the consensus group has voted for a particular transaction. Each node in the consensus group signs the hash of the transaction and passes it on to other nodes in the consensus group. Nodes collect these votes, and when the number of votes is more than 50%, these votes form a receipt that can prove consensus on the transaction. Notably, the consensus algorithm on Shardeum also plays a key role in randomly assigning ‘node IDs’ to validator nodes before they join the network. With the help of node IDs, the network will constantly auto-rotate validators and standby nodes (nodes that are waiting their turn to be automatically rotated into the network as active validators) to make it difficult for malicious actors to take over at any given point in time.

Processed transactions are thus grouped together and forwarded to archive nodes in the network that are responsible for storing historical data (validator nodes will only store the state of the accounts involved across shards, allowing ordinary users to operate nodes on Shardeum). And, through dynamic state sharding, Shardeum implements a 3-dimensional sharding approach by splitting State, Network, and Transaction on top of dynamically autoscaling to increase or decrease network capacity relative to the traffic on the network.

Each node in the network will be assigned dynamic account space across multiple shards with a sufficient degree of overlap between address ranges. This enables parallel processing of transactions while maintaining atomic and cross-shard composability. Auto-scaling will enable Shardeum to use resources efficiently and respond dynamically to changes in demand resulting in immediate finality and low latency while maintaining low transaction costs forever. Furthermore, developers can use and interact with Solidity or Vyper contracts on Shardeum without special considerations for sharding, as contracts are deployed to unique shards automatically while maintaining atomic composability across all shards.

How Does Shardeum Achieve Atomic & Cross-Shard Composability?

While we can research and benefit from further network innovation and development once the white paper is released and open source protocols occur before the mainnet in Q3/Q4 of 2023, let's see how Shardeum can maintain high levels of atomic and cross-shard composability based on what we have discussed above.

  • Shardeum orders and processes time-based transactions on an individual basis

  • Shardeum's consensus mechanism involves leaderless and rotated nodes

  • Consensus is done at the transaction level (and not at the block level)

  • Validators on the network are given dynamic account space across multiple shards. Although dynamic state sharding requires each node to store a different address range, there will be significant overlap between the addresses covered by nodes with sufficient redundancy of at least 128 validators

  • Because transactions are processed individually, transactions affecting multiple shards have no risk of being confirmed on one shard, but canceled on another.

  • Transaction level consensus further allows transactions affecting multiple shards to be processed simultaneously by these shards which not only reduces the time to process a transaction even if it affects multiple shards, but also ensures atomic processing with very low latency and immediate settlement

  • When a multi-step transaction is initiated in the case of a complex smart contract, it involves executing all those steps across multiple shards simultaneously. With Shardeum transaction-level consensus, these steps can be grouped into a single atomic transaction to ensure atomic composability

  • With the help of dynamic state sharding, auto-scaling, optimal consensus mechanism, time-based transaction ordering, Shardeum will scale linearly allowing an average user to run a node on the network with negligible computing requirements

  • Linear scaling and auto-scaling will keep network operational costs sustainable which essentially means transaction costs on the network will remain very low and constant permanently

  • Low gas fees enable users and developers to interact with multiple shards and conduct cross-shard transactions cost-effectively while promoting increased user participation, which in turn facilitates seamless cross-shard composability

  • Each node/shard joining the network will increase the network throughput proportionally allowing Shardeum to scale infinitely to prevent bottlenecks and transaction backlogs. This directly increases the composability of the network

  • Linear scaling, furthermore, facilitates distributing workloads evenly across shards. By ensuring a balanced distribution of transactions and operations, this prevents a single shard from becoming a bottleneck or experiencing excessive congestion to enable seamless cross-shard composability

  • Linear scaling enables inter-shard communication protocols developed to facilitate secure and reliable movement of data and state information between shards, enabling seamless coordination for cross-shard composability

  • Because Shardeum introduces operational efficiencies through linear and automatic scaling, it increases the network's capacity to handle complex operations and interactions across multiple shards, enabling a more interconnected and interoperable blockchain ecosystem

Conclusion

In conclusion, the importance of cross-shard composability is enormous in blockchain systems, enabling scalability and the development of more complex smart contracts. This involves executing transactions across multiple shards and maintaining atomicity, consistency, isolation, and durability (ACID) across all shards involved.

Although achieving cross-shard composability requires the implementation of various mechanisms, such as routing protocols, inter-shard communication, universal account systems, and metadata management systems, these mechanisms only complement the efficiency and scalability of the underlying protocols. Shardeum is uniquely positioned to integrate complex dapps/smart contracts while facilitating cross-chain interactions and interoperability as a result of its breakthrough technology. Stay tuned for the development of this project in its final stages of production readiness.

#ShardeumIsBorderless #shardeum #TrendingTopic #Write2Eam