-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[P2P] Background router peer discovery #712
Comments
## @Reviewer This PR may be more digestible / reviewable on a commit-by-commit basis. Commits are organized logically and any given line is only modified in a single commit, with few exceptions*. *(In the interest of preserving the git-time-continuum :police_officer::rotating_light:, this applies in batches of commits between comments or reviews *by humans*) --- ## Description Implements a "background router" to work alongside raintree (to be integrated in a future PR) which uses a kademlia DHT for peer discovery and a gossipsub pubsub router for broadcasting and listening. ## Issue Part 1 of #505 Part 1 of #712 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Removed unused `Transport` interface - Moved and renamed `raintree.RainTreeConfig` to `util.RouterConfig` - Renamed `protocol.DefaultTopicStr` to `protocol.BackgroundTopicStr` - Added `protocol.PeerDiscoveryNamespace` - Added kademlia peer discovery baseline test - Added background router (kad + gossipsub) - Renamed `P2PConfig#MaxMempoolCount` to `P2PConfig#MaxNonces` - Renamed `DefaultP2PMaxMempoolCount` to `DefaultP2PMaxNonces` - Updated Dockerfiles using outdated go version to 1.19 - Updated P2P README ## Testing - [ ] `make develop_test`; if any code changes were made - [x] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [x] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made ## Required Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [x] I have updated the corresponding README(s); local and/or global - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) --------- Co-authored-by: Daniel Olshansky <[email protected]>
Given what we now know about go-libp2p-kad-dht peer advertising and TTLs, I think it's safe to say that churn is addressed by this implementation. I would like to have added some tests which prove it though before we close this issue. |
Appreciate the update. How about we update the deliverable to simply include the test you mentioned? |
Objective
Implement peer discovery using LibP2P's Kademlia algorithm and investigate if dynamic peer churn is included in LibP2P by default or needs to be implemented separately.
Origin Document
V1 P2P Specification
LibP2P research
LibP2P Implementation
Goals
Deliverable
Non-goals / Non-deliverables
General issue deliverables
Testing Methodology
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @jessicadaugherty
The text was updated successfully, but these errors were encountered: