Pre-Genesis (Joining as a Genesis Validator)
Running the SGE Node
This section explains how to install and set up the SGE Node and run a validator node.
Getting the Binary
Install the SGE Network application
Initialize node
Getting The Pre-Genesis
After the installation is a success. The first thing to do is initialize the SGE node. For this, remove all previous data of the SGE node.
Once the system is clean, initialize the node with the following command:
Now that the node is initialized, we need to replace the generated genesis.json
file with the pre-genesis file from this repo.
Head over to sgenet-1 within this repo and get the pre-genesis.json file. Replace the ~/.sge/config/genesis.json
file with this pre-genesis.json
file. Make sure to rename the file to genesis.json
.
We are now ready to proceed to the next step and create Genesis transactions.
Submitting a Genesis Transaction
Now that we have our Node setup, first, create (or recover) a new SGE Account.
Now that we have the keys to an SGE wallet account, let's go ahead and add it to the Genesis file as a Genesis account
For example
Now that we have some balance in the genesis account, the next step is to make a genesis transaction to create a new validator with our account.
This will add the genesis transaction to a gentx-xxxx.json
file.
Once you have the gentx file, make a PR to gentxs to include your Genesis transaction.
Registering Peer IDs
You will need to register your Peer ID as well in order for other nodes to connect with your node. To do so, first, get your Node ID.
Now, get your public IP. The Gossip protocol of your node runs on port 26656 by default.
So, your final combined peer ID should be of the format:
For Example
Now make a PR to peers dir to add your peer ID to the list.
Getting The Genesis File
Once everyone has submitted their genesis transactions, the SGE team will collect all these genesis transactions and generate the genesis.json
the file that will be used to start the chain.
Once generated, all the genesis validators will be notified and you can get the genesis file from here.
Download this file and replace the ~/.sge/config/genesis.json
file with this new Genesis file.
Starting the SGE Node
We are now ready to start your SGE Node. To start your node run
Note that the chain may not immediately start generating new blocks because 67% voting power has not yet been achieved. That is, other validators have not yet started their nodes.
New block generation will start as soon as 67% of voting power is achieved, even if the rest 33% of validators are not yet online. This means that if they do not join soon enough they will be slashed and jailed for missing blocks.
Install system.d service file
Please following contents(the working dir may be changed as needed)
Reload unit files in the systemd
Last updated