How does my 3node communicate with the Grid? And what about the Telegram Threefold Bot?

Here’s an explanation as far as I understand. Please correct me if I’m wrong, share your thoughts in the comment section and let’s make this clear for everyone! I’ll update the propositions and additional details you farmers contribute. Let’s New Internet.


The Grid sends signals to the 3node to see if it’s online, the 3node receives it and sends it back. It can send multiple signals. That’s basically how it first connects with the Grid when Zero-OS starts. It pings google.com and when it gets a clear signal, it knows the Internet connection is strong, it then downloads Zero-OS on the Grid and then runs it in the cache. Then the 3node answers back and forth with the Grid as stated to confirm that the connection is still on.

The Grid can’t be continuously connected to the 3node. It would be too time consuming. So it sends a certain number of signals per a fixed period of time, and within a certain threshold, it considers the 3node online. That’s the probabilistic aspect. Meaning, it takes “averages” and sees if it’s enough.

So with concrete examples for us farmers:

Scenario 1: My power shut downs. All my nodes are down because I have no UPS. My modem is also down. Power goes back on, the modem goes back on, my servers start, load Zero-OS, then it’s back on Grid. So Zero-OS knows for sure you were offline, indeed you had to ask the Grid to come back online! (When you download Zero-OS during booting).

Scenario 2: My internet shut downs. The 3node stays open with Zero-OS downloaded in the cache as power is still on. My 3node sends signal to the Grid but the Grid can’t receive it… because Internet is down on our side! Duh! Same for the Grid, from its perspective it sends signals, but the 3node doesn’t answer. Then when Internet is back on, the Grid receives the signal from the 3node and vice versa. So over a certain period of time, if you have enough ping-pong completed, your 3node is online from the Explorer’s perspective. And the Explorer’s perspective has the last words when it comes to uptime.

What does this mean/imply concretely? For example, I already had a 30 minutes to 1 hour offline moment but within the parameters of scenario 2. I had the complete 43848 minutes of the minting period. The uptime signals met the threshold needed.

What about the Telegram Bot?

The Telegram Farmer Bot is based on this concept, but with a much smaller period. For example, it sends 4 signals within 5-second periods, if one of those four signals comes back as up, it says your 3node is up. So it’s more sensible in this regard.

This means it’s very efficient in real time to tell you if your node is on the Grid. If your 3node is offline on the Telegram Bot, it doesn’t mean the 3node is offline from the Grid’s perspective. Thus, it’s a very efficient tool for maintenance! Just make sure you subscribe your node IDs to the bot and it will alert you when your nodes go offline (ex: /subscribe 123). Indeed, as it’s more sensible than the Grid’s algorithm, you can have false positives compared to the Grid. For example, the Bot says the 3node is offline, but it’s just that its ping-pong communications on a shorter scale than the Grid’s one caught up moments when the connection was not good and missed the signals. So when you get an alert and you want to double check, just write /status nodeID (ex: /status 123) and if it comes back offline a couple of times without any uptime status, you should look up your 3node.

Here’s the link to the Telegram Farmer Bot, brought to you by @scott

1 Like

Cool, so its just not continually monitoring and does its best to determine uptime through occasional checking in.

1 Like

It’s helpful to understand that the Grid is really just nodes and TF Chain (which itself is a collection of nodes). Nodes report their uptime by writing an entry on TF Chain, about once every two hours. These reports are used for minting.

There are two ways to get information about nodes. Once is to query TF Chain, and the other is to communicate with nodes directly (in the future, nodes may also push information to services like the explorer, but this is not yet the case). The status bot takes the latter approach, by sending pings to the nodes over Yggdrasil every five minutes. Therefore, it will report on temporary network interruptions that might not affect your total uptime calculation as used for minting.

2 Likes

Well that explains perfectly in a sentence. This could be set in a Q+A in the FAQ!

Nice.

Thank you! I did 2-3 questions with you and Nelson’s ideas on the FAQ.

That’s every informative. Great work.