Zebra/zebra-network/src
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
..
address_book 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
address_book_peers change(rpc): Add getpeerinfo RPC method (#5951) 2023-01-17 07:09:07 +00:00
config feat(net): Cache a list of useful peers on disk (#6739) 2023-06-06 08:28:14 +00:00
isolated fix(log): Stop logging peer IP addresses, to protect user privacy (#6662) 2023-05-14 15:06:07 +00:00
meta_addr 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
peer cleanup(rust): Fix new nightly clippy warnings (#7135) 2023-07-05 07:11:27 +00:00
peer_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
protocol cleanup(rust): Fix new nightly clippy warnings (#7135) 2023-07-05 07:11:27 +00:00
address_book.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
address_book_peers.rs change(rpc): Add getpeerinfo RPC method (#5951) 2023-01-17 07:09:07 +00:00
address_book_updater.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
config.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
constants.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
isolated.rs fix(log): Stop logging peer IP addresses, to protect user privacy (#6662) 2023-05-14 15:06:07 +00:00
lib.rs feat(net): Cache a list of useful peers on disk (#6739) 2023-06-06 08:28:14 +00:00
meta_addr.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
peer.rs fix(net): Reject nodes using ZClassic ports, and warn if configured with those ports (#6567) 2023-04-28 00:17:37 +00:00
peer_cache_updater.rs fix(net): Clean up licensing, closure `move`, log typos, tracing spans (#6995) 2023-06-19 18:17:39 +00:00
peer_set.rs 1. Create an API for a missing inventory registry, but don't register any missing inventory yet (#3255) 2022-02-06 23:05:52 +00:00
policies.rs Delete outdated `TODOs` refering to closed issues (#6732) 2023-05-23 03:33:14 +00:00
protocol.rs Refactor protocol into internal, external modules. 2019-11-27 05:06:01 -05:00