Skip to content

chore(dkg): remove summary's transcripts for remote subnets (4/4) - #11224

Merged
pierugo-dfinity merged 1 commit into
masterfrom
pierugo/summary/remove-transcripts-for-remote-subnets-4
Oct 5, 2026
Merged

pierugo-dfinity merged 1 commit into
masterfrom
pierugo/summary/remove-transcripts-for-remote-subnets-4

Conversation

@pierugo-dfinity

@pierugo-dfinity pierugo-dfinity commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

The sentinel field is no longer read: remove it from the protobuf definition.

V3 <-> V4 (#11224):
The goal of V4 is to remove the introduced sentinel field.
Upgrade V3 -> V4: V4 will ignore the sentinel field set by V3.
Rollback V4 -> V3: V3 will deserialize a summary with an unset sentinel, but it does not read it anyways.

@github-actions github-actions Bot added the chore label Aug 19, 2026
@pierugo-dfinity
pierugo-dfinity force-pushed the pierugo/summary/remove-transcripts-for-remote-subnets-4 branch from db9bcca to 64db239 Compare August 20, 2026 07:28
@pierugo-dfinity
pierugo-dfinity force-pushed the pierugo/summary/remove-transcripts-for-remote-subnets-4 branch from 64db239 to 6862cb3 Compare August 20, 2026 07:32
Rachit2323 pushed a commit to Rachit2323/ic that referenced this pull request Aug 25, 2026
…inity#11220)

Since the work performed to speedup the latency of remote DKG requests,
their results are delivered as part of data blocks instead of summaries.
The `transcripts_for_remote_subnets` field in summaries is thus now
unused. This PR begins the migration to remove it entirely. Once it is,
the batch delivery can be rewritten more cleanly as we would know that
summary heights never contain any consensus responses.

We cannot simply replace the field with a `BackwardsCompatible<Vec<_>,
_>` (i.e. replace the `Vec<_>` with an `Option<Vec<_>>`) because the
field is a `repeated`, and an empty vector is not differentiable from an
absent one. In contrast, `Some(vec![])` and `None` have different
hashes. For that reason, we need to add a new sentinel field to the
protobuf definition that will be set to `true` to explicitely indicate
that the field is absent. The entire rollout can be reviewed by looking
at the stacked PRs and is described below (together with justifying why
upgrades & downgrades are safe).

- V0 (current) <-> V1 (after this PR):
- The goal of V1 is to keep the exact same representation (including
hash) of V0's summaries while still understanding the sentinel and
compute the same hash as V2 for V2's summaries.
- Upgrade V0 -> V1: A V0's summary doesn't set the sentinel so the field
deserializes as `Some(vec![])` and the hash of an empty vector is
appropriately computed.
- Rollback V1 -> V0: a V1's summary doesn't set the sentinel just yet.
V0 does not read it anyways and always includes an empty vector in the
hash, same as V1.
- V1 <-> V2 ([dfinity#11221](dfinity#11221)):
- The goal of V2 is to actually stop hashing an empty vector, and
instead just ignore it.
- Upgrade V1 -> V2: V2 still understands `Some(vec![])` so will compute
V1's summary's hash identically. For its own summaries, it starts to
fill the sentinel (because the transcripts are `None`).
- Rollback V2 -> V1: V1 understands the sentinel and thus ignores the
transcripts while computing the hash.
- V2 <-> V3 ([dfinity#11223](dfinity#11223)):
    - The goal of V3 is to remove the field entirely.
- Upgrade V2 -> V3: V3 doesn't know about the transcripts anymore (the
field is removed). V2 created a summary with `None` transcripts meaning
their hash was not included, good.
- Rollback V3 -> V2: V3 unconditionally sets the sentinel to `true`,
meaning V2 will interpret the transcripts as `None` and not try to hash
them.
 - V3 <-> V4 ([dfinity#11224](dfinity#11224)):
     - The goal of V4 is to remove the introduced sentinel field.
     - Upgrade V3 -> V4: V4 will ignore the sentinel field set by V3.
- Rollback V4 -> V3: V3 will deserialize a summary with an unset
sentinel, but it does not read it anyways.
@pierugo-dfinity
pierugo-dfinity force-pushed the pierugo/summary/remove-transcripts-for-remote-subnets-4 branch 2 times, most recently from 19fd9ef to 052c013 Compare September 7, 2026 11:46
@pierugo-dfinity
pierugo-dfinity force-pushed the pierugo/summary/remove-transcripts-for-remote-subnets-4 branch from 052c013 to a643fcd Compare September 7, 2026 14:21
@pierugo-dfinity
pierugo-dfinity force-pushed the pierugo/summary/remove-transcripts-for-remote-subnets-4 branch from a643fcd to 5fa4c49 Compare September 21, 2026 13:12
Base automatically changed from pierugo/summary/remove-transcripts-for-remote-subnets-3 to master September 21, 2026 16:02
@pierugo-dfinity
pierugo-dfinity force-pushed the pierugo/summary/remove-transcripts-for-remote-subnets-4 branch from 5fa4c49 to f0fbda1 Compare September 21, 2026 16:02
@pierugo-dfinity
pierugo-dfinity force-pushed the pierugo/summary/remove-transcripts-for-remote-subnets-4 branch from f0fbda1 to da45395 Compare October 5, 2026 09:44
@pierugo-dfinity
pierugo-dfinity marked this pull request as ready for review October 5, 2026 11:45
@pierugo-dfinity
pierugo-dfinity requested a review from a team as a code owner October 5, 2026 11:45
@zeropath-ai

zeropath-ai Bot commented Oct 5, 2026

Copy link
Copy Markdown

✅ No security or compliance issues detected. Reviewed everything up to da45395.

Security Overview
Detected Code Changes
Change Type Relevant files
Refactor ► rs/protobuf/def/types/v1/dkg.proto
    Modify Summary: add field 16 to reserved list and add new reserved name transcripts_for_remote_subnets_removed
► rs/protobuf/src/gen/types/types.v1.rs
    Update generated Summary struct: remove transcripts_for_remote_subnets_removed field existing in previous version (no longer present)
Refactor ► rs/types/types/src/consensus/dkg.rs
    Remove transcripts_for_remote_subnets_removed handling in From<&DkgSummary> for pb::Summary

@pierugo-dfinity
pierugo-dfinity added this pull request to the merge queue Oct 5, 2026
Merged via the queue into master with commit bf17c1c Oct 5, 2026
41 checks passed
@pierugo-dfinity
pierugo-dfinity deleted the pierugo/summary/remove-transcripts-for-remote-subnets-4 branch October 5, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants