Dhive Docs
  • Welcome to Dhive
  • Dhive L1
  • Dhive EVM "CLI"
    • Client Configuration Guide
    • Using Dhive with Docker
    • Running a Single Node Local Network
  • Loyalty Program
    • Tokenization of loyalty Program
  • Redeemable NFTs
  • Onchain Reviews
  • Dhive Bridging
  • Dhive Amm
    • Overview
    • Get Started
    • Create A Wallet
    • Get DVI 20 Tokens
    • Token Swaps
  • Liquidity Pools
  • Add/Remove Liquidity
  • Contracts
  • Dhive rNFT Marketplace
    • Overveiw
  • Tokenize Your Business
  • List Product "rNFT"
  • Buy rNFT
  • Redeem rNFT
  • Cashback Mechanism
  • Contracts
  • Post A Reveiw
  • For Validators
    • Overview
    • Run a Validator
    • Configuration
    • Disk Usage Optimization
    • State Sync
    • Mempool
  • Tokenomics
    • Overview
    • DFuel Tokenomics
    • Dhive Validator Token Tokenomics
  • Others
    • Dhive Roadmap
Powered by GitBook
On this page
  • Creating Your Validator
  • Editing Validator Description
  • Tracking Validator Signing Information
  • Unjailing Your Validator
  • Halting Your Validator
  • Common Problems

Was this helpful?

  1. For Validators

Run a Validator

Prerequisite Readings

  • Validator Overview

  • Validator Security

Tip: If you plan to use a Key Management System (KMS), follow these steps first: Using a KMS.

Warning: ⚠️ Ensure your server timezone configuration is set to UTC. A different timezone configuration may cause a LastResultsHash mismatch error, potentially taking down your node.


Creating Your Validator

Your node consensus public key (dhivevalconspub...) can be used to create a new validator by staking DHIVE tokens. You can retrieve your validator public key by running:

dhived tendermint show-validator

Warning: 🚨 Never create your mainnet validator keys using a test keying backend. Doing so may result in a loss of funds by making them remotely accessible via the eth_sendTransaction JSON-RPC endpoint.

Security Advisory: Insecurely configured Geth can make funds remotely accessible.

To create your validator on the testnet, use the following command:

dhived tx staking create-validator \
  --amount=1000000atdhive \
  --pubkey=$(dhived tendermint show-validator) \
  --moniker="choose a moniker" \
  --chain-id=<chain_id> \
  --commission-rate="0.05" \
  --commission-max-rate="0.10" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1000000" \
  --gas="auto" \
  --gas-prices="0.025atdhive" \
  --from=<key_name>

Tips:

  • The commission-max-change-rate measures percentage point changes over the commission-rate. For example, a change from 1% to 2% represents a 100% increase but only one percentage point.

  • Min-self-delegation is a strictly positive integer defining the minimum voting power your validator must maintain. A value of 1000000 ensures your validator never has a self-delegation lower than 1 atdhive.

You can confirm that your validator is in the validator set using a third-party explorer.


Editing Validator Description

You can update your validator's public description, which helps delegators identify and evaluate your validator. Provide input for all necessary flags; missing flags default to empty if never set or retain their previous values.

To edit your validator description, use:

dhived tx staking edit-validator \
  --moniker="choose a moniker" \
  --website="https://dhive.org" \
  --identity=6A0D65E29A4CBC8E \
  --details="To infinity and beyond!" \
  --chain-id=<chain_id> \
  --gas="auto" \
  --gas-prices="0.025atdhive" \
  --from=<key_name> \
  --commission-rate="0.10"

Note:

  • The commission-rate must be between 0 and the validator’s commission-max-rate.

  • The commission-max-change-rate determines the maximum percentage point change per day.

To view your validator details, use:

dhived query staking validator <account_cosmos>

Tracking Validator Signing Information

To monitor past validator signatures, use:

dhived query slashing signing-info <validator-pubkey> \
  --chain-id=<chain_id>

Unjailing Your Validator

If your validator is jailed for downtime, submit an Unjail transaction from the operator account to resume earning block proposer rewards.

dhived tx slashing unjail \
  --from=<key_name> \
  --chain-id=<chain_id>

To confirm your validator is active, run:

dhived query tendermint-validator-set | grep "$(dhived tendermint show-address)"

Your validator should now appear in Dhive explorers. Look for the Bech32-encoded address in ~/.dhived/config/priv_validator.json.

Note: To be in the validator set, you must have more total voting power than the 100th validator.


Halting Your Validator

For maintenance or planned upgrades, halt your validator systematically by setting a halt-height or using the --halt-height flag. Your node will shut down gracefully at the specified block height.


Common Problems

Problem #1: My Validator Has voting_power: 0

Your validator may be jailed. Validators are jailed if they fail to vote on 500 of the last 10,000 blocks or if they double-sign transactions.

To recover:

  1. If dhived is not running, restart it:

    dhived start
  2. Allow your full node to sync to the latest block.

  3. Unjail your validator.

  4. Verify your voting power:

    dhived status

If your voting power is lower than before, it means you were slashed for downtime.

Problem #2: My Node Crashes Due to Too Many Open Files

By default, Linux limits the number of open files per process to 1024. dhived may exceed this limit, causing crashes. A quick fix is:

ulimit -n 4096

Then restart dhived:

dhived start

If using systemd, adjust configurations as follows:

# /etc/systemd/system/dhived.service
[Unit]
Description=Dhive Node
After=network.target

[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/home/ubuntu/go/bin/dhived start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target

Following these guidelines ensures your validator remains active, secure, and optimally configured on the Dhive network.

PreviousOverviewNextConfiguration

Last updated 3 months ago

Was this helpful?