-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Experimental - Reduce # of connections effectively used to gossip transactions out (#1558) * maxpeers for mempool * mempool: fix max_peers bcast routine active flag * Use semaphore to limit concurrency * Rename MaxPeers to MaxOutboundPeers * Add max_outbound_peers to config toml template * Rename in error message * Renams the parameter to highlight its experimental nature. Extend the AddPeer method to return an error. Moves the semaphone to outside the broadcast routine * reverting the addition of error to AddPeer. It fails if the context is done and handling this case will be done some other time, when an actual context is passed into acquire. * reverting the addition of error to AddPeer. It fails if the context is done and handling this case will be done some other time, when an actual context is passed into acquire. * Fixing lint issue * renaming semaphore to something more meaningful * make default value 0, which is the same as the current behavior. 10 is the recommended value. * adding new flag to manifest.go * Adding changelog * Improve the description of the parameter in the generated config file. * Add metric to track the current number of active connections. * Change metric to gauge type and rename it. * e2e: Allow disabling the PEX reactor on all nodes in the testnet * Apply suggestions from code review * Update config/config.go comment * fix lint error * Improve config description * Rename metric (remove experimental prefix) * Add unit test * Improve unit test * Update mempool/reactor.go comment --------- * Updating test file, leaving it broken for now * mempool: Limit gossip connections to persistent and non-persistent peers (experimental) (#1584) * Ignore persistent peers from limiting of outbound connections * Update 1558-experimental-gossip-limiting.md Update changeling * Fix typo in mempool/metrics.go * Use two independent configs and semaphores for persistent and non-persistent peers * Forgot to rename in test * Update metric description * Rename semaphores * Add comment to unit test --------- * Reverting to old way of reporting errors * Reverting change that shouldn't have been included in cherry-pick * Reverting tests to use older functions * fix rebase merge --------- Co-authored-by: Adi Seredinschi <[email protected]> Co-authored-by: Ethan Buchman <[email protected]> Co-authored-by: Daniel Cason <[email protected]> Co-authored-by: hvanz <[email protected]> Co-authored-by: Andy Nogueira <[email protected]> Co-authored-by: Sergio Mena <[email protected]>
- Loading branch information
1 parent
5b1e711
commit 47ffffa
Showing
12 changed files
with
235 additions
and
38 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
.changelog/unreleased/improvements/1558-experimental-gossip-limiting.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent | ||
peers to which the node gossip transactions. | ||
([\#1558](https://github.com/cometbft/cometbft/pull/1558)) | ||
([\#1584](https://github.com/cometbft/cometbft/pull/1584)) | ||
- `[config]` Add mempool parameters `experimental_max_gossip_connections_to_persistent_peers` and | ||
`experimental_max_gossip_connections_to_non_persistent_peers` for limiting the number of peers to | ||
which the node gossip transactions. | ||
([\#1558](https://github.com/cometbft/cometbft/pull/1558)) | ||
([\#1584](https://github.com/cometbft/cometbft/pull/1584)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.