- Participants must follow our pages on our Discord, Telegram and Twitter and be aware of announcements published.
- You have to update your node software when asked. Outdated nodes will not receive their rewards.
- During the testnet, we may be required to resync our nodes or restart building blocks from height 0. Do not panic! We will keep track of all participants' contribution even after fresh starts!
- IMPORTANT! YOU WILL NEED TO WITHDRAW YOUR FUNDS FROM YOUR MPN ACCOUNT TO YOUR MAIN-CHAIN ADDRESS IN THE END OF THE TESTNET, OTHERWISE YOU WILL NOT GET YOUR REWARDS!
If you only want to run a Ziesha node and do not want to execute Zero Contract or mine Ziesha, you will only need to install . In case you also want to mine Ziesha, there are two roads:
- Mine as a solo-miner: You will need to install (The Main Payment Network executor) and also the (A RandomX CPU miner).
- Mine in a mining pool: You will only need to install
How to install bazuka
?
-
Prepare a Linux machine.
-
Make sure you have installed
libssl-dev
andcmake
packages.sudo apt-get update && sudo apt-get upgrade
sudo apt install -y build-essential libssl-dev cmake
-
Install the Rust toolchain (https://rustup.rs/)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Clone the
bazuka
repo:git clone https://github.com/ziesha-network/bazuka
-
Warning: Make sure Rust binaries are present in your PATH before compiling:
source "$HOME/.cargo/env"
-
Compile and install:
cd bazuka cargo install --path .
Now if you want to join the pelmeni
testnet, you first have to initialize your
node. If you have already initialized bazuka in an older testnet, you first need
to remove your previous initialization by running:
rm -rf ~/.bazuka ~/.bazuka-wallet ~/.bazuka.yaml ~/.uzi-pool-history ~/.uzi-pool-miners
Then initialize:
bazuka init [flags...]
Available flags:
--bootstrap <bootstrap>...
: You can use the nodes introduced by the community as your bootstrap nodes through this flag. (E.g You can use one of our nodes:65.108.193.133:8765
)--db <db>
: Path of the node's database. Default:~/.bazuka
.--external <external>
: Public ip/port of your node. Default:YOUR_PUBLIC_IP:8765
.--listen <listen>
: Local socket. Default:0.0.0.0:8765
.--mnemonic <mnemonic>
: If you already have a 12-word mnemonic phrase, you can pass it through this flag. If not provided, a new wallet will be generated for you. Keep the mnemonic word list somewhere safe!--network <network>
: The network your node will operate on. Default:mainnet
Example to initialize a node with 2 bootstrap nodes 65.108.193.133:8765
on the pelmeni
network:
bazuka init --network pelmeni --bootstrap 65.108.193.133:8765 --mnemonic "YOUR OLD MNEMONIC PHRASE"
If you don't have a mnemonic phrase and you would like bazuka
to generate one for you:
bazuka init --network pelmeni --bootstrap 65.108.193.133:8765
Make sure you write down the mnemonic phrase generated for you somewhere safe! All your rewards will go into this public-key, in the future mainnet!
After initializing your node you can run it through:
bazuka node start --discord-handle "YOUR DISCORD HANDLE"
IMPORTANT: You are required to provide your Discord handle through the
--discord-handle
flag. By providing your handle, we will be able to authenticate
your node, as a part of rewarding process.
The Main Payment Network (MPN) is a special, builtin smart-contract that is created in the genesis-block of the Ziesha Protocol. It manages a merkle-tree of millions of accounts that can transfer ℤ with each other with nearly zero-cost transactions. It uses the Groth16 proving system and has a fixed number of transaction slots per update.
(NOTE: If you want to build a mining pool, follow the guide here: https://github.com/ziesha-network/uzi-pool)
You need to follow the steps:
- Find out your wallet-address by running
bazuka wallet
. - Install/update
uzi-miner
on your system:git clone https://github.com/ziesha-network/uzi-miner cd uzi-miner cargo update cargo install --path .
- Provide your wallet-address to the pool owner. He will give you Miner Token in return, which should be passed to
uzi-miner
. - Run uzi-miner with --pool flag:
(Note: Change number of
uzi-miner --pool --node IP_OF_THE_POOL:8766 --threads 32 --miner-token MINER_TOKEN
--threads
based on the spec of your system)
In order to be a miner, besides working on a PoW puzzle, you will also need to
execute the MPN contract on each block you generate. The zoro
software is
a CPU/GPU-executor of MPN contract. In order to run zoro
, you'll need a machine
with at least 32GB of RAM. If you want to be competitive miner you'll also have to
competitive CPU. (In future versions, GPU will be used instead of CPU)
-
Make sure Bazuka is the latest version.
cd bazuka git pull origin master cargo install --path .
If you get a
DifferentGenesis
error, it means that the genesis block has changed in the updated software. So you need to start fresh. Remove the~/.bazuka
folder by running:rm -rf ~/.bazuka
Now run Bazuka again.
-
Install the MPN executor (
zoro
)Make sure you have your GPU drivers installed. You also have to install
ocl-icd-opencl-dev
! (Currently, only NVIDIA GPUs are supported!)apt install ocl-icd-opencl-dev
Then:
git clone https://github.com/ziesha-network/zoro cd zoro cargo install --path .
-
Generate the proving parameters (Note: You will need 64GB of memory in order to generate parameters! If your RAM is 32GB, try adding another 32GB of swap space!)
zoro generate-params
-
Run
zoro
beside your node: (This will use your Nvidia GPU for mining!)zoro start --node 127.0.0.1:8765 --seed "SOME RANDOM STRING" \ --update-circuit-params update_params.dat --deposit-circuit-params deposit_params.dat \ --withdraw-circuit-params withdraw_params.dat --db $HOME/.bazuka --gpu
Note: You can switch to CPU by removing the
--gpu
flag, but your chances of mining a block will be very little with a CPU executor!(Note: The seed phrase for the executor account needs to be different from the seed you use for your node! The transaction fees of the Zero transactions processed by your executor will go to this account)
NOTE: YOUR PROVING TIME MUST BE AROUND 30-40S IN ORDER TO BE COMPETETIVE!
-
After a new block is generated, the
uzi-miner
should start working on the PoW puzzle, so you will also need to haveuzi-miner
running on your system:git clone https://github.com/ziesha-network/uzi-miner cd uzi-miner cargo install --path . uzi-miner --node 127.0.0.1:8765 --threads 32
(Note: Change number of
--threads
based on the spec of your system)