Aegeus Coin (AEG) BlockChain Checker ScriptsteemCreated with Sketch.

in #cryptocurrency2 years ago (edited)

Blockchain consensus protocol is a complicated beast. But it is the backbone of decentralization. Depending on the rules the certain blockchain adopted, it is usually the longest chain winning. However, in case of staking, it depends.

In cryptocurrency, this is made complicated by wallet updates.. Once wallet updates are made, multiple protocols of the same blockchain will co-exist. Multiple updates down the line and that becomes even worse. You get the drift.

The above is true with the cryptocurrency Aegeus, with ticker AEG. I just lost track of how many updates there are (I wasn't an early adopter), but the current wallet version is V-3.0.0 (Protocol 70818). I have experienced several times where my wallet has gone haywire, and that in turn gave me orphan blocks.

AEGEUSEXP.PNG

 
This script is the solution I put in place to get notified of the occurrence, and at the same time re-start the wallet so that I don't have to do anything. The script is based on the screenshots above.

It assumes the following things:

  • The explorer contains the correct copy of the blockchain (HINT: It usually is!)
  • The wallet has the ability to re-correct itself through the blockchain consensus protocol
  • You are running the hot wallet in a Linux environment

The logic is simple: If the local block hash is the same as that of the explorer block hash for the same height, then I'm on the right chain. If not, restart the wallet.

This script also makes use of the push notifications of wallet events to your mobile phone. If you are not into telegram and want another alternative, here's the same push notifications but with PushBullet.

I run this script regularly with cron.. It is set to run every 15 minutes. With this configuration, no significant load increases have occurred in the VPS. So I left it to run at that frequency.

The script can be modified to adapt to other cryptocurrencies. Just need to modify the service, the CLI commands and the URL of the explorer.

 

(screencaps are mine)

 


If you happen to find this script helpful, send me an upvote, or resteem this post, or buy me beer by these wallets. Thanks in advance.

  • #Bitcoin (BTC) - 3Kyjg1Wj1PNGN3KhiRprxYvvQpdjC5kT3k
  • #Etherium (ETH) - 0x5F168F895C63ccC5FbEf921047bc2b63f6780c3F
  • #Aegeus (AEG) - AVjd8s5fC17bE49QpLjBnve29kFiEGeGG6

Thanks! (vote for them as witness!)

 

Sort:  
UpvoteBank
Your upvote bank
__2.jpgThis post have been upvoted by the @UpvoteBank service. Want to know more and receive "free" upvotes click here

This post has received a 3.13 % upvote from @drotto thanks to: @dillagr.

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by dillagr from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Hi @dillagr!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 2.066 which ranks you at #23920 across all Steem accounts.
Your rank has dropped 97 places in the last three days (old rank 23823).

In our last Algorithmic Curation Round, consisting of 215 contributions, your post is ranked at #186.

Evaluation of your UA score:
  • Only a few people are following you, try to convince more people with good work.
  • The readers like your work!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.18
TRX 0.03
JST 0.028
BTC 37015.02
ETH 1199.88
USDT 1.00
SBD 3.10