Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Thoughts on #SameAs

Preamble

I am not a particularly good coder. As such take these as a suggestion of what could be, not what is happening! If this were to be accepted, it would need to be adopted by all the SSB clients (ssb-server, manyverse, etc). Also, this may be extremely simplistic and may produce far too many messages to the pool very quickly!

I asked on the Scuttlebutt IRC channel, and it was suggested that @MixMix might be interested in this?

Actors

This proposal will assume there are three participating SameAs devices ("actors"):

  1. laptop
  2. phone
  3. tablet

It also assumes that there is at least two other peers ("actors") that observes this:

  1. friend-peer
  2. follower-peer

Process

  1. The first SameAs device (Laptop) creates a SameAs invite, and shares in, pub-invite-like to the second device (Phone).

  2. Phone enters the invite, which ensures that Laptop and Phone trust each other, follow each other, and confirm they are in-fact, SameAs.

  3. Phone and Laptop both send a SameAs message for the opposing member.

  4. (optional) Phone and Laptop sync following/blocking/ignoring/SameAs lists and ensure both are following/etc. the same peers.

  5. One of the two SameAs devices (Laptop) creates a new SameAs invite and sends it to Tablet (but the reverse could also be true - i.e. Tablet could send an invite to Laptop).

  6. Tablet accepts the SameAs invite and syncs with Laptop, and observes there is a SameAs peer. As Laptop and Phone are considered SameAs, Tablet also becomes SameAs Phone, because it syncs with Laptop.

  7. Tablet and Laptop both send a SameAs message. Phone observes the SameAs message and sends a SameAs message too.

  8. Friend-peer (who is friend-of Laptop) sees two SameAs messages about Tablet and Phone and automatically follows both devices. Tablet and Phone have both also sent follow messages to Friend-peer, because they have sync'd state with Laptop.

  9. Follower-peer (who follows Phone) sees two SameAs messages about Laptop and Tablet. It automatically follows both Laptop and Tablet because it trusts the message from Phone.

  10. Follower-peer disagrees with messages from Tablet, and so blocks Tablet. Follower-peer has a record of the SameAs message about Laptop and Phone so blocks both of those devices too.

  11. Tablet is sold (lost, stolen, broken, etc), and Laptop realises they forgot to revoke the SameAs. They can send a de-invite message, which is seen by all SameAs peers (Phone) who also de-invite Tablet. If Tablet is recovered, it MUST go through the SameAs process again, as all participants will see it as no longer being SameAs.

  12. Eve wants to be treated as SameAs Phone, so broadcasts a SameAs Phone message. Friend-peer looks for a matching SameAs message from Phone but doesn't see it. Until the SameAs message is seen by Phone too, it is not treated as SameAs.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.