Repository navigation
fix(consensus): stop gossiping unsigned CUPs - #11873
Merged
pierugo-dfinity merged 4 commits intoOct 19, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow filter preserves signed-CUP eligibility, and regression assertions cover unsigned-CUP exclusion.
0 open findings
What changed in this PR
Prevents replicas from broadcasting unsigned genesis and recovery catch-up packages (CUPs) at startup, avoiding peer validation failures during recovery restarts.
Changes:
- Filters unsigned CUPs from initial broadcasts.
- Updates regression assertions and expected artifact counts.
| File | Description |
|---|---|
| rs/artifact_pool/src/consensus_pool.rs | Excludes unsigned CUPs from startup broadcasts and verifies their exclusion in tests. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ No security or compliance issues detected. Reviewed everything up to d017011. Security Overview
Detected Code Changes
|
eichhorl
approved these changes
Oct 19, 2026
Co-authored-by: Leo Eichhorn <[email protected]>
pierugo-dfinity
enabled auto-merge
October 19, 2026 09:43
pierugo-dfinity
deleted the
pierugo/consensus/do-not-gossip-unsigned-CUPs
branch
October 19, 2026 10:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CUPs taken from the registry, like genesis or recovery CUPs, are unsigned but totally legitimate and end up in the replica's validated pool on replica startup, without checking their signatures (which would fail because empty). P2P then replicates this artifact to the other peers' unvalidated pools, which cannot validate it since the signature is missing and this could raise an alert for suspicion of malicious behaviour.
Luckily, this rarely happens in production because:
is_haltedbut ishalt_at_cup_height(like in verifiable recoveries for resharing chain-keys), there the validator still runs. For now, the alert never triggered probably because the orchestrator stops the replica and restarts it only at the next iteration of the upgrade loop 10 seconds later, which considerably reduces the timing window. With fix(orchestrator): wait for processes to properly exit when restarting #11744 though, the replica will be restarted right away, and we might observe this alert.For good practice, do not make replicas broadcast unsigned CUPs during pool initialization since other replicas would not be able to validate it anyways.
Kudos to @basvandijk for detecting the flakiness on the aforementioned PR and suggesting a fix!