Miner v1.0.1
Memory optimization
Reduce about 30% memory cost.
Quick Start Miner
Follow this quick start guide to start miner.
1. Download Miner
Download in github release.
MacOS: miner-darwin.zip
Windows: miner-windows.zip
Linux: miner-linux.zip
MacOS
Download the file miner-darwin.zip
and unzip the file.
Start terminal and go to the unzipped directory miner-darwin
set executable permission with this command:
chmod 777 ./miner
Windows
Download the file miner-windows.zip
and unzip the file.
Linux
Download the file miner-linux.zip
and unzip the file.
Go to the unzipped directory miner-linux
set executable permission with this command:
chmod 777 ./miner
2. Download ZKP ProveKey
Before starting to mine, you also need to download a ZKP ProveKey file.
Click this IPFS Download Link will download a file named QmQL4k1hKYiW3SDtMREjnrah1PBsak1VE3VgEqTyoDckz9
.
Copy QmQL4k1hKYiW3SDtMREjnrah1PBsak1VE3VgEqTyoDckz9
to the unzipped miner directory.
3.Set Keyfile
Note that miner works successfully only if the address from keyfile is staked. Staked mining in fortress wallet.
There are two ways to set the keyfile for miner:
First Way: Generate New Keyfile
The following command will generate a new keyfile named keyfile.json
to derive you Miner Account. You can set a password for your keyfile and remember this password.
MacOS
Go to the unzipped directory miner-darwin
in terminal and use this command:
./miner generate
Linux
Go to the unzipped directory miner-linux
in command line and use this command:
./miner generate
Windows
Go to the unzipped directory miner-windows
in command line and use this command:
./miner.exe generate
Second Way: Copy Existing Keyfile
If you have generated keyfile with fortress wallet, copy the keyfile into this directory (the same directory of the executable file miner
).
4. Start Mining
The following command will startup miner with Miner Address derived from keyfile and set the Coinbase Address the same as Miner Address by default.
MacOS
Go to the unzipped directory miner-darwin
in terminal and use this command:
./miner mine --key name_of_your_keyfile
Linux
Go to the unzipped directory miner-linux
in command line and use this command:
./miner mine --key name_of_your_keyfile
Windows
Go to the unzipped directory miner-windows
in command line and use this command:
./miner.exe mine --key name_of_your_keyfile
Enter keyfile password when the following prints:
Password:
Then miner starts to initialize ZKP prover, includes compiling ZKP circuit and loading ZKP prove key. You can see the
followings in log:
INFO [08-24|15:56:41.152] Compiling ZKP circuit
INFO [08-24|15:56:46.234] Loading ZKP prove key. This takes a few minutes
This may take 5 to 15 minutes, please wait. When the initialization success, the following prints in log:
INFO [08-24|16:02:46.363] Init ZKP Problem worker success!
INFO [08-24|16:02:46.380] miner start
After miner starts, it waits for the new mining epoch, the following prints in log:
INFO [09-03|21:19:57.780] waiting for next mining epoch
Miners follow new blocks and keep working in the following process:
- Wait for new mining epoch. When it reaches a new epoch, log prints:
INFO [08-24|15:24:51.004] start new mining epoch
- Doing VRF and get the Challenged Height of this mining epoch. Log prints:
INFO [08-24|15:24:51.008] vrf finished challenge height=3015 index=15
- Wait till the blockchain reach Challenge Height.
The waiting time is printed like the following. It will wait 420 seconds in this example.
INFO [09-03|21:21:13.180] waiting for challenge block time duration (second)=420
- When reaches the Challenge height, miner start to solve the ZKP problem.
It takes about 1 to 2 minutes, depending on your device.
INFO [09-03|21:28:13.140] start working ZKP problem
INFO [09-03|21:29:21.203] ZKP problem finished
- ZKP problem solved, miner submit result. Log prints:
INFO [08-24|15:27:25.153] submit work
miner address=<Your miner address>
coinbase address=<Your Coinbase address>
score=114387952695245842542743197336030803861427527497199672381530456658266076847982
- Wait for the next epoch. Mining epoch interval is 100 blocks.
The waiting duration is printed like the following.
It will wait 294 seconds in this example.
INFO [09-03|21:36:24.472] waiting for next mining epoch time duration (second)=294
- If your mining work get the best score in this mining epoch, you will get mining reward and log prints:
INFO [09-18|12:18:28.865] Congratulations you got the best score! height=215,500
Coinbase address
If you want miner address to receive mining reward, you don't need to set coinbase address for miner or in Fortress wallet
If you want another address instead of miner address to receive mining reward, you have to set coinbase address. Here are two ways:
- Set coinbase address in Fortress Wallet. Then you don't need to set it again when starting miner. Your mining reward will be and only be sent to this coinbase address.
- If you haven't set coinbase address in Fortress Wallet, you are able to add
--coinbase your_coinbase_address
after the miner startup command to manually set coinbase address.
And your mining reward will be sent to this address. If you are use Miner version 0.0.4 or earlier, don't set coinbase address in Fortress Wallet.
Release File Info
-
miner-darwin.zip
MD5: 998991d36a254686730d13fd469972b0
-
miner-windows.zip
MD5: cb84ddb94fb7c71bf29a2945893e7830
-
miner-linux.zip
MD5: 6abeb492e8db9790b737d83c36035a43