Skip to content

Commit 3943601

Browse files
committed
use 8546 for nitro ws port
1 parent 8c90d16 commit 3943601

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ mkconfig_nitro DATETIME *ARGS:
131131
--nitro-addr "localhost:55000" \
132132
--chain-namespace 412346 \
133133
--parent-rpc-url "http://127.0.0.1:8545" \
134-
--parent-ws-url "ws://127.0.0.1:8545" \
134+
--parent-ws-url "ws://127.0.0.1:8546" \
135135
--parent-chain-id 1337 \
136136
--parent-ibox-contract "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1" \
137137
--key-manager-contract "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35" \

test-configs/nitro-ci-committee/node_0.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace = 412346
2626
[chain.parent]
2727
id = 1337
2828
rpc_url = "http://127.0.0.1:8545/"
29-
ws_url = "ws://127.0.0.1:8545/"
29+
ws_url = "ws://127.0.0.1:8546/"
3030
ibox_contract = "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1"
3131
block_tag = "finalized"
3232
key_manager_contract = "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35"

test-configs/nitro-ci-committee/node_1.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace = 412346
2626
[chain.parent]
2727
id = 1337
2828
rpc_url = "http://127.0.0.1:8545/"
29-
ws_url = "ws://127.0.0.1:8545/"
29+
ws_url = "ws://127.0.0.1:8546/"
3030
ibox_contract = "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1"
3131
block_tag = "finalized"
3232
key_manager_contract = "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35"

timeboost-config/src/node.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ namespace = 10101
116116
[chain.parent]
117117
id = 31337
118118
rpc_url = "http://127.0.0.1:8545/"
119+
ws_url = "ws://127.0.0.1:8545/"
119120
ibox_contract = "0x4dbd4fc535ac27206064b68ffcf827b0a60bab3f"
120121
block_tag = "finalized"
121122
key_manager_contract = "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35"

timeboost/src/lib.rs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use timeboost_sequencer::{Output, Sequencer};
2323
use timeboost_types::{BundleVariant, ConsensusTime, KeyStore};
2424
use tokio::select;
2525
use tokio::sync::mpsc::{self, Receiver, Sender};
26-
use tracing::{info, warn};
26+
use tracing::{error, info, warn};
2727

2828
pub use conf::{TimeboostConfig, TimeboostConfigBuilder};
2929
pub use timeboost_builder as builder;
@@ -101,13 +101,26 @@ impl Timeboost {
101101
// setup the websocket for contract event stream
102102
let ws = WsConnect::new(self.config.chain_config.parent.ws_url.clone());
103103
// spawn the pubsub service (and backend) and the frontend is registered at the provider
104-
let provider = ProviderBuilder::new().connect_pubsub_with(ws).await?;
104+
let provider = ProviderBuilder::new()
105+
.connect_pubsub_with(ws)
106+
.await
107+
.map_err(|err| {
108+
error!(?err, "event pubsub failed to start");
109+
err
110+
})?;
105111

106112
let filter = Filter::new()
107113
.address(self.config.chain_config.parent.key_manager_contract)
108114
.event(KeyManager::CommitteeCreated::SIGNATURE)
109115
.from_block(BlockNumberOrTag::Finalized);
110-
let mut events = provider.subscribe_logs(&filter).await?.into_stream();
116+
let mut events = provider
117+
.subscribe_logs(&filter)
118+
.await
119+
.map_err(|err| {
120+
error!(?err, "pubsub subscription failed");
121+
err
122+
})?
123+
.into_stream();
111124

112125
loop {
113126
select! {

0 commit comments

Comments
 (0)