ssbc / ssb-server

The gossip and replication server for Secure Scuttlebutt - a distributed social network
1.69k stars 164 forks source link

Breaking change in replication was possibly introduced #271

Closed pfrazee closed 8 years ago

pfrazee commented 8 years ago

I think we may have broken network replication with the recent changes (in https://github.com/ssbc/scuttlebot/pull/258, particularly https://github.com/ssbc/scuttlebot/commit/1a4f727fd57876ae82bc997d7e920e851469262e). The change in how latest sequence was fetched during gossip may not have been backwards-compatible.

Take a look at the old replicate plugin: https://github.com/ssbc/scuttlebot/blob/4489885b8b93f688d2c18a790dcdc664b5c7a5b5/plugins/replicate.js#L66. This involves the createLatestLookupStream method. But, the current build has disabled the method.

That alone should cause old sbots to fail replication.

We should also review the effects of the changes to secure-scuttlebutt's lastDB index, as this has been changed from just a seq to {sequence:, ts:}. Is it possible that, after restoring createLatestLookupStream, the change in the output values would still cause old sbots to break?

I suspect this may relate to https://github.com/ssbc/scuttlebot/issues/269

pfrazee commented 8 years ago

Oh wait! Very happy to say, I think I'm wrong about this. It appears createHistoryStream is the only function that get's called on the remote peer, and so the recent changes would not affect remote calling.

If @dominictarr can confirm, close issue.