/ 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.
bronzeagequai
Nodes are essential to any blockchain’s functionality, and this is no different for Quai. having a network of properly onboarded and maintained nodes is critical to the success and security of the bronze age testnet.
bronzeagequai

Overview

By setting up and running a node, you are directly helping the Quai Network succeed. In return, you will be rewarded in $QUAI through the Bronze Age Rewards program.

To simplify the process as much as possible, we have created a thorough list of steps required. If you need any additional assistance or have any technical questions, joining the Discord server is the best place to reach the team. If you would prefer to learn how to set up your Bronze Age node in video format, you can watch a member of our team set his node up from scratch on our YouTube channel.

NOTE: To run a miner, you must complete all parts of this three part article/video series.

Step 0: Clear data from stone age testnet

This step only applies to individuals who ran a node or miner during Quai Network’s Stone Age Testnet.

First, it is important to clear nodelogs from the Stone Age Testnet. This can be done by running the following command:

rm -rf nodelogs

The final command to run before setting up for the Bronze Age is to clear the previous databases from the Stone Age. The command is as follows:

./build/bin/quai removedb

We hope you said your goodbyes — rour system has now moved on from the Stone Age Testnet, without even a nodelog to remember it by. But don’t worry — we’ll be generating plenty of new data and logs with your Bronze Age node!

Step 1: Check System prerequisites

Running a Quai node does not require a supercomputer by any means, but there are some minimum system specs that your device should fulfill in order to run your node successfully.

The minimum specs for running a full node: 4GB RAM, CPU with 2+ Cores, 20GB+ Free Storage for Sync, and 8 MB/s internet download speed.

If you are running a miner in addition to a node, the recommended specs are as follows: 16GB+ RAM, CPU 4+ Cores, Fast SSD with 100GB+, and 25+ MB/s internet download speed.

Step 2: Install setup prerequisites for BRonze age node

Before the actual node setup, there are a couple important pieces of software to download and install.

First, install Golang Version >= 1.17.7 at https://golang.org/doc/install

Next, install Git at https://github.com/git-guides/install-git

If you are on a Windows machine, install Ubuntu from the Microsoft Store at https://www.microsoft.com/store/productId/9NBLGGH4MSV6

Finally, if you are on a Mac, create a folder named “Quai” on your desktop.

Step 3: Become Familiar With Linux terminal commands

There are a series of commands that many node users will find themselves running often during upkeep, maintenance, and updates to the node. It is important to become somewhat familiar with this set of commands, and understand at a basic level when they need to be used.

cd directory_name

-Change into a directory, aka change into a folder. Use this to move into desired directories (i.e. cd go-quai).

cd ..

-Useful for returning to a prior directory.

cd

-Return to the base directory of your computer.

ls

-List working directory contents, aka displays contents of the folder you’re in.

git clone

-For cloning a set directory into your computer. Use this to clone the go-quai & quai-manager repositories.

cat nodelogs/zone-1-1.log

-Prints nodelogs for a specific chain (this command outputs nodelogs for Cyprus 1)

make go-quai

-Generates the go-quai binary

make run-full-node

-Begins running full node, and publishes stats at provided IP address

git pull origin main

-Pulls most recent code from the go-quai repository. Regenerating the go-quai binary with ‘make go-quai’ is crucial after each update of the repository.

Step 4: Prerequisite commands

Before you can begin running your Bronze Age node, there are a few crucial commands to run that will prime your Linux environment to run the node.

Windows users: there are a couple extra steps we have to take to catch up to the Mac users.

Mac users: we’ll be back with you after we run a few commands.

Start by installing essential developer libraries using the command

sudo apt install build-essential

Next, we need to install Golang using Ubuntu by running the following command. Note that this command is redundant if you have already installed Go using the link during Step 2: Install Setup Prerequisites.

wget -c https://golang.org/dl/go1.17.3.linux-amd64.tar.gz

Next we need to log into a Linux superuser account by using the command

sudo -E bash

Once you have logged in as a superuser, you can run the following command that will remove all previous instances of go, and unzip the previous file downloaded:

rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.3.linux-amd64.tar.gz

exit

At this point, Windows users and Mac users will follow the same steps to complete the node setup. If you are setting up a node on a Mac, you can rejoin us here.

The next command we will be running will allow us to access go at any place in your computer — this is essential to running your node:

export PATH=$PATH:/usr/local/go/bin

We now need to clone the go-quai repository. For Mac users, clone it into the “Quai” folder that you created on your desktop. To complete this step on Mac and Windows, use the following command:

git clone https://github.com/spruce-solutions/go-quai.git

Next, we will navigate into the go-quai directory we just created by using the command

cd go-quai

This will bring us into the go-quai directory. We have two more commands to input before we can run the commands that start our node. This next command will create a network.env file that allows you to input specific information.

cp network.env.dist network.env

Now, we will need to generate the go-quai binary by running the command

make go-quai

Step 5: Set up your network.env

Now that we’ve generated the go-quai binary, we have to make some alterations to the network.env file in order to allow your node to connect to the stats server.

The variables to focus on are the STATS_NAME and the STATS_PASS. All the stats host addresses should be pre-input.

Input your STATS_NAME as whatever name you input on the Spartan Draft Form. This is how we will identify the node is yours.

Input the STATS_PASS as quainetworkbronze. This will change in future testnets/mainnet.

An example of a network.env file for a node named “justin”

Once you’ve made these edits, use ctrl+O & hit enter to save, then use ctrl+X to exit the editing window and return to the go-quai directory.

Step 6: Start your bronze age node

Finally, after double checking your computer, completing the installations, and brushing up on the commands you’ll be using, it is time to run the commands that set up your Quai node. Miners, you can head on over to the How to Set Up and Maintain your Bronze Age Quai Miner article for tailored instructions.

The basic command to begin running a full node of all 13 chains without mining is

make run-full-node

To receive your Quai rewards, you must share your node status with the official Quai Status Page. We did this when we altered the network.env file in the last step.

Once you run this command, take a look at the Quai Status Page again. You should see your node’s name on the list.

And there it is! Your Quai node is now up and running, helping secure Quai Network around the globe.

To check your node logs, use the following command:

cat nodelogs/zone-1–1.log

-Note: Zone-1-1 can be changed to show the logs for any of Quai’s 13 chains. Some alternate examples are:

cat nodelogs/prime.log
cat nodelogs/region-2.log

You should see a long and confusing output — but what you’re on the lookout for are any errors or abnormalities. You should share any errors you encounter in our Discord server where you can chat with other Spartans. Here is an example of a successful Prime chain node log:

Using the command ‘cat nodelogs/prime.log’ in the go-quai directory outputs the Prime chain’s nodelogs. This is an example of a successful node output.

To stop your node, simply run the following command in the go-quai directory:

make stop

If you want to turn your node back on again in the future, simply return to the go-quai directory, and run the same command as before:

make run-full-node

Step 7: Maintain network updates

It is absolutely crucial that all node operators stay up to date with the most recent codebase in order to properly participate in the Testnet. Forked or outdated nodes will receive little to zero rewards. The process of updating your node is remarkably simple, and well worth doing.

To start make sure your node is off. After that, we need to be in our go-quai directory. To navigate to this directory (if you are not already in it), we can run this command:

cd go-quai

Now that we are in the go-quai directory, we can pull the most recent version of the go-quai repository by running the following command:

git pull origin main

Your node will update to the most current version of Quai. At this point, all you need to do is regenerate the go-quai binary with the following command:

make go-quai

Once the binary has been generated, your node is fully updated. At this point, you can reactivate your node.

Note: There is a bug we occasionally encounter on this step. If you encounter an error in regenerating the go-quai binary (make go-quai), run the following command to re-export Go before trying to generate the binaries again.

export PATH=$PATH:/usr/local/go/bin

step 8: reap the rewards

Computing power isn’t cheap! Quai Network realizes this, and will compensate Testnet node operators accordingly. Throughout the Bronze Age Testnet, node operators will be compensated 1000 Mainnet $QUAI for setting up a node at any point during the Testnet, and will receive an additional 3000 $QUAI for maintaining 90%+ uptime throughout the course of the Bronze Age.

Thank you for your interest in setting up a Quai node! This is the first article in a series detailing how to interact with Quai Network’s Bronze Age Testnet. If you are also interested in mining and sending transactions, check out the follow-up article in this series outlining how to create addresses and send transactions during the Testnet.

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.