logoDeveloper Hub

Validate an Avalanche L1

This page demonstrates how to configure nodes to validate an Avalanche L1.

This page demonstrates how to configure nodes to validate an Avalanche L1. Avalanche L1 Validation vian Avalanche-CLI is currently only supported on Fuji and Devnet.

ALPHA WARNING: This command is currently in experimental mode. Proceed at your own risk.

Prerequisites

Before we begin, you will need to have:

  • Created a Cloud Server node as described for AWS or GCP
  • A node bootstrapped to the Primary Network (run avalanche node status <clusterName> to check bootstrap status) (Ignore for Devnet)
  • Deployed an Avalanche L1 on Fuji or Devnet
  • Stored key / Ledger with AVAX to pay for gas fess associated with adding node as Primary Network and Avalanche L1 Validator transactions. Instructions on how to fund stored key on Fuji can be found here (Ignore for Devnet)

Sync with Avalanche L1

Before the nodes can be Avalanche L1 Validators, the nodes need to first sync with the Avalanche L1.

To have all nodes in cluster clusterName sync with Avalanche L1 blockchainName, run:

avalanche node sync <clusterName> <blockchainName>

All the nodes in cluster clusterName will now be syncing to Avalanche L1 blockchainName.

Wait until nodes are successfully Syncing with the Avalanche L1 before running the next commands.

To check sync status, run avalanche node status <clusterName> --subnet <blockchainName>. Once the node is finished syncing, the response will be:

All nodes in cluster `clusterName` are synced to Subnet `blockchainName`

Be an Avalanche L1 Validator

Once the nodes have synced, we can now have the nodes be Avalanche L1 Validators.

To have the nodes be Avalanche L1 Validators, run:

avalanche node validate subnet <clusterName> <blockchainName>

For Fuji Only: If any of the nodes is not yet a Primary Network Validator, we will first add it as a Primary Network Validator.

The wizard will ask us how we want to pay for the transaction fees. Choose Use stored key for Fuji:

 Which key source should be used to pay transaction fees?:
 Use stored key
    Use ledger

Once you have selected the key to pay with, choose how many AVAX you would like to stake in the validator. Default is the minimum amount of AVAX that can be staked in a Fuji Network Validator. More info regarding minimum staking amount in different networks can be found here.

 What stake weight would you like to assign to the validator?:
 Default (1.00 AVAX)
    Custom

Next, choose how long the node will be validating for:

 How long should your validator validate for?:
 Minimum staking duration on primary network
    Custom

Once all the inputs are completed you will see a transaction ID indicating that the node is now a Primary Network Validator.

Note: if you see an error indicating that the transaction is not committed, run avalanche node validate subnet <clusterName> <blockchainName> again as it could be due to the validator start time having elapsed.

We will then proceed with adding the node as an Avalanche L1 Validator. Similar to adding the node as a Primary Network Validator, the wizard will ask you for how you would like to pay for the transaction fee.

Once that is completed, you will be asked what stake you would like to assign the Avalanche L1 Validator:

 What stake weight would you like to assign to the validator?:
 Default (20)
    Custom

Note that for this part, you are not staking actual AVAX in the validator. This is an arbitrary weight that you are assigning to the validator. Next, enter the start and end time for the node to validate the Avalanche L1.

Once all input is completed, you will another transaction ID indicating that the node is now scheduled to be an Avalanche L1 Validator.

Once the start time that you chose for the node to be an Avalanche L1 Validator has elapsed, verify that the node is an Avalanche L1 validator by running avalanche node status <clusterName> --subnet <blockchainName>.

You should see:

All nodes in cluster `clusterName` are validators to Subnet `blockchainName`

Last updated on

On this page

Edit on Github