Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[P2P] feat: add background router (#707)
## @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]>
- Loading branch information