Skip to content

Snapshot

0G banner"

Light snapshot:  2156330          |         Full snapshot:  2103676

  1. Stop node:
    Terminal window
    sudo systemctl stop 0gd.service
  2. Backup priv_validator_state.json & reset data
    Terminal window
    cp $HOME/.0gchain/data/priv_validator_state.json $HOME/.0gchain/priv_validator_state.json.backup
  3. Install tool
    Terminal window
    sudo apt-get install wget lz4 aria2 pv -y
  4. Download snapshot:
    Terminal window
    #pruning = "custom", pruning-keep-recent = "100", pruning-interval = "10"
    cd $HOME
    rm -f light_0gchain_snapshot.lz4
    aria2c -x 16 -s 16 -k 1M https://josephtran.co/light_0gchain_snapshot.lz4
  5. Reset data
    Terminal window
    0gchaind tendermint unsafe-reset-all --home $HOME/.0gchain --keep-addr-book
  6. Decompress snapshot
    Terminal window
    lz4 -dc light_0gchain_snapshot.lz4 | pv | tar -xf - -C $HOME/.0gchain
  7. Move priv_validator_state.json back
    Terminal window
    mv $HOME/.0gchain/priv_validator_state.json.backup $HOME/.0gchain/data/priv_validator_state.json
  8. Restart node
    Terminal window
    sudo systemctl restart 0gd && sudo systemctl status 0gd