From 6e38c18aec76f2104ad41e2a6e9b55f3bc319596 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Wed, 1 Oct 2025 23:46:02 +0200 Subject: [PATCH] adapt code to latest nwaku --- examples/tic-tac-toe-gui/src/main.rs | 1 + examples/toy-chat/src/main.rs | 1 + waku-bindings/src/node/config.rs | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/tic-tac-toe-gui/src/main.rs b/examples/tic-tac-toe-gui/src/main.rs index 97dbf51..196404e 100644 --- a/examples/tic-tac-toe-gui/src/main.rs +++ b/examples/tic-tac-toe-gui/src/main.rs @@ -345,6 +345,7 @@ async fn main() -> eframe::Result<()> { tcp_port: Some(60010), cluster_id: Some(16), shards: vec![1, 32, 64, 128, 256], + num_shards_in_network: Some(257), // node_key: Some(SecretKey::from_str("2fc0515879e52b7b73297cfd6ab3abf7c344ef84b7a90ff6f4cc19e05a198027").unwrap()), max_message_size: Some("1024KiB".to_string()), relay_topics: vec![String::from(&game_topic)], diff --git a/examples/toy-chat/src/main.rs b/examples/toy-chat/src/main.rs index e5890fd..1de0615 100644 --- a/examples/toy-chat/src/main.rs +++ b/examples/toy-chat/src/main.rs @@ -55,6 +55,7 @@ impl App { tcp_port: Some(60010), cluster_id: Some(16), shards: vec![1, 32, 64, 128, 256], + num_shards_in_network: Some(257), // node_key: Some(SecretKey::from_str("2fc0515879e52b7b73297cfd6ab3abf7c344ef84b7a90ff6f4cc19e05a198027").unwrap()), max_message_size: Some("1024KiB".to_string()), relay_topics: vec![String::from(&pubsub_topic)], diff --git a/waku-bindings/src/node/config.rs b/waku-bindings/src/node/config.rs index 6bf5fb0..e26a87e 100644 --- a/waku-bindings/src/node/config.rs +++ b/waku-bindings/src/node/config.rs @@ -28,8 +28,11 @@ pub struct WakuNodeConfig { #[default(Some(true))] pub relay: Option, pub relay_topics: Vec, - #[default(vec![1])] + #[default(vec![0])] pub shards: Vec, + #[default(Some(1))] + #[serde(rename = "numShardsInNetwork")] + pub num_shards_in_network: Option, #[serde(skip_serializing_if = "Option::is_none")] pub max_message_size: Option,