threefoldtecharchive / tfchain_explorer

explorer UI for grid 3
https://explorer.dev.grid.tf
2 stars 0 forks source link

Calculate if a node is up based on the updatedAt field #135

Closed DylanVerstraete closed 2 years ago

DylanVerstraete commented 2 years ago

We are now pushing uptime reports every 10 minutes on devnet. The node object in graphql has a field updatedAt, which will be set to the current time if a node uptime report comes in.

We can reuse the code from explorer V2 to mark nodes as up: https://github.com/threefoldtech/tfexplorer/blob/611203dd8aeed6b9c34380533b388db08a7cb193/frontend/src/components/nodestable/nodestable.js#L77

RafyAmgadBenjamin commented 2 years ago

The issue if we depend on graphql, the nodes will be delayed in reporting the actual state that's why we depended on grid proxy to give the almost instant state for the node

DylanVerstraete commented 2 years ago

Alot of ppl were complaining that their node wasn't marked as up whilst it was actually running. Sometimes yggdrasill and rmb are not behaving as they should. To push uptime more frequenctly and display is a node is up based on that is a better approach.

RafyAmgadBenjamin commented 2 years ago

okay, thank you Dylan

DylanVerstraete commented 2 years ago

Thanks Rafy :-)

I want to give more information about why we want to go for this approach, for instance we have an issue right now with ZOS which we couldn't have detected otherwise. The issue is that ZOS get's stuck on reporting consumption reports / uptime reports, while this actually brings the node in to an NON-working state the gridproxy still says these nodes are up because they are responding on RMB.. See how this also can work in the other direction then from my last comment?

ref: https://github.com/threefoldtech/zos/issues/1565

despiegk commented 2 years ago

we cannot push more frequently, actually its already way too much, we will explode the blockchain