Update to latest discovery (#6486)

* Upgrade discv5 to v0.8

* Rename some logs

* Improve the NAT reporting with new discv5 metrics

* Merge branch 'unstable' into discv5-v8

* Limited Cargo.lock update

* Update yanked futures-* crates
This commit is contained in:
Age Manning
2024-11-19 09:52:23 +11:00
committed by GitHub
parent c5007eaa1c
commit 8cebc87d95
8 changed files with 133 additions and 73 deletions

View File

@@ -1052,10 +1052,6 @@ impl<E: EthSpec> NetworkBehaviour for Discovery<E> {
discv5::Event::SocketUpdated(socket_addr) => {
info!(self.log, "Address updated"; "ip" => %socket_addr.ip(), "udp_port" => %socket_addr.port());
metrics::inc_counter(&metrics::ADDRESS_UPDATE_COUNT);
// We have SOCKET_UPDATED messages. This occurs when discovery has a majority of
// users reporting an external port and our ENR gets updated.
// Which means we are able to do NAT traversal.
metrics::set_gauge_vec(&metrics::NAT_OPEN, &["discv5"], 1);
// Discv5 will have updated our local ENR. We save the updated version
// to disk.