└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # ℤ - The Chaos Testnet! 2 | 3 | The time has come! Zeeka's very first incentivized testnet is scheduled to start 4 | on 9:30AM UTC 20th October! 5 | 6 | ### Rules 7 | 8 | - Participants are required to keep themselves updated regarding the announcements published on our Discord and Twitter. 9 | - You have to updat your node/executor/miner software when asked. Outdated miners/nodes will not receive their rewards. 10 | - In order to control the height progress of the testnet, we have put a hard-coded height limit on our software. The height limit is currently set to: **5000** blocks. 11 | - 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! 12 | 13 | ### How to run a Bazuka node? 14 | 15 | If you only want to run a Zeeka node and do not want to execute Zero Contract or 16 | mine Zeeka, you will only need to install `bazuka` (This repo). In case you also 17 | want to mine Zeeka, you will need to install ![zoro](https://github.com/zeeka-network/zoro) 18 | (The Main Payment Network executor) and also the ![uzi-miner](https://github.com/zeeka-network/uzi-miner) 19 | (A RandomX CPU miner). 20 | 21 | **How to install `bazuka`?** 22 | 23 | * Prepare a Linux machine. 24 | * Make sure you have installed `libssl-dev` and `cmake` packages. 25 | 26 | ``` 27 | sudo su 28 | ``` 29 | 30 | ``` 31 | sudo apt-get update && sudo apt-get upgrade 32 | ``` 33 | 34 | ``` 35 | sudo apt install -y build-essential libssl-dev cmake 36 | ``` 37 | 38 | * Install the Rust toolchain (https://rustup.rs/) 39 | ``` 40 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 41 | ``` 42 | * Clone the `bazuka` repo: 43 | ``` 44 | git clone https://github.com/zeeka-network/bazuka 45 | ``` 46 | * ***Warning:*** Make sure Rust binaries are present in your PATH before compiling: 47 | ``` 48 | source "$HOME/.cargo/env" 49 | ``` 50 | * Compile and install: 51 | ``` 52 | cd bazuka 53 | cargo install --path . 54 | ``` 55 | 56 | Now if you want to join the `chaos` testnet, you first have to initialize your 57 | node. If you have already initialized bazuka for the Debug Testnet, you first need 58 | to remove your previous initialization by running: 59 | 60 | ```sh 61 | rm ~/.bazuka.yaml 62 | ``` 63 | 64 | Then initialize: 65 | 66 | ```sh 67 | bazuka init --seed [your seed phrase] --network chaos --node 127.0.0.1:8765 68 | ``` 69 | 70 | (Example seed: `"A_RANDOM_STRING_THAT_IS_LONG_ENOUGH_783264dfhejfjcgefjkef"`) 71 | 72 | The seed is a random string of characters, not mnemonic phrases. **You do not need to generate it using wallets! (E.g Metamask)** 73 | The longer the seed is, the safer. We suggest a seed string of at least 80 random characters. Your regular and zero-knowledge private-keys are derived from the `--seed` value, so **don't forget to keep them somewhere safe and do not share it**! 74 | 75 | Run your node: 76 | 77 | ```sh 78 | bazuka node --listen 0.0.0.0:8765 --external IP ADDRESS:8765 --network chaos --db ~/.bazuka-chaos --bootstrap 144.91.101.166:8765 --bootstrap 45.67.228.84:8765 --bootstrap 152.228.155.120:8765 --bootstrap 80.87.202.42:8765 --bootstrap 148.251.1.124:8765 \ --discord-handle "Rues#9144" 79 | ``` 80 | 81 | You can use the nodes introduced by the community as your `--bootstrap` nodes. 82 | You either have to run your node on a machine with a static IP, or configure a NAT 83 | Virtual Server in order to expose your node on a public IP. Specify your public IP 84 | through the `--external` option. 85 | 86 | **IMPORTANT:** You are required to provide your Discord handle through the 87 | `--discord-handle` flag. By providing your handle, we will be able to authenticate 88 | your node, as a part of rewarding process. 89 | 90 | ### What is the Main Payment Network? 91 | 92 | The Main Payment Network (MPN) is a special, builtin smart-contract that is 93 | created in the genesis-block of the Zeeka Protocol. It manages a merkle-tree of 94 | millions of accounts that can transfer ℤ with each other with nearly zero-cost 95 | transactions. It uses the Groth16 proving system and has a fixed number of 96 | transaction slots per update. 97 | 98 |

99 | Deposit/Withdraw/Rsend/Zsend 100 |

101 | 102 | ### How to mine ℤeeka? 103 | 104 | In order to be a miner, besides working on a PoW puzzle, you will also need to 105 | execute the MPN contract on each block you generate. The `zoro` software is 106 | a CPU/GPU-executor of MPN contract. In order to run `zoro`, you'll need a machine 107 | with at least 32GB of RAM. If you want to be competitive miner you'll also have to 108 | competitive CPU. (In future versions, GPU will be used instead of CPU) 109 | 110 | 1. Make sure Bazuka is the latest version. 111 | 112 | ``` 113 | cd bazuka 114 | git pull origin master 115 | cargo install --path . 116 | ``` 117 | 118 | If you get a `DifferentGenesis` error, it means that the genesis block has changed 119 | in the updated software. So you need to start fresh. Remove the `~/.bazuka-chaos` 120 | folder by running: `rm -rf ~/.bazuka-chaos` 121 | 122 | Now run Bazuka again. 123 | 124 | 2. Install the MPN executor (`zoro`) 125 | 126 | Make sure you have your GPU drivers installed. You also have to install `ocl-icd-opencl-dev`! ***(Currently, only NVIDIA GPUs are supported!)*** 127 | 128 | 129 | ``` 130 | apt install ocl-icd-opencl-dev 131 | ``` 132 | 133 | Then: 134 | 135 | ``` 136 | git clone https://github.com/zeeka-network/zoro 137 | cd zoro 138 | cargo install --path . 139 | ``` 140 | 141 | 3. Download the proving parameters 142 | 143 | - Payment parameters (~700MB): https://drive.google.com/file/d/1slabmFFr0Ct6fef09GOGHGqxYwB7YUMG/view?usp=sharing 144 | - Update parameters (~6GB): https://drive.google.com/file/d/1iVD2bpywWGHLB4cgasuhTEZwXQoGa2bj/view?usp=sharing 145 | 146 | Or if you want to download them through command-line: 147 | 148 | ``` 149 | wget https://api.rues.info/payment_params.dat -O payment_params.dat 150 | ``` 151 | 152 | ``` 153 | wget https://api.rues.info/update_params.dat -O update_params.dat 154 | ``` 155 | 156 | 4. Run `zoro` beside your node: (This will use your Nvidia GPU for mining!) 157 | 158 | ```sh 159 | zoro --node 127.0.0.1:8765 --seed [seed phrase for the executor account] --network chaos \ 160 | --update-circuit-params [path to update_params.dat] --payment-circuit-params [path to payment_params.dat] \ 161 | --db $HOME/.bazuka-chaos --gpu 162 | ``` 163 | 164 | **Note:** You can switch to CPU by removing the `--gpu` flag, but your chances of mining a block 165 | will be very little with a CPU executor! 166 | 167 | (Note: The seed phrase for the executor account needs to be different from the 168 | seed you use for your node! The transaction fees of the Zero transactions processed 169 | by your executor will go to this account) 170 | 171 | 5. After a new block is generated, the `uzi-miner` should start working on the PoW 172 | puzzle, so you will also need to have `uzi-miner` running on your system: 173 | 174 | ``` 175 | git clone https://github.com/zeeka-network/uzi-miner 176 | cd uzi-miner 177 | cargo install --path . 178 | uzi-miner --node 127.0.0.1:8765 --threads 32 179 | ``` 180 | 181 | (Note: Change number of `--threads` based on the spec of your system) 182 | --------------------------------------------------------------------------------