livepeer / go-livepeer-basicnet

Basic p2p video streaming for Livepeer
MIT License
18 stars 8 forks source link

Add a ping service #40

Closed ericxtang closed 6 years ago

ericxtang commented 6 years ago

Add the ability to ping another node. This can be used for testing connectivity.

ericxtang commented 6 years ago

@j0sh why are libp2p messages unreliable? Aren't we sending messages over tcp?

j0sh commented 6 years ago

We don't know if directed messages actually reach the intended destination after sending them. There could be partitions within the libp2p network, the destination node could be experiencing issues, and there is a large element of trust in the peers you're connected to (eclipse attacks etc).

ericxtang commented 6 years ago

Ahh. The current implementation of ping is only to direct neighbors. I see it just as a simple debugging tool to see if the node still has connectivity to a specific neighbor. Added the nonce stuff though - we can use it in the future.

j0sh commented 6 years ago

LGTM 🚢

ghost commented 6 years ago

@j0sh The noncing idea is great idea. It means we end up with a graph for every user node and for each edge off a user we know its latest IP and the DateTime changed. Thats really useful for mesh logic later .