Missed Blocks Bot for Witnesses (Block Producers) on Telegram

2 years ago

Yesterday I got notified by @murda-ra who asked if I could setup a script for missed blocks which I did earlier for some other Graphene / Chainbase powered chains for Smoke.io
Screenshot 2018-12-05 at 08.58.39.png

Since then I found some time to get the script running on my notification server, through a simple bot interface in a (private) channel on Telegram.

What is it and why is it useful?
All Smoke data is stored on a blockchain (you got that already right :D). The witnesses (block producers) validate and add your transactions, whether a blog, comment, upsmoke, transfer and other actions to the blockchain in a block, once their round to produce one comes. If they start missing on blocks they need to add in their timeframe, the Smoke base becomes less stable, because your transaction gets delayed.

So this "Missed blocks" script notifies individual witnesses (block producers) when they miss a block. Because many have Telegram on multiple devices, including their phone they receive a notification, triggering them to check on the health of their block producing node and keeping the Smoke.io network stable.

How does it work?
The script is a basic python script, utilising the grapheneapi library importing it's GrapheneWebsocketRPC class. Every 30 seconds the script loops through the witness list and compares the amount of missed blocks of the given witnesses compared to the already known data. If it increases, it will trigger a telegram notification in the Missed Blocks channel.

Why is the Telegram channel private?
Although the missed blocks data is publicly available on the Smoke chain, we chose to keep the channel private as it is just a "notification service" which we could, in network related emergency cases (should they ever occur), also use to send out an alert to all active witnesses in private, for example when an instant vulnerability needs to be patched.

I am a Smoke witness, how can I be added to the notification bot?
The bot works by @'-handle-ing your Telegram username in the notifications channel. First step is to have a Telegram @-address (most of you already have that). Then in the Smoke Witness channel, reply to the currently pinned message with your Smoke.io witness name and @telegram username, like so: "smoke_witness_username" : "@telegram_username" so I can add the mapping to the script.

Greetings from Amsterdam,


I run a block producing node on Smoke.io, therefor I am a smoke witness. My witness name is @roelandp - You can vote for witnesses on https://smoke.io/~witnesses - your vote(s) matter so give it some thought!

#witness #python #blockproducing #witness-category

Get 4.2 Free Smoke Power On Sign Up To Start Your Journey On Smoke! The First Cannabis Community That Pays You To Post And Curate Content You Love..
Sort Order:  Trending

Great work on this!

I urge all witnesses to sign up for this service!

Find the witness telegram group here for more info: https://t.me/joinchat/DyK3GUhn3hzjeTltnbW_zw




Congratulations Sir, keep up the good work.

I sent my witness name and telegram name on discord witness channel. Could you please add me to the telegram notification distribution.

Thank you for setting this up!



you did a good job) with this you help witnesses and us mere mortals)))))
everywhere you succeed on Steemit and here on Smoke ! by the way glad to see you

Good work mate.

“@hightimes” : “@coininstant”

gr8 work buddy, thanks!


Check TG - your new node is ready :)


you need to give me your telegram username :) so i can add you. I noticed you missed a block earlier today, so you would have been notified :)


He is currently traveling - believe tomorrow will pick up our messages :D

This is great i tell you(even if i am not yet a witness but aspiring to be ).Its another way of developing the platform and witnesses also!!!

I know that you are doing a great job and that is why you are my witness too on steemit... Great work you´re doing here! KUDOS!

This is awesome! Thank you for taking the time to create this for us. :-)

Thanks again @roelandp :)

amazing work really nice

Thanks for all the hard work everyone does here.

Many thanks for the great work and what you´re contributing to this community!

you're the man @roelandp!

Awesome work. Hopefully, I could build some bot for Smoke. Right now, just busy building a private bot ;)

great job guys like you are putting in here @roelandp @stoner @curationbro @raz @powerpics...welldone!!

This looks great! Will help them out quite a bit!

Great job from you and the whole team. 👍

Great job and thanks for making all this possible. To all witnesses.

Nice work yall totally resmoked this!

nice to ear about it! thnks for the help!

congratulation to all witness
do all that is necessary because the future of smoke.io is on your shoulder.