lighthouse/beacon_node
Michael Sproul 4b6cb3db2c Prevent port re-use in HTTP API tests (#4745)
## Issue Addressed

CI is plagued by `AddrAlreadyInUse` failures, which are caused by race conditions in allocating free ports.

This PR removes all usages of the `unused_port` crate for Lighthouse's HTTP API, in favour of passing `:0` as the listen address. As a result, the listen address isn't known ahead of time and must be read from the listening socket after it binds. This requires tying some self-referential knots, which is a little disruptive, but hopefully doesn't clash too much with Deneb 🤞

There are still a few usages of `unused_tcp4_port` left in cases where we start external processes, like the `watch` Postgres DB, Anvil, Geth, Nethermind, etc. Removing these usages is non-trivial because it's hard to read the port back from an external process after starting it with `--port 0`. We might be able to do something on Linux where we read from `/proc/`, but I'll leave that for future work.
2023-09-20 01:19:03 +00:00
..
beacon_chain Prevent port re-use in HTTP API tests (#4745) 2023-09-20 01:19:03 +00:00
beacon_processor Fix beacon-processor-max-workers (#4636) 2023-08-21 05:02:34 +00:00
builder_client Tidy formatting of Reqwest errors (#4336) 2023-06-27 01:06:50 +00:00
client Add Experimental QUIC support (#4577) 2023-09-15 03:07:24 +00:00
eth1 Replace ganache-cli with anvil (#3555) 2023-05-15 07:22:02 +00:00
execution_layer Prevent port re-use in HTTP API tests (#4745) 2023-09-20 01:19:03 +00:00
genesis rust 1.72 lints (#4659) 2023-08-24 14:33:24 -04:00
http_api Prevent port re-use in HTTP API tests (#4745) 2023-09-20 01:19:03 +00:00
http_metrics upgrade to libp2p 0.52 (#4431) 2023-08-02 00:59:34 +00:00
lighthouse_network Add Experimental QUIC support (#4577) 2023-09-15 03:07:24 +00:00
network Add Experimental QUIC support (#4577) 2023-09-15 03:07:24 +00:00
operation_pool Fix some typos (#4565) 2023-08-14 00:29:43 +00:00
src Add Experimental QUIC support (#4577) 2023-09-15 03:07:24 +00:00
store Fix bug in block root storage (#4663) 2023-08-28 05:34:28 +00:00
tests Appease Clippy 1.68 and refactor http_api (#4068) 2023-03-13 01:40:03 +00:00
timer Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
Cargo.toml Release v4.4.1 (#4690) 2023-09-04 02:56:52 +00:00