Skip to content

fix(p2p): request messages for an explicit block and round - #1444

Open
oXtxNt9U wants to merge 3 commits into
developfrom
feat/p2p/get-messages-round
Open

fix(p2p): request messages for an explicit block and round#1444
oXtxNt9U wants to merge 3 commits into
developfrom
feat/p2p/get-messages-round

Conversation

@oXtxNt9U

@oXtxNt9U oXtxNt9U commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

GetMessages requests now carry an explicit (blockNumber, round, bitmaps) query instead of the responder guessing from the request headers. The responder serves exactly the queried round or nothing.

  • removes timing races where honest replies were judged against a moved target and peers wrongly banned
  • query bitmaps are copied at job creation so they can't drift while the request waits
  • precommit minorities now also trigger full downloads, matching the consensus rule
  • incomplete replies are logged instead of banned (not provable misbehavior)
  • payload limit scales with validator count

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

- GetMessages requests now carry a mandatory (blockNumber, round, bitmaps) query
- removes the timing races where honest replies were judged against a moved target and peers wrongly banned
- precommit minorities now also trigger full downloads, matching the consensus rule
- incomplete replies are logged instead of banned (not provable misbehavior)
- payload limit scales with validator count
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.81197% with 197 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.03%. Comparing base (87365ff) to head (df7bd10).

Files with missing lines Patch % Lines
...es/p2p/source/socket-server/codecs/proto/protos.js 8.41% 196 Missing ⚠️
packages/p2p/source/peer-communicator.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1444      +/-   ##
===========================================
- Coverage    77.34%   77.03%   -0.32%     
===========================================
  Files          922      933      +11     
  Lines        15954    16656     +702     
  Branches      2167     2291     +124     
===========================================
+ Hits         12340    12831     +491     
- Misses        3609     3818     +209     
- Partials         5        7       +2     
Flag Coverage Δ
contracts 91.76% <ø> (?)
packages 76.63% <15.81%> (-0.71%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@oXtxNt9U
oXtxNt9U marked this pull request as ready for review August 10, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant