/ launching_quai_network

/ sequence_initiated

/ launching_quai_network

/ sequence_initiated

/ launching_quai_network

/ sequence_initiated

/ 56% complete


struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
struct group_info *groups_alloc(int gidsetsize){
struct group_info *group_info;
int nblocks;
int i;


nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK;
/* Make sure we always allocate at least one indirect block pointer */
nblocks = nblocks ? : 1;
group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER);
if (!group_info)
return NULL;
group_info->ngroups = gidsetsize;
group_info->nblocks = nblocks;
atomic_set(&group_info->usage, 1);


if (gidsetsize <= NGROUPS_SMALL)
group_info->blocks[0] = group_info->small_block;
else {
for (i = 0; i < nblocks; i++) {
gid_t *b;
b = (void *)__get_free_page(GFP_USER);
if (!b)
goto out_undo_partial_alloc;
group_info->blocks[i] = b;
}
}
return group_info;

EXPORT_SYMBOL(groups_alloc);


void groups_free(struct group_info *group_info)
{
if (group_info->blocks[0] != group_info->small_block) {
int i;
for (i = 0; i < group_info->nblocks; i++)
free_page((unsigned long)group_info->blocks[i]);
}
kfree(group_info);
}


EXPORT_SYMB|

/ launching_quai_network

/ sequence_initiated

/ launching_quai_network

/ sequence_initiated

/ launching_quai_network

/ sequence_initiated

/ 56% complete


struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
struct group_info *groups_alloc(int gidsetsize){
struct group_info *group_info;
int nblocks;
int i;


nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK;
/* Make sure we always allocate at least one indirect block pointer */
nblocks = nblocks ? : 1;
group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER);
if (!group_info)
return NULL;
group_info->ngroups = gidsetsize;
group_info->nblocks = nblocks;
atomic_set(&group_info->usage, 1);


if (gidsetsize <= NGROUPS_SMALL)
group_info->blocks[0] = group_info->small_block;
else {
for (i = 0; i < nblocks; i++) {
gid_t *b;
b = (void *)__get_free_page(GFP_USER);
if (!b)
goto out_undo_partial_alloc;
group_info->blocks[i] = b;
}
}
return group_info;

EXPORT_SYMBOL(groups_alloc);


void groups_free(struct group_info *group_info)
{
if (group_info->blocks[0] != group_info->small_block) {
int i;
for (i = 0; i < group_info->nblocks; i++)
free_page((unsigned long)group_info->blocks[i]);
}
kfree(group_info);
}


EXPORT_SYMB|

0%_LOADING

/ launching_quai_network

/ sequence_initiated

/

loading...

REBUILDING CURRENCY
a new currency
a new financial system
a new world
/ launching_quai_network / sequence_initiated / scroll_to_commence_build
> Quai Network is a set of EVM-compatible blockchains that achieves 50k+ TPS without compromising decentralization.
quaiworld
Quai Network’s chains are classified as prime, region, or zone. Understanding the functionality and differences between the Prime, Region, and zone chains is critical to having a comprehensive understanding of Quai.

While most cryptocurrencies function using only one blockchain, some innovative projects like Quai, Kadena, and NEAR utilize a modular approach in order to increase TPS and throughput. However, the concept of having a network of chains that can interact with each other requires an additional level of organization that single-chain projects do not have to consider.

Quai organizes itself into a 3×3 hierarchical structure of chains. Each chain is either a Prime, Region, or Zone chain, each of which have unique characteristics and utility. As Quai gets closer to its mainnet launch, the network will start with single Prime chain, 3 Region chains, and 9 Zone chains but will be horizontally scalable based on user demand.

UPDATE JUNE 7 2023: As of the current implementation of Quai, Prime and Region chains no longer carry state. Accounts and transactions are only maintained in Zone chains. This article has been left in its original form for users reading old blog posts to understand the history and progression of Quai’s development.

The Prime Chain

The singular Prime Chain is at the core of Quai Network’s functionality. This chain utilizes a memory intensive hashing algorithm that is shared across subordinate chains. All Quai miners are required to mine the Prime Chain, as it aggregates and settles state transitions across the network.

The Prime Chain has an approximated throughput of one block every 15 minutes, making it the chain with the lowest throughput on the network. Because the Prime Chain has a high difficulty and slower throughput, it is often not ideal for simple transactions and dApp interaction. Rather, the Prime Chain is ideal for use in situations where the whole network is being addressed, as all miners are mining the Prime Chain. However, the high security provided by the Prime blocks is used to secure the rest of the network, including other chains more optimized for day-to-day interaction.

The Region Chains

The Region Chains, currently limited to Cyprus, Paxos, and Hydra, are chains that are one tier lower in the network hierarchy than the Prime Chain. These chains have a higher throughput and lower difficulty than the Prime Chain, with throughput approximated at about one block every 5 minutes.

While all miners must mine Quai’s Prime Chain, the same is not true for the Region Chains. In order to successfully mine Quai, a miner can only mine one Region Chain at a time in addition to the Prime Chain. When the miner is set up on the network, the operator must choose whether to mine the Cyprus, Paxos, or Hydra Chain. These three chains are able to interact natively on the network, but are still separate chains requiring unique mining power.

Region Chains, while having a higher throughput than the Prime Chain, are still slower than Zone Chains, and are thus more suited to network interactions where it is not necessary to address the entire network (Prime Chain) but it requires more engagement than a Zone Chain.

Looking into the future of Quai, there is nothing stopping the network from creating and adding additional Region Chains (and thus Zone Chains) in the future. If the network grows to a point where adding another Region Chain would be beneficial, the network will scale horizontally to meet demand.

The Zone Chains

Each Region Chain is a step up in the hierarchy from its subordinate three Zone Chains. The Cyprus Region Chain, for example, has three subordinate Zone Chains: Cyprus 1, 2, and 3. Similar to how miners choose a Region Chain to mine, they also choose which subordinate Zone Chain to mine as well. Thus, each miner ends up mining three chains: the Prime Chain, one of the three Region Chains, and one of the three subordinate Zone Chains to the Region Chain they chose.

These Zone Chains have the highest throughput and TPS capacity, making them ideal for day-to-day transactions, contracts, and interactions. Each Zone Chain is expected to output a block every 10 seconds. Zone Chains also have the capacity to reference other Zone Chains, even those under different Region Chains. It is expected that much of the activity on Quai Network will occur on Zone Chains.

This graphic shows the sharded distribution of the network. Different addresses are designed to participate in different chains within Quai Network.

Coincident Blocks

Coincident Blocks are how the security of the Prime Chain is ensured throughout the entire network. Quai Network lays out three simple rules for understanding Coincident Blocks:

  • All Prime blocks within Quai Network must contain a Region and Zone block.
  • All Region blocks within Quai Network must contain a Zone block.
  • Zone blocks can be mined asynchronously without being included in a Prime or Region coincident block.

Essentially, a Coincident block occurs when either Prime, Region, and Zone block (or just a Region and Zone block) are confirmed at the same time. These blocks “represent combined levels of work across blockchains,” and allow the chains lower in the hierarchy to inherit the security and reliability of the Prime Chain at the top of the network hierarchy while still conducting independent activities.

Conclusion

To summarize, Quai Network classifies chains into three different categories. There is a singular Prime Chain, which all miners mine, that has low throughput and dictates the security for all Region and Zone chains. The Prime Chain has three subordinate Region Chains that divide mining power between chains. Finally, each Region Chain has three subordinate Zone Chains designed to handle large amounts of transactions and activity.

Each Quai miner mines the Prime Chain, a Region Chain, and a Zone Chain subordinate to that Region Chain (ex. Miner A mines Prime, Cyprus, Cyprus 1, while Miner B mines Prime, Hydra, and Hydra 3).

Miners are able to find blocks that contain enough work to validate all three chains, creating what Quai has named a Coincident block. These Coincident blocks allow the entire network to inherit the same security as the Prime Chain, which is mined by every miner within the Quai community.

The different chains are designed to handle different types of blockchain interaction. The Prime Chain, since it has the lowest throughput, is good for interactions that do not require speed, but might require interaction from users across the entire network. The Region Chains are much faster than the Prime Chain, but segment the network into three sections. Thus, the Region chains are valuable for protocols where it is not necessary to interact with the entire network that still wish to avoid being isolated to one Zone Chain. Finally, Zone Chains are perfect for daily transactions and the majority of Quai interactions. Zone Chains have a very high throughput and TPS capacity, and are expected to handle the bulk of Quai Network’s activity.

Overall, Quai Network has created a unique and innovative structure for managing many different blockchains. By utilizing a hierarchical 3×3 structure, different types of chains are able to have different use-cases and faster throughput while retaining the same security as the almighty Prime Chain.

Join us to build a better blockchain.

Quai Network is an open-source Proof-of-Entropy-Minima blockchain network utilizing the capabilities of merged mining to increase throughput and security. Users of Quai Network will enjoy fast transaction times without compromising decentralization and security. Miners will have competitive mining opportunities across the many blockchains within the network.

Capable of thousands of transactions per second, the Quai Network is a new solution to scalability that is soon to be ready for mainnet release.

Terms & Conditions / Disclaimer

The entirety of the Quai Genesis grants program, including the content of this article, is subject to the Terms and Conditions outlined here.

Opinions, ideas, and statements shared in this update are delivered with numerous assumptions, risks, and uncertainties which are subject to change over time. There are multiple risk factors, including those related to blockchain, cryptographic systems, and technologies generally, as well Quai’s business, operations and results of operations, that could cause actual results or developments anticipated not to be realized or, even if substantially realized, to fail to achieve any or all of the benefits that could be expected therefrom. We reserve the right to unilaterally, completely, or partially change plans, expectations, and intentions stated herein at any time and for any reason, in our sole and absolute discretion, and we undertake no obligation to update publicly or revise any forward-looking statement, whether as a result of new information, future developments, or otherwise. ACCORDINGLY, WE RECOMMEND THAT YOU DO NOT RELY ON, AND DO NOT MAKE ANY FINANCIAL DECISION OR INVESTMENT BASED ON, THE STATEMENTS CONTAINED IN THIS UPDATE OR ANY OF OUR UPDATES/ARTICLES — INCLUDING BUT NOT LIMITED TO ANY SELLING OR TRADING OF QUAI TOKENS, ETHER, OR ANY OTHER CRYPTOGRAPHIC OR BLOCKCHAIN TOKEN, OR THE SECURITIES OF ANY COMPANY.

The views, opinions, and statements made in this update are those of an individual author and not those of any institution, University, or legal entity operating within the jurisdiction of The United States or beyond. There is no association between these views, opinions, and statements and any for-profit or non-profit entity, particularly with Universities, Foundations, and other Agencies located within the United States. Any perception of such an association is purely accidental, and will be rectified immediately if brought to our attention by the reader.

Security

All Quai Network blockchains are braided together, keeping the entire network censorship resistant and secure creating Scalable Proof-of-Work.

Decentralization

Quai allows anyone to participate in network governance by running a node or miner. With thousands of participants distributed across the globe, there is no single party with the ability to modify or turn off the network, ensuring zero network downtime.

Scalability

Quai Network automatically expands with demand to upwards of 50,000 TPS while keeping fees under $0.01.

Consensus

Transactions in Quai Network can be locally confirmed prior to global confirmation, offering high throughput with the shortest possible time to economic finality.

Shared Security

All blockchains within Quai Network share Proof-of-Work security through merged mining. Every Quai transaction is eventually confirmed by 100% of network hash power.

Merge-Mined Parachains

Parachains inherit security and interoperability by merged mining with Quai Network, and create new incentives for miners and users.

The Prime Chain

The Prime blockchain acts as the "knot" tying all Quai Network chains together. The Prime blockchain braids sub networks together, facilitating the transfer of data across chains.

Sub Networks

Quai's many high-speed sub networks independently and asynchronously process transactions. All sub networks are braided together by the Prime chain, ensuring shared security and interoperability across the network.