Skip to content

Channels not using CRDT-like group synchronization may result in losing members in multi-device setups #7954

@link2xt

Description

@link2xt

If you have two devices that handle QR invites into the channel, and Bob1 subscribes via device 1 and then Bob2 subscribes via device 2 at the same time, device 1 and device 2 will each send a sync message with only Bob1 or Bob2:

core/src/securejoin.rs

Lines 655 to 659 in 5f84be7

if chat.typ == Chattype::OutBroadcast {
// We don't use the membership consistency algorithm for broadcast channels,
// so, sync the memberlist when adding a contact
chat.sync_contacts(context).await.log_err(context).ok();
} else {

These SetPgpContacts messages do not have per-member timestamps, so they are not merged, but overwrite the whole chatlist:

core/src/chat.rs

Lines 5107 to 5110 in 5f84be7

/// Set chat contacts by their fingerprints.
///
/// The list is a list of pairs of fingerprint and address.
SetPgpContacts(Vec<(String, String)>),

Slightly related to just opened issue #7952

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions