Zebra/zebra-network/src/peer_set
Arya 77ad91ced4
fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029)
* Adds most_recent_by_ip field to address book

* adds test

* Apply suggestions from code review

* fixes lint

* Updates most_recent_by_ip in .take()

Updates should_update_most_recent_by_ip() and has_active_peer_with_ip to check last_attempt and last_failure times

Renames has_active_peer_with_ip

* Documents that Zebra will not initiate more than 1 outbound connections per IP

* Fixes is_ready_for_connection_attempt_with_ip

Adds test coverage for AttemptPending and Failed

Fixes new_outbound_peer_connections_are_rate_limited proptest

* Applies suggestions from code review.

* Applies suggestions from code review

* Always return true from `is_ready_for_connection_attempt_with_ip` if max_connections_per_ip != 0

* Update max_connections_per_ip config docs

* Warn about invalid config fields and use default values

* Ignores last_attempt and last_failure in is_ready_for_connection_attempt_with_ip

updates test

* Only update most_recent_by_ip if update.last_conn_state is responded.

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* fixes lint

* Update zebra-network/src/address_book.rs

Co-authored-by: teor <teor@riseup.net>

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Fix Rust syntax

* Fix whitespace

---------

Co-authored-by: teor <teor@riseup.net>
2023-07-06 05:54:10 +00:00
..
candidate_set fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
initialize fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
inventory_registry fix(log): Stop logging peer IP addresses, to protect user privacy (#6662) 2023-05-14 15:06:07 +00:00
set fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
unready_service Delete outdated `TODOs` refering to closed issues (#6732) 2023-05-23 03:33:14 +00:00
candidate_set.rs fix(net): Avoid potential concurrency bugs in outbound handshakes (#6869) 2023-06-08 23:43:03 +00:00
initialize.rs fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
inventory_registry.rs fix(log): Stop logging peer IP addresses, to protect user privacy (#6662) 2023-05-14 15:06:07 +00:00
limit.rs fix(log): Remove redundant startup logs, fix progress bar number, order, and wording (#7087) 2023-07-05 07:08:59 +00:00
set.rs fix(log): Remove redundant startup logs, fix progress bar number, order, and wording (#7087) 2023-07-05 07:08:59 +00:00
unready_service.rs fix(net): Clean up licensing, closure `move`, log typos, tracing spans (#6995) 2023-06-19 18:17:39 +00:00