Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XIP-31: Message History request system #65

Merged
merged 5 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions XIPs/assets/xip-31/message-backup-providers-flow.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sequenceDiagram
Participant B as Backup Requester
Participant S as Backup Storage Provider
Participant N as XMTP Network
Participant M as Message Backup Provider
B->>N: Send a MessageHistoryBackupRequest to each potential Message Backup Provider
M->>N: Check for MessageHistoryBackupRequest
N-->>M: Receive MessageHistoryBackupRequest
M->>S: Upload backup file
M->>N: Send MessageHistoryBackupResponse
B->>N: Check for MessageHistoryBackupResponse
N-->>B: Receive response
B->>S: Request file from URL in response
S-->>B: Receive file
B-->>B: Decrypt and load file into database
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions XIPs/assets/xip-31/message-history-actors.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
classDiagram
class R["Backup Requester"]{
The new installation requesting missing messages
Responsible for selecting a Backup Storage Provider and obtaining authorization
Creates MessageHistoryBackupRequests
Reads MessageHistoryBackupResponses
}
class M["Message Backup Provider"]{
An existing installation that has access to message history
Reads MessageHistoryBackupRequests
Creates MessageHistoryBackupResponses
Uploads Message Backup Files to the pre-selected storage provider
Responsible for generating one-time encryption keys
}
class S["Backup Storage Provider"]{
A cloud service with durable storage
Stores encrypted backups for a few days
Responsible for authenticating requests to reduce abuse
}
Binary file added XIPs/assets/xip-31/message-history-actors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading