8000 GitHub - jalesfevas/nockchain
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jalesfevas/nockchain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 

Repository files navigation

Nockchain

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.


$NOCK Details

  • Mining starts May 21th. Launch Countdown
  • 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.

Mainnet Network Details

  • Mainnet to be launched in 21th May.
  • 10-min block times (like Bitcoin)
  • For Testnet, we run "Miner" and a "simulated local testnet" with a fake genesis block, to connect our Miner to it.
  • Once Mainnet live, public peers are published, so we just need to run Miner alone. It connects to public peers.
  • Before Mainnet launch, team will upload the Official Repository with necessary updates like public peers url to connect our miner to.

$NOCK Issuance Details

  • The earlier you start mining, the BIGGER rewards you are going to earn.

image


Nock Mining Dashboard

This community-driven dashboard, NockStats has many good features like: Wallet balance, Trading, Tokenomics, Calculator, etc.


How to Mine

  • 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

Method 1: Solo (CLI):

  • You run a solo CPU-based Miner Node on your system which will certainly need a powerful hardware.
  • You can follow CLI Setup steps.

Method 2: Pool & Method 3: GUI

  • 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.

image


CLI Miner Setup

Hardware Requirements

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.

OS Requirements

  • 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.

Zorp as a for-profit labs company behind Nockchain will be selling private, closed-source software to mining partners, possibly even GPU-based to help bootstrap the initial security and proofrate of the network.

Meaning they will likely dominate block rewards over the vast majority of people, but yet the protocol might potentially be rewarding for early users.


CLI Installation Steps

Step 1: Install Dependecies

  • 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  -y
  • Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
  • Docker (For Mainnet, we might choose Docker setup)
sudo apt update -y && sudo apt upgrade -y
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt update -y && sudo apt upgrade -y

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Test Docker
sudo docker run hello-world

sudo systemctl enable docker
sudo systemctl restart docker

Step 2: Clone NockChain Repo

git clone https://github.com/zorp-corp/nockchain

cd nockchain

Step 3: Install Choo (Jock/Hoon Compiler)

make install-hoonc
  • This compiles hoonc, the Nock-based compiler used for running Jock programs and ZKVM applications.

Step 4: Build

Building may take more than 15 minutes.

# Install node binaries
make build

# Install wallet binaries
make install-nockchain-wallet

# Install Nockchain
make install-nockchain

Step 5: Setup Wallet

Make sure you are in nockchain directory.

  • Set PATH:
export PATH="$PATH:$(pwd)/target/release"
  • 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="$PATH:$(pwd)/target/release". By doing this, you won't get Error: wallet: command not found.

Step 6: Configure Nodes

Your Node's configuration is in Makefile Open Makefile:

nano Makefile
  • MINING_PUBKEY: Replace your wallet public key with its value.
  • Ports: By default, Nodes use ports 3005 and 3006. If these ports are occupied on your system, modify them in the node configuration.
  • To save: Ctrl+X + Y + Enter

Step 7: Open ports

# Allow ssh port
sudo ufw allow ssh
sudo ufw allow 22

# Enable firewall
sudoufw enable

# Open ports
sudo ufw allow 3005/tcp
sudo ufw allow 3006/tcp

Step 8: Run Leader Node

Leader Node is a fake testnet node. On mainnet Peer IDs will be replaced with Leader node, we only need to run Follower Node in the next step.

  • Open a screen:
screen -S leader
  • Start a Leader Node (Testnet Node for fake genesis block):
make run-nockchain-leader
  • Wait for it to install.
  • To minimize: Ctrl + A + D

Step 9: Run Follower Node:

  • Open a screen
screen -S follower
  • Start a Follower Node (Miner Node for connecting to other peers):
make run-nockchain-follower
# OK Response:
I (12:18:31) "inner dumbnet cause: [%command %timer]"
I (12:18:32) nc: block by-height: [Ok(%heavy-n) Ok(1) 0]
  • To minimize: Ctrl + A + D

Usefull commands

Wallet commands:

Note: After every terminal restart, Ensure you execute these two commands before executing wallet commands again: cd nockchain & export PATH="$PATH:$(pwd)/target/release". By doing this, you won't get Error: wallet: command not found.

General Wallet Command:

nockchain-wallet --nockchain-socket ./test-leader/nockchain.sock

Wallet Balance:

nockchain-wallet --nockchain-socket ./test-leader/nockchain.sock balance
  • It looks good. ~ is like a 0 and balance will be 0 until you mine a block.

image

Screen commands:

Ensure screens do not overlap. Before opening or switching to another screen, minimize or close the current screen.

# Return leader screen (leader logs)
screen -r leader

# Return leader screen (follower logs)
screen -r follower

# Minimize screen
Press: CTRL + A + D

# Screens list
screen -ls

# Stop Node when inside a screen
Press: Ctrl + C

# Kill and Remove screen when outside a screen (replace NAME)
screen -XS NAME quit

Well, We just tested a Nockchain Miner node on the testnet, which is NOT incentivized. This was an experiment to prepare for the Mainnet launch on May 19. The team might update the docs with new features, and the Mainnet setup may ir may not differ.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0