[libp2p] how to use queries


I am going thought the documentation of libp2p and looking in how I can to use it the best for my project. I couldn’t find information about how the queries form the dht work (js version). There is no information in the spec nor in the the examples folder / the code.

So my question’s are:

  1. Is there a query language
  2. How should I use them
  3. When I send queries to a peer / list of peer’s, how do they process them?
  4. Can queries’s be used as an attac to produce a heavy work load on the network?
  5. If 4. is true, shouldn’t there be a way to blacklist those peer’s?

Thank you :slight_smile: