Skip to content

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

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

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

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 15.45064% with 197 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.70%. Comparing base (b030a82) to head (b65766f).

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    78.03%   77.70%   -0.34%     
===========================================
  Files          952      963      +11     
  Lines        16300    17002     +702     
  Branches      2337     2461     +124     
===========================================
+ Hits         12720    13211     +491     
- Misses        3575     3784     +209     
- Partials         5        7       +2     
Flag Coverage Δ
contracts 91.76% <ø> (?)
packages 77.33% <15.45%> (-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
@oXtxNt9U
oXtxNt9U force-pushed the feat/p2p/get-messages-round branch 2 times, most recently from baaa3d9 to 68302e1 Compare August 25, 2026 05:38
@oXtxNt9U
oXtxNt9U force-pushed the feat/p2p/get-messages-round branch from 68302e1 to b65766f Compare August 25, 2026 05:39
@oXtxNt9U
oXtxNt9U marked this pull request as draft August 26, 2026 10:09
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