Skip to content

Commit 2cefd2b

Browse files
committed
feat: add waku discovery network enr to bootstrapping nodes by default
1 parent 526630f commit 2cefd2b

File tree

11 files changed

+542
-545
lines changed

11 files changed

+542
-545
lines changed

Cargo.lock

Lines changed: 526 additions & 529 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ panic = 'unwind'
1212
opt-level = 3
1313

1414
[workspace.dependencies]
15-
graphcast-sdk = "0.4.3"
15+
graphcast-sdk = { git = "https://github.com/graphops/graphcast-sdk" }

subgraph-radio/benches/gossips.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fn gossip_poi_bench(c: &mut Criterion) {
4242
waku_port: None,
4343
waku_node_key: None,
4444
boot_node_addresses: vec![],
45-
waku_log_level: None,
45+
waku_log_level: "fatal".to_string(),
4646
waku_addr: None,
4747
discv5_enrs: None,
4848
discv5_port: None,

subgraph-radio/src/config.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ impl Config {
100100
) -> Result<GraphcastAgentConfig, GraphcastAgentError> {
101101
let wallet_key = self.wallet_input().unwrap().to_string();
102102
let topics = self.radio_infrastructure().topics.clone();
103+
let mut discv5_enrs = self.waku().discv5_enrs.clone().unwrap_or(vec![]);
104+
// Discovery network
105+
discv5_enrs.push("enr:-P-4QJI8tS1WTdIQxq_yIrD05oIIW1Xg-tm_qfP0CHfJGnp9dfr6ttQJmHwTNxGEl4Le8Q7YHcmi-kXTtphxFysS11oBgmlkgnY0gmlwhLymh5GKbXVsdGlhZGRyc7hgAC02KG5vZGUtMDEuZG8tYW1zMy53YWt1djIucHJvZC5zdGF0dXNpbS5uZXQGdl8ALzYobm9kZS0wMS5kby1hbXMzLndha3V2Mi5wcm9kLnN0YXR1c2ltLm5ldAYfQN4DiXNlY3AyNTZrMaEDbl1X_zJIw3EAJGtmHMVn4Z2xhpSoUaP5ElsHKCv7hlWDdGNwgnZfg3VkcIIjKIV3YWt1Mg8".to_string());
103106

104107
GraphcastAgentConfig::new(
105108
wallet_key,
@@ -117,7 +120,7 @@ impl Config {
117120
self.waku().waku_port.clone(),
118121
self.waku().waku_addr.clone(),
119122
self.waku().filter_protocol,
120-
self.waku().discv5_enrs.clone(),
123+
Some(discv5_enrs),
121124
self.waku().discv5_port,
122125
)
123126
.await
@@ -539,9 +542,10 @@ pub struct Waku {
539542
long,
540543
value_name = "WAKU_LOG_LEVEL",
541544
help = "Waku node logging configuration",
545+
default_value = "fatal",
542546
env = "WAKU_LOG_LEVEL"
543547
)]
544-
pub waku_log_level: Option<String>,
548+
pub waku_log_level: String,
545549
#[clap(
546550
long,
547551
value_name = "DISCV5_ENRS",
@@ -601,7 +605,7 @@ mod tests {
601605
waku_port: None,
602606
waku_node_key: None,
603607
boot_node_addresses: vec![],
604-
waku_log_level: None,
608+
waku_log_level: "fatal".to_string(),
605609
waku_addr: None,
606610
discv5_enrs: None,
607611
discv5_port: None,

subgraph-radio/src/operator/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,6 @@ impl RadioOperator {
121121
};
122122
let notifier = Notifier::from_config(config);
123123

124-
GRAPHCAST_AGENT
125-
.get()
126-
.unwrap()
127-
.register_handler()
128-
.expect("Could not register handler");
129-
130124
RadioOperator {
131125
config: config.clone(),
132126
persisted_state,

test-runner/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ categories = [
2121
]
2222

2323
[dependencies]
24-
waku = { version = "0.1.1", package = "waku-bindings" }
24+
waku = { version = "0.3.0", package = "waku-bindings" }
2525
test-utils = { path = "../test-utils" }
2626
graphcast-sdk = { workspace = true }
2727
subgraph-radio = { path = "../subgraph-radio" }

test-sender/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ categories = [
2121
]
2222

2323
[dependencies]
24-
waku = { version = "0.1.1", package = "waku-bindings" }
24+
waku = { version = "0.3.0", package = "waku-bindings" }
2525
graphcast-sdk = { workspace = true }
2626
test-utils = { path = "../test-utils" }
2727
subgraph-radio = { path = "../subgraph-radio" }

test-sender/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ async fn start_sender(config: TestSenderConfig) {
6060
store_retention_max_messages: None,
6161
store_retention_max_seconds: None,
6262
gossipsub_params: Some(gossipsub_params),
63+
dns4_domain_name: None,
64+
websocket_params: None,
6365
};
6466

6567
let node_handle = waku_new(Some(node_config)).unwrap().start().unwrap();

test-utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ categories = [
2121
]
2222

2323
[dependencies]
24-
waku = { version = "0.1.1", package = "waku-bindings" }
24+
waku = { version = "0.3.0", package = "waku-bindings" }
2525
graphcast-sdk = { workspace = true }
2626
subgraph-radio = { path = "../subgraph-radio" }
2727
tokio = { version = "1.1.1", features = ["full", "rt"] }

test-utils/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub fn test_config() -> Config {
4848
waku_node_key: None,
4949
waku_addr: None,
5050
boot_node_addresses: vec![],
51-
waku_log_level: None,
51+
waku_log_level: "fatal".to_string(),
5252
discv5_enrs: None,
5353
discv5_port: None,
5454
filter_protocol: None,

0 commit comments

Comments
 (0)