cryptomolot docs
  • 💎cryptomolot
  • 🏗️Testnets
    • Alignedlayer
      • How to create Public RPC Alignedlayer
    • Artela
      • How to create Public RPC Artela
    • Celestia
      • Celestia - Validator Node
      • Celestia - Bridge Node
      • How to create Public RPC Celestia
    • 0G (Zero Gravity)
      • 0G RPC Node
      • 0G Storage Node
        • Upgrade storage node 1.0.0
      • 0G DA Node
      • How to create Public RPC 0G
      • Monitoring tool
      • Snapshot
    • Side Protocol
      • How to create Public RPC Side
    • Warden Protocol
    • Story Protocol
      • Upgrade node
      • Cheatsheet
      • Monitoring tool
      • Alerts about your node failures
  • 🚀Mainnets
    • Aptos
      • Tools to monitore your validator
        • Alerts for your validator via telegram public
      • How to move node using snapshot
      • Fullnode security
      • Snapshot
Powered by GitBook
On this page
  • Set var
  • Create database directory
  • Download snapshot
  • Decompress the archive to workspace directory:
  • Download the files needed to run VFN or Validator
  • Start your node
  • Update on-chain network addresses and update on-chain consensus key (only for Validator)
  • Delete the downloaded archive to save space
  • More information can be found here
  1. Mainnets
  2. Aptos

How to move node using snapshot

This can be done on all node types, including validator node (VN), validator fullnode (VFN) and public fullnode (PFN).

Hi guys, today I am going to tell you how to start validator node using snapshot, this is really useful when you need to move a node to another server.

By default, nodes are configured for fast synchronization. The last state of the chain is reached in about 15-30 minutes. You may need a database that includes a larger amount of data stored in a snapshot (time for downloading and unpacking at least 2 hours. Size ~400GB)

Set var

It is assumed that you have already done the initial preparation of the server, including installing the docker, configuring the firewall, etc.

Change "alice" to your username

echo export USERNAME=alice >> $HOME/.bash_profile
echo export WORKSPACE=mainnet >> $HOME/.bash_profile
source $HOME/.bash_profile
mkdir ~/$WORKSPACE
cd ~/$WORKSPACE
sudo apt-get install lz4

Create database directory

The folder with the database must be in the folder where the container will be created at start, by default this is /var/lib/docker/volumes/

If you have changed the root directory of the docker, you should use the directory you use

You can check it with the command:

docker info|grep "Docker Root Dir"

For VFN:

mkdir -p /var/lib/docker/volumes/aptos-fullnode/_data/

For Validator:

mkdir -p /var/lib/docker/volumes/aptos-validator/_data/

Download snapshot

wget https://snapshots.bwarelabs.com/aptos/mainnet/aptos20240501.tar.lz4

Decompress the archive to workspace directory:

lz4 -c -d aptos20240501.tar.lz4 | tar -x -C ~/$WORKSPACE

Then move files to data directory:

For VFN:

mv ~/$WORKSPACE/data/* /var/lib/docker/volumes/aptos-fullnode/_data/

For Validator:

mv ~/$WORKSPACE/data/* /var/lib/docker/volumes/aptos-validator/_data/

Download the files needed to run VFN or Validator

Remember to change the IP to the new one in the configuration file ~/$WORKSPACE/alice/operator.yaml

Start your node

VFN:

cd ~/$WORKSPACE && docker-compose -f docker-compose-fullnode.yaml up -d

OR

Validator:

cd ~/$WORKSPACE && docker-compose up -d

Update on-chain network addresses and update on-chain consensus key (only for Validator)

Change <pool-address> to your pool-address

aptos node update-validator-network-addresses  \
  --pool-address <pool-address> \
  --operator-config-file ~/$WORKSPACE/$USERNAME/operator.yaml \
  --profile mainnet-operator
aptos node update-consensus-key  \
  --pool-address <pool-address> \
  --operator-config-file ~/$WORKSPACE/$USERNAME/operator.yaml \
  --profile mainnet-operator

Delete the downloaded archive to save space

rm -v aptos20240501.tar.lz4

More information can be found here

PreviousAlerts for your validator via telegram publicNextFullnode security

Last updated 1 year ago

You can use one of the options of your choice: 1. Bwarelabs: 2. Polkachu: Check the latest snapshot on their website before proceeding to the next step

All done. Now you can check the connection your node

🚀
https://bwarelabs.com/snapshots/aptos
https://polkachu.com/aptos_snapshots/aptos
https://aptos.dev/nodes/validator-node/operator/node-liveness-criteria
https://aptos.dev/nodes/validator-node/operator/node-requirements
https://aptos.dev/nodes/full-node/bootstrap-fullnode
https://aptos.dev/nodes/validator-node/operator/connect-to-aptos-network
https://aptos.dev/nodes/validator-node/operator/running-validator-node/run-validator-node-using-docker
files for VFN
files for Validator