Skip to content

feat(subnet-spiltting): deliver Splitting batch to DSM - #11213

Draft
pierugo-dfinity wants to merge 1 commit into
pierugo/subnet-splitting/dkg-key-managerfrom
pierugo/subnet-splitting/batch-delivery
Draft

feat(subnet-spiltting): deliver Splitting batch to DSM#11213
pierugo-dfinity wants to merge 1 commit into
pierugo/subnet-splitting/dkg-key-managerfrom
pierugo/subnet-splitting/batch-delivery

Conversation

@pierugo-dfinity

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Delivers subnet-splitting summary blocks to DSM with node-specific subnet assignments.

Changes:

  • Passes the replica node ID into batch delivery.
  • Emits BatchContent::Splitting for scheduled splits.
  • Adds source and destination assignment tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
rs/consensus/src/consensus/finalizer.rs Supplies the local node ID during delivery.
rs/consensus/src/consensus/batch_delivery.rs Builds splitting batches and tests assignments.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +257 to +260
BatchContent::Splitting {
new_subnet_id,
other_subnet_id,
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but according to this comment, this will be overwritten as soon as the destination subnet starts a new round after the split.
Maybe something worth looking into: both the Scheduled summary and the PostSplit summary have the same registry version, so DSM might use the cached OwnSubnetInfo by mistake. But because destination replicas are restarted before executing anything and I assume this cache is stored only in memory, this shouldn't be a problem.

cc @alin-at-dfinity for confirmation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will work as is, as per your analysis.

We can (and probably should) make it clearer by explicitly resetting it to default for subnet B in online_split() instead of carrying it over. Not perfect, as it will result in (apparently valid) disabled features and default limits, but it will work better as documentation (we really expect this to be populated, or else).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another alternative is to actually fill it with the proper values by reading the registry at the batch's registry version (which is precisely the version at which the split happened). But we'd then have two individual locations where the registry is read, not perfect either.

Comment thread rs/consensus/src/consensus/batch_delivery.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants