Zebra/zebrad/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
..
bin/zebrad fix(zebrad): accept default subcommand arguments and print consistent usage information for top-level 'help' subcommand (#6801) 2023-06-07 06:03:42 +00:00
commands fix(commands): Require an argument name before the list of tracing filters when used without a subcommand (#7056) 2023-07-05 09:28:05 +00:00
components 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
application.rs fix(log): Only show the Zebra logo & intro for the `start` command (#7075) 2023-06-27 17:38:57 +00:00
commands.rs fix(log): Only show the Zebra logo & intro for the `start` command (#7075) 2023-06-27 17:38:57 +00:00
components.rs Re-order Zebra startup, so slow services are launched last (#3091) 2021-11-23 17:42:44 +00:00
config.rs rpc(config): Add a `mining` section with miner address to config (#5491) 2022-11-01 00:43:45 +00:00
lib.rs feat(ui): Add a terminal-based progress bar to Zebra (#6235) 2023-04-13 08:42:17 +00:00
prelude.rs fix(zebrad): accept default subcommand arguments and print consistent usage information for top-level 'help' subcommand (#6801) 2023-06-07 06:03:42 +00:00
sentry.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00