Links

Mining

Since Quai Network is Proof of Work, mining is used in the production of blocks. Quai Network utilizes combined headers during block production. The act of combining headers is done inside of the Quai Network manager.

Install Manager + Miner Source Code

Manager + Miner can be found in the quai-manager repository.
git clone https://github.com/spruce-solutions/quai-manager

Building the source

For prerequisites and detailed build instructions please read the Installation Instructions.
Building quai-manager requires both a Go (version 1.14 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run
Build via Makefile
make quai-manager
Build via GoLang directly
go build -o ./build/bin/manager manager/main.go

Run the manager

Set the region and zone flags

The below commands will run the manager in region 1 and zone 2.
It can be set to any value between 1 and 3 for regions and zones and the manager will start in that location.
Run via Makefile
make run-mine region=1 zone=2
To run the manager in background and save the logs
make run-mine-background region=1 zone=2

Set

Run via Go binary
./build/bin/manager 1 2 1

View Logs

cat logs/manager.log
// Example successful output
PRIME: [7112 29321 33661] @xc27ca45848d27e4f414dbafc0efc3b5fc96608fc407ff00fc924897f3d61ce2f
ZONE: [7113 29322 33662] @x35a47a31af0905c9baa8661412f5437cd8361271fd06b790e037c86b209c1490
PRIME: [7113 29322 33663] 0x822c0aab59bd3ec0d0a662f36fc6e1e82ee9a46ca7981822fddf4432c22cf2f9
ZONE: [7114 29323 33664] Oxd416c0e46a29d104bb37f146d3a37f66ec024c3f2703b3e92cc0903c80ab0da
ZONE: [7114 29323 33665] 0xb4b00b537ba6271695f0527e2a4e220224307a85d6b0681392a2ac1c37c18c01
REGION: [7114 29323 336661 0×84b3c32f881f7bb512f5467ac129149ebc33f25c690f740d83a6ddb94dbeßfbe

Stopping the Manager

make stop
// This will close the port on which the manager was running and should print it
To view a YouTube tutorial on how to set up a Bronze Age Quai Network miner, click here.
To read our article offering a step-by-step guide on how to set up a Bronze Age Quai Network miner, click here.