--- title: 56/STATUS-COMMUNITIES name: Status Communities that run over Waku v2 status: draft category: Standards Track description: Status Communities allow multiple users to communicate in a discussion space. This is a key feature of the Status application. editor: Aaryamann Challani \ contributors: - Andrea Piana \ sidebar_position: 56 --- ## Abstract This document describes the design of Status Communities over Waku v2, allowing for multiple users to communicate in a discussion space. This is a key feature for the Status messaging app. ## Background and Motivation The purpose of Status communities, as specified in this document, is allowing for large group chats. Communities can have further substructure, e.g. specific channels. Smaller group chats, on the other hand, are out of scope for this document and can be built over [55/STATUS-1TO1-CHAT](../55/1to1-chat.md). We refer to these smaller group chats simply as "group chats", to differentiate them from Communities. For group chats based on [55/STATUS-1TO1-CHAT](../55/1to1-chat.md), the key exchange mechanism MUST be X3DH, as described in [53/WAKU2-X3DH](../../waku/standards/application/53/x3dh.md). However, this method does not scale as the number of participants increases, for the following reasons - 1. The number of messages sent over the network increases with the number of participants. 2. Handling the X3DH key exchange for each participant is computationally expensive. Having multicast channels reduces the overhead of a group chat based on 1:1 chat. Additionally, if all the participants of the group chat have a shared key, then the number of messages sent over the network is reduced to one per message. ## Terminology - **Community**: A group of peers that can communicate with each other. - **Member**: A peer that is part of a community. - **Admin**: A member that has administrative privileges. Used interchangeably with "owner". - **Channel**: A designated subtopic for a community. Used interchangeably with "chat". ## Design Requirements Due to the nature of communities, the following requirements are necessary for the design of communities - 1. The creator of the Community is the owner of the Community. 2. The Community owner is trusted. 3. The Community owner can add or remove members from the Community. This extends to banning and kicking members. 4. The Community owner can add, edit and remove channels. 5. Community members can send/receive messages to the channels which they have access to. 6. Communities may be encrypted (private) or unencrypted (public). 7. A Community is uniquely identified by a public key. 8. The public key of the Community is shared out of band. 9. The metadata of the Community can be found by listening on a content topic derived from the public key of the Community. 10. Community members run their own Waku nodes, with the configuration described in [Waku-Protocols](#waku-protocols). Light nodes solely implementing [19/WAKU2-LIGHTPUSH](../../waku/standards/core/19/lightpush.md) may not be able to run their own Waku node with the configuration described. ## Design ### Cryptographic Primitives The following cryptographic primitives are used in the design - - X3DH - Single Ratchet - The single ratchet is used to encrypt the messages sent to the Community. - The single ratchet is re-keyed when a member is added/removed from the Community. ## Wire format \