handel
handel copied to clipboard
Libp2p - weird behaviors
We now have a comparative baseline simulation using libp2p where each peer connects to a few other peers (designated as a parameter "Count" in a config file), subscribe to the "handel" topic, broadcast their signature and wait to receive enough signatures. Unfortunately, this simulation exhibits weird behaviors (~failures) of the libp2p pubsub library. We can tests these failures in two different ways, in the fail_libp2p branch:
- Running the test
TestGossipMeshy
insimul/p2p/libp2p
which is directly inspired from the tests found in the libp2p/pubsub repo. - Running the simulation in
simul/
withgo run main.go -config config_gossip.toml -platform localhost
- It's the generalization of the tests. Even with a large number of connected peers, the simulation fails most often.
Please note that sometime theses tests pass, but most often they don't - repeat the experience !
For the test, using a Neighbor
connector that makes each peer connects only to some "neighbors" in the ID space (modulo), so all peer's connections form a circle - it's a completely connected graph. On the contrary, using Random
connector that randomly connects peers (as in the libp2p pubsub's tests) fails most of the time.