Run testnet full node [addendum to the official guide]

Hi Aptos fam! We hope these additions will help you avoid some of the issues we had when installing public full node in Aptos testnet.

This guide is an addition to the official guide to running Public Fullnode on a testnet.

Step 1. We described server configuration and protection here.

Step 2. Install Docker

Step 3. Setup a node

mkdir testnet && cd testnet

mkdir data

wget -O fullnode.yaml

wget -O genesis.blob

wget -O waypoint.txt

Editing the fullnode.yaml file:

  role: "full_node"
  data_dir: "/opt/aptos/data"
    from_file: "/opt/aptos/etc/waypoint.txt"

  genesis_file_location: "/opt/aptos/etc/genesis.blob"

- network_id: "public"
  discovery_method: "onchain"
  listen_address: "/ip4/"

  enabled: true
  address: ""

Since the node will not be able to start synchronization with the genesis block, before launching, you should download the database by any means and place it in the
~/testnet/data/db/ directory.

You can use a snapshot (Bootstrap Fullnode from Snapshot | Aptos Docs) or backup/restore (Bootstrap Fullnode from Backup | Aptos Docs) and that should give your node more up-to-date seed peer information.

note: In the next release (1.7), we’ll automatically be injecting seeds to testnet and mainnet nodes, meaning these nodes should always be able to connect (even if they only have the genesis blob).

Step 4. Starting the node:

docker run -d --pull=always \
    --rm -p 8080:8080 \
    -p 9101:9101 -p 6180:6180 \
    -v $(pwd):/opt/aptos/etc -v $(pwd)/data:/opt/aptos/data \
    --workdir /opt/aptos/etc \
    --name=aptos-fullnode aptoslabs/validator:mainnet aptos-node \
    -f /opt/aptos/etc/fullnode.yaml

Useful commands and links:

Looking at the logs:

docker ps

Copy container id and write the command:

docker logs [Container ID] --tail 100

For example:

docker logs 665c711d377e --tail 100

Run a Public Fullnode with the Aptos Source Code or Docker

Bootstrap Fullnode from Backup

Node Files For Testnet

You can find the latest block using the REST API using this:

  1. The index page will tell you the latest node version (e.g., ledger_version):

  2. Use the ledger_version to lookup the block that it belongs to, e.g.,:

Thanks for reading!

1 Like

any rewards for doing NOde ?

I don’t think so in this case !

1 Like

There is no incentivized testnet ongoing, it’s for users who would love testing and then to keep going on mainnet.