Repository navigation
mixing: Allow more than mixing.MaxPeers in KE messages - #3824
Merged
Merged
Conversation
davecgh
reviewed
Oct 7, 2026
The 64 MaxPeers limit was introduced to reduce severe memory consumption, but it's later messages in the session (CT, SR, and DC especially) which use the most memory. When more than 64 peers are chosen by mixclient in a compatible pairing, it would error during publishing of KE messages for exceeding the lower limit. This prevents the intended mixing.MaxPeers limiting from occurring later in Client.run() after peer agreement is reached. This commit removes the limit check for KE messages from mixpool, and additionally adds a mixclient check that the initial KE messages before peer agreement all have no more than the larger wire.MaxMixPeers limit.
jrick
force-pushed
the
max_mix_peers_peer_agreement
branch
from
October 7, 2026 19:00
e0207bd to
cdcd4a9
Compare
davecgh
approved these changes
Oct 7, 2026
davecgh
left a comment
Member
There was a problem hiding this comment.
Approving since this is necessary. Although I will note that we're ultimately going to want some additional limits put in place as discussed elsewhere.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 64 MaxPeers limit was introduced to reduce severe memory consumption, but it's later messages in the session (CT, SR, and DC especially) which use the most memory.
When more than 64 peers are chosen by mixclient in a compatible pairing, it would error during publishing of KE messages for exceeding the lower limit. This prevents the intended mixing.MaxPeers limiting from occurring later in Client.run() after peer agreement is reached.
This commit removes the limit check for KE messages from mixpool, and additionally adds a mixclient check that the initial KE messages before peer agreement all have no more than the larger wire.MaxMixPeers limit.