Diary of a Fork (& How to Recover from it)
What is this post about?
You may have heard of the perils of forking your feed. This post covers what a fork is in this context, how I diagnosed my fork and then how I fixed my fork
What is a fork?
A fork is a spikey utensil which you stab items to put into your mouth.
A fork can also be a life choice to make where you have to select between different select options with different possibilities and options and trials and opportunities. The word "fork" has been used to mean "to divide in branches, go separate ways" as early as the 14th century (according to wikipedia)
Here's what wikipedia says about it in a software case:
In software engineering, a project fork happens when developers take a copy of source code from one software package and start independent development on it, creating a distinct and separate piece of software. The term often implies not merely a development branch, but also a split in the developer community, a form of schism.[1]
Free and open-source software is that which, by definition, may be forked from the original development team without prior permission, without violating copyright law. However, licensed forks of proprietary software (e.g. Unix) also happen.
this picture is of my workmate jaromil and is a reference to the devaun.org fork of debian
What is a fork in the context of SSB? (spolier :: it's a Bad Thing (tm) )
This is what happened to me. It means that your feed creates a branch which a subset of your friends can see. This subset can be 0 or more. In my case it meant that 0 people other than me could see the posts I was making.
How does a fork happen in SSB?
There are a few different ways:
you can try running same identity (private key / secret) from multiple devices. When you post from both devices but one or the other of the logs have not caught up with eachother you can then create two distinct forks.
it used to be the case that if you changed your local machine time and made posts "in the future" then this could cause a fork. @elavoie talks about that more here.
other
How do you Diagnose a fork?
In my case I am working with the #mmt crew and I linked a post I had made out of band (i.e. shared via www rather than inband - within SSB) here is the post: %8//8qB/...
@peg said: I can't see that.
Sometimes gossip replication can be slow, so it could just be a question of waiting some. but this got my spidey senses tingling.
From that post onwards I noticed that no-one had responded to or liked any of the posts I had made in a 24 hour period. Some of these posts were direct responses to active discussions. This indicated to me that perhaps people weren't seeing the posts.
I then asked some of the #mmt crew to make a post with a link to the last post they could see in my feed.
@mix did that here: %cQDfDfG...
hey @dan hassan here's the most recent message I can see of yours : %4Ax2Ikb...
I also checked from my manyVerse account and could not see any posts.
Recovery
Running out of time, so I'll keep this brief.
First I did diagnosis.
I captured sbot state by running sbot progress
to see what the general index number was. This is not perfect as it is subjective. There is no objective target to measure completeness. The aim was to recreate the DB from fresh.
DO NOT interact with the fresh install. Don't like anything. Don't make any posts. Do not add a name about yourself.
I moved
.ssb
-> .ssb-backupI deleted
patchbay
&&patchwork
I created a new .ssb directory
I copied
.ssb-backup/secret
&.ssb-backup/gossip.json
->.ssb
I cloned patchwork and installed and ran
I left patchwork running
I noticed on
watch sbot progress
that syncing seemed to stallI closed patchwork
I cloned patchbay
I ran patcbay
I noticed
watch sbot progress
now includedebt
data and syncing resumed and finished.I then made a post and checked from my #manyVerse account to see if I could now see the posts. I could. Yay.
Final Thoughts
This is just the way that worked for me this time. I am not saying this is a canonical approach that will work for anyone else.