Sharding allows blockchains to increase throughput by splitting state and/or execution across many threads. Quai uses sharding to create the first multithreaded blockchain execution environment in which all threads share objective Proof-of-Work security.
The tradeoffs and benefits of sharding databases are well understood in information science. Sharding is a method of partitioning a database into smaller, more manageable pieces called shards. Each shard is a separate database which stores a subset of data on a separate server in a different location. Sharding allows large databases to service many requests beyond the limits imposed by read/write operations of data storage media. By distributing the data across multiple servers, sharding can help to reduce the load on any one server and improve the overall performance and availability of the database.
Quai Network utilizes sharding to improve the performance of a decentralized database in largely the same way that sharding is used to improve centralized databases. In a single-threaded, unsharded blockchain, all nodes must maintain the state of the entire network, and all transactions must pass through the same single execution thread. Quai Network, as a multithreaded blockchain, allows for nodes to choose to only maintain shards of the Network rather than the entire state. Lower node resource requirements reduces the barrier to participation in the network. Further, each shard within Quai acts as a unique execution thread, which enables data partitioning, allowing the optimization of network performance though the introduction of shard-specific subnets.
Quai Network utilizes a sharded address space to allow nodes and wallets to quickly identify which Quai blockchain an address resides on. The set of address prefixes currently occupies a byte prefix for each blockchain in the network. In the future, as the network grows, the amount of prefixes included in this list will increase.
- Prime: 0x0087245518127A1e11fCDBD54b285BCb4173df8C
- Cyprus: 0x115046125D6Ba88C1FBcbE7203Ef663e37F08870
- Cyprus One: 0x1558F443A1bE597021fDa16C38c4AA126Fc569c3
0x00 - 0x09
0x0a - 0x13
0x14 - 0x1d
0x1e - 0x27
0x28 - 0x31
0x32 - 0x3b
0x3c - 0x45
0x46 - 0x4f
0x50 - 0x59
0x5a - 0x63
0x64 - 0x6d
0x6e - 0x77
0x78 - 0x81
The major barrier to the adoption of sharding in distributed ledger technology has been the splitting of network security across shards. Quai Network utilizes a simple extension of Nakamoto consensus, referred to as Proof-of-Work 2.0, in order to maintain shared, full-network security within each shard. Proof-of-Work 2.0 functions by organizing shards into a hierarchical structure, with hash linked references between shards produced through merged mining. These hash linked references, produced in coincident blocks, enforce atomic chain progression and rollbacks across the entire network.