4b6cb3db2c
## 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.
56 lines
1.9 KiB
TOML
56 lines
1.9 KiB
TOML
[package]
|
|
name = "http_api"
|
|
version = "0.1.0"
|
|
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
|
edition = "2021"
|
|
autotests = false # using a single test binary compiles faster
|
|
|
|
[dependencies]
|
|
warp = { version = "0.3.2", features = ["tls"] }
|
|
serde = { version = "1.0.116", features = ["derive"] }
|
|
tokio = { version = "1.14.0", features = ["macros", "sync"] }
|
|
tokio-stream = { version = "0.1.3", features = ["sync"] }
|
|
types = { path = "../../consensus/types" }
|
|
hex = "0.4.2"
|
|
beacon_chain = { path = "../beacon_chain" }
|
|
eth2 = { path = "../../common/eth2", features = ["lighthouse"] }
|
|
slog = "2.5.2"
|
|
network = { path = "../network" }
|
|
lighthouse_network = { path = "../lighthouse_network" }
|
|
eth1 = { path = "../eth1" }
|
|
state_processing = { path = "../../consensus/state_processing" }
|
|
lighthouse_version = { path = "../../common/lighthouse_version" }
|
|
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
|
|
lazy_static = "1.4.0"
|
|
warp_utils = { path = "../../common/warp_utils" }
|
|
slot_clock = { path = "../../common/slot_clock" }
|
|
ethereum_ssz = "0.5.0"
|
|
bs58 = "0.4.0"
|
|
futures = "0.3.8"
|
|
execution_layer = { path = "../execution_layer" }
|
|
parking_lot = "0.12.0"
|
|
safe_arith = { path = "../../consensus/safe_arith" }
|
|
task_executor = { path = "../../common/task_executor" }
|
|
lru = "0.7.7"
|
|
tree_hash = "0.5.0"
|
|
sysinfo = "0.26.5"
|
|
system_health = { path = "../../common/system_health" }
|
|
directory = { path = "../../common/directory" }
|
|
logging = { path = "../../common/logging" }
|
|
ethereum_serde_utils = "0.5.0"
|
|
operation_pool = { path = "../operation_pool" }
|
|
sensitive_url = { path = "../../common/sensitive_url" }
|
|
store = { path = "../store" }
|
|
bytes = "1.1.0"
|
|
beacon_processor = { path = "../beacon_processor" }
|
|
|
|
[dev-dependencies]
|
|
environment = { path = "../../lighthouse/environment" }
|
|
serde_json = "1.0.58"
|
|
proto_array = { path = "../../consensus/proto_array" }
|
|
genesis = { path = "../genesis" }
|
|
|
|
[[test]]
|
|
name = "bn_http_api_tests"
|
|
path = "tests/main.rs"
|