Jesse Lawson

buy me a coffee ☕ / GitHub / Mastodon

Nov 13, 2022

Designing an account import feature for Mastodon

#Mastodon #Fediverse #Account Portability

I’ve been working on a project called the Web Archive Integrity Tool (WAIT), a system that allows two Mastodon servers to fully migrate an account from one instance to another – not just one’s followers and followees, but also the entirety of the content they’ve published as well.

Here’s how it works:

  1. The exporting server stores a hash of the user’s archive along with the archive itself.

  2. The importing server receives the archive from the migrating user, and queries the originating server for the hash.

  3. Both the importing and exporting servers validate that the archive is indeed the archive that matches the hash (both servers validate this independently then together).

  4. Upon successful validation, the importing server stages upload into an ephemeral db, and awaits human validation.

  5. A human validates the import data and finishes the import.

Some caveats/notes:

  • The human validation is necessary to actually read the content to scrub for hate speech, bigotry, etc. Never trust a computer to do this part.
  • A lot of the work here has involved fundamentally changing the way accounts are imported and exported, and how servers communicate with each other about transient accounts.
  • From what I can see of the ActivityPub spec, server-to-server archive transference wasn’t ever in scope.
  • This project is about solving the instance availability problem (in which an instance going down means everyone on that instance goes down) in a different kind of way.

I might have something to demo sometime next year depending on how things go. If you’re interested in following along, follow me on Mastodon.