Witness Essentials: Watcher v1.0.4 (Important Update)

witness_essentials.png


Witness Essentials: Watcher received a small but important update (v1.0.4) which is mandatory if you're running v1.0.3, as the previous version included a small bug, which would result in an endless-loop without failing-over.

Besides this bug-fix, this update also includes two minor tweaks:

  • alerts are now sent if the witness has recovered
  • in case of API hickups to get the witness data, the round will be skipped to prevent unnecessary failover.

Github

https://github.com/witness-essentials/watcher

Pull Requests:


What is Witness Essentials?

Witness Essentials is a collection of important tools for witnesses.

Witness Essentials: Watcher is a script for Steem Witnesses to watch for missed blocks, failover towards backup-nodes & alert via multiple services.

  • Multiple alert options available (TELEGRAM, SMS <NEXMO, TWILIO>, EMAIL)
  • Transaction signing either via private signing-key or private active-key
  • RPC Failover
  • Rotation between keys supported
  • Robust error handling

Github Organization: https://github.com/witness-essentials


Getting Started

You can find a detailed guide on Github


Update Information

Before I get into the update: please look over the code yourself if you're using it. I'm not taking responsibilities for it to be bug-free, but I'm doing my best, as I use the code myself for my witness servers.

I'll try to work on unit tests as soon as I find the time, but for now, everything should work.

The bug-fix was pretty much only this:

// If a block has been missed before, but witness node has recovered and signed a new block
    if(_g.MISSED_BLOCK_FLAG && witness.last_confirmed_block_num > _g.last_confirmed_block_num) {
      .... other code
      // Move from here 
     // g.last_confirmed_block_num = witness.last_confirmed_block_num
    }

    // to here
    _g.last_confirmed_block_num = witness.last_confirmed_block_num

Explanation: _g.last_confirmed_block_num is the last signed block of the specific witness. If the last_confirmed_block_numof the newly fetched witness object is higher, then that means the witness has signed a new block. If _g.MISSED_BLOCK_FLAG is also true, then that means the witness previously missed a block, but then recovered and signed a new one.

In 1.0.3, _g.last_confirmed_block_num was only updated in case of a missed block, which would result in the code treating it as if the witness has recovered. While in reality, the _g.last_confirmed_block_numwas simply not updated. Thus resulting in an endless loop and the bug-fix was it to update it every round.


Alright, that's it for v1.0.4.

All the best,
Wolf


Do you believe that my work is valuable for Steem? Then please vote for me as witness.

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
8 Comments