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

fix DHT connection on discovery on devnet #2026

Closed
noot opened this issue Nov 11, 2021 · 1 comment · Fixed by #2059
Closed

fix DHT connection on discovery on devnet #2026

noot opened this issue Nov 11, 2021 · 1 comment · Fixed by #2059
Assignees

Comments

@noot
Copy link
Contributor

noot commented Nov 11, 2021

Task summary

  • DHT discovery seems to have regressed on the devnet and no longer works
  • previously, when running 3 nodes Alice, Bob and Charlie, Bob and Charlie would use Alice as their bootnode, and then discover each other via the DHT, resulting in each node having 2 peers
  • however it seems to have regressed w/ the peer scoring update and this no longer happens (Alice has 2 peers, but Bob and Charlie only have 1, and they no longer connect to each other)
  • it seems they still discover each other, but don't connect to each other, as adding in code to directly connect them after discovering results in the correct behaviour (ie. adding a line here to connect them, as can be seen in older commits)
    if len(d.h.Network().Peers()) < d.maxPeers {
    err = d.h.Connect(d.ctx, peer)
    if err != nil {
    logger.Trace("failed to connect to discovered peer", "peer", peer.ID, "err", err)
    }
    } else {
    d.h.Peerstore().AddAddrs(peer.ID, peer.Addrs, peerstore.PermanentAddrTTL)
    return
    }
    }
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

🎉 This issue has been resolved in version 0.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants