Skip to main content

Module migration

Module migration 

Source
Expand description

Shared types, errors, and encoding helpers for the app-data migration synthesis path.

Structs§

CanonicalBootstrapExpectation
The receiver-side bootstrap expectation. The validator picks the comparison strategy per component:

Enums§

MigrationError
Errors produced by the synthesis functions in this module.

Functions§

decode_group_membership_delta
Decode a GROUP_MEMBERSHIP wire payload (a TlsMapDelta<InboxId, VLBytes> of all-Insert mutations against an empty prior — bootstrap shape) back to a BTreeMap<InboxId, GroupMembershipEntry>. Used by the bootstrap validator to inspect the proposal payload.
decode_group_membership_dict
Decode GROUP_MEMBERSHIP dict-storage bytes (a TlsMap<InboxId, VLBytes> snapshot) back to a BTreeMap<InboxId, GroupMembershipEntry>. Used by readers walking the AppData dictionary post-bootstrap.
encode_group_membership_delta
Encode GROUP_MEMBERSHIP for the bootstrap wire payload as a TlsMapDelta<InboxId, VLBytes> of all-Insert mutations — one per inbox, each value a GroupMembershipEntry envelope (currently always wrapping a V1).
encode_group_membership_dict
Encode GROUP_MEMBERSHIP dict-storage bytes as a TlsMap<InboxId, VLBytes> snapshot. The dict always holds the raw map as state; this encoder is the symmetric of decode_group_membership_dict and is used by tests and by callers that need to construct expected dict bytes (the runtime path goes through apply_app_data_update_payload, which produces the same snapshot from a wire delta).
synthesize_canonical_subset_for_validation
Compute the CanonicalBootstrapExpectation from a pre-flip group’s state. Sync, fully local — no API calls — so every honest receiver produces bit-identical output.
synthesize_canonical_subset_from_extensions
Extensions-only variant of synthesize_canonical_subset_for_validation. Lets tests exercise synthesis without standing up a real MLS group.
synthesize_registry_from_policy_set
Produce a populated ComponentRegistry from the legacy PolicySetProto. Deterministic: every honest peer synthesizes bit-identical output from the same input.