Summary:
- The intention of this task was to ensure the correct functionality of service-discovery protocol and also measure it’s latency (how much time it takes for a discoverer node to find an advertiser).
- While doing this, we found several issues, mentioned in this document
- Ticket issues
- Refresh issues
- Infinite loops bugs
- Triggered discussions regarding code structure and implementation
- After all of the necessary fixes, in a network of 200+ nodes, a node that is interested in finding an advertiser that is not common in the network (1/200 advertisers) takes less than 1.5 seconds. This has been reproduced 50 times, where we can see the cumulative plot here in this document.
Code used in scenario
nim node: https://github.com/vacp2p/dst-libp2p-test-node/tree/Alberto/service_discovery/nim-test-node/service-discovery
~~nim-libp2p version: c44b81ddb54c4902c8d97d5b8113853bc3f43f2f # 2.1.0 specific commit~~
~~nim-libp2p version: f0c97fcf410cc35c082aebb15f6568eae206da3d # changes on top of 2.2.0 tag~~
~~nim-libp2p version: 33f6aeb96adad6ea8a10e010b82df7c0d57ba0a3 (nodes stuck)~~
nim-libp2p version: 2643afbf06d310827a0e2c84e70cc3aff449612d
Current scenario:
- 1 bootstrap node
- 200 popular advertiser nodes
- 1 rare advertiser node