From d417717926175dc4d635fa35370053b474ca4cab Mon Sep 17 00:00:00 2001 From: Jazz Turner-Baggs <473256+jazzz@users.noreply.github.com> Date: Wed, 28 May 2025 15:14:48 -0700 Subject: [PATCH] Add Chat SDK milestone and FURPS --- FURPS/application/chat_sdk.md | 38 +++++++++++++++ FURPS/application/group_chat.md | 31 ++++++++++++ draft-roadmap/chatsdk_groups.md | 72 +++++++++++++++++++++++++++ draft-roadmap/create_chat_sdk.md | 83 ++++++++++++++++++++++++++++++++ 4 files changed, 224 insertions(+) create mode 100644 FURPS/application/chat_sdk.md create mode 100644 FURPS/application/group_chat.md create mode 100644 draft-roadmap/chatsdk_groups.md create mode 100644 draft-roadmap/create_chat_sdk.md diff --git a/FURPS/application/chat_sdk.md b/FURPS/application/chat_sdk.md new file mode 100644 index 0000000..455ea37 --- /dev/null +++ b/FURPS/application/chat_sdk.md @@ -0,0 +1,38 @@ +# Chat SDK + +## Functionality + +1. Accounts can be created in a permissionless way, to communicate on the network. +2. Accounts can send messages to conversations with one other participant. +3. All conversations benefit from forward secrecy and post-compromise security. +4. Sender gets confirmation of message reception by recipient device. +5. Developers can create their own payload types or use supplied basic types. +6. Sdk contains a default message database for developers. +7. Sdk contains a default secrets database for developers. + +## Usability + +1. Secure session setups are non-interactive, allowing messages to be sent without waiting for the recipient's device to come online. +2. Conversations are initiated by sharing invite links out-of-band. +3. Minimal example of the ChatSDK is no more than 25 lines of code. + +## Reliability + +1. Participants in a conversation can eventually determine whether they missed messages. + +## Performance + +1. 10K active SDK users on a single shard add no more than an average of 10Mbps to the total bandwidth; based on clients generating 100 Character ChatMessages, 4 times per minute. + +## Supportability + +1. Messaging integrates Waku RLN, supporting configuration, and limited outbound message per epoch. +2. Payload definitions are versioned to support future protocol updates. +3. library can be used in Go applications +4. library can be used in Rust applications + +## +Privacy + +1. Non-participants in the conversation cannot correlate individual messages to a sender. +2. Non-participants in the conversation cannot correlate conversation to participants. +3. Network observers cannot aggregate account holder activity. \ No newline at end of file diff --git a/FURPS/application/group_chat.md b/FURPS/application/group_chat.md new file mode 100644 index 0000000..50e1e84 --- /dev/null +++ b/FURPS/application/group_chat.md @@ -0,0 +1,31 @@ +# Group Chat + +## Functionality + +1. Accounts can receive a message in multiple locations (e.g. devices) by registering new installations. +2. Accounts can view and remove installations as needed. +3. Accounts can create GroupChats between multiple accounts. +7. Participants can set a group name and description for all participants in the group. +8. Account can view all provisioned installations. +9. Account can revoke other installations in case of a lost device. + +## Usability + + +## Reliability + +1. Group Participants in a conversation can tell if a message is missing, and who sent it. + +## Performance + +1. The number of network messages for a single outbound group message does not scale with the number of group members. + +## Supportability + +1. Developers can create group conversations from Go Applications +2. Developers can create group conversations from Rust Applications + +## +Privacy + +1. Non-participants cannot correlate a group conversation to any of its participants. +2. No identifying information is visible when registering an installation. \ No newline at end of file diff --git a/draft-roadmap/chatsdk_groups.md b/draft-roadmap/chatsdk_groups.md new file mode 100644 index 0000000..aae0e6e --- /dev/null +++ b/draft-roadmap/chatsdk_groups.md @@ -0,0 +1,72 @@ +# Extend ChatSDK with GroupChat + +**Estimated date of completion**: 2025/11/18 + +**Resources Required for 2025H2**: +- 1 Chat Research +- 1 Engineer + +**Risks** +- (Schedule)(Medium) - Task Dependency: This task is dependent on [ChatSDK - Developer Preview](/draft-roadmap/create_chat_sdk.md). Delays there will translate into delays in this project. + +- (Technical)(Medium) - Lack of Libraries: There currently does not exist the required libraries in Nim to build groupchat. This will involve evaluating the potential of calling an existing library via FFI or implementing it from scratch. This can be mitigated by vetting existing library potential should occur early or finding security reviewers for nim implemented cryptography. + +- (Technical)(Low) - Group chat is prone to bugs, even when using existing encryption protocols. Extra time has been alocated to testing and debugging in an effort to mitigate this, however it still remains a risk. + +This milestone is complete when apps like Status can build a chat experience which includes support for multiple device, and multiple participants. + +This is not intended to mark the end of ChatSDK development, but a usable sdk for intial builders. + + +**FURPS**: [Group Chat](/FURPS/application/group_chat.md) + +**GitHub Milestone and deliverables**: + +## [Group Chat ](https://github.com/waku-org/pm/issues/) + +**Owner**: Chat Research + +**Feature**: [Group Chat](/FURPS/application/group_chat.md) + +**FURPS**: + +- F1. Accounts can receive a message in multiple locations (e.g. devices) by registering new installations. +- F2. Accounts can view and remove installations as needed. +- F3. Accounts can create GroupChats between multiple accounts. +- F4. Participants can set a group name and description for all participants in the group. +- F5. Account can view all provisioned installations. +- F6. Account can revoke other installations in case of a lost device. + +- R1. Group Participants in a conversation can tell if a message is missing, and who sent it. + +- P1. The number of network messages for a single outbound group message does not scale with the number of group members. + +- +PRIV1. Non-participants cannot correlate a group conversation to any of its participants. +- +PRIV2. No identifying information is visible when registering an installation. + +**Checklist**: +- [ ] Specs: link to specs and/or API definition +- [ ] Code: link to GitHub issues/PRs/Epic +- [ ] Dogfood: link to dogfooding session/artefact +- [ ] Docs: links to README.md or docs.waku.org (TBD) + + +## [Group Chat - Bindings ](https://github.com/waku-org/pm/issues/) + +**Owner**: Chat Eng + +**Feature**: [Bindings](/FURPS/application/chat_sdk.md) + +**Dependencies**: [ChatSDK - GroupChat ] + +**FURPS**: + +- S1. Developers can create group conversations from Go Applications +- S2. Developers can create group conversations from Rust Applications + + +**Checklist**: +- [ ] Specs: link to specs and/or API definition +- [ ] Code: link to GitHub issues/PRs/Epic +- [ ] Dogfood: link to dogfooding session/artefact +- [ ] Docs: links to README.md or docs.waku.org (TBD) diff --git a/draft-roadmap/create_chat_sdk.md b/draft-roadmap/create_chat_sdk.md new file mode 100644 index 0000000..7274fc5 --- /dev/null +++ b/draft-roadmap/create_chat_sdk.md @@ -0,0 +1,83 @@ +# Create MVP ChatSDK + +**Estimated date of completion**: 2025/08/19 + +**Resources Required for 2025H2**: +- 1 Chat Research +- 1 Engineer + +**Risks** +- (Schedule)(High) - Lack of Nim experience: Nim is a new language to many who will be performing this work, and will require skillup to be effective. Delays and high bug counts are possible due to underestimating effort required to become proficient. Leveraging existing nim knowledge on the team will help mitigate this risk. + +- (Organizational)(Medium) - Direction Alignment: Currently the chat usecase does not have a Security Model and Privacy Model defined from which to drive development. These will need to be drafted while work begins. Given these documents will have wider impact in the org and community there is a risk that consensus will take longer than anticipated, stalling development. Mitigation involves documenting the targeted approach and socializing it as early as possible. Following the Protocol Design Framework outlined for chat usecases will help decompose work areas making partial consensus easier to reach. + +- (Schedule)(Medium) - Cryptographic Primitives: There is an assumption that the cryptographic libraries needed for the success of this project are available and in a usuable state. To mitigate, early tasks will involve spikes to find appropriate libraries and derisk their usage their state. Extra time spent preparing crypto libraries / porting will result in delays. + +- (Technical)(Low) - Uncertain Performance: Performance targets for bandwidth are hard to quantify at this stage. They are listed as `P1` in the FURPS. While these targets appear reasonable (125 bytes per second per user) that remains to be seen. This is hard to mitigate as the SDK cannot be profiled until late in the developement cycle, making adjustments difficult. + +This milestone is complete when a development preview of the Chat SDK is published and made available to the community. + +The SDK is intentionally minimal—focused solely on proving the usability of the core approach. It supports 1:1 chat with out-of-band contact discovery and includes supporting implementations to help developers get up and running quickly. + +The primary goal is to deliver a usable library that developers can build with today, while laying a flexible foundation for future extensions such as group chats and identity. Releasing early as possible maximizes feedback time and interation speed. + +Motivations for the work are described [here](https://forum.vac.dev/t/chatsdk-motivations/501). + + +**FURPS**: [ChatSDK](/FURPS/application/chat_sdk.md) + +**GitHub Milestone and deliverables**: + +## [ChatSDK - Developer Preview ](https://github.com/waku-org/pm/issues/) + +**Owner**: Chat Research + +**Feature**: [Chat SDK](/FURPS/application/chat_sdk.md) + +**FURPS**: +- F1. Accounts can be created in a permissionless way, to communicate on the network. +- F2. Accounts can send messages to conversations with one other participant. +- F3. All conversations benefit from forward secrecy and post-compromise security. +- F4. Sender gets confirmation of message reception by recipient device. +- F5. Developers can create their own payload types or use supplied basic types. +- F6. Sdk contains a default message database for developers. +- F7. Sdk contains a default secrets database for developers. + +- U1. Secure session setups are non-interactive, allowing messages to be sent without waiting for the recipient's device to come online. +- U2. Conversations are initiated by sharing invite links out-of-band. +- U3. Minimal example of the ChatSDK is no more than 25 lines of code. + +- R1. Participants in a conversation can eventually determine whether they missed messages. + +- P1. 10K active SDK users on a single shard add no more than an average of 10Mbps to the total bandwidth; based on clients generating 100 Character ChatMessages, 4 times per minute. + +- S1. Messaging integrates Waku RLN, supporting configuration, and limited outbound message per epoch. +- S2. Payload definitions are versioned to support future protocol updates. + +**Checklist**: +- [ ] Specs: link to specs and/or API definition +- [ ] Code: link to GitHub issues/PRs/Epic +- [ ] Dogfood: link to dogfooding session/artefact +- [ ] Docs: links to README.md or docs.waku.org (TBD) + + +## [ChatSDK - Bindings ](https://github.com/waku-org/pm/issues/) + +**Owner**: Chat Eng + +**Feature**: [Bindings](/FURPS/application/chat_sdk.md) + +**Dependencies**: [ChatSDK - Developer Preview ] + +**FURPS**: + +For library ChatSDK: +- U3. Minimal example of the ChatSDK is no more than 25 lines of code. +- S3. library can be used in Go applications. +- S4. library can be used in Rust applications + +**Checklist**: +- [ ] Specs: link to specs and/or API definition +- [ ] Code: link to GitHub issues/PRs/Epic +- [ ] Dogfood: link to dogfooding session/artefact +- [ ] Docs: links to README.md or docs.waku.org (TBD)