ssbc / ssb-ebt

secure scuttlebutt replication with epidemic-broadcast-trees
MIT License
18 stars 10 forks source link

introduce format.prepareForIsFeed() #54

Closed staltz closed 3 years ago

staltz commented 3 years ago

PR targeting the partial-replication-changes branch

staltz commented 3 years ago

@arj03 Second attempt now. Tests are passing, I ran them locally.

One thing I was thinking was: should we call prepareForIsFeed for every call site of isFeed? There are quite many of them

arj03 commented 3 years ago

Hmm, give me 30 mins to think that over

arj03 commented 3 years ago

I end up taking back my words but for now I think we should be safe. This is quite tricky to reason about.

We have initialized in vectorclock that is used everywhere so that at least makes sure that we have the base state loaded. So the only other case is a race condition where we start doing something before metafeeds has had a chance to register the data, and I think in that regard request is a special case. Take sbot.post which also has isFeed, that one would only be called after you called request on that feed.