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

chore: update deps #974

Merged
merged 4 commits into from
Aug 20, 2024
Merged

chore: update deps #974

merged 4 commits into from
Aug 20, 2024

Conversation

Stebalien
Copy link
Member

Mostly boxo + libp2p.

Mostly boxo + libp2p.
@guillaumemichel
Copy link
Contributor

// close both hosts so query fails
require.NoError(t, d1.host.Close())
require.NoError(t, d2.host.Close())
// peers will still be in the RT because we have decoupled membership from connectivity
require.NoError(t, tu.WaitFor(ctx, func() error {
if !checkRoutingTable(d1, d2) {
return fmt.Errorf("should have routes")
}
return nil
}))
// failed queries should remove the peers from the RT
_, err := d1.GetClosestPeers(ctx, "test")
require.NoError(t, err)
_, err = d2.GetClosestPeers(ctx, "test")
require.NoError(t, err)
require.NoError(t, tu.WaitFor(ctx, func() error {
if checkRoutingTable(d1, d2) {
return fmt.Errorf("should not have routes")
}
return nil
}))

It seems that with go-libp2p v0.33 and previous, host.Connect() after host is closed returns an error (failed to dial: swarm closed). But after v0.34, host.Connect() doesn't return an error and actually connect to the node, even after the host.Close() is called. This is the reason why TestRTEvictionOnFailedQuery is failing.

I haven't been able to find where this change of behavior comes from in libp2p.

cc: @sukunrt @MarcoPolo

@aschmahmann
Copy link
Contributor

Some bisecting shows that the issue with TestRTEvictionOnFailedQuery was introduced in libp2p/go-libp2p#2118.

The culprit seems to be libp2p/go-libp2p@17ba661

@guillaumemichel
Copy link
Contributor

I have updated TestRTEvictionOnFailedQuery. The goal of closing the hosts was that the next query fails, but clearing the addresses of the other node in the peerstore has the same effect and also makes the query fail.

@sukunrt
Copy link
Member

sukunrt commented Aug 9, 2024

@guillaumemichel You can also close the swarm if you want. But the behavior change in go-libp2p is intentional.

@Stebalien
Copy link
Member Author

Let's continue the discussion in the go-libp2p issue.

@2color 2color mentioned this pull request Aug 14, 2024
@sukunrt
Copy link
Member

sukunrt commented Aug 20, 2024

I've removed 4667e81 and updated go-libp2p.

Copy link
Contributor

@guillaumemichel guillaumemichel left a comment

Choose a reason for hiding this comment

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

Connectedness issues will be addressed in #976 if necessary

@MarcoPolo MarcoPolo merged commit 079c5f7 into master Aug 20, 2024
9 checks passed
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.

5 participants