Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodes should reconnect to peers once they are online #1908

Open
weiihann opened this issue Jun 14, 2024 · 2 comments
Open

Nodes should reconnect to peers once they are online #1908

weiihann opened this issue Jun 14, 2024 · 2 comments

Comments

@weiihann
Copy link
Contributor

Given the following scenario:

  • Node A is a feeder node.
  • Node B is a regular P2P node.
  • Node A is online first. Node B syncs successfully from Node A.
  • Node A goes offline. Node B no longer syncs from Node A.
  • Node A goes online again. Node B should automatically detects that Node A is online again, and attempts to resync from it.

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
Copy link
Contributor

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants