Ontology Sharding Design Released
As the new year draws close, we are publishing the Ontology sharding design as an early open-source new year gift.
The Ontology team wants to ensure decentralization and security of blockchain networks while achieving high scalability. Sharding will solve the challenges of blockchain scalability and allow it to accomplish ultra-large-scale network expansion.
Sharding is now a mainstream blockchain technology, which includes mainly three dimensions: network sharding, transaction sharding, and state sharding.
The Ontology sharding network extends upon the existing main chain model, supports the above three dimensions, and adopts a hierarchical network architecture which achieves ultra-large-scale network expansion through multi-layer network sharding.
- Network sharding: Messages requiring sharding are only broadcast within the shard’s network.
→ The Ontology sharding network uses a hierarchical network architecture. Each shard network is managed independently and each node participates in different sharding networks through staking.
- Transaction sharding: Transactions run in different shards, and each shard runs an independent consensus algorithm.
→ Ontology transaction shards are based on smart contracts. Each smart contract runs on a shard network. Transactions that call smart contracts need to be sent to the corresponding shard network for processing.
- State sharding: Shards only need to maintain state data in their shard without saving data of other shards.
→ All services in the shard are implemented in smart contracts. Like smart contracts, smart contract state data is only saved in the corresponding shard network, thus realizing state sharding.
- Effective linear scalability;
- Transactions in a shard are only processed by nodes in the shard;
- Support for atomic cross-shard transaction processing;
- Using ONG for the sharding network incentive model.
The basic design is as follows:
- Shard performance is determined only by the nodes participating in the network and the network performance;
- Shards communicate with each other through a reliable message queue and the verifiability of messages between shards is achieved with Merkel proof;
- Ontology sharding supports transactions of smart contracts within shards and cross-shard. For transactions within shards, the synchronous transaction model in single chains is used, and cross-shard transactions adopt a new asynchronous transaction model. The distributed transaction algorithm based on MVCO (Multi-Version Commitment Ordering) realizes high scalability cross-shard transactions;
- The Ontology sharding design supports migrating smart contracts across shards, which is important for the expansion of shard networks.
Read the full Ontology sharding design on GitHub here.
About the Ontology Research Institute
Ontology set up the research institute in order to focus more on the research and development of core blockchain technology and strengthen the ability to explore, reflect on, and apply emerging technologies, as well make contributions to the entire industry. At present, there are more than 10 R&D personnel in the Ontology Research Institute.