Farmerbot update required for Grid 3.14

Hi farmers,

Along with the recent update of the ThreeFold Grid to version 3.14, all farmerbot users should also make sure they have the latest version of the farmerbot. Even if your farmerbot seems to be working well, it is best to update. If you noticed that the bot is not working for you, updating will likely resolve the issue.

We understand too that some nodes lost uptime because the need to update was not communicated in advance. The team is discussing how to best address this and we’ll make a separate announcement on that topic.

How to update the farmerbot

You can use my farmerbot install script to update the farmerbot program without disturbing your existing configuration. I periodically update the script with the latest version number that should be in use on mainnet. So you’ll need to download a new copy of the script, and then follow the prompts which will include an option to update. You can skip over the steps that generate the config and the systemd service file.

On a terminal in your machine running the farmerbot, perform these commands:

rm farmerbot-setup.sh
wget https://gist.githubusercontent.com/scottyeager/b4e4504f037841da165e7f759976a86c/raw/farmerbot-setup.sh
sudo bash farmerbot-setup.sh
sudo systemctl restart farmerbot

That is assuming that your systemd service is just called farmerbot. If you see an error about the service not being found, double check the service name by looking for a farmerbot related file in this folder:

ls /etc/systemd/system

Replace the service name in the restart command above.

Now you can check that your bot is running well (also replace the service name if needed):

systemctl status farmerbot

If you see any error, it’s possible your config file is not compatible with the new version. Go on to the next section for info about how to fix that.

Fixing config file

With the updated farmerbot, a certain config field changed its form and the bot won’t start if your config file uses the old form. Open your farmerbot config file in an editor, for example:

nano /root/farmerbot/config.yaml

If you don’t know the path of your config file, check inside the service file:

cat /etc/systemd/system/farmerbot.service

Look for the config.yaml file, and point your editor to the appropriate path.

Next look for a line like this:

wake_up_threshold: 80

Delete the line and save the file. The bot should be trying to start continually and will start up automatically once the file is corrected. You can check again with the status command shown above. If any issue persists, connect with the support team or send a message in the farmer’s chat on Telegram for further assistance.

The threshold configuration has changed to operate per resource type. Since 80% is the default value, removing the line will not change anything if the default value was set. If you want to set thresholds using the new style, check the example config file to see how to do it.

3 Likes