You are reading content from Scuttlebutt
@mix %ThjbfJz+Iwblex8czvFWC9Xal6zTnrgrKJ7Wt1ktPSE=.sha256

ssb-peer-invites in patchbay

I'm working on getting @dominic's ssb-peer-invites into #patchbay (finally)

challenges so far are that is seems to take ~2 minutes to generate a peer invite at the moment. This could be because of some ebt replication errors with pubs, but not sure...

Anyway, exciting.
Oh, and I've been refactoring the mess which was the /networks page into sections

User has chosen not to be hosted publicly
@mix %QifLvjhXu+ZC1wTUBF/OGoxkoN5sLdTzMXzXlRZpXOE=.sha256

Here's an example of a peer invite (for reference):

@mix %1vXsHzVorHMF34cvKQu26y243J/F5rcSmqYOzMQkCq8=.sha256

this references a peer-invite message I've published :

  "key": "%EK1CqwP4PttwdVkzgq3To2aBBMDAgCqP9HCL8Tli4VA=.sha256",
  "value": {
    "previous": "%Z4iHRXlWnwXzMFUAfmNLCCFNymEvbua8AQfk0XcC/mc=.sha256",
    "sequence": 25703,
    "author": "@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519",
    "timestamp": 1561889899730,
    "hash": "sha256",
    "content": {
      "type": "peer-invite",
      "invite": "@kKtLxHXAmC6qv9qpEQ2pmZehDXZP4zSYenKIW4MOltU=.ed25519",
      "host": "@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519",
      "signature": "rNLpKdrh0ax2is5BIyoY2stT7pjEnf9eGe+OcW6z3Ot10mNnwIdZrC4+xK5Azn+ky02B98/VqsETouLAe4NSAg==.sig.ed25519"
    "signature": "REHgOAAyPH1YUxIhif9xC3HyJO1IBgTKLlRMw6WL1xgqMdxKnMNBGx0M8eS/ktwUZ/zdyeqExzLSrglEZCowBQ==.sig.ed25519"
@mix %sORhjKQsd0LUDvHyVd9h9rSPCfTSK/Q44/FusRsPG6w=.sha256

hey @cel have you experimented with peer-invites? (I notice your pub is one of the ones which offers to be connecting peer.

I'm definitely hitting some bumps, would love to get this into a few clients and as many pubs as possible. If you've got any learning you've gleaned along the way, you love to hear

@Dominic %YXrPz6pNnKw0F63HN+RdOhl+iJ9E5soieFmGw3R+R3A=.sha256

@mix I bet the time it takes is because it looks for pubs that be willing to handle the initial sync,
I'm guessing that right now maybe not many pubs are running ssb-peer-invites?
hmm, in that invite I notice it's attached 7 pub addresses! it should only be 3... having a look to see why that is...

Okay I fixed some problems.
We need more pubs running ssb-peer-invites too, we should put it into the default ssb-server

@mix %ER55lKb2p7bFetqxbCnMxm0SnTym81o65Tti1eMbRBc=.sha256
Voted @mix I bet the time it takes is because it looks for pubs that be willing t
@cel %IvDpOUI78O4a4BkMHx5yxY03eUxJJAlc4eMZqUrbmqI=.sha256

@mixmix I have not actually used peer invites, just deployed the plugin on my pub. Have you had trouble using peer invites in connection with my pub?

@Jacob %Im45eTIbW7Eyct28QTIvSOnstX7UXtTiFr1z+DQZ7HI=.sha256

@mix Yes this is great mix, lots of notes would also be appreciated for when we're doing this in patchwork <3

@mix %6VPdYY8lGLK+S3misCwfHRN73IWXkMwissE9+8VhTWY=.sha256

No problems with your pub @cel was just wondering what your experience so far has been. I installed it in too.

@Powersource we're a way ahead of that! I'm planning get @mary some funding to work on improving the documentation + functionality via the maintenance grant I'm managing.

@Anders %ZzD5ySfk15lJsqRA9R3wkSxC0sPeoQ6Y9m3fYB6wy9g=.sha256
Voted ![ssb-peer-invites in patchbay](&YmDADh8TJYVNouL6v7cjEQ48yd2TfnjnKti5kYlw11
@Anders %IwG4GtadWmHUhsn+YJZBXs9D7/wnPtlTuVOTVrPl+0o=.sha256

Sweet @mix. Looking forward to testing this.

I did a new release of ssb-minimal-pub-server that includes all the modules needed to support peer-invites.

@Anders %mrGtnjLsU5HMtJu+AmcLJOiRs/xelm+XOJ7icH4dZtw=.sha256
Voted No problems with your pub [@cel](@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5
@Anders %ftRFnGgv3+nMIAOW9vWyQRWCpaMGGDqBHcICNQFIHBM=.sha256
Voted @mix I bet the time it takes is because it looks for pubs that be willing t
@Anders %KYtcEvhLbBZLA9A5+nZAFd0DNULW/2ci5lYwdAYDU+U=.sha256
Voted [@mix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519) Yes this is g
@mix %Dk6Vko5N6VLZlSXPntmJbu9oIbKaSy7yZSQRZ+/3gSs=.sha256
Voted Sweet [@mix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519). Lookin
@mix %3XAsnw7X+oGSCeaHx/fK9n34q5xPezTBx4e+s/UXu/4=.sha256

@dominic tried to progress that PR.

Also useful to know : I built out form stuff for openInvite and acceptInvite.... but openInvite didn't really work as advertised

  • called back with (null, msg, undefined)
  • expected cb with (null, msg, opened) (where openeded is something like { private, reveal } ?
@Dominic %DTgWvH//M2YGWMZmvMumZbqY9TMdX0SsUysFO9h3n68=.sha256

@mix I don't understand how that can happen. looking at the code, the cb should be either (err, null) or (null, msg, {private, reveal}) possibly {private: undefined, reveal: undefined}

@Dominic %fqzyltYHEpX+OcuN+0aSfynPIJtZQ61vAdzv8kU/IEg=.sha256

oh, now I remember. muxrpc just doesn't support more than one value argument on a callback. so it's just dropping the opened argument. I didn't notice this before because all the tests use an sbot directly.

@Gordon %VCY35FOp2B9T6Fg8l7oGbeprwg7Ry84j8/fp4t6mNs8=.sha256
Voted oh, now I remember. `muxrpc` just doesn't support more than one value argum
@mix %I3mHyHAanTZPNUJkaKHeXi+ha3fkFG8/qzvp+fsMQMA=.sha256

nice catch @dominic, yeah I did look into the tests and saw that none of the tests were checking for values of private / reveal coming through ... and that you were testing low level stuff methods, but not the higher level ones. Wouldn't have known about muxrpc.

Would that mean that acceptInvite also won't have access to those methods, and then not be able to publish anything about who introduced who? (I kinda assumed that this method would take care of publishing an introduction with the reveal automatically but I've been too busy getting things connected to read that part of the docs yet)

@Dominic %b11NXRFQSHPFTSJai3cZ2oMcjIefJz1DntBbUDagZ5w=.sha256

@mix I fixed everything and got the tests passing on travis and published ssb-peer-invites@2.0.0

@Gordon %BN1hYHllmDYdRm0Bx+ImKFGsVnju6fmQREzGDOwUa7A=.sha256
Voted @mix I fixed everything and got the tests passing on travis and published s
User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
@Gordon %KCl/WmrBxR8kfcanzXgIC02D5GqsrHn7Y9pCJXwAaVo=.sha256
Voted well, i mean, not right now.. i'll come back later ;-) but im looking forw
@Gordon %fRw1ZvKYX/qDk+GdyThFlpzVc2xfG4SG4QUf/Bmkg8M=.sha256
Voted OMG this is what i need right now, peer invites ;_)
@mix %ZMbM1q1hVgt/O3K4U4UBlyePWNVB6jUXZdEVyBTUsl0=.sha256
Voted OMG this is what i need right now, peer invites ;_)
@mix %N6PkT2uTFhLU2WfY4+2/VwZcAADd0E1xFi3JjWRFB3E=.sha256

hey @dominic have install ssb-peer-invites@2.0.0 in patchbay + pub, and it's now generating smaller invites, e.g. :


still took about 2 minutes to make

and I get an error when trying to run openInvite:

method:peerInvites,getInvite not in list of allowed method
  • tried running the ssb-peer-invites tests locally and they fail. If that's expected, that'd be good to know.
  • I had a look at the permissions, and see there's only willReplicate for anonymous uses, but also some sbot.auth.hook which I didn't understand.
@mix %K5+mKttKnkTIVY+0PkpTplpAtPQijyWDx27A/sJH3Z4=.sha256

@dominic oh nope, those pubs in that invite are perhaps running old versions of ssb-peer-invites. Edited the invite to point at my pub:


And openInvite works. Moving on to acceptInvite I see the following message published :

  "key": "%TnuKwcC8yEzo6PnPNULMRpmr/cUO7V7mNRjX/NTWBDI=.sha256",
  "value": {
    "previous": null,
    "sequence": 1,
    "author": "@dDMKJSiqhqVXRJm9E4vMlFQ1sJsulUfzZSfXQpQU3VA=.ed25519",
    "timestamp": 1562406989644,
    "hash": "sha256",
    "content": {
      "type": "peer-invite/accept",
      "receipt": "%dssZD9XJBIcwXYrMzekkLHDHHhSRtQN0Ck5yvB/UiHw=.sha256",
      "id": "@dDMKJSiqhqVXRJm9E4vMlFQ1sJsulUfzZSfXQpQU3VA=.ed25519",
      "key": "DUL3gNsj/eS3Rc/MDmo07tMGj7DoZf5QtmRG8LL5PIQ=",
      "signature": "4ogoEjwxgBLMRVymAFG9l2mCRgmG9Fhxvg/gwgtPI3fpRb6yfY4PJwwolH4LlO8WoS/f2iBqNbEp87C+wipmDw==.sig.ed25519"
    "signature": "FFId+uvASIkvt5TFSzPWSfkxULJUI8vcxJ4Zj6A1gF5+EnmZhExylSxO6n34QlmxpYNTdVXyjJzjbZH04RL3Ag==.sig.ed25519"

But then nothing happens - no connected are formed with my pub, and there's nothing in conn.json (the new gossip.json).

Over at, I see it's happily published the following :

  "key": "%TnuKwcC8yEzo6PnPNULMRpmr/cUO7V7mNRjX/NTWBDI=.sha256",
  "value": {
    "previous": null,
    "sequence": 1,
    "author": "@dDMKJSiqhqVXRJm9E4vMlFQ1sJsulUfzZSfXQpQU3VA=.ed25519",
    "timestamp": 1562406989644,
    "hash": "sha256",
    "content": {
      "type": "peer-invite/accept",
      "receipt": "%dssZD9XJBIcwXYrMzekkLHDHHhSRtQN0Ck5yvB/UiHw=.sha256",
      "id": "@dDMKJSiqhqVXRJm9E4vMlFQ1sJsulUfzZSfXQpQU3VA=.ed25519",
      "key": "DUL3gNsj/eS3Rc/MDmo07tMGj7DoZf5QtmRG8LL5PIQ=",
      "signature": "4ogoEjwxgBLMRVymAFG9l2mCRgmG9Fhxvg/gwgtPI3fpRb6yfY4PJwwolH4LlO8WoS/f2iBqNbEp87C+wipmDw==.sig.ed25519"
    "signature": "FFId+uvASIkvt5TFSzPWSfkxULJUI8vcxJ4Zj6A1gF5+EnmZhExylSxO6n34QlmxpYNTdVXyjJzjbZH04RL3Ag==.sig.ed25519"
@mix %EYxU2eMWrEuWlgwRFYVbDWGr9T5OgFEnP/94TciQHPM=.sha256

Oh, and I see I'm also friends with this new identity I invited, which is sweet.

So am I right in saying there's a missing final steps here which:

  1. pushes the details of the pub/ pubs in to connecting / recording for gossip connecting (in conn.json)
  2. publishes the reveal ... I think that should be me @mix which publishes that?

(1) is obviously the most important
(2) I'm definitely interested in because I'm interested in that idea of knowing who has invited / introduced who, but can't quite see how another peer would connect those dots at the moment

@Jacob %hTMBTO96zg7TFu+jgDnI8rltvUFS8wWntQPBRuVqtLA=.sha256

Would someone running a peer-invites pub mind following me with it? for testing @mix @Dominic @cel

@Jacob %U2G1Zc0ilZM43U4mqr+97FOswoTaU9imym2GEjP/7/A=.sha256

Getting this when simply loading peer-invites into patchwork (plus the modules the readme mentions)

TypeError: Cannot read property 'createLayer' of undefined
    at Object.exports.init (/home/me/prj/ssb/patchwork/node_modules/ssb-peer-invites/index.js:67:28)
    at /home/me/prj/ssb/patchwork/node_modules/secret-stack/api.js:33:28
    at Array.forEach (<anonymous>)
    at create (/home/me/prj/ssb/patchwork/node_modules/secret-stack/api.js:32:20)
    at module.exports (/home/me/prj/ssb/patchwork/lib/server-process.js:53:11)
    at <anonymous>:20:9
    at WebFrame.(anonymous function) [as executeJavaScript] (/home/me/prj/ssb/patchwork/node_modules/electron/dist/resources/electron.asar/renderer/api/web-frame.js:56:27)
    at resolve (/home/me/prj/ssb/patchwork/node_modules/electron/dist/resources/electron.asar/renderer/web-frame-init.js:15:33)
    at new Promise (<anonymous>)
    at EventEmitter.ipcRenderer.on (/home/me/prj/ssb/patchwork/node_modules/electron/dist/resources/electron.asar/renderer/web-frame-init.js:14:5)

Line of code that breaks is here. Is it breaking because patchwork is using its own friends plugin? What do? @Christian Bundy

@mix %lfw6uWKTX9osBHEtAjjXmj11biTn1nPI58CYfIVFVII=.sha256

yes @Powersource I think you need ssb-friends

sent you an invite for our coop pub

@Jacob %+Lad1L3WFnChbf57GdWkMxWW1veHo9nOIJt1w10bjcw=.sha256

@mix I'm still unsure how all this fits together. Do you think I could just install ssb-friends and stuff would work? Would other stuff break?

@Dominic %o2/x7rjm13kRpwLM/MSmCGc5UpGBO4WviTDhRwJC5/k=.sha256

@mix it isn't actually ment to publish the reveal, instead it publishes the key to the reveal, which you can use to extract the revealed reveal (and ssb-peer-invites uses this to validate the peer-invite/accept message)

for 1) need to add the pub addresses from the invites require('ssb-peer-invites/util').parse(address).pubs.forEach(function (addr) { sbot.gossip.add(addr) }) hmm, I guess that should happen after the invite is successfully accepted.

@mix %B6vGDDItFFnrPoGdR1NWHYWWuKM5sFohsPWhvvHO2/o=.sha256

hey @Powersource I'm in the middle of trying to understand this, can't explain at the moment. You would need to rip out the custom ssb-friends in Patchwork. Look at the sbot plugins. I can loop back once I have more of an idea what's going on. Also hoping to work with @mnin on documenting and streamlining ssb-peer-invites as a piece of maintenance work. Stay tuned. Perhaps start a Patchwork specific thread so those details don't get muddled with these other details <3

yes I agree gossip.add should happen.. otherwise the whole thing was for nothing and the new peer has no-one to connect to. I would also expect a connection to be started - not sure if that will auto-happen or if that needs to explicitly called too.

re (2) I saw the private come out with openInvite callback. If reveal isn't auto-published I don't think it's got any practical use. Thoughts?

@mix %/lorCf11O4aC/FIa1UZ6IMLqWriCScdLU6E27Supt+o=.sha256

oh ... published the key to the reveal..I didn't know what the key attribute was on that message, that makes more sense! is there a method which knows how to take an accept message and get details about the invite. Building UI, I'd want :

  • who invited them
  • what their new identity is
  • what the decrypted reveal said

we can come to that once we've got gossiping working though

@Dominic %DECMKAQvq7VyvFvaHAGLdZ3ord7XJ69zvGXxsBnp/2A=.sha256

@mix it's just require('ssb-peer-invites/util').unbox(invite.content.reveal, accept.content.key)

@cryptix %jnOR4b2aYynxjzKdH5JbhIMetMrykQtewvB7CgI+xDQ=.sha256

Really happy to see progress on this front!! Lots of heromoji hearts to @mix et al.

A bit off-topic but still felt like sharing: I managed to implement the server/pub portion of these invites in #go-ssb two weeks ago but am currently busy overhauling the offchain msgs proposal. New one should follow this week.

@mix %WS9lxJ63cEGnm1Nh138p6VFMWzZkIMdcdqXAmTXsFuo=.sha256
Voted Really happy to see progress on this front!! Lots of heromoji hearts to [@m
@mix %t2IzzzamG8g/tVz8zLZof4rdlnCmfVbLgLeBsIO6tuw=.sha256
Voted @mix it's just `require('ssb-peer-invites/util').unbox(invite.content.revea
@mix %ovdEkzeD+pCx1SGbVmWeKcI6vkyKjSCf2ivMViu2XfE=.sha256

thanks @dominic. I'll try that out and confirm it all works here. I think at some stage I might like to document that well, or find a good place to put a helper method which just manages all of that for you - as in just give it an accept message and it shows you everything a client might want to show

@mix %KJQQihwBF2BUhv0M3/fLrWaAduEumJ2IAjkEr8zKasI=.sha256

@dominic here's a PR which is my best attempt at progressing the auto-connect :

I might need help because testing does not work locally so short of manually testing this (several minutes per iteration), I'm a little blind.

Ok after trying to debug via travis D: I've written something crude which just connects to all the pubs in the invite (I think). Keen to get this merged and move on to better onboarding before dweb camp!

@mix %Jdz4rYsVwB5fPFZgOuQ6lpaOlbR8lOQqz2E+whNPdYA=.sha256

ok the UI is about ready to go ... not perfect but use-able.



Now just need to get that PR tested and merged. I think I might merge the UI side of this so I can focus on some onboarding work & an new installers before #dweb-camp

please don't use this with friends and family for onboarding yet (the PR this is waiting on makes this actually work ...)

User has chosen not to be hosted publicly
Join Scuttlebutt now