Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add pending connection limits + bump libp2p to 0.54.1 (#2644)
## Linked Issues/PRs <!-- List of related issues/PRs --> Replaces: #2150 - Closes #1560 - related to #904 but doesn't close completely because of (wrt to `max_pending_outgoing_connections`): > Even though I've added this parameter, I'm not fully sold that it should be present. The rationale is we only dial a peer if: > a) We are below the desired amount of peers in a gossipsub mesh (which would imply we would be below any potential max_pending_outgoing_connections anyway) and we determined that the peer in question would have a reasonable peer score. So essentially our gossipsub config should handle this scenario. > AND > b) We are relatively certain that peer is reachable i.e. the multiaddr for that peer can be successfully dialled - if that is so, we want to prioritize dialling it. > But I may be missing something about the current p2p setup. ## Description <!-- List of detailed changes --> > This is apart of the broader initiative outlined in #1968 to improve the DoS resilience > > > This PR doesn't make the pending connection limits configurable for a reason, it is an easy way for the operator to footgun and mess up the node configuration. We've used some defaults for now, but there should be some analysis done on optimal connection count for latency to propagate messages. ## Checklist - [x] Breaking changes are clearly marked as such in the PR description and changelog ### Before requesting review - [x] I have reviewed the code myself --------- Co-authored-by: Mårten Blankfors <[email protected]>
- Loading branch information