Skip to content

Commit

Permalink
chore: define max circuit bytes (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
miraclx authored Nov 6, 2024
1 parent 45420bf commit bb24153
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "examples/dcutr", "examples/chat"]

[package]
name = "boot-node"
version = "0.5.0"
version = "0.5.1"
authors = ["Calimero Limited <[email protected]>"]
edition = "2021"
repository = "https://github.com/calimero-network/boot-node"
Expand Down
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit bb24153

Please sign in to comment.