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

Bug: FINAL_PEER being returned without diallable addresses #176

Closed
maschad opened this issue Sep 3, 2023 · 5 comments
Closed

Bug: FINAL_PEER being returned without diallable addresses #176

maschad opened this issue Sep 3, 2023 · 5 comments
Assignees
Labels
status/blocked Unable to be worked further until needs are met

Comments

@maschad
Copy link

maschad commented Sep 3, 2023

I am running a local kubo daemon which I am querying via peerID i.e.

curl -X POST "http://127.0.0.1:5001/api/v0/dht/findpeer?arg=<my-peer-id>" 

and I do note that the FINAL_PEER event is returned without a diallable address and no QUERY_ERROR but I notice the previous js-ipfs RPC client implementation would return a QUERY_ERROR if a peer is not found during a DHT lookup, and so a FINAL_PEER event should not be returned if it is unable to find the peer in the dht as mentioned in the comment this may be an issue with the Kubo HTTP API.

This was mentioned in #56 but I am creating a separate issue as this relates directly to libp2p/js-libp2p#1951 (comment) and libp2p/js-libp2p#1985

@SgtPooki
Copy link
Member

SgtPooki commented Sep 5, 2023

@maschad we may need to return a QUERY_ERROR from https://github.com/libp2p/js-libp2p-delegated-peer-routing if Kubo is operating as expected, as the kubo-rpc-client library is intended to return exact responses from Kubo RPC HTTP API..

I'll attempt to get confirmation of the expected functionality.

@SgtPooki
Copy link
Member

SgtPooki commented Sep 5, 2023

Kubo-rpc-client is returning the exact same as Kubo, which means this is not a bug with this library IMO.. I opened ipfs/kubo#10117 and need to wait on further guidance/info from Kubo folks here.

@SgtPooki SgtPooki added the status/blocked Unable to be worked further until needs are met label Sep 5, 2023
@achingbrain
Copy link
Member

achingbrain commented Sep 7, 2023

FWIW I don't think this is a case for QUERY_ERROR - it's for when dialling a node failed or they return an invalid response (e.g. a bad protobuf) or similar.

In this case the query executed correctly, there just weren't any results - there should be no FINAL_PEER event, then it's up to the code making the query to translate that in a 'peer not found' error (though this might be the Kubo RPC implementation).

@SgtPooki
Copy link
Member

Next action items are unclear on this. Could use some guidance from @hacdias or @lidel on how we want to handle this.

is a code-change in kubo-rpc-client required, or are we just waiting for ipfs/kubo#10117 to release

@BigLep
Copy link
Contributor

BigLep commented Sep 15, 2023

Per 2023-09-15 verbal, my understanding is this will be handled in Kubo 0.23 release: ipfs/kubo#10014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked Unable to be worked further until needs are met
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants