diff --git a/Cargo.lock b/Cargo.lock index df120bb..bd6ebe5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -368,7 +368,7 @@ dependencies = [ [[package]] name = "boot-node" -version = "0.5.0" +version = "0.5.1" dependencies = [ "camino", "clap", diff --git a/Cargo.toml b/Cargo.toml index dc151a6..def6f54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [".", "examples/dcutr", "examples/chat"] [package] name = "boot-node" -version = "0.5.0" +version = "0.5.1" authors = ["Calimero Limited "] edition = "2021" repository = "https://github.com/calimero-network/boot-node" diff --git a/src/main.rs b/src/main.rs index 333fba8..957ed2c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,6 +12,7 @@ use tracing_subscriber::EnvFilter; const PROTOCOL_VERSION: &str = concat!("/", env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")); const CALIMERO_KAD_PROTO_NAME: StreamProtocol = StreamProtocol::new("/calimero/kad/1.0.0"); +const MAX_RELAY_CIRCUIT_BYTES: u64 = 8 << 20; // 8 MiB #[derive(NetworkBehaviour)] struct Behaviour { @@ -95,7 +96,11 @@ async fn main() -> eyre::Result<()> { }, ping: ping::Behaviour::new(ping::Config::new()), rendezvous: rendezvous::server::Behaviour::new(rendezvous::server::Config::default()), - relay: relay::Behaviour::new(keypair.public().to_peer_id(), Default::default()), + relay: relay::Behaviour::new(keypair.public().to_peer_id(), { + let mut x = relay::Config::default(); + x.max_circuit_bytes = MAX_RELAY_CIRCUIT_BYTES; + x + }), })? .build();