Shardeum validator 1.4.0 fix

As per the new version of validators, the node is exiting every time it starts and finishes validating. To address this issue, I have created a small bash script that can help fix the problem.

Quick fix :

cd .shardeum/
./shell.sh
apt install nano
nano status_check.sh
#!/bin/bash

# Function to check the status
check_status() {
      # Fetch the status using the operator-cli command or any appropriate method
      status=$(operator-cli status | grep "state:" | awk '{print $2}')

# Compare the status to "active"
         if [[ "$status" == "standby" || "$status" == "active" ]]; then
         echo "Status is standby or active."
      else
          echo "Status is neither standby nor active. Running the command..."
          # Run the command you want to execute when the status is not active
          # Replace the following line with your desired command
          operator-cli start
      fi
}

# Loop to check the status every 5 minutes
while true; do
      check_status
      sleep 300  # Sleep for 5 minutes (300 seconds)
done
chmod +x status_checker.sh

Make the script run indefinitely :

  1. Install tmux
    apt-get install tmux

  2. Run the script:

./status_checker.sh
  1. Detach from the tmux session: Press Ctrl + B, then release the keys and press D.

Finally, this script runs every 5 minutes to check if the node is stopped and reactivates it. Additionally, please note that Shardeum will be airdropping soon, as mentioned in this tweet: link to the tweet.

Support SpuriousDragon

SpuriousDragon

Shardeum validator 1.4.0 fix

Transhumanist, bitcoin evangelist, coder.

ar://EMWMLV2n9lUcZQPrGE03rtBGzB902w4HDbTdEJoRRmc