Hard Reset Instructions
Contents2 sections
Hard reset wipes the local state and downloads the most recent chain snapshot. After the snapshot is applied, the node catches up using statesync and blocksync.
Hard reset is the most powerful means of resetting a node. Steps are:
- Download a recent snapshot of the network state.
- Initialize the DB from the snapshot (this can take up to an hour on testnet and a few minutes on mainnet)
- Catch up to the tip of the chain via statesync / blocksync (typically < 5 minutes assuming snapshot is a few hours old)
Monad Foundation and Category Labs are snapshot providers. If there is an issue, please refer to Discord validator channels for more snapshot providers.
Prerequisite
aria2must be installed on the node
Instructions
SSH into the node as
rootuser.Stop the monad services and reset the workspace to delete all runtime data.
bash /opt/monad/scripts/reset-workspace.shDownload and import TrieDB database snapshot.
Mainnet
On mainnet, database snapshot restoration takes from 1 to 5 minutes. As the blockchain grows over time, snapshot restoration takes longer.
Using Monad Foundation provider:
MF_BUCKET=https://bucket.monadinfra.com curl -sSL $MF_BUCKET/scripts/mainnet/restore-from-snapshot.sh | bashUsing Category Labs provider:
CL_BUCKET=https://pub-b0d0d7272c994851b4c8af22a766f571.r2.dev curl -sSL $CL_BUCKET/scripts/mainnet/restore_from_snapshot.sh | bashTestnet
On testnet, database snapshot restoration takes under 5 minutes. As the blockchain grows over time, snapshot restoration takes longer.
Using Monad Foundation provider:
MF_BUCKET=https://bucket.monadinfra.com curl -sSL $MF_BUCKET/scripts/testnet/restore-from-snapshot.sh | bashUsing Category Labs provider:
CL_BUCKET=https://pub-b0d0d7272c994851b4c8af22a766f571.r2.dev curl -sSL $CL_BUCKET/scripts/testnet/restore_from_snapshot.sh | bashFetch latest
forkpoint.tomlandvalidators.tomlruntime files.This step is optional if automatic remote config fetching is configured (v0.12.1+). Ensure
REMOTE_VALIDATORS_URLandREMOTE_FORKPOINT_URLare defined in/home/monad/.envfile. See Full Node Installation for configuration details. If not configured, you may run the below commands.Mainnet
MF_BUCKET=https://bucket.monadinfra.com VALIDATORS_FILE=/home/monad/monad-bft/config/validators/validators.toml curl -sSL $MF_BUCKET/scripts/mainnet/download-forkpoint.sh | bash curl $MF_BUCKET/validators/mainnet/validators.toml -o $VALIDATORS_FILE chown monad:monad $VALIDATORS_FILETestnet
MF_BUCKET=https://bucket.monadinfra.com VALIDATORS_FILE=/home/monad/monad-bft/config/validators/validators.toml curl -sSL $MF_BUCKET/scripts/testnet/download-forkpoint.sh | bash curl $MF_BUCKET/validators/testnet/validators.toml -o $VALIDATORS_FILE chown monad:monad $VALIDATORS_FILEStart all services
systemctl start monad-bft monad-execution monad-rpc