Running a Testnet Validator Node
Hardware Requirements
Minimal
16 GB RAM
300 GB SSD Storage
1.4 GHz x2 CPU
Recommended
32 GB RAM
600 GB SSD Storage
2.0 GHx x4 CPU
Prerequisites
Golang 1.21 required. (Installation Ref)
git Installation Ref
make Installation Ref
Installation
Installation of NodeGenerate Wallet
Run the following to generate a wallet. Save the mnemonic displayed on the output, which can be used for scenarios where you would like to import your wallet address.
hid-noded keys add <key-name>If you already have a BIP39 mnemonic, you can import your wallet by running the following. Enter the mnemonic string in the prompt and the wallet will be imported.
hid-noded keys add <key-name> --recoverConfigure the Full Node
Initialise the node with a moniker name.
hid-noded init <moniker-name> --chain-id prajna-1Configuration files of the node are stored in the default location: $HOME/.hid-node. If you want to specify a different location, append the flag --home <hid-node-home-directory> to the above command. In this case, for every transaction based commands, you have to explicitly pass this flag.
Replace
genesis.jsonpresent in<hid-node-home-directory>/configwith the Testnet genesis here.Copy the final peers from here. Open
<hid-node-home-directory>/config/config.tomland the add the peers in the fieldpersistent_peers.
Run Full Node
hid-noded binary can be run in either of the following ways:
In Terminal
hid-noded startAs a system service
Change directory:
cd /etc/systemd/systemAdd the hid-noded system service file to
/etc/systemd/systemdirectory.Reload service files:
sudo systemctl daemon-reloadTo make sure your service starts on every reboot (Optional):
sudo systemctl enable hidnoded-standalone.serviceTo start the service:
sudo systemctl start hidnoded-standalone.serviceTo check the status of service:
sudo systemctl status hidnoded-standalone.serviceTo restart the service:
sudo systemctl restart hidnoded-standalone.service
Important Points
If you haven't run any CometBFT based chains before, please note the following points before moving to the upcoming sections below:-
RPC and gRPC ports can be modified in
<blockchain-config-dir>/config/config.tomlAPI port can be modified in
<blockchain-config-dir>/config/app.tomlThere are primarily two types of commands:
Transaction based. It starts with
hid-noded tx ...Query based. It starts with
hid-noded q ...
Transaction based commands may/always require the following flags:
--chain-id prajna-1--fees 4000uhid: The value of fees is arbitrary, but it should be sufficiently high enough for the transaction to go through.4000uhidis an appropriate value for almost every transaction--node <rpc-ip-or-dns:rpc-port>: The node expects RPC to run on default port 26657. If your RPC port is different from default, you need to explicitly pass this flag. In case of default port, it can be skipped.
Query based commands may require the following flag:
--node <rpc-ip-or-dns:rpc-port>: The node expects RPC to run on default port 26657. If your RPC port is different from default, you need to explicitly pass this flag. In case of default port, it can be skipped.
Learn more about Cosmos SDK's modules and their respective commands from here
Promotion of Full Node to Validator Node
Perform these steps only when your node is completely synced with the testnet.
Acquire some $HID tokens. Use the faucet channel of Hypersign Protocol's Discord Server from here
Perform the following validator creation transaction.
hid-noded tx staking create-validator \
--from <key-name> \
--amount 1000000uhid \
--pubkey "$(hid-noded comet show-validator)" \
--chain-id prajna-1 \
--moniker="<validator-name>" \
--commission-max-change-rate=0.01 \
--commission-max-rate=1.0 \
--commission-rate=0.07 \
--min-self-delegation="1000000" \
--details="<enter details about your validator node or validation service>" \
--security-contact="<contain details>" \
--website="<your website>"
--fees="<Transaction fees in uhid. Example: 4000uhid>"Redeeming Staked Rewards
Having significant stake in the blockchain comes with reward in the form of tokens. The redemption of rewards needs to be done manually. Run the following to redeem rewards:
hid-noded tx distribution withdraw-rewards <validator-addr> --from <validator-wallet-address> --chain-id jagrat --fees <Transaction fees in uhid. Example: 4000uhid><validator-addr>- Validator's Operator address. (Prefix ishidvaloper)<validator-wallet-address>- Validator's wallet address from which they have stake tokens. (Prefixhid)
If you also want to withdraw validator commission, append the --commission flag to the above command.
To check the outstanding validator rewards.
hid-noded q distribution validator-outstanding-rewards <validator-addr><validator-addr>- Validator's Operator address. (Prefix ishidvaloper)
Unjailing a validator node
In CometBFT-based blockchain, if a node is not active for a certain period of time or if the current self stake falls below the minimum self stake, it is temporarily moved out of the validator set. This situation is called Jailing of a validator. The validator remains in the jailed period for about 10 minutes.
The validator can only be unjailed manually through a transaction after the jailed period is over and if the current self stake is above the required self stake at the time the time of performing the following unjail transaction:
hid-noded tx slashing unjail --from <validator-associated-wallet-address> --chain-id jagrat --fees <amount-in-uhid>Last updated