RTradeLtd / Temporal

☄️ Temporal is an easy-to-use, enterprise-grade interface into distributed and decentralized storage
https://temporal.cloud
MIT License
226 stars 40 forks source link

GET https://api.ipfs.temporal.cloud/api/v0/name/resolve failing with 504 #440

Closed chaingrok closed 4 years ago

chaingrok commented 4 years ago

Describe the bug GET https://api.ipfs.temporal.cloud/api/v0/name/resolve is failing with http code 504 (gateway timeout error)

The IPFS doc https://docs.ipfs.io/reference/api/http/#api-v0-name-resolve says that such a request with no parameter is ok : "arg [string]: The IPNS name to resolve. Defaults to your node’s peerID. Required: no."

To Reproduce

submit GET https://api.ipfs.temporal.cloud/api/v0/name/resolve

Expected behavior

Should respond by defaulting arg to node's PeerId as per doc

bonedaddy commented 4 years ago

This is because IPNS name resolution can take quite awhile, and sometimes just doesn't work at all, primarily due to:

If you want to get faster resolves you can try the dht-record-count argument. As a security measure we timeout requests if there hasn't been any response from the request for 1-2 minutes. As a work-around you can try using the dht-record-count request parameter to require a lower quorum (ie, 1 or 2), or better yet you can use the stream option which should prevent the request from timing out as long as there are records coming through.

I'm going to close this as there really isn't anything we can do about it, since IPNS records inherently take a very long time to resolve, and more often than not never resolve.

chaingrok commented 4 years ago

Ok. Thanks for the explanation! (closing for this reason is fine)