Switch libp2p sigp gossipsub fork (#4999)

* switch libp2p source to sigp fork

* Shift the connection closing inside RPC behaviour

* Tag specific commits

* Add slow peer scoring

* Fix test

* Use default yamux config

* Pin discv5 to our libp2p fork and cargo update

* Upgrade libp2p to enable yamux gains

* Add a comment specifying the branch being used

* cleanup build output from within container
(prevents CI warnings related to fs permissions)

* Remove revision tags add branches for testing, will revert back once we're happy

* Update to latest rust-libp2p version

* Pin forks

* Update cargo.lock

* Re-pin to panic-free rust

---------

Co-authored-by: Age Manning <Age@AgeManning.com>
Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>
Co-authored-by: antondlr <anton@delaruelle.net>
Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
João Oliveira
2024-01-10 05:26:52 +00:00
committed by GitHub
parent be79f74c6d
commit 38df87c3c5
17 changed files with 1057 additions and 987 deletions

View File

@@ -5,7 +5,6 @@ use crate::{Enr, PeerIdSerialized};
use directory::{
DEFAULT_BEACON_NODE_DIR, DEFAULT_HARDCODED_NETWORK, DEFAULT_NETWORK_DIR, DEFAULT_ROOT_DIR,
};
use discv5::{Discv5Config, Discv5ConfigBuilder};
use libp2p::gossipsub;
use libp2p::Multiaddr;
use serde::{Deserialize, Serialize};
@@ -91,7 +90,7 @@ pub struct Config {
/// Discv5 configuration parameters.
#[serde(skip)]
pub discv5_config: Discv5Config,
pub discv5_config: discv5::Config,
/// List of nodes to initially connect to.
pub boot_nodes_enr: Vec<Enr>,
@@ -324,7 +323,7 @@ impl Default for Config {
discv5::ListenConfig::from_ip(Ipv4Addr::UNSPECIFIED.into(), 9000);
// discv5 configuration
let discv5_config = Discv5ConfigBuilder::new(discv5_listen_config)
let discv5_config = discv5::ConfigBuilder::new(discv5_listen_config)
.enable_packet_filter()
.session_cache_capacity(5000)
.request_timeout(Duration::from_secs(1))