Skip to content

Commit

Permalink
feat: add pending connection limits + bump libp2p to 0.54.1 (#2644)
Browse files Browse the repository at this point in the history
## 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
MitchTurner and netrome authored Feb 10, 2025
1 parent 57c350d commit 0300e46
Show file tree
Hide file tree
Showing 19 changed files with 607 additions and 385 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]

### Added

- [2150](https://github.com/FuelLabs/fuel-core/pull/2150): Upgraded `libp2p` to `0.54.1` and introduced `ConnectionLimiter` to limit pending incoming/outgoing connections.
- [2648](https://github.com/FuelLabs/fuel-core/pull/2648): Add feature-flagged field to block header `fault_proving_header` that contains a commitment to all transaction ids.

### Changed
Expand Down
Loading

0 comments on commit 0300e46

Please sign in to comment.