git ssb

0+

Dominic / ssb-peer-invites



Commit 478a1872ed9ecb972d3be8785bb5694341e22b2e

more notes

Dominic Tarr committed on 3/14/2018, 7:07:38 AM
Parent: b5341b7884d950c13e5fc0ff8d0292ec9d8f27d6

Files changed

README.mdchanged
README.mdView
@@ -1,6 +1,25 @@
11 # user-invites
22
3 +when ssb was younger, we created the current invite system,
4 +henceforth in this document referred to as the "followbot" system.
5 +special peers called "pubs" can create tokens called "invite codes".
6 +The invite code allows a new person to connect to the pub, and
7 +request a follow.
8 +
9 +This generally worked fairly well, but had some problems:
10 +
11 +* not clear who invited who.
12 +* people were confused about what a "pub" was
13 +* sometimes pubs failed to follow back.
14 +* some pubs more inviting than others "too open"
15 +* hard to tell if growth was word of mouth or not
16 +
17 +## solution: user-invites
18 +
19 +These are invites created directly by _users_ to directly
20 +invite one new person.
21 +
322 * user creates invite, publishes stub, sends invite to guest
423 * guest publishes voucher, which uses accept
524 * guest calls pub passes accept message directly.
625 * peers can strongly link invite with stub
@@ -97,8 +116,11 @@
97116 you should discuss with the host (person who invited you).
98117 If you don't accept their invite as is, there should be
99118 some back-and-forth.
100119
120 +Problem: alice wants to also give some private information to bob,
121 +for example, a welcome message, or to add bob to a private group (coming soon)
122 +
101123 ---
102124
103125 ## interactions with pubs.
104126
@@ -114,8 +136,23 @@
114136 (is this a message pointing to the stub and the stub signature?)
115137
116138 ---
117139
140 +Notes on [sameAs](https://github.com/ssbc/ssb-same-as#assert-that-you-are-the-same-as-another-feed)
141 +
142 +two peers create messages pointing to each other,
143 +``` js
144 +{
145 + type: 'contact',
146 + sameAs: other_feed
147 +}
148 +```
149 +
150 +if `other_feed` has a sameAs pointing back to this one,
151 +then the feeds are considered merged.
152 +
153 +---
154 +
118155 question: what is the pub policy?
119156
120157 the pub should follow anyone who they would have replicated,
121158 because of their standing follow policy.
@@ -124,9 +161,37 @@
124161 connect and give you the thing. The invite should include
125162 multiple pubs (say, 3?).
126163 ---
127164
165 +Alice creates joins the network using Pub, which is run by Charles.
128166
167 +Alice creates an invite, and sends it to Bob, with the Pub address
168 +on it.
169 +
170 +Bob connects to the Pub, and convinces it that he was invited by alice.
171 +Bob remembers the pub's address, for the future.
172 +
173 +Dawn follows Charles and Alice. She sees the sameAs message that
174 +links Pub to Charles. He replicates Pub, and sees it has a public
175 +address. (type: 'address', ...). When she wants to sync Bob or Alice
176 +she connects to Pub.
177 +
178 +Dawn sees that Alice has created an invite, but she doesn't know who
179 +it is yet. But then she sees that Pub has acknowledged a reciept
180 +for that invite. Dawn retrives the reciept via ooo, and discovers
181 +Bob. Since she replicates Alice, this is the second hop from here,
182 +so she replicates Bob, and says "HI"
183 +
184 +---
185 +
186 +subsystems:
187 +
188 +sameAs - link a pub with a uxer id.
189 +address - a pub advertises it's public address.
190 +invite/invite-receipt - uxer creates and invite, and a new uxer accepts it.
191 +
192 +---
193 +
129194 function createInvite (name, cb) {
130195 var keys = generate()
131196
132197 publish(signObj({
@@ -150,4 +215,8 @@
150215
151216
152217
153218
219 +
220 +
221 +
222 +

Built with git-ssb-web