github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/docs/architecture/adr-050-improved-trusted-peering.md (about) 1 # ADR 50: Improved Trusted Peering 2 3 ## Changelog 4 * 22-10-2019: Initial draft 5 * 05-11-2019: Modify `maximum_dial_period` to `persistent_peers_max_dial_period` 6 7 ## Context 8 9 When `max_num_inbound_peers` or `max_num_outbound_peers` of a node is reached, the node cannot spare more slots to any peer 10 by inbound or outbound. Therefore, after a certain period of disconnection, any important peering can be lost indefinitely 11 because all slots are consumed by other peers, and the node stops trying to dial the peer anymore. 12 13 This is happening because of two reasons, exponential backoff and absence of unconditional peering feature for trusted peers. 14 15 16 ## Decision 17 18 We would like to suggest solving this problem by introducing two parameters in `config.toml`, `unconditional_peer_ids` and 19 `persistent_peers_max_dial_period`. 20 21 1) `unconditional_peer_ids` 22 23 A node operator inputs list of ids of peers which are allowed to be connected by both inbound or outbound regardless of 24 `max_num_inbound_peers` or `max_num_outbound_peers` of user's node reached or not. 25 26 2) `persistent_peers_max_dial_period` 27 28 Terms between each dial to each persistent peer will not exceed `persistent_peers_max_dial_period` during exponential backoff. 29 Therefore, `dial_period` = min(`persistent_peers_max_dial_period`, `exponential_backoff_dial_period`) 30 31 Alternative approach 32 33 Persistent_peers is only for outbound, therefore it is not enough to cover the full utility of `unconditional_peer_ids`. 34 @creamers158(https://github.com/Creamers158) suggested putting id-only items into persistent_peers to be handled as 35 `unconditional_peer_ids`, but it needs very complicated struct exception for different structure of items in persistent_peers. 36 Therefore we decided to have `unconditional_peer_ids` to independently cover this use-case. 37 38 ## Status 39 40 Proposed 41 42 ## Consequences 43 44 ### Positive 45 46 A node operator can configure two new parameters in `config.toml` so that he/she can assure that tendermint will allow connections 47 from/to peers in `unconditional_peer_ids`. Also he/she can assure that every persistent peer will be dialed at least once in every 48 `persistent_peers_max_dial_period` term. It achieves more stable and persistent peering for trusted peers. 49 50 ### Negative 51 52 The new feature introduces two new parameters in `config.toml` which needs explanation for node operators. 53 54 ### Neutral 55 56 ## References 57 58 * two p2p feature enhancement proposal(https://github.com/tendermint/tendermint/issues/4053)