archethic-node icon indicating copy to clipboard operation
archethic-node copied to clipboard

Nodes should not try to connect to stale nodes

Open bchamagne opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

Currently, for each nodes in the network we create a Connection process which holds the tcp connection with the node. If the tcp connection is closed, the process retry to connect to the node every 500ms. For some reason a node can stop working or can be offline forever. If its happen there is no needs to retry to connect to it every 500ms this it may not be connectable anymore.

Describe the solution you'd like

If a node becomes completely unavailable the Connection process should be stopped. If the node is restarted, it will send a message to us and so we should restart the Connection process since the node is back again.

Additional context

A node is considered a completely unavailable if it is globally unavailable and the Connection availability timer of the Connection process is nil for more than 1 Slot time

Epic

No response

bchamagne avatar Nov 14 '23 16:11 bchamagne