ChainSafe / forest

🌲 Rust Filecoin Node Implementation
https://forest.chainsafe.io
Apache License 2.0
617 stars 145 forks source link

fix(p2p): adaptive chain exchange timeout #4470

Open hanabi1224 opened 3 days ago

hanabi1224 commented 3 days ago

Summary of changes

This PR tries to address the below comment on CHAIN_EXCHANGE_TIMEOUT

/// Timeout for response from an RPC request // This value could be tweaked, this is just set pretty low to avoid peers // timing out requests from slowing the node down. If increase, should create a // countermeasure for this.

Changes introduced in this pull request:

https://github.com/ChainSafe/forest/actions/runs/9754275564/job/26921065275?pr=4470#step:8:445

2024-07-02T03:11:08.618161Z  INFO forest_filecoin::chain_sync::network_context: Decreased chain exchange timeout to 2500ms. Current average: 96ms
2024-07-02T03:11:08.659245Z  INFO forest_filecoin::chain_sync::network_context: Decreased chain exchange timeout to 2000ms. Current average: 39ms

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist