Skip to content

Commit

Permalink
Add XIP-31: Message History request system (#65)
Browse files Browse the repository at this point in the history
* first pass

* Update XIPs/xip-31-message-history.md

Co-authored-by: J-Ha <[email protected]>

* XIP-31 updates

* Remove question from XIP-31

---------

Co-authored-by: Ry Racherbaumer <[email protected]>
Co-authored-by: Ry Racherbaumer <[email protected]>
  • Loading branch information
3 people authored Oct 2, 2024
1 parent 5028e6c commit 38d3130
Show file tree
Hide file tree
Showing 5 changed files with 445 additions and 0 deletions.
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

0 comments on commit 38d3130

Please sign in to comment.