Skip to content

Commit

Permalink
feat: add waku discovery network enr to bootstrapping nodes by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-eiger committed Sep 28, 2023
1 parent 09a3472 commit 6fb5f8b
Show file tree
Hide file tree
Showing 8 changed files with 537 additions and 540 deletions.
1,055 changes: 526 additions & 529 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ panic = 'unwind'
opt-level = 3

[workspace.dependencies]
graphcast-sdk = "0.4.3"
#graphcast-sdk = { git= "https://github.com/graphops/graphcast-sdk", branch = "dev" }
graphcast-sdk = { git= "https://github.com/graphops/graphcast-sdk", branch = "hope/waku-binding-pr-70" }
5 changes: 4 additions & 1 deletion subgraph-radio/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ impl Config {
) -> Result<GraphcastAgentConfig, GraphcastAgentError> {
let wallet_key = self.wallet_input().unwrap().to_string();
let topics = self.radio_infrastructure().topics.clone();
let mut discv5_enrs = self.waku().discv5_enrs.clone().unwrap_or(vec![]);
// Discovery network
discv5_enrs.push("enr:-P-4QJI8tS1WTdIQxq_yIrD05oIIW1Xg-tm_qfP0CHfJGnp9dfr6ttQJmHwTNxGEl4Le8Q7YHcmi-kXTtphxFysS11oBgmlkgnY0gmlwhLymh5GKbXVsdGlhZGRyc7hgAC02KG5vZGUtMDEuZG8tYW1zMy53YWt1djIucHJvZC5zdGF0dXNpbS5uZXQGdl8ALzYobm9kZS0wMS5kby1hbXMzLndha3V2Mi5wcm9kLnN0YXR1c2ltLm5ldAYfQN4DiXNlY3AyNTZrMaEDbl1X_zJIw3EAJGtmHMVn4Z2xhpSoUaP5ElsHKCv7hlWDdGNwgnZfg3VkcIIjKIV3YWt1Mg8".to_string());

GraphcastAgentConfig::new(
wallet_key,
Expand All @@ -116,7 +119,7 @@ impl Config {
self.waku().waku_port.clone(),
self.waku().waku_addr.clone(),
self.waku().filter_protocol,
self.waku().discv5_enrs.clone(),
Some(discv5_enrs),
self.waku().discv5_port,
)
.await
Expand Down
6 changes: 0 additions & 6 deletions subgraph-radio/src/operator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ impl RadioOperator {
};
let notifier = Notifier::from_config(config);

GRAPHCAST_AGENT
.get()
.unwrap()
.register_handler()
.expect("Could not register handler");

RadioOperator {
config: config.clone(),
persisted_state,
Expand Down
2 changes: 1 addition & 1 deletion test-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ categories = [
]

[dependencies]
waku = { version = "0.1.1", package = "waku-bindings" }
waku = { version = "0.3.0", package = "waku-bindings" }
test-utils = { path = "../test-utils" }
graphcast-sdk = { workspace = true }
subgraph-radio = { path = "../subgraph-radio" }
Expand Down
2 changes: 1 addition & 1 deletion test-sender/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ categories = [
]

[dependencies]
waku = { version = "0.1.1", package = "waku-bindings" }
waku = { version = "0.3.0", package = "waku-bindings" }
graphcast-sdk = { workspace = true }
test-utils = { path = "../test-utils" }
subgraph-radio = { path = "../subgraph-radio" }
Expand Down
2 changes: 2 additions & 0 deletions test-sender/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ async fn start_sender(config: TestSenderConfig) {
store_retention_max_messages: None,
store_retention_max_seconds: None,
gossipsub_params: Some(gossipsub_params),
dns4_domain_name: None,
websocket_params: None,
};

let node_handle = waku_new(Some(node_config)).unwrap().start().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ categories = [
]

[dependencies]
waku = { version = "0.1.1", package = "waku-bindings" }
waku = { version = "0.3.0", package = "waku-bindings" }
graphcast-sdk = { workspace = true }
subgraph-radio = { path = "../subgraph-radio" }
tokio = { version = "1.1.1", features = ["full", "rt"] }
Expand Down

0 comments on commit 6fb5f8b

Please sign in to comment.