dkg/pedersen: buffer channels to not drop early bundles - #4683
dkg/pedersen: buffer channels to not drop early bundles#4683KaloyanTanev wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The change directly addresses the documented root cause with minimal surface-area impact and includes targeted regression tests for the primary failure mode.
Pull request overview
Fixes a Pedersen DKG reliability issue where p2p-delivered deal/response/justification bundles can arrive before Kyber starts reading board channels, causing unbuffered-channel delivery to block until the receive context expires and the bundle is dropped (and previously also permanently deduped).
Changes:
- Buffer the incoming bundle channels (
dealCh,responseCh,justificationCh) toconfig.Nodes()so early bundles queue until Kyber starts consuming them. - On context-expired drops, remove the bundle from the dedup “seen” set so a later redelivery isn’t rejected as a duplicate.
- Add internal tests covering early deal buffering and acceptance of redelivery after an intentional drop.
File summaries
| File | Description |
|---|---|
| dkg/pedersen/board.go | Buffers bundle channels and adds bundleDedup.forget to allow redelivery after context-expired drops. |
| dkg/pedersen/board_internal_test.go | Adds focused regression tests for early deal buffering and redelivery after drop. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4683 +/- ##
==========================================
- Coverage 65.38% 65.38% -0.01%
==========================================
Files 247 247
Lines 29983 29990 +7
==========================================
+ Hits 19605 19609 +4
- Misses 10377 10380 +3
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Bundles from peers ahead in the ceremony arrive before this node's kyber protocol starts reading the board channels; the unbuffered channels drop them once the 5s p2p request context expires, and they are never redelivered (
SendAsyncis fire-and-forget, and the dedup map records bundles before delivery). The node then evicts the affected dealers during justifications (Public polynomial missing) and aborts withonly N/M valid deals, as seen in a real replace-operator ceremony.Buffer the deal/response/justification channels to cluster size and forget dropped bundles in the dedup map so a redelivery is accepted.
category: bug
ticket: #4682