DHT bootstraping success check #3492
Replies: 2 comments 6 replies
-
Thanks for the report.
This is not the intended way of checking for failure. I would determine failure/success based on whether all |
Beta Was this translation helpful? Give feedback.
-
Hi Max, The solution is definitively an option for us. I was just wondering if you could be interested about making these checks into some kind of a native event ? Also, I have noticed that during the bootstrap, if the first phase fails (nobody answer) we still proceed to phase two (random peerid request to fill the kbuckets). |
Beta Was this translation helpful? Give feedback.
-
Hi,
I stumbled on a weird behavior recently and I would like to know if it's normal or if it hides an error.
I was doing some DHT tests on the bootstrap when the bootstrapping node cannot be contacted (due to timeout for instance).
To know that the bootstrapping has finished and that it's ok to work with the DHT, I watch for
BootstrapOk
event withnum_remaining
set to 0.During my tests, the bootstrapping actually fails since no node is reachable. But to my surprise, I still got a
BootstrapOk
event with thenum_remaining
to 0, which let me think that everything is ready when it's not.After a bit of research, I found that I could look into the
stats
of theKademliaEvent::OutboundQueryProgressed
to check if at least one request is succesful, and therefore if the bootstrap did actually succeed.However it feels a bit weird, moreover since there's a
BootstrapTimeout
, and therefore I'd like to know if this is the intended way of checking the bootstraping success.Beta Was this translation helpful? Give feedback.
All reactions