11.7 Reset Blockchain State
When updating or switching execution clients, incompatibilities may arise with the existing blockchain state. These errors often occur due to changes in the client’s internal database structure, chain data corruption, or leftover logs. Resetting the blockchain state can resolve sync issues, failed starts, and client crashes by reinitializing a clean local environment.
The following steps are performed on your 📟 node server.
1. Stop Node Operation
Depending on your setup method, there are different ways to stop your node before applying updates.
- LUKSO CLI
- Service Automation
cd <lukso-working-directory>
lukso stop
Exchange <lukso-working-directory>
with the path of the node folder.
sudo systemctl stop lukso-validator
Force Client Shutdown
- Geth
- Erigon
- Nethermind
- Besu
- Teku
- Nimbus-Eth2
- Lighthouse
- Prysm
sudo pkill geth
sudo pkill erigon
sudo pkill nethermind
sudo pkill besu
sudo pkill teku
sudo pkill nimbus_beacon_node
sudo pkill nimbus_validator_client
sudo pkill lighthouse
The Lighthouse client uses a single binary for both the consensus and validator processes.
sudo pkill prysm
sudo pkill validator
2. Remove Blockchain Data
# Move into Node Directory
cd <lukso-working-directory>
# Remove Blockchain Data
rm -rf <network>-data
# Remove Logs
rm -rf <network>-logs
# Initialize the Folder
sudo lukso init
The lukso init
command only adds missing files within the /configs/
folder without overwriting existing ones.
Exchange <lukso-working-directory>
and <network>
with the path of the node folder and the configured network.
3. Restart the Node
Depending on your setup method, there are different ways to start your node after the blockchain state was cleared.
- LUKSO CLI Node
- LUKSO CLI Validator
- Service Automation
cd <lukso-working-directory>
lukso start --checkpoint-sync
Exchange <lukso-working-directory>
with the path of the node folder.
cd <lukso-working-directory>
lukso start --validator --transaction-fee-recipient "<your-fee-recipient-address>" --checkpoint-sync
The following properties need to be exchanged:
<lukso-working-directory>
with the path of the node folder<your-fee-recipient-address>
with the wallet address receiving staking profits
sudo systemctl start lukso-validator
After the clients were started, verify that their services are still up.
sudo lukso status
If you are still running into issues, scan for problems, update your clients and configuration, or revert the client version.