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(p2p): make kademlia in forest work for lotus #4580

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Jul 23, 2024

Summary of changes

Part of #4576

go-libp2p-kad-dht sends the remote peer id as query key during bootstrap, however, rust-libp2p returns empty peer list when the key it receives matches the local one. This PR configures Kademlia with a random peer ID as a workaround

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@hanabi1224 hanabi1224 marked this pull request as ready for review July 23, 2024 12:23
@hanabi1224 hanabi1224 requested a review from a team as a code owner July 23, 2024 12:23
@hanabi1224 hanabi1224 requested review from lemmih and LesnyRumcajs and removed request for a team July 23, 2024 12:23
Copy link
Member

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to state the current state - given it's a workaround, the actual fix should be where exactly? I mean, we can live with a workaround but at least we should create an issue in a relevant project.

src/libp2p/discovery.rs Outdated Show resolved Hide resolved
Co-authored-by: Hubert <[email protected]>
@hanabi1224
Copy link
Contributor Author

hanabi1224 commented Jul 23, 2024

Just to state the current state - given it's a workaround, the actual fix should be where exactly? I mean, we can live with a workaround but at least we should create an issue in a relevant project.

@LesnyRumcajs Then let's keep #4576 open. I'm not sure where the actual fix should go yet. Let me explore the code more and discuss with libp2p people on slack

@hanabi1224 hanabi1224 added this pull request to the merge queue Jul 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 23, 2024
@hanabi1224 hanabi1224 added this pull request to the merge queue Jul 23, 2024
Merged via the queue into main with commit a9dfa82 Jul 23, 2024
28 checks passed
@hanabi1224 hanabi1224 deleted the hm/make-forest-kademlia-work-for-lotus branch July 23, 2024 14:32
@LesnyRumcajs LesnyRumcajs mentioned this pull request Jul 23, 2024
4 tasks
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 this pull request may close these issues.

3 participants