remove nat module and use libp2p upnp (#4840)

* remove nat module and use libp2p upnp

* update Cargo.lock

* remove no longer used dependencies

* restore nat module refactored

* log successful mapping

* only activate upnp if config enabled

reduce logs to debug!

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat

* address review

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into libp2p-nat

* address review
This commit is contained in:
João Oliveira
2024-02-27 07:29:18 +00:00
committed by GitHub
parent d36241b4a1
commit abd99652b4
9 changed files with 146 additions and 318 deletions

View File

@@ -6,6 +6,7 @@ use crate::types::SnappyTransform;
use crate::gossipsub;
use libp2p::identify;
use libp2p::swarm::NetworkBehaviour;
use libp2p::upnp::tokio::Behaviour as Upnp;
use types::EthSpec;
use super::api_types::RequestId;
@@ -32,6 +33,8 @@ where
// NOTE: The id protocol is used for initial interop. This will be removed by mainnet.
/// Provides IP addresses and peer information.
pub identify: identify::Behaviour,
/// Libp2p UPnP port mapping.
pub upnp: Upnp,
/// The routing pub-sub mechanism for eth2.
pub gossipsub: Gossipsub,
}