fetch-logo
ConceptsConceptsGuidesGuidesExamplesExamplesReferencesReferencesAPIsAPIs
GitHub (opens in a new tab)
  • Guides
      • Quickstart
        • What's an Agent?
        • uAgents Framework installation
        • Create your first agent
        • Agents address
        • Communicating with other agents
        • Agent Handlers (on_...)
        • Agents storage functions
        • Public and private Agents
        • Send tokens with Agents
        • Agents Mailboxes
        • Agent Functions
        • Make agents AI Engine compatible
        • Multi-file agent pipeline for AI Engine: Hugging face API to create a multi agent pipeline
        • Options for running local agents
        • Hosted agent
        • Introducing dialogues
        • Almanac Contract
        • Verify messages with Agents
        • Multi-file agent pipeline for AI Engine: Network of Primary and Secondary functions in Agentverse
        • Localwallet
        • Agentverse: Hosted Agents
        • Agentverse: Dice Roll agent
        • Agentverse: Allowed Imports
        • Agentverse: Mailbox
        • Register Agentverse Functions
        • Agentverse Functions: coin toss agent
        • Field descriptions for DeltaV
        • Agentverse Command Line Interface (AVCTL)
        • AVCTL Hosting commands
      • Agents and Functions creation APIs
      • Secret Management APIs
      • How to convert native FET to and from ERC-20 FET
      • How to stake FET tokens
      • Different ways of staking FET
      • Re-delegating staked FET token
      • Reconciliation service
      • How to setup a Multisig Wallet
        • Getting started
        • How to use the Fetch wallet
        • How to stake and claim rewards
        • Address book
        • Connections
        • Fetch Wallet Hardware Connection Guide
        • Installation
        • Connecting to a blockchain
        • Querying balances
        • Wallets and private keys
        • Sending funds
        • Staking
        • Smart contracts
          • Stake auto-compounder
          • Stake optimizer
          • Oracles
          • Wallet top-up
          • Liquidity pool
          • Swap automation
        • Installation️
        • Getting started
        • Keys
          • How to add profiles
          • How to add contract templates
          • How to compile contracts
          • How to deploy contracts
          • Contract interaction
        • Installation
        • How to use chain state snapshots
        • State-synchronization (state-sync)
        • How to set up a validator node
        • How to join a testnet
        • How to run a single node test network
        • Governance
        • How to get testnet tokens via the Token Faucet
          • CLI - Introduction
          • CLI - Managing keys
          • CLI - Managing tokens
          • CLI - Multisig keys
          • CLI - Delegation
          • Governance proposals
      • Agents 101
      • Agents 101 for AI Engine
  • Guides
      • Quickstart
        • What's an Agent?
        • uAgents Framework installation
        • Create your first agent
        • Agents address
        • Communicating with other agents
        • Agent Handlers (on_...)
        • Agents storage functions
        • Public and private Agents
        • Send tokens with Agents
        • Agents Mailboxes
        • Agent Functions
        • Make agents AI Engine compatible
        • Multi-file agent pipeline for AI Engine: Hugging face API to create a multi agent pipeline
        • Options for running local agents
        • Hosted agent
        • Introducing dialogues
        • Almanac Contract
        • Verify messages with Agents
        • Multi-file agent pipeline for AI Engine: Network of Primary and Secondary functions in Agentverse
        • Localwallet
        • Agentverse: Hosted Agents
        • Agentverse: Dice Roll agent
        • Agentverse: Allowed Imports
        • Agentverse: Mailbox
        • Register Agentverse Functions
        • Agentverse Functions: coin toss agent
        • Field descriptions for DeltaV
        • Agentverse Command Line Interface (AVCTL)
        • AVCTL Hosting commands
      • Agents and Functions creation APIs
      • Secret Management APIs
      • How to convert native FET to and from ERC-20 FET
      • How to stake FET tokens
      • Different ways of staking FET
      • Re-delegating staked FET token
      • Reconciliation service
      • How to setup a Multisig Wallet
        • Getting started
        • How to use the Fetch wallet
        • How to stake and claim rewards
        • Address book
        • Connections
        • Fetch Wallet Hardware Connection Guide
        • Installation
        • Connecting to a blockchain
        • Querying balances
        • Wallets and private keys
        • Sending funds
        • Staking
        • Smart contracts
          • Stake auto-compounder
          • Stake optimizer
          • Oracles
          • Wallet top-up
          • Liquidity pool
          • Swap automation
        • Installation️
        • Getting started
        • Keys
          • How to add profiles
          • How to add contract templates
          • How to compile contracts
          • How to deploy contracts
          • Contract interaction
        • Installation
        • How to use chain state snapshots
        • State-synchronization (state-sync)
        • How to set up a validator node
          • Pre-requisites
          • Creating a validator
          • Edit a validator configuration
          • Unbonding a validator
        • How to join a testnet
        • How to run a single node test network
        • Governance
        • How to get testnet tokens via the Token Faucet
          • CLI - Introduction
          • CLI - Managing keys
          • CLI - Managing tokens
          • CLI - Multisig keys
          • CLI - Delegation
          • Governance proposals
      • Agents 101
      • Agents 101 for AI Engine
Guides
Fetch Network
Ledger
How to set up a validator node

How to set up a validator node 🌐

Pre-requisites

First of all, you need to have:

  • installed ↗️ fetchd.
  • Configured and connected ↗️ your validator to the desired network.

Also, it would be beneficial if you also explore the CLI documentation ↗️ to understand how to correctly interact with the Fetch Ledger.

Creating a validator

If you wish to create a validator, you will need to send a transaction to the network to stake your FET tokens. This process registers you as a validator, and if you are one of the chosen validators, you will start to produce blocks. If you want to create a validator using fetchd Command Line Interface (CLI) ↗️ you will need to send a create-validator transaction to the network as shown below:

fetchd tx staking create-validator \
  --amount=<the amount to bond> \
  --pubkey=$(fetchd tendermint show-validator) \
  --moniker="choose a moniker" \
  --chain-id=<chain_id> \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="<the min self delegation>" \
  --gas auto --gas-adjustment 1.5 --gas-prices "<network gas prices>" \
  --from=<key_name>

Dorado example

You should verify that you have some tokens available before trying to create a validator. The easiest way to do this is via the CLI ↗️. Below, you can find an example of a typical CLI command that registers the node as running the validator:

fetchd tx staking create-validator \
  --amount=1000000000000000000atestfet \
  --pubkey=$(fetchd tendermint show-validator) \
  --moniker="my-test-validator" \
  --chain-id=dorado-1 \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1000000000000000000" \
  --gas auto --gas-adjustment 1.5 --gas-prices 1000000000atestfet \
  --from=test-key

Edit a validator configuration

It is possible that validators will need to adjust various settings about their nodes over the time. This can be simple things, such as the associated website for a validator, or more consequential actions, like altering the commission rate. In either case, should a validator choose to make this update they would send an edit-validator transaction to the network.

These transactions can be created in a similar way to the create-validator transaction depicted above:

fetchd tx staking edit-validator
  --moniker="choose a moniker" \
  --website="https://fetch.ai" \
  --details="To infinity and beyond!" \
  --chain-id=<chain_id> \
  --commission-rate="0.10" \
  --from=<key_name>

Unbonding a validator

Whenever and if a validator wants to stop being a validator for any reason, they can unbond some or all of their staked tokens. Unbonding refers to the process of withdrawing or removing a certain amount of staked tokens from a validator or a network after a defined waiting period.

This operation is carried out with the following CLI command:

fetchd tx staking unbond \
  <validator operator address> \
  <amount to remove> \
  --from <key name>

An instance of this command is given in the example below:

fetchd tx staking unbond \
  fetchvaloper1jqqwdch3jmzlmj4tjfn67s3sqm9elkd3wrpspf \
  1000000000000000000000atestfet \
  --gas auto --gas-adjustment 1.5 --gas-prices 1000000000atestfet \
  --from test-key

Was this page helpful?

State-synchronization (state-sync)How to join a testnet
footer-logo

Main website

Integrations

Events

We’re hiring!

Twitter (opens in a new tab)Telegram (opens in a new tab)Discord (opens in a new tab)GitHub (opens in a new tab)Youtube (opens in a new tab)LinkedIn (opens in a new tab)Reddit (opens in a new tab)
Sign up for developer updates