Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix description of 'unconditional peer' behavior #272

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ type P2PConfig struct { //nolint: maligned
// with the default being "priority".
QueueType string `mapstructure:"queue-type"`

// List of node IDs, to which a connection will be (re)established ignoring any existing limits
// List of node IDs, to which a connection will be (re)established, dropping an existing peer if any existing limit has been reached
UnconditionalPeerIDs string `mapstructure:"unconditional-peer-ids"`
}

Expand Down
2 changes: 1 addition & 1 deletion config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ send-rate = {{ .P2P.SendRate }}
# TODO: Remove once MConnConnection is removed.
recv-rate = {{ .P2P.RecvRate }}

# List of node IDs, to which a connection will be (re)established ignoring any existing limits
# List of node IDs, to which a connection will be (re)established, dropping an existing peer if any existing limit has been reached
unconditional-peer-ids = "{{ .P2P.UnconditionalPeerIDs }}"


Expand Down
4 changes: 2 additions & 2 deletions internal/p2p/peermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ type PeerManagerOptions struct {
// necessary to make room for these.
PersistentPeers []types.NodeID

// Peers to which a connection will be (re)established ignoring any existing limits
// Peers to which a connection will be (re)established, dropping an existing peer if any existing limit has been reached
UnconditionalPeers []types.NodeID

// Only include those peers for block sync
Expand Down Expand Up @@ -157,7 +157,7 @@ type PeerManagerOptions struct {
// by optimize().
persistentPeers map[types.NodeID]bool

// List of node IDs, to which a connection will be (re)established ignoring any existing limits
// List of node IDs, to which a connection will be (re)established, dropping an existing peer if any existing limit has been reached
unconditionalPeers map[types.NodeID]struct{}

// blocksyncPeers provides fast blocksyncPeers lookups.
Expand Down
2 changes: 1 addition & 1 deletion scripts/confix/testdata/v33-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ max_num_inbound_peers = 40
# Maximum number of outbound peers to connect to, excluding persistent peers
max_num_outbound_peers = 10

# List of node IDs, to which a connection will be (re)established ignoring any existing limits
# List of node IDs, to which a connection will be (re)established, dropping an existing peer if any existing limit has been reached
unconditional_peer_ids = ""

# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used)
Expand Down
2 changes: 1 addition & 1 deletion scripts/confix/testdata/v34-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ max_num_inbound_peers = 40
# Maximum number of outbound peers to connect to, excluding persistent peers
max_num_outbound_peers = 10

# List of node IDs, to which a connection will be (re)established ignoring any existing limits
# List of node IDs, to which a connection will be (re)established, dropping an existing peer if any existing limit has been reached
unconditional_peer_ids = ""

# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used)
Expand Down
2 changes: 1 addition & 1 deletion scripts/confix/testdata/v35-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ max-connections = 64
# Rate limits the number of incoming connection attempts per IP address.
max-incoming-connection-attempts = 100

# List of node IDs, to which a connection will be (re)established ignoring any existing limits
# List of node IDs, to which a connection will be (re)established, dropping an existing peer if any existing limit has been reached
# TODO: Remove once p2p refactor is complete.
# ref: https://github.com/tendermint/tendermint/issues/5670
unconditional-peer-ids = ""
Expand Down
Loading