maidsafe/qp2p

Contact Multiple EP echo servers

Closed this issue · 2 comments

Currently (for the sake of quickness and simplicity) the crate only contacts the 1st hard-coded-contact for echo service. Discuss how many do we need to contact.

Contacting just one is problematic if they are faulty (don't respond or worse respond wrongly).

  1. Work out how do we trust the results specially given that for some routers (with symmetric NATs) different peers might see us differently (different Endpoints - EPs) and validly so.
  2. This should not generally happen when we are port forwarded but it has happened in the past for that too where the incoming connections on a forwarded port reaches the local EP but a new outgoing from the same local EP uses a different ephemeral mapping on the router.
  3. How many results to collate/collect and how to work them our before we trust it ?

We should contact 10 nodes if possible and take the majority decision of them. If there is no majority then we select the next 10. Failing all of that take any we can and try to bootstrap and let routing tell us if it's correct.
The method should likely also be async.

done