feat(subnet-splitting): freeze registry version until summary is reached - #10938
Merged
pierugo-dfinity merged 21 commits intoAug 6, 2026
Merged
Conversation
pierugo-dfinity
force-pushed
the
pierugo/subnet-splitting/status
branch
from
July 30, 2026 10:04
6af0506 to
46227a8
Compare
pierugo-dfinity
force-pushed
the
pierugo/subnet-splitting/freeze-registry-version
branch
from
July 31, 2026 08:34
c2411d8 to
91f9402
Compare
pierugo-dfinity
force-pushed
the
pierugo/subnet-splitting/freeze-registry-version
branch
from
August 3, 2026 08:49
44f0377 to
da13866
Compare
pierugo-dfinity
marked this pull request as ready for review
August 3, 2026 14:26
|
✅ No security or compliance issues detected. Reviewed everything up to 85b670f. Security Overview
Detected Code Changes
|
eichhorl
reviewed
Aug 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts consensus’ handling of registry versions during subnet splitting to prevent non-summary (data) blocks from adopting a registry version that already indicates a pending split, and to ensure the summary block adopts exactly the registry version at which the split was scheduled.
Changes:
- Add a
subnet_splittingutility to detect whether a subnet split is pending at a given registry version and expose aStatus/StatusErrorAPI. - Update block-making to “freeze” the context registry version below the scheduled split version until the next summary block, then bump exactly to the scheduled version.
- Update block validation to reject data blocks that reference a registry version at/above the scheduled split version, and to require summary blocks to reference exactly the scheduled version; add tests.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rs/types/types/src/consensus/catchup.rs | Introduces SubnetSplittingArgs decoding from protobuf for subnet-splitting CUP contents. |
| rs/consensus/utils/src/subnet_splitting.rs | New helper to determine whether subnet splitting is scheduled vs. already adopted, plus unit tests. |
| rs/consensus/utils/src/lib.rs | Exposes the new subnet_splitting module. |
| rs/consensus/utils/Cargo.toml | Adds dependencies for the new module and its tests (thiserror, ic-registry-keys, rstest). |
| rs/consensus/utils/BUILD.bazel | Mirrors the new Rust deps for Bazel builds/tests. |
| rs/consensus/src/consensus/validator.rs | Enforces frozen vs. exact registry-version rules during splitting; adds corresponding tests. |
| rs/consensus/src/consensus/malicious_consensus.rs | Updates call site for get_stable_registry_version signature change. |
| rs/consensus/src/consensus/block_maker.rs | Implements registry-version freezing/bumping behavior based on subnet-splitting status; adds tests. |
| Cargo.lock | Records new dependency additions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eichhorl
approved these changes
Aug 6, 2026
pierugo-dfinity
deleted the
pierugo/subnet-splitting/freeze-registry-version
branch
August 6, 2026 15:14
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.
Because Consensus passes the block’s validation context's registry version to other components (including DSM), it could happen that a subnet split has not yet happened from Consensus' point of view but it would have from the other components' point of view. While it does not necessarily have to lead to misbehavior, this PR proposes to "freeze" the registry version in the validation context from the moment a split is detected in the registry until the next summary block (which will have a
Scheduledstatus).More precisely, we will not bump the registry version in the validation context of any data block in a DKG interval to any version of the registry which has a flag indicating that the subnet splitting should happen. We only bump it when reaching the summary block (to exactly the registry version the split was scheduled at, not a more recent one).