Skip to content

server: Prefer 3 min mix capable outbound peers.#3389

Merged
davecgh merged 1 commit intodecred:masterfrom
davecgh:server_three_min_mix_peers
Jun 18, 2024
Merged

server: Prefer 3 min mix capable outbound peers.#3389
davecgh merged 1 commit intodecred:masterfrom
davecgh:server_three_min_mix_peers

Conversation

@davecgh
Copy link
Member

@davecgh davecgh commented Jun 18, 2024

The current logic attempts to maintain at least one mix capable outbound peer to ensure better connectivity among the mix capable peers. It works as intended, however, only having a single mix capable peer means there will be delays if that peer goes offline until a replacement is found. A possible consequence is that any mix clients might potentially get interrupted if that peer goes offline and a replacement isn't found quickly enough.

Attempting to maintain a minimum of three mix capable outbound peers will significantly reduce the likelihood of having periods without any mix capable peers.

This updates the logic accordingly.

[DBG] SRVR: Rejecting outbound peer <redacted> with protocol version 9 in favor of a peer with minimum version 10 (have: 0, target: 3)
...
[DBG] SRVR: Rejecting outbound peer <redacted> with protocol version 9 in favor of a peer with minimum version 10 (have: 2, target: 3)
...
$ dcrctl getpeerinfo | jq 'map(select(.version>=10)) | length'
3

@davecgh davecgh added this to the 2.0.3 milestone Jun 18, 2024
The current logic attempts to maintain at least one mix capable outbound
peer to ensure better connectivity among the mix capable peers.  It
works as intended, however, only having a single mix capable peer means
there will be delays if that peer goes offline until a replacement is
found.  A possible consequence is that any mix clients might potentially
get interrupted if that peer goes offline and a replacement isn't found
quickly enough.

Attempting to maintain a minimum of three mix capable outbound peers
will significantly reduce the likelihood of having periods without any
mix capable peers.

This updates the logic accordingly.
@davecgh davecgh force-pushed the server_three_min_mix_peers branch from bbf9fd7 to 3099bb2 Compare June 18, 2024 18:26
@davecgh
Copy link
Member Author

davecgh commented Jun 18, 2024

I shortened the debug message a bit per the edited PR description.

@davecgh davecgh merged commit 3099bb2 into decred:master Jun 18, 2024
@davecgh davecgh deleted the server_three_min_mix_peers branch June 18, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants