NethermindEth / juno

Starknet client implementation.
https://juno.nethermind.io
Apache License 2.0
371 stars 158 forks source link

Nodes should reconnect to peers once they are online #1908

Open weiihann opened 1 week ago

weiihann commented 1 week ago

Given the following scenario:

However, that's not the case currently as Node B wasn't able to detect that Node A is online.

Not sure where the root cause is, but have some ideas for solution:

  1. Persists the peer information somewhere and loads it whenever the node is started. In this way, Node A could notify Node B that it is online.
  2. Regularly ping peers if they are online.
IronGauntlets commented 1 week ago

LIbp2p automatically detects when an old nodes come back online but it does take some time. This is probably due to how often the DHT table is refreshed. I would recommend to wait a little while longer.

CodeMongerrr commented 6 days ago

I want to try this one out, with the first way.