* Update waku to the latest main

* Update beta version

* Update deps

* Add relay topics config entry

* Update test config
This commit is contained in:
Daniel Sanchez 2023-01-26 12:58:45 +01:00 committed by GitHub
parent 3de48c3d98
commit 67e5aef69a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 7 deletions

4
Cargo.lock generated
View File

@ -1346,7 +1346,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]] [[package]]
name = "waku-bindings" name = "waku-bindings"
version = "0.1.0-beta2" version = "0.1.0-beta3"
dependencies = [ dependencies = [
"aes-gcm", "aes-gcm",
"base64", "base64",
@ -1366,7 +1366,7 @@ dependencies = [
[[package]] [[package]]
name = "waku-sys" name = "waku-sys"
version = "0.1.0-beta2" version = "0.1.0-beta3"
dependencies = [ dependencies = [
"bindgen", "bindgen",
] ]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "waku-bindings" name = "waku-bindings"
version = "0.1.0-beta2" version = "0.1.0-beta3"
edition = "2021" edition = "2021"
authors = [ authors = [
"Daniel Sanchez Quiros <danielsq@status.im>" "Daniel Sanchez Quiros <danielsq@status.im>"
@ -25,7 +25,7 @@ serde_json = "1.0"
sscanf = "0.3" sscanf = "0.3"
smart-default = "0.6" smart-default = "0.6"
url = "2.3" url = "2.3"
waku-sys = { version = "0.1.0-beta2", path = "../waku-sys" } waku-sys = { version = "0.1.0-beta3", path = "../waku-sys" }
[dev-dependencies] [dev-dependencies]
serial_test = "0.10.0" serial_test = "0.10.0"

View File

@ -4,6 +4,7 @@ use std::fmt::{Display, Formatter};
use std::str::FromStr; use std::str::FromStr;
// std // std
// crates // crates
use crate::WakuPubSubTopic;
use multiaddr::Multiaddr; use multiaddr::Multiaddr;
use secp256k1::SecretKey; use secp256k1::SecretKey;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@ -33,6 +34,8 @@ pub struct WakuNodeConfig {
/// Enable relay protocol. Default `true` /// Enable relay protocol. Default `true`
#[default(Some(true))] #[default(Some(true))]
pub relay: Option<bool>, pub relay: Option<bool>,
#[serde(default)]
pub relay_topics: Vec<WakuPubSubTopic>,
/// The minimum number of peers required on a topic to allow broadcasting a message. Default `0` /// The minimum number of peers required on a topic to allow broadcasting a message. Default `0`
#[default(Some(0))] #[default(Some(0))]
pub min_peers_to_publish: Option<usize>, pub min_peers_to_publish: Option<usize>,
@ -47,7 +50,7 @@ pub struct WakuNodeConfig {
#[serde(rename = "discV5")] #[serde(rename = "discV5")]
pub discv5: Option<bool>, pub discv5: Option<bool>,
/// Array of bootstrap nodes ENR. /// Array of bootstrap nodes ENR.
#[serde(rename = "discV5BootstrapNodes")] #[serde(rename = "discV5BootstrapNodes", default)]
pub discv5_bootstrap_nodes: Vec<String>, pub discv5_bootstrap_nodes: Vec<String>,
/// UDP port for DiscoveryV5. Default `9000`. /// UDP port for DiscoveryV5. Default `9000`.
#[default(Some(9000))] #[default(Some(9000))]

View File

@ -26,6 +26,7 @@ pub fn main() -> Result<(), String> {
node_key: None, node_key: None,
keep_alive_interval: None, keep_alive_interval: None,
relay: None, relay: None,
relay_topics: vec![],
min_peers_to_publish: None, min_peers_to_publish: None,
filter: None, filter: None,
log_level: Some(WakuLogLevel::Error), log_level: Some(WakuLogLevel::Error),

View File

@ -1,6 +1,6 @@
[package] [package]
name = "waku-sys" name = "waku-sys"
version = "0.1.0-beta2" version = "0.1.0-beta3"
edition = "2021" edition = "2021"
authors = [ authors = [
"Daniel Sanchez Quiros <danielsq@status.im>" "Daniel Sanchez Quiros <danielsq@status.im>"

@ -1 +1 @@
Subproject commit 2c9c763c306dfa10dc371134d830702d4e0fbf0f Subproject commit 6c989fb1780159aacd8ec210ac4d7a33f40005df