Nockchain is a lightweight chain for heavyweight compute. It uses ZK-Proof of Work (zkPoW). Miners create a ZK-Proof (ZKP) of a fixed puzzle computation, then hash the ZKP, and earn $NOCK based on their computation power.
The team has released a Public Testnet to run a local testnet node and a testnet miner, to explore how Nockchain works before Mainnet goes live.
- Genesis Mainnet and NOCK Mining starts May 21th.
- 10-min block times (like Bitcoin).
- Total Supply: 2^32 nocks (around 4.29 billion).
- Fair launch: 100% of $NOCK will be issued to Miners.
- $NOCK is used to pay for blockspace on Nockchain.
- The mining terms is exactly same a Bitcoin PoW mining.
- More computational power = More rewards
- More miners on the network = Higher hashrate = More difficulty to mine rewards
- You run a solo CPU-based Miner Node on your system which will certainly need a powerful hardware.
- You can follow CLI Setup steps.
- You join a pool (same as bitcoin mining), share your computational power and earn rewards in a shared pool of rewards.
- Official mining method is CLI introduced by the team, and no official Pool or GUI mining programs introduced.
- But new community-driven Projects and Pools are poping up.
- GUI Setup (App): There's a new project called Nockpool, I think they are building a GUI-based Node so you can easily open a wallet on Windows, join a pool, and Mine $NOCK.
Hardware requirement is highly speculative since no one knows how Mainnet-launch goes.
Miner is CPU-based initially | ||
---|---|---|
RAM | CPU | Disk |
64 GB |
6 cores or higher |
100-200 GB SSD |
- more CPU = more hashrate = more chances
- We still can't say that's enough, because it's just a testnet environment and we need to wait until mainnet.
- Windows Users: Install Linux Ubuntu on your Windows using this Guide
- VPS: Recommended crypto-payment VPS provider to Purchase or Visit VPS Beginner Guide
Note: Miners are initially CPU-based for users and will eventually move to GPU and ASIC later
- Update Packages
sudo apt-get update && sudo apt-get upgrade -y
- Install Packages:
sudo apt install curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli libgbm1 pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev libclang-dev llvm-dev -y
- Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
- Enable memory overcommit:
sudo sysctl -w vm.overcommit_memory=1
# kill miner screen
screen -XS miner quit
# remove nockchain
rm -rf nockchain
rm -rf .nockapp
git clone https://github.com/zorp-corp/nockchain
cd nockchain
- Copy
.env
file from the example one:
cp .env_example .env
- Build: (takes time depending on your hardware.)
make install-hoonc
export PATH="$HOME/.cargo/bin:$PATH"
make build
make install-nockchain-wallet
export PATH="$HOME/.cargo/bin:$PATH"
make install-nockchain
export PATH="$HOME/.cargo/bin:$PATH"
Make sure you are in nockchain
directory.
- Set PATH:
export PATH="$HOME/.cargo/bin:$PATH"
- Create wallet:
nockchain-wallet keygen
- Save
memo
,private key
&public key
of your wallet.
Note: After every terminal restart, Ensure you execute these two commands before executing wallet commands again:
cd nockchain
&export PATH="$HOME/.cargo/bin:$PATH"
. By doing this, you won't get Error:wallet: command not found
.
- Replace the value of
MINING_PUBKEY=
in.env
with your own Public Key:
nano .env
To save: Press Ctrl + X
, Y
& Enter
.
Backup wallet keys:
nockchain-wallet export-keys
- This will save your keys to a file called
keys.export
in the current directory.
Import wallet keys:
nockchain-wallet import-keys --input keys.export
-
Make sure
keys.export
is in yournockchain
directory. -
Note: For Local systems who are using a home router network which is mostly behind NAT, they need to forward ports. Ask chatgpt until I get the chance to write a guide for it.
- Enable memory overcommit with this:
sudo sysctl -w vm.overcommit_memory=1
- First, Make sure you are in nockchain directory:
cd ~/nockchain
- The following method will be for running multiple miner instances on a server, you can repeat it by inscreasing
n
numbers byn+1
Run Miner 1:
# create directory
mkdir miner1 && cd miner1
# open screen
screen -S miner1
# start miner
RUST_LOG=info,nockchain=info,nockchain_libp2p_io=info,libp2p=info,libp2p_quic=info \
MINIMAL_LOG_FORMAT=true \
nockchain --mine \
--mining-pubkey PUB_KEY
# OR
# start miner with peers (find good peers in nockchain tg)
RUST_LOG=info,nockchain=info,nockchain_libp2p_io=info,libp2p=info,libp2p_quic=info \
MINIMAL_LOG_FORMAT=true \
nockchain --mine \
--mining-pubkey PUB_KEY \
--peer /ip4/95.216.102.60/udp/3006/quic-v1 \
--peer /ip4/65.108.123.225/udp/3006/quic-v1 \
--peer /ip4/65.109.156.108/udp/3006/quic-v1 \
--peer /ip4/65.21.67.175/udp/3006/quic-v1 \
--peer /ip4/65.109.156.172/udp/3006/quic-v1 \
--peer /ip4/34.174.22.166/udp/3006/quic-v1 \
--peer /ip4/34.95.155.151/udp/30000/quic-v1 \
--peer /ip4/34.18.98.38/udp/30000/quic-v1 \
--peer /ip4/96.230.252.205/udp/3006/quic-v1 \
--peer /ip4/94.205.40.29/udp/3006/quic-v1 \
--peer /ip4/159.112.204.186/udp/3006/quic-v1 \
--peer /ip4/217.14.223.78/udp/3006/quic-v1
- Replace
PUBLIC_KEY
. - If you are getting
generating new candidate
, then you are sucessfully mining blocks! - No worry if you are getting Errors like
command: timer
,ConnectionError
, etc.
- To minimize screen:
Ctrl
+A
+D
- Now, You can run more Miner instances by increasing +1 to the numbers of run command.
- Miner's highly eating your RAM, keep watching your RAM usage with command:
htop
, before running more instances.
Restart Miner:
- If you ever stopped your Miner, to restart it again, delete old data files first:
rm -rf ./.data.nockchain .socket/nockchain_npc.sock
- Make sure you are in the specific miner's directory you want to restart .e.g
miner1
,miner2
, etc.
Screen commands
- Ensure screens do not overlap. Before opening or switching to another screen, minimize or close the current screen.
- Replace
miner
with your miner's screen name .e.gminer1
,miner2
, etc.
# Return screen
screen -r miner
# Minimize screen
Press: CTRL + A + D
# Screens list
screen -ls
# Stop Node (when inside a screen)
Press: Ctrl + C
# Kill and Remove Node (when outside a screen)
screen -XS miner quit
Make sure you are in a miner directory to get connected to the network when executing this command .e.g (cd ~/nockchain/miner1
)
nockchain-wallet --nockchain-socket .socket/nockchain_npc.sock list-notes
If you got balance, then the response is like this:
- name: [first='xxxxx' last='xxxxx']
- assets: 2.576.980.378
- source: [p=[BLAH] is-coinbase=%.y]