Presenting HE-AWM: Hive-Engine Auto Witness Monitor

avatar

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".



0
0
0.000
19 comments
avatar

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

0
0
0.000
avatar
(Edited)

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).

0
0
0.000
avatar

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

It's upvoted now :)

0
0
0.000
avatar

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. 😁

0
0
0.000
avatar

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.

0
0
0.000
avatar
(Edited)

Did you cause this off sync to test the script?

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

0
0
0.000
avatar

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.

0
0
0.000
avatar

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 :)

0
0
0.000
avatar

Most likely... but hence any node can easily become out of sync for a diverse amount of reasons. And to react to that is essential for network stability. That's why I would recommend everyone to use something like the script I created.

0
0
0.000
avatar

Can your script, potentially, be used as a sort of load balancer or node switcher too? So you could switch from one node to the other manually? With some safeguard in place that the switched-to node must be in sync :)

0
0
0.000
avatar

Not yet, but I have plans to add something like that. Either for nodes behind the same IP or behind different IPs.

0
0
0.000
avatar

Great. Imagine the web scoreboard where you can see the health of your nodes and switch them with a click :)

0
0
0.000
avatar

Yeah... I would like that too, but that's not my area of expertise. And it's still too soon to kind of go that direction alone. The node is quite something very simple.

But from the already developed tools for general witnesses monitoring like the https://primersion.com/he-witnesses from @primersion I believe it would be easier to do it, given that support for the nodes to switch will be coded into the node API of HE code. Long shot things I would say. There's too many happening... I have been into this path more than once so, I know it's not like a game developing or a flash stream out of the shell product.

But yeah, thanks for the insight. I have those as well 😁

0
0
0.000
avatar

You are welcome :) It's easy for me to stay since I didn't volunteer myself to code it. Maybe, one of these days ... No, I sort of volunteered for something else which resides partially on the H-E chain. To calculate the net worth of your Rising Star Game cards. I've no idea when I'll start since I have too much of real job and paid orders to do first, of course.

0
0
0.000
avatar

Yeah... I know the feeling... same here. Real job function I have is quite cross-team functional, so I end up everywhere all the time.

0
0
0.000