Skip to content

Instantly share code, notes, and snippets.

@IronCore864
Created November 27, 2025 09:49
Show Gist options
  • Select an option

  • Save IronCore864/2d803edacef8c8a7e32728543c266860 to your computer and use it in GitHub Desktop.

Select an option

Save IronCore864/2d803edacef8c8a7e32728543c266860 to your computer and use it in GitHub Desktop.
Avalanche Testnet (Fuji) Validator

0 Check If System Spec Meets Requirements

free -hl
df -hl
lscpu

1 Install Node

cd ~/
wget https://github.com/ava-labs/avalanchego/releases/download/v1.14.0/avalanchego-linux-amd64-v1.14.0.tar.gz
tar zxvf avalanchego-linux-amd64-v1.14.0.tar.gz
cd ~/avalanchego-v1.14.0

Run:

export AVAGO_NETWORK_ID=fuji
export AVAGO_HTTP_HOST=0.0.0.0
export AVAGO_PUBLIC_IP=54.176.106.136
export AVAGO_STAKING_HOST=0.0.0.0
nohup ./avalanchego --network-id=fuji &

Wait for a few hours for the bootstrapping to finish.

To see if the bootstrapping is done, run:

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.isBootstrapped",
    "params": {
        "chain":"X"
    }
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

It should return isBootstrapped":true.

Read more:

2 Get Tokens

Follow this to request testnet tokens. TL;DR:

  • Register a builder hub account
  • Install the core wallet Chrome plugin, and connect it to Avalanche
  • Request P-Chain tokens (1 needed for testnet staking)

Note: If you encounter quota issues with P-Chain tokens, you can also request C-Chain tokens and cross-chain transfer them to P-Chain in the wallet.

3 Validate

Note that the node should have a public IP and should be accessible on the staking port (9651 by default). I verified this by running an HTTP server on this port, and I could access it from my laptop.

Retrieve the Node ID, the BLS signature and the BLS key:

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.getNodeID"
}' -H 'content-type:application/json' 127.0.0.1:9650/ext/info

Note that the public key is the BLS key, and the proof of possession is the BLS signature.

Connect the Core extension to the Core web, and go to the 'Stake' tab. Here, choose 'Validate' from the menu. Fill out the staking parameters. If you don't know how, read this and this.

4 Verify

From the log, you should see something like:

[11-27|09:02:47.415] INFO <P Chain> validators/logger.go:50 node added to validator set {"subnetID": "11111111111111111111111111111111LpoYY", "nodeID": "NodeID-C9LK5qydbEfMhLuvLQUT4mZwzMGvx83L", "publicKey": "0xa3872866b08ee32ca9b7598352a9267486ce3dd1cee9b2da22527a9d66999dbd292d870f198f86c8eb2b018c19319743", "txID": "2CojvYfB991C8NFy4YhLzhioVwKA9v5Ktg19B7iU6YfQHR9drp", "weight": 1000000000}

You can also call platform.getCurrentValidators to check that your node's id is included in the response:

curl -X POST --data '{
  "jsonrpc":"2.0",
  "id"     : 1,
  "method" :"platform.getBalance",
  "params" :{
      "addresses":["P-fuji1rjjy7tlry4yh26cymcx2zuu9zlg7js36vv259l"]
  }
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P

You should get something similar to:

{"jsonrpc":"2.0","result":{"balance":"99982174","unlocked":"99982174","lockedStakeable":"0","lockedNotStakeable":"0","balances":{"U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK":"99982174"},"unlockeds":{"U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK":"99982174"},"lockedStakeables":{},"lockedNotStakeables":{},"utxoIDs":[{"txID":"2CojvYfB991C8NFy4YhLzhioVwKA9v5Ktg19B7iU6YfQHR9drp","outputIndex":0}]},"id":1}

Note that the address is in the format P-xxx, which you can find at https://core.app/portfolio.

Validator dashboard: https://testnet.avascan.info/staking/validator/NodeID-C9LK5qydbEfMhLuvLQUT4mZwzMGvx83L

Read more:

4 Automation

None.

I would use Ansible for wget/tar/executing the command, maybe register it with systemd to ensure it will be restarted if it exits.

5 Monitor

None.

I will monitor the following key metrics:

  • Sync Status: Ensuring the node is fully synchronised with the network (I didn't do this because I went out for a bike ride, and when I came back, it was almost ready).
  • Uptime: Essential for earning rewards. I'll monitor the node's availability and restart it automatically if it crashes.

AI also suggests monitoring:

  • Peer Count: Maintaining sufficient peer connections for optimal performance.
  • CPU and Memory Usage: Monitoring resource utilisation to prevent performance bottlenecks.
  • Network Traffic: Tracking inbound and outbound network traffic.

But I think compared to the previous two items, these are less critical, since if everything is set up correctly, including right-sizing the instance, these shouldn't be a problem.

6 Problem

There is one thing I'm less sure about, which is that I noticed from the dashboard that "Validation Success Rate" and "Total Validations" are both N/A. I'm not sure if it's really up; maybe the outside world can't reach it on the elastic IP:9651. Did not do further research into this. The status shows to be "Active", though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment