Commit 478a1872ed9ecb972d3be8785bb5694341e22b2e
more notes
Dominic Tarr committed on 3/14/2018, 7:07:38 AMParent: b5341b7884d950c13e5fc0ff8d0292ec9d8f27d6
Files changed
README.md | changed |
README.md | ||
---|---|---|
@@ -1,6 +1,25 @@ | ||
1 | 1 … | # user-invites |
2 | 2 … | |
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 … | + | |
3 | 22 … | * user creates invite, publishes stub, sends invite to guest |
4 | 23 … | * guest publishes voucher, which uses accept |
5 | 24 … | * guest calls pub passes accept message directly. |
6 | 25 … | * peers can strongly link invite with stub |
@@ -97,8 +116,11 @@ | ||
97 | 116 … | you should discuss with the host (person who invited you). |
98 | 117 … | If you don't accept their invite as is, there should be |
99 | 118 … | some back-and-forth. |
100 | 119 … | |
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 … | + | |
101 | 123 … | --- |
102 | 124 … | |
103 | 125 … | ## interactions with pubs. |
104 | 126 … | |
@@ -114,8 +136,23 @@ | ||
114 | 136 … | (is this a message pointing to the stub and the stub signature?) |
115 | 137 … | |
116 | 138 … | --- |
117 | 139 … | |
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 … | + | |
118 | 155 … | question: what is the pub policy? |
119 | 156 … | |
120 | 157 … | the pub should follow anyone who they would have replicated, |
121 | 158 … | because of their standing follow policy. |
@@ -124,9 +161,37 @@ | ||
124 | 161 … | connect and give you the thing. The invite should include |
125 | 162 … | multiple pubs (say, 3?). |
126 | 163 … | --- |
127 | 164 … | |
165 … | +Alice creates joins the network using Pub, which is run by Charles. | |
128 | 166 … | |
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 … | + | |
129 | 194 … | function createInvite (name, cb) { |
130 | 195 … | var keys = generate() |
131 | 196 … | |
132 | 197 … | publish(signObj({ |
@@ -150,4 +215,8 @@ | ||
150 | 215 … | |
151 | 216 … | |
152 | 217 … | |
153 | 218 … | |
219 … | + | |
220 … | + | |
221 … | + | |
222 … | + |
Built with git-ssb-web