ssbc / secret-stack

connect peers to each other using secret-handshakes
MIT License
90 stars 19 forks source link

make manifest a public muxrpc API #71

Closed staltz closed 3 years ago

staltz commented 3 years ago

Context

Manifest bootstrapping has been a muxrpc feature since Dec 2017, but its usage hasn't been effectively enabled in the SSB ecosystem, and that's because secret-stack actually just assumes the remote peer has the same manifest as the local peer. Anyway, this feature has been possible for others to use because secret-stack implements it as a muxrpc API.

Problem

One specific solution to a specific problem in go-ssb has been to use manifest bootstrapping on remote peers (possible and often JS peers) in order to know what muxrpc methods can be called.

Unfortunately, upon go-ssb attempting to call manifest() on a remote JS peer, we got the following error logged in go-ssb:

Apr 16 14:30:55 hermiesclub gossbroom[18542]: level=warn remote="IPADDR:PORT|@SSB
FEED=.ed25519" call=manifest reqID=1 event="manifest request failed to read" err=
"muxrpc CallError: Error - method:manifest is not in list of allowed methods"

Solution

We need to make the manifest muxrpc method publicly accessible to "anonymous" peers. I tested this change in production and the above go-ssb error does not show anymore.

staltz commented 3 years ago

cc @cryptix

christianbundy commented 3 years ago

Unfortunately, upon go-ssb attempting to call manifest() on a remote JS peer, we got the following error logged in go-ssb:

Nice! I wonder if this explains some of the odd behavior I've seen in SSB-Client using the auto manifests with anonymous peers. 🤦 Great job all.

staltz commented 3 years ago

@christianbundy Thanks for popping up again, always nice to see you again. Is that an approve? Y'all fine if I merge and release a new version?