Update Fullnode With New Releases
This document outlines the process for updating your fullnode. For fullnodes running in devnet
, an additional data wipe step is required as devnet
is wiped on every release.
If you built the fullnode from aptos-core source code
- Stop your fullnode by running the below command:
cargo stop aptos-node
- For users of the Rust binary, pull the latest release appropriate for your network (
devnet
,testnet
, ormainnet
):
git checkout [network_branch] && git pull
Replace [network_branch]
with devnet
, testnet
, or mainnet
as applicable, and rebuild the binary.
-
If your fullnode is running in
devnet
, follow the additional steps in the Additional data wipe steps fordevnet
section below. -
Restart your fullnode by running the same start (
run
) command as before:
cargo run -p aptos-node --release -- -f ./fullnode.yaml
- See the Verify initial synchronization section for checking if the fullnode is syncing again.
Additional data wipe steps for devnet
For devnet, follow these additional steps after stopping your fullnode:
-
Delete the data folder (the directory path is what you specified in the configuration file, e.g.,
fullnode.yaml
).- The default data folder is
/opt/aptos/data
.
- The default data folder is
-
Delete the
genesis.blob
file andwaypoint.txt
file (depending on how you configured it, you might not have this file and may instead have awaypoint
directly in your configuration file). -
Download the new genesis.blob file and the new waypoint.
-
Update the configuration file (e.g.,
fullnode.yaml
) with the new waypoint (if you configure the waypoint directly there).
If you run a fullnode via Docker
- Stop your fullnode by running the below command:
docker compose down --volumes
- If your fullnode is running in
devnet
, delete the entire directory which holds your fullnode config and data directory. - Re-install and configure those files as during setup.
- Restart your fullnode:
docker compose up -d
If you run a fullnode on GCP
Upgrade with data wipe (devnet only)
Upgrading your node in devnet requires a data wipe, as the network is reset on each deployment. Other networks (e.g., testnet and mainnet) don't require this step and we recommend not wiping your data in these networks.
-
You can increase the
era
number inmain.tf
to trigger a new data volume creation, which will start the node on a new DB. -
Update
image_tag
inmain.tf
. -
Update Terraform module for fullnode, run this in the same directory of your
main.tf
file:
terraform get -update
- Apply Terraform changes:
terraform apply
Upgrade without data wipe
-
Update
image_tag
inmain.tf
. -
Update Terraform module for fullnode, run this in the same directory of your
main.tf
file:
terraform get -update
- Apply Terraform changes:
terraform apply
# if you didn't update the image tag, terraform will show nothing to change, in this case, force helm update
terraform apply -var force_helm_update=true