Closed lidel closed 2 months ago
I don't think this will happen often, I think the long wait happens only when backend was just restarted, and Amino DHT is being mapped by FullRT client.
I've added stdout informing user that the backend is not ready yet in https://github.com/ipfs/ipfs-check/pull/55:
$ ./ipfs-check
Starting ipfs-check
...
2024/08/29 20:42:34 Please wait, initializing accelerated-dht client.. (mapping Amino DHT may takes 5 or more minutes)
...
2024/08/29 20:42:34 Accelerated DHT client ready
2024/08/29 20:46:59 Backend ready and listening on [::]:3333
...
2024/08/29 20:46:59 Ready to start serving.
Thanks for pointing this out! This is indeed a problem when you start it locally and it runs the accelerated DHT (aka FullRT) by default.
Have <input type="range" allowing user to adjust timeout (e.g. between 30 seconds and 15 minutes?), and pass it to backend
We can also implement this on the frontend with an AbortSignal https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static which we'd handle on the backend using the context
If DHT is still being mapped, or we test CID Without providers, it will wait forever, e.g. here its 15minutes before showing result to user:
Proposed improvements
<input type="range"
allowing user to adjust timeout (e.g. between 30 seconds and 15 minutes?), and pass it to backend