This guide is outdated.
Please do not attempt to follow it without further notice.
If you are having problms with your Core Node, try the following in the following order until your issue is resolved:
If your Core Node is on a side chain, first try restarting it. At restart, the core node will communicate with the boot nodes and build a new peers list. This may help your core node get back on to the canonical chain.
If you are running nodemon on the VPS, stop it by running the following command:
sudo systemctl stop nodemon.timer
Login to your VPS and run the following to stop the core node:
sudo systemctl stop energi3
Wait about 5 minutes to let the core node release all peer connection information.
Run the following to start Core Node:
sudo systemctl start energi3
If you are running nodemon on your VPS, start it:
sudo systemctl start nodemon.timer
Attach to the Core Node:
energi3 attach
Once on the Core Node console, check if you node is fully synced by comparing with the block height on the Stats website.
nrg.blockNumber
If the Core Node is fully synced, run the following to compare the block hash with the Stats website. In the example below, we took 571700 as the block height returned from the previous command.
nrg.getBlock(571700).hash
Result:
"0x1b6d5522cd3ec6e87a931f5079b75e2a43a52fc93faf53478dd02faa2cc4d490"
If your Core Node is reporting bad blocks and/or invalid merkle root errors, it likely has corrupted the preimage database. To fix this, follow the instructions below.
2.1.1 - Run the following commands after logging into the VPS as nrgstaker.
NOTE: You may get the following error:
rm: cannot remove 'preimages.rlp': No such file or directory
It is normal. It just indicates you do not have an older version of preimages.rlp file on your VPS.
rm preimages.rlp
sudo systemctl stop nodemon.timer # if you run nodemon
sudo systemctl stop energi3
wget https://s3-us-west-2.amazonaws.com/download.energi.software/releases/chaindata/mainnet/preimages.rlp
energi3 import-preimages preimages.rlp
sudo systemctl start energi3
sudo systemctl start nodemon.timer # if you run nodemon
Remember to re-unlock your account for staking. See the Staking Guide on the left-menu.
2.2.1 - Stop Energi Core Node and Attach
2.2.2 - Download
preimages.rlp
2.2.3 - Save the file in your Downloads folder (for example)
2.2.4 - Open Command Prompt (Type cmd in your Windows search bar)
2.2.5 - Run this command to go in your Downloads folder:
cd "%userprofile%\Downloads"
2.2.6 - Run the following command to update the preimages data store:
energi3 import-preimages preimages.rlp
2.2.7 - Restart Energi Core Node and Attach
Remember to re-unlock your account for staking. See the Staking Guide on the left-menu.
2.3.1 - Stop Energi Core Node
2.3.2 - Download preimages.rlp
2.3.3 - Save the file in your Downloads folder (for example)
2.3.4 - Open Terminal
2.3.5 - Run this command to go in your Downloads folder :
cd "$HOME/Downloads"
2.3.6 - Run the following command to update the preimages data store:
$HOME/energi3/bin/energi3 import-preimages preimages.rlp
2.3.7 - Restart Energi Core Node
$HOME/energi3/bin/energi3 console
Remember to re-unlock your account for staking. See the Staking Guide on the left-menu.
Remember to re-unlock your account for staking. See the Staking Guide on the left-menu.