feat(subnet-splitting): implement subnet splitting's halting logic - #10936
Merged
Conversation
Base automatically changed from
pierugo/add-subnet-splitting-status-field
to
master
July 30, 2026 09:38
pierugo-dfinity
force-pushed
the
pierugo/subnet-splitting/status
branch
from
July 30, 2026 10:04
6af0506 to
46227a8
Compare
pierugo-dfinity
marked this pull request as ready for review
July 30, 2026 12:11
|
✅ No security or compliance issues detected. Reviewed everything up to fb258f5. Security Overview
Detected Code Changes
|
Contributor
There was a problem hiding this comment.
Pull request overview
Implements consensus halting behavior needed for subnet splitting by extending consensus status evaluation to consider subnet-splitting state from the governing DKG summary, and by passing the last summary block through block making/validation paths to avoid repeated lookups and panics.
Changes:
- Extend
consensus::status::{get_status, should_halt}to include subnet-splitting-based halting (Scheduled/PostSplit), and refactor boolean aggregation. - Thread the governing DKG summary block through consensus block making, validation, and batch delivery; remove error variants/panics that previously came from re-looking up the summary block.
- Update/expand tests to cover subnet splitting halting scenarios and adapt existing DKG/iDKG validation paths to the new signatures.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| rs/types/types/src/consensus/dkg.rs | Removes a DKG payload creation error variant now that callers provide the governing summary block. |
| rs/test_utilities/artifact_pool/src/consensus_pool.rs | Updates test payload builder wiring to fetch and pass the last DKG summary block. |
| rs/consensus/src/consensus/validator.rs | Fetches governing summary once and passes it into status + iDKG/DKG validation; improves failure classification. |
| rs/consensus/src/consensus/status.rs | Adds subnet-splitting halting logic and refactors halting decision computation; expands tests. |
| rs/consensus/src/consensus/notary.rs | Adapts should_halt call site to new signature. |
| rs/consensus/src/consensus/malicious_consensus.rs | Threads last DKG summary block into block construction path. |
| rs/consensus/src/consensus/catchup_package_maker.rs | Adapts should_halt call site and uses start (summary) block for halting checks. |
| rs/consensus/src/consensus/block_maker.rs | Fetches governing summary once, passes through payload builders, and logs when proposing splitting summaries. |
| rs/consensus/src/consensus/batch_delivery.rs | Retrieves summary block earlier and passes it into status checks before delivering non-summary batches. |
| rs/consensus/idkg/src/payload_verifier.rs | Accepts governing summary block from caller instead of re-looking it up (removes panic path). |
| rs/consensus/idkg/src/payload_builder/errors.rs | Removes an iDKG error variant tied to missing summary lookup. |
| rs/consensus/idkg/src/payload_builder.rs | Threads the prior summary block through iDKG payload building rather than looking it up internally. |
| rs/consensus/dkg/src/payload_validator.rs | Accepts governing summary block from caller instead of re-looking it up (removes panic path) and updates tests. |
| rs/consensus/dkg/src/payload_builder.rs | Requires caller-provided governing summary block, avoiding internal lookup/error variant. |
| rs/consensus/dkg/src/lib.rs | Updates DKG tests for new validator signature requiring the governing summary block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pierugo-dfinity
commented
Jul 30, 2026
eichhorl
approved these changes
Jul 30, 2026
eichhorl
approved these changes
Aug 3, 2026
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.
This PR implements the halting logic of subnet splitting by adapting Consensus'
get_statusfunction, used by block making, block validation, and batch delivery.On a
Scheduledsubnet split summary, replicas will halt as they are about to skip the whole interval and create CUPs for the next summary height directly.On a
PostSplitsubnet split summary, the split is done. As a replica's subnet ID is determined at startup, the source subnet will have it correct and can continue creating blocks. Though for a short amount of time, the destination subnet will still have the configured source subnet ID while the summary indicates the destination subnet ID. In that case, do not create new blocks (i.e. halt) until the orchestrator observes thisPostSplitCUP and restarts the replica (with the correct destination subnet ID). After they restarted, replicas' subnet ID will match the one in the summary and should create blocks.Note: as the two subnets are still connected under the same P2P network after the split but have different halting conditions, it is expected to receive artifact invalidation during that time: the destination subnet will receive non-empty blocks from the source subnet.
Note 2: again, because the two subnets are still connected under the same P2P network after the split, the source subnet will broadcast certifications/certification shares for heights above the post-split summary. These should be ignored by the destination subnet: coming later in a separate PR.
P.S.: the PR also finds the last summary block at one single place and passes it around during block making and validation, allowing to remove some error variants and avoid panics.