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

Update Dependencies & Go #35

Merged
merged 19 commits into from
Jul 26, 2024
Merged

Update Dependencies & Go #35

merged 19 commits into from
Jul 26, 2024

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Apr 3, 2024

Closes #34.

chore: update dependencies
@hacdias
Copy link
Member Author

hacdias commented Apr 3, 2024

Well, the tests seem to fail, but the exact same query fails on the live version:

image

I don't think the current tests are very reproducible as they rely on having Kubo installed and running, as well as an active Internet connection, and specific expectations from the network.

@hacdias hacdias requested a review from aschmahmann April 3, 2024 12:17
@hacdias hacdias marked this pull request as draft April 4, 2024 14:25
daemon.go Outdated
func providerRecordInDHT(ctx context.Context, d kademlia, c cid.Cid, p peer.ID) bool {
func providerRecordInDHT(ctx context.Context, d kademlia, c cid.Cid) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the idea behind the change here? This version seems to answer the question "has anyone advertised the record" which is different from "did node X that is hosting the data advertise it has the data".

Unless this is part of bigger changes towards #24 or #6, seems like we'd rather answer the second question. Otherwise, someone might see:
✔ Successfully connected to multiaddr
✔ Found multiaddr with 2 dht peers
✔ Found the multihash in the dht
✔ Successfully downloaded the CID from the peer

and yet the data would still not be retrievable because a different peer (who is unreachable) had advertised themselves in the DHT but this one had not

Copy link
Member Author

@hacdias hacdias Apr 5, 2024

Choose a reason for hiding this comment

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

Ah, okay. I will revert this. I would also like to actually incorporate the features from #24. I don't mind tackling that in this PR.

Regarding the tests:

  • Locally only one test is failing: checking if the bootstrap peer has the empty directory.
  • In the CI there's more tests failing.

I still have to take a better look at it.


TODO: rewrite initial comment with the goals of this PR.

@hacdias
Copy link
Member Author

hacdias commented May 6, 2024

I'm closing this as it's unlikely that I'll get back to this until EOM. Feel free to reuse any of the commits in the future.

@hacdias hacdias closed this May 6, 2024
@aschmahmann
Copy link
Contributor

Reopening this, as the PR seems to get most of the job done and we can continue from here (thanks @hacdias). I'm not planning on bringing in the pl-diagnose features in this PR though as it'll make it easier to land this one.

@aschmahmann aschmahmann reopened this Jun 25, 2024
@aschmahmann aschmahmann marked this pull request as ready for review July 4, 2024 02:41
@@ -133,9 +154,9 @@ func (d *daemon) runCheck(writer http.ResponseWriter, uristr string) error {
}
}

testHost, err := libp2p.New(libp2p.ConnectionGater(&privateAddrFilterConnectionGater{}))
testHost, err := d.createTestHost()
Copy link
Member

@2color 2color Jul 26, 2024

Choose a reason for hiding this comment

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

@aschmahmann Why do we create a new libp2p host for testing if Vole also creates a host?

There's a case here where the host created in this scope successfully connects to one of the maddrs of the passed peerID (using the results from peerAddrsInDHT), but then checkBitswapCID fails with the maddr that was passed in.

Copy link
Contributor

Choose a reason for hiding this comment

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

There's a case here where the host created in this scope successfully connects to one of the maddrs of the passed peerID (using the results from peerAddrsInDHT), but then checkBitswapCID fails with the maddr that was passed in.

This might not be handled as cleanly as it could (particularly in handling things like if the users only wants to pass a /p2p/<peerID> multiaddr), but that failure is IMO a good one to have. We want separate checks for:

  1. Is the CID (really multihash) advertised in the DHT (or later IPNI)?
  2. Are the peer's addresses discoverable (particularly useful if the announcements are DHT based, but also independently useful)
  3. Is the peer contactable with the address the user gave us?
  4. Is the address the user gave us present in the DHT?
  5. Does the peer say they have at least that one CID (doesn't say anything about the rest of any associated DAG but it a quick test and start) when asked using a protocol most clients speak (i.e. currently Bitswap, later also trustless gateways, etc.)?

If we allowed the test to succeed instead of fail we wouldn't have a check on just the passed multiaddr working. We can do something to tease out each test better, but maybe better to just follow that up in another PR

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I agree It's very useful to have all those 5 separate checks.

I think we just need to make sure we structure the results better. Will follow up in a separate PR

integration_test.go Outdated Show resolved Hide resolved
@2color 2color merged commit 65ee5cb into main Jul 26, 2024
1 check passed
@2color 2color deleted the update branch July 26, 2024 13:40
@aschmahmann aschmahmann mentioned this pull request Jul 31, 2024
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.

Upgrade go-libp2p for quic-v1 multiaddrs to work
3 participants