Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 8 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ delay_map = "0.4"
deposit_contract = { path = "common/deposit_contract" }
directory = { path = "common/directory" }
dirs = "3"
discv5 = { version = "0.10", features = ["libp2p"] }
# TODO: switch to crates.io once released.
discv5 = { git = "https://github.com/ackintosh/discv5.git", rev = "279671c83fd5acea3422c5772f767238723cff40", features = ["libp2p"] }
doppelganger_service = { path = "validator_client/doppelganger_service" }
educe = "0.6"
eip_3076 = { path = "common/eip_3076" }
Expand Down
4 changes: 4 additions & 0 deletions beacon_node/http_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ use lighthouse_network::PeerId;
use lighthouse_version::version_with_platform;
use logging::{SSELoggingComponents, crit};
use network::{NetworkMessage, NetworkSenders};
use network_utils::discovery_metrics::scrape_discovery_metrics;
use network_utils::enr_ext::EnrExt;
use parking_lot::RwLock;
pub use publish_blocks::{
Expand Down Expand Up @@ -2949,6 +2950,9 @@ pub fn serve<T: BeaconChainTypes>(
.and(warp::path::end())
.then(|task_spawner: TaskSpawner<T::EthSpec>| {
task_spawner.blocking_json_task(Priority::P1, move || {
// discv5 metrics are not pushed continuously; pull fresh values from the discv5
// global metrics so that observe_nat() reads up-to-date contactability results.
scrape_discovery_metrics();
Ok(api_types::GenericResponse::from(observe_nat()))
})
});
Expand Down
3 changes: 3 additions & 0 deletions boot_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ impl BootNodeConfigSerialization {
Some(SocketAddrV4::new(ipv4, ipv4_port)),
Some(SocketAddrV6::new(ipv6, ipv6_port, 0, 0)),
),
lighthouse_network::discv5::ListenConfig::FromSockets { .. } => {
unreachable!("FromSockets is not used in Lighthouse")
}
};

BootNodeConfigSerialization {
Expand Down
Loading