Presenting HE-AWM: Hive-Engine Auto Witness Monitor

in #hive-engine3 years ago

This is now a more "proper" announcement of what I was trying to create for HE-Witnesses. So I made my previous repo private and moved the code to an independent one.

v1.1 - Pre-Alpha Experimental

Again, this works but there are lots of things to improve, mostly because I don't get to exercise what those that daily practices those "good practices", do... hence the current state. After my experimentation is done, things will be prettier.

But so far, this has been able to handle the witness quite well and AVOID MISSING blocks, which is the most important part. The current 3 missed blocks (1 initially and then 2 because of some idiot that happened to my previous hardware) I have on @atexoras.witness are pre this script and that was why I decided that I had to quickly come up with something.

I had experimented already with something similar (but handling a different infrastructure) on EOS, so it was not very hard to come up with this, given the time I have (very little).

Surely, you want to run something like this outside your node/IP too (when possible), to handle the case of your node/ISP going down for some reason. For now, I am keeping this simple enough for me to play around (and others) while I learn a bit more along the way.

Current HE-Witness commitment

I am currently experimenting with stuff and will support the chain as much as I can. I don't have the infrastructure nor the time to be as active as everyone up there. Plus, there are plenty of competent people already to support this chain.

That said, I am extremely grateful for who decides to give me a chance to be around and experiment with this at all levels (up high or low). My aim is to produce (and prove it works) a strong enough monitoring/management system that manages your witness node(s) so that it should not matter what kind of infrastructure you have to support the chain.

At the same time, the idea is to protect people from making accidental mistakes and having automatic mechanisms that protect the chain from "missed blocks".

Sort:  

Is your witness node offline right now? @atexoras.witness?

It uses the script... it changes depending on the blocks ahead... Having the node offline or not is not problematic for the network as long the witness is not registered (aka enabled). This is why I have developed the script. The idea is to never miss blocks... depending on the status of my node, which is what the network needs.

We have many nodes so having this kind of behaviour for a couple of nodes is not harmfull.

I am testing it during the week this week... but I will eventually have to move if offline for some more testing... (hardware wise).

Thanks for the explanation. I was just asking because I wanted to upvote it.

It's upvoted now :)

Appreciate it.

I will be doing some more changes this week. It was a pretty busy Monday, so not sure how much I can work on this on the daily basis... usually, it's like 10 min of focus before wild monsters appear.

So, a full hour of concentration is very niche.

Anyhow, this is simple enough for me to support as it's not very far away from what I have to support daily at work. Just, on a tiny scale. 😁

For example... just a few minutes ago... I have been off sync by 3 blocks... and because that's enough for me to think I can miss, the script just decided to unregister:

And now (at the time of this comment) its already registered again because I am in sync.

With time I plan to make it more reactive. There are lots I know I can improve.

Did you cause this off sync to test the script?

Hey, the script could be run as a service somewhere :)

No... its probably my lousy ISP and the fact that I am extremely distant from the rest of the world (higher latency). It's very common for the node time to time to not be in full sync with the head of the chain. But still that should not affect the block production if you take the right decisions about when to have the node registered or not (hence my he-awm script)

To be honest, I don't know if this is the code that does not yet know to quickly sync when there is lack or slow response from the Streamer nodes. Do you experience the same or you are always in sync?

I have other stuff running that does not behave like this, so, for now I am yet not 100% sure if this is due network or the P2P code.

I am always in sync. In fact, I am surprised that the node is working so smoothly. (knock knock no jinx :) )

It may help that my VPS resides in Lithuania :)