Before proceeding, we will need to increase the default per-user open file limit in Linux.
# Increase file limits
echo "* soft nofile 64000" | sudo tee -a /etc/security/limits.conf
echo "* hard nofile 64000" | sudo tee -a /etc/security/limits.conf
echo "root soft nofile 64000" | sudo tee -a /etc/security/limits.conf
echo "root hard nofile 64000" | sudo tee -a /etc/security/limits.conf
echo "session required pam_limits.so" | sudo tee -a /etc/pam.d/common-session
# Increase file limits
echo "* soft nofile 64000" | sudo tee -a /etc/security/limits.conf
echo "* hard nofile 64000" | sudo tee -a /etc/security/limits.conf
echo "root soft nofile 64000" | sudo tee -a /etc/security/limits.conf
echo "root hard nofile 64000" | sudo tee -a /etc/security/limits.conf
echo "session required pam_limits.so" | sudo tee -a /etc/pam.d/login
To check the above updated settings, use the commands below:
2. Download VagaChain Configuration Files and Install
2.1 Download
Clone VagaChain dependencies and build binaries by using the following git commands:
# Get Cosmos SDK and VagaChain build binaries
cd
git clone [replace with Git Repository Link]
cd vagachain
git fetch --all
# git checkout -f v0.22.0
Good to know:
Depending on the servers internet connection and speed, the download process may take a few minutes.
Note:
During the initial stage of public validator node onboarding, Vagabond will conduct a pre-selection of interested participants to ensure the best possible support experience and to attain high quality validator node operators.
Git Repository Link will only be made available to selected participants in the currently running Validator Onboarding Program.
2.2 Install
Install VagaChain
# Install executables
make install
3. VagaChain Service Configuration
3.1 Systemd (Linux) service unit file
The following step will create a service to run VagaChain in the background. It will also allow the machine to automatically restart the service if it stops for some reason (and helps to avoid getting slashed!). This is a necessary step to make sure our validator runs 24-7.
Copy and paste the complete code below. Replace [user] and [home] with your systems user profile name and home directory.
# Enable vagachaind.service
cd
cd vagachain/build/
sudo mv vagachaind.service /etc/systemd/system/
sudo systemctl enable vagachaind.service
4. Initialize the Chain
4.1 Define the name of your validator node
Before kick-starting your node, we need to initialize the chain so that it can connect to the VagaChain network. This is done with the following init subcommand:
# Create the config skeleton as user vagachaind
vagachaind init --chain-id=frankfurt-1 <moniker>
# Create the config skeleton as user vagachaind
vagachaind init --chain-id=porto-1 <moniker>
Change moniker to a different human-readable name of choice and remove the brackets. This will be the displayed id of your node when connected to the VagaChain network.
Note:
Monikers can only contain ASCII characters; using Unicode characters will render your node unreachable by other peers in the network.
The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network. All these configuration files are in ~/.vagachain folder by default:
# Directory Structure
. # ~/.vagachain
|- data # Contains the databases used by the node.
|- config/
|- app.toml # Application-related configuration file.
|- client.toml # Client-related configuration file.
|- config.toml # Tendermint-related configuration file.
|- genesis.json # The genesis file.
|- node_key.json # Private key to use for node authentication in the p2p protocol.
|- priv_validator_key.json # Private key to use as a validator in the consensus protocol.
4.2 Configure app.toml and config.toml
Set minimum-gas-prices:
# Set minimum gas price
sed -i 's/minimum-gas-prices = "0uvaga"/minimum-gas-prices = "0.01uvaga"/g' ~/.vagachain/config/app.toml
Recommended setting:
minimum-gas-prices = "0.01uvaga"
Next we need to set the external_address parameter registered in the config.toml file. This setting will add your public IP to the address book in seed nodes, preventing continuous reconnections. The default P2P port is 26656.
# Set public IP
sed -i -e 's/external_address = \"\"/external_address = \"'$(curl httpbin.org/ip | jq -r .origin)' :26656\"/g' ~/.vagachain/config/config.toml
Proceed after with the following changes in config.toml. These have to be done manually:
cd
cd .vagachain/config/
vim config.toml
# Set persistent peers // P2P Configuration Options
persistent_peers = "8547fe121e014e81bd28828946524226d5e07a60@82.165.78.199:26656"
# Set seeds // P2P Configuration Options
seeds = "8547fe121e014e81bd28828946524226d5e07a60@82.165.78.199:26656"
# Set CORS to "*" // RPC Server Configuration Options // OPTIONAL
cors_allowed_origins = ["*"]
Good to know:
VagaChain being a decentralized network, you will need an entry point to join it. This is done by connecting to one or more nodes in the network when you start your node.
You may choose a different node operator from the one suggested above in the persistent_peers setting.
4.3 Download Genesis and Address Book files
# Download files
wget <genesis.json link>
wget <addrbook.json link>
# Replace default Genesis and Address book files
sudo mv <name of downloaded genesis file> .vagachain/config/genesis.json
sudo mv <name of downloaded address book file> .vagachain/config/addrbook.json
Note:
5. Create VAGA Wallet Account
The following step is to create a new VagaChain VAGA wallet account for your validator node. When providing the <account-name>, make sure you drop the quotation marks <>.
The following request will come up. Enter a passphrase:
# Create Keyring Passphrase
Enter keyring passphrase:
Re-enter keyring passphrase:
Tip:
Choose a long passphrase containing different sets of random ASCII characters
An important reminder:
Store all account information onto an external offline storage: pubkey, mnemonic seed phrase, account address, name and passphrase.
In order for vagachaind to recognize a wallet address it must contain VAGA coins.
Add funds to your new wallet account from an existing wallet account.
To add funds to your new wallet account, use the faucet (link below) to receive VAGA.
Testnet faucet link not available at the moment
6. Genesis & Address Book
Set your newly created VagaChain wallet account as a local genesis account and set the <initial-balance>:
Good to know:
The smallest unit of VAGA is the uVAGA, or the micro VAGA, where:
1 uVAGA = 0.000001 VAGA
# Set Local Genesis Account
vagachaind add-genesis-account $(vagachaind keys show <account-name> -a) <initial-balance>uvaga
# Enter keyring passphrase
# Set Local Genesis Account
vagachaind add-genesis-account $(vagachaind keys show <account-name> -a) <initial-balance>uvaga
# Enter keyring passphrase
# Set Local Genesis Account
# <account-name> = vaga-test
# <initial-balance> = 1000 VAGA = 1000000000 uvaga
vagachaind add-genesis-account $(vagachaind keys show vaga-test -a) 1000000000uvaga
# Enter keyring passphrase
Now that you have created a local genesis account, go ahead and create your first genesis transaction with the <stake-amount> of VAGA you wish to bond to your validator by granting it some uvaga coins.
Collect both gentxs transactions and add them to the genesis.json file:
# Add gentx to Genesis File
vagachaind collect-gentxs
7. Create Validator and Set Staking Amount
7.1 Create validator
To create the validator and initialize it with a self-delegation, run the following command. key-name is the name of the Application Operator Key that is used to sign transactions.
The above command registers the validator account you created as a validator operator account (i.e. the account that controls the validator) and self-delegates the provided stake-amount of staking coins.
Note:
When you specify commission parameters, the commission-max-change-rate is measured as a percentage-point change of the commission-rate. For example, a change from 1% to 2% is a 100% rate increase, but the commission-max-change-rate is measured as 1%.
Min-self-delegation is a strictly positive integer that represents the minimum amount of self-delegated voting power your validator must always have. A min-self-delegation of 1 means your validator will never have a self-delegation lower than 10000000uvaga
7.2 Confirm validator is active
If running the following command returns something, your validator is active:
# Confirm validator is active
vagachaind query tendermint-validator-set | grep "$(vagachaind tendermint show-validator)"
You may look for the bech32 encoded address in the ~/.vagachain/config/priv_validator_key.json file.
You can also verify the inclusion of your node in the network by viewing the VagaChain Block Explorer:
7.3 Secure your keys and have a backup plan
An important reminder:
Backup your priv_validator_key.json & node_key.json files onto an external and secure offline storage.
The location of these files can be found at: $HOME/.vagachaind/config/
Protecting and having a contingency backup plan for your keys and sensitive data will help mitigate catastrophic hardware or software failures of the node.
8. Start your Validator
You can now start your validator:
# Start vagachaind
sudo systemctl start vagachaind
# Check status
sudo systemctl status vagachaind
# Control+C to exit
To further verify the status of your validator, use the following HTML link:
Congratulations!
You have now a fully running validator node on the VagaChain blockchain network.
To participate, please refer to the following documentation:
Links made available to selected participants of the
Compatible VagaChain VAGA wallet:
Note: Link made available to selected participants of the
Replace <account-name> with your previously created VagaChain .
Secure your keys and have a backup plan:
Make sure to change moniker in the above link with the .