eth/protocols/wit: remove peer lock held across p2p.Send to prevent broadcast stalls and added metrics#2120
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2120 +/- ##
===========================================
+ Coverage 51.44% 51.46% +0.02%
===========================================
Files 881 882 +1
Lines 153870 153975 +105
===========================================
+ Hits 79157 79247 +90
- Misses 69542 69546 +4
- Partials 5171 5182 +11
... and 24 files with indirect coverage changes
🚀 New features to boost your workflow:
|
|
Looks like erigon got stuck at block 256 in the E2E test. Could you take a look and see if these changes did not affect anything? |
…roadcast stalls and added metrics
36c9229 to
c5a59a8
Compare
|
@claude Can you do a detailed review of this PR. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
|
Quick question @pratikspatil024 - I could be missing something, but while testing this on Kurtosis-PoS, it seems like the For the functionality, I've tested on separate Kurtosis devnets on Bor images with and without this fix (along with a custom timeout added to simulate slow |
|
Awesome, thanks for looking into this and testing this fix, @jhkimqd! Looking at the and found out that the entry point which pushed the witnesses into the So the metric not increasing makes sense. The delay in |
|



Description
p2p.Send()calls (up to20swrite timeout), which could block the block broadcast loop when a peer was slow or disconnectingKnownCachethread-safe internally so external locking is no longer neededwit/peer/send_witness_durationandeth/broadcast_loop_durationChanges
Breaking changes
Please complete this section if any breaking changes have been made, otherwise delete it
Nodes audience
In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)
Checklist
Cross repository changes
Testing
Manual tests
Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it
Additional comments
Please post additional comments in this section if you have them, otherwise delete it