Blurt Witness Nodes Auto Switcher

in blurtopian •  4 years ago 

When I woke up this morning, DINO told me that my witness server is missing blocks like crazy.

image.png

So I have to restart my witness server and finally got the issue resolve.

I was thinking to write a program to switch my witness node to my backup one in case of failure, but thanks to @justyy I don't need to write the program. He has an open source witness nodes switcher program that is ready to use.

He created the witness nodes switcher program for STEEM, so I have to make little modifications to it in order to be used for BLURT.

Here is the program I modified: https://github.com/ericet/BlurtWitnessAutoSwitch

If you have a backup witness server running, all you need is change the config.json file.


{
    "account": "Your Blurt Witness Account",
    "key": "Your Active Key",
    "signing_keys": [
        "Witness Public Signing Key 1", //Make sure this is your public witness key, not the private one
        "Witness Public Signing Key 2", //Make sure this is your public witness key, not the private one
        "BLT1111111111111111111111111111111114T1Anm"
    ],
    "url": "https://blurt.world/@yourBlurtId", //Your witness url
    "fee": "5.000 BLURT", //Account creation fee
    "interval": 60, //running interval. e.g: every 60 seconds
    "period": 360,
    "threshold": 4, // missing number of blocks in a interval. In this case, missing 4 blocks in 60 seconds. If you have a ranking lower than 20, change the threshold lower.
    "rpc_nodes": ["https://blurtd.privex.io"] 
}

Just a side note, the signing_keys in the config.json needs witness public key, make sure you don't mistakenly enter your private witness key.

threshold means number of missing blocks in a interval. So if you have a witness ranking less than 20, lower the threshold or increase the interval value.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!
Sort Order:  
  ·  4 years ago  ·  

This is awesome, not your server issues, but this switcher.. Thanks for sharing.

  ·  4 years ago  ·  

No problem

What's the core issue? Why is your server down? Maybe you need to contact the hosting company.

  ·  4 years ago  ·  

I'm running two nodes, one is my main witness node. It's down because the server maintenance. The other one is the full node, which used by dino bot and notifications program. This one crashed pretty frequently recently due to too many files are opening. I have a fix for it, hopefully it works.

Wow! @ericet you are doing so many things and it is all to help us all run this awesome platform smoothly. I hope it will all get fixed soon and maybe then you will have good sleep.

  ·  4 years ago  ·  

Great timing. I'm also looking for this script. I've used the steem scripts in the past.
Cheers.

  ·  4 years ago  ·  

Glad that helps

  ·  4 years ago  ·  

Thanks for the awesome tip!

  ·  4 years ago  ·  

Welcome. My node crashed pretty frequently recently, have to take time look into the root cause

  ·  4 years ago  ·  

Oh lala! you woke up working and active. Good thing you were able to solve.
Thank you for sharing, this information may be valuable to other witness members of the Blurt family.
Good vibes.

  ·  4 years ago  ·  

My witness server is not so reliable recently, so there always be some issues need to fix when I woke up.

  ·  4 years ago  ·  

Everything is going to be fine and soon one day when you wake up you will find that everything worked. Positive mind.