Skip to content

Commit

Permalink
fix šŸ›: Fix for BlocksByRange timeout (increased timeout, source stillā€¦
Browse files Browse the repository at this point in the history
ā€¦ needs to be determined)

ISSUE: #48
  • Loading branch information
emailnjv committed Nov 27, 2024
1 parent 84324f9 commit b85001a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions app/src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ impl NetworkBackend {
info!("Responding to rpc...");
self.swarm.behaviour_mut().eth2_rpc.send_response(peer_id, (connection_id, substream_id), payload);
}
Some(_) => {
debug!("Unhandled message");
}
None => {
// channel shut down, nothing to do
}
Expand All @@ -293,7 +296,7 @@ impl NetworkBackend {
message_id: id,
message,
})) => {
tracing::debug!(
debug!(
"Got message: '{}' with id: {id} from peer: {peer_id}",
String::from_utf8_lossy(&message.data),
);
Expand Down Expand Up @@ -345,10 +348,12 @@ impl NetworkBackend {
Ok(RPCReceived::EndOfStream(request_id, _)) => {
rpc_response_channels.remove(request_id);
}
Err(HandlerErr::Inbound { id: _, proto: _, error: _ }) => {
Err(HandlerErr::Inbound { id: err_stream_id, proto: _, error: stream_error }) => {
// not sure what to do with this, ignore for now
warn!("Inbound error: {:?}", stream_error);
}
Err(HandlerErr::Outbound { id: _, proto: _, error: _ }) => {
Err(HandlerErr::Outbound { id: stream_id, proto: _, error: stream_err }) => {
warn!("Outbound error: {:?}", stream_err);
}
}

Expand Down Expand Up @@ -450,8 +455,8 @@ fn create_swarm() -> Result<Swarm<MyBehaviour>, Error> {

let network_params = NetworkParams {
max_chunk_size: 1024 * 1024_usize,
ttfb_timeout: Duration::from_secs(15),
resp_timeout: Duration::from_secs(15),
ttfb_timeout: Duration::from_secs(180),
resp_timeout: Duration::from_secs(180),
};

let drain = slog::Discard;
Expand Down
1 change: 1 addition & 0 deletions app/src/network/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ impl<Id: ReqId, TSpec: EthSpec> RPC<Id, TSpec> {
}
};

tracing::debug!("Pushing RPC request to swarm request_id: {:?}, request_id: {:?}", request_id, peer_id);
self.events.push(event);
}

Expand Down
2 changes: 1 addition & 1 deletion etc/config/chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
"powTargetTimespan": 12000,
"powTargetSpacing": 1000
},
"isValidator": true
"isValidator": false
}

0 comments on commit b85001a

Please sign in to comment.