Available on crate feature
extensions-draft and crate feature virtual-clients-draft and (32-bit or 64-bit) only.Expand description
Virtual-clients commit data (mls-virtual-clients draft): the Safe AAD item a virtual client attaches to a commit to declare its in-use derivation epochs and the actions the commit performs. Virtual-clients commit data (mls-virtual-clients draft).
A virtual client attaches this struct to a commit as a Safe AAD item under
VC_COMPONENT_ID. It tells the sibling emulators which derivation epochs
the author still uses and which actions the commit performs.
enum {
reserved(0),
key_package_upload(1),
new_derivation_epoch(2),
(255)
} ActionType;
struct {
ActionType action_type;
select (VirtualClientAction.action_type) {
case key_package_upload:
KeyPackageUpload key_package_upload;
case new_derivation_epoch:
struct{};
};
} VirtualClientAction;
struct {
opaque epoch_id<V>;
} VcEpochReference;
struct {
VcEpochReference in_use_epochs<V>;
} VcEpochUsage;
struct {
optional<VcEpochUsage> epoch_usage;
VirtualClientAction actions<V>;
} VirtualClientCommitData;Entries of a VcEpochUsage are unique and sorted, and a
VirtualClientCommitData carries at most one new_derivation_epoch
action. Both rules are enforced on construction and on deserialization.
Structs§
- VcEpoch
Reference - A reference to a derivation epoch by its
EpochId. - VcEpoch
Usage - The set of derivation epochs the author of a commit still uses.
- Virtual
Client Commit Data - What a virtual client tells its siblings about a commit it authored.
Enums§
- VcCommit
Data Error - Errors that can occur when building or parsing a
VirtualClientCommitData. - Virtual
Client Action - One action a virtual client’s commit performs.