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

Leverage copy-on-write trees for data recovery #7

Open
Nuhvi opened this issue May 31, 2024 · 1 comment
Open

Leverage copy-on-write trees for data recovery #7

Nuhvi opened this issue May 31, 2024 · 1 comment
Assignees
Labels
exit homeserver migration and credible exit issues

Comments

@Nuhvi
Copy link
Collaborator

Nuhvi commented May 31, 2024

Since we will be using Merkle Treap for efficient verification and sync, we might as well use their copy-on-write nature, for versioning and data recovery.

There are two main scenarios where a user needs to recover data:

  1. Error
  2. Malicious homeserver

To recover from mistakes, homeservers can offer to keep up to n snapshots of each repo/drive as long as it fits within the user storage quota.

To recover from Malicious homeservers deleting all users data, there must be some mirror or archive pulling snapshots from the homeserver, however, it can't keep infinite amount of history, so the homeserver can create too many malicious versions of the data, that the mirrors drop all the older valid versions.

To avoid that, mirrors should sync a maximum number of snapshots from a homeserver, for example by only syncing once an hour and only getting the most recent version.

This way, mirrors offer users m number of days of history to recover within. Hopefully a user can notice their homeserver malice, and react quickly to migrate to another homeserver, or download their entire data if it is small enough to fit in their personal computer.

@Nuhvi Nuhvi self-assigned this May 31, 2024
@Nuhvi Nuhvi added the exit homeserver migration and credible exit issues label Jun 1, 2024
@Nuhvi
Copy link
Collaborator Author

Nuhvi commented Jun 3, 2024

Another way to leverage snapshots is; while migrating to another homeserver, a user can specify a specific snapshot from the old homeserver (usually the current one) for the new homeserver to keep no matter what the old homeserver does during migration, so once that snapshot is downloaded, the user is satisfied that this is enough to switch homeservers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exit homeserver migration and credible exit issues
Projects
None yet
Development

No branches or pull requests

1 participant