ahdinosaur / ssb-pub

easily host your own Secure ScuttleButt (SSB) pub in a docker container
http://butt.nz/
GNU Affero General Public License v3.0
158 stars 25 forks source link

Replication not working with Manyverse #48

Open mplorentz opened 2 years ago

mplorentz commented 2 years ago

I know this repo isn't being maintained, but I wanted to open this in case others are having this issue. My friend just installed Manyverse and redeemed an invitation to my pub sucessfully, but replication fails with this error (IP address redacted):

sbot_1    | server error, from net:11.11.111.111:53861~shs:
sbot_1    | Error: stream ended with:0 but wanted:64
sbot_1    |     at drain (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/pull-reader/index.js:43:26)
sbot_1    |     at /home/node/.npm-global/lib/node_modules/ssb-server/node_modules/pull-reader/index.js:63:18
sbot_1    |     at /home/node/.npm-global/lib/node_modules/ssb-server/node_modules/pull-reader/index.js:20:7
sbot_1    |     at drain (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/stream-to-pull-stream/index.js:126:18)
sbot_1    |     at Socket.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/stream-to-pull-stream/index.js:143:5)
sbot_1    |     at Socket.emit (events.js:388:22)
sbot_1    |     at endReadableNT (internal/streams/readable.js:1336:12)
sbot_1    |     at processTicksAndRejections (internal/process/task_queues.js:82:21)

Replication does appear to still be working with other apps, like Planetary.

mplorentz commented 2 years ago

@staltz do you know of any changes on the Manyverse side that might be causing this? Is Manyverse expected to work with oldish JS pubs?

staltz commented 2 years ago

@mplorentz The biggest reason that I can imagine is that the pub is missing ssb-ebt (and AFAIK Planetary does not have EBT so it's operating on the old "ssb-replicate" style of replication, because EBT in go-ssb is fairly new). Manyverse some months dropped support for the old style of replication and is now using only ssb-ebt. I only later realized that this was a breaking change, but I think we'll keep it because it's best in the long run, and ssb-ebt is prepared for future developments because it supports replicating alternative formats (gabby grove, "insert your favorite format feed here", and more importantly, it support indexed feeds which is vital for partial replication).

Gladly with JS pubs it's easy to just install ssb-ebt.

staltz commented 2 years ago

Yeah it seems that this repo is just using ssb-server@15.3.0. But it seems like that version should have ssb-ebt installed, so I don't know what's going on. The lack of an shs key in the error server error, from net:11.11.111.111:53861~shs: sounds fishy. Another thing that could be going on is that the version of ssb-ebt is too old. But there could be other reasons too.

mplorentz commented 2 years ago

Thanks Andre! I’m not sure if I’ll dive into fixing this anytime soon but if I do this is a really great starting point.

On Feb 2, 2022, at 1:00 PM, André Staltz @.***> wrote:

 Yeah it seems that this repo is just using @.*** But it seems like that version should have ssb-ebt installed, so I don't know what's going on. The lack of an shs key in the error server error, from net:11.11.111.111:53861~shs: sounds fishy. Another thing that could be going on is that the version of ssb-ebt is too old. But there could be other reasons too.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.