NEAR Epoch Sync

Overview

Epoch Sync allows a node to synchronize from genesis without depending on external snapshots. This process is automated via Ansible with all necessary configurations already in place.

Reference: NEAR Node Epoch Sync Documentation

When to Use Epoch Sync

Perform an epoch sync when encountering:

  • Corrupted state data
  • Logs showing "downloading blocks" but percentage not moving
  • Need to quickly resync a node from scratch

Resync Process

The resync process is straightforward since all epoch sync configurations are already set up:

  1. Stop the neard service

    systemctl stop attestant-neard
    
  2. Remove all data files

    rm -rf /home/neard/.near/data/*
    
  3. Start the service again

    sudo systemctl start attestant-neard
    

The node will automatically begin epoch sync using the existing configuration and return to normal operation once synchronized.

To monitor the sync progress:

# Check service status
systemctl status attestant-neard

# Monitor logs
tail -f /var/log/neard/neard.log