companyzero / bisonrelay

ISC License
31 stars 13 forks source link

GUI: Diagnose/troubleshoot broken ratchets #622

Open jzbz opened 2 months ago

jzbz commented 2 months ago

I've hit this scenario several times where a broken ratchet occurs and a ratchet reset, treset, or mediated KX does not remedy the situation. So essentially there's no way to distinguish whether your messages are not being received by the person you're communicating with or you're being ghosted. I provide a suggestion on how to partially distinguish the two with read receipts in #621 and the software could potentially display a message suggesting a manual KX from scratch if a message isn't delivered after 24 hours for example. Right now you're pretty much in the dark.

miki-totefu commented 2 months ago

there's no way to distinguish whether your messages are not being received by the person you're communicating with or you're being ghosted

this is by design and can't be worked around (except by read receipts as mentioned)

3-way handshake ("perform handshake" on gui) can tell if the ratchet is intact - messages are exchanged and ntfn is shown if everyone can send/receive from each other - but user could also block this if wanted

24h is too soon - user could be offline for days/weeks and not send/receive messages (pretty common during vacation)

to diagnose broken ratches: go to user profile, see if the send/receive RV matches (they are swapped on each user)

user 1 send rv == user 2 recv rv user 1 recv rv == user 2 send rv

to diagnose broken resets: same thing, but look at reset rv

user 1 my reset rv == user 2 their reset rv user 1 their reset rv == user 2 my reset rv

if they don't match, then ratchet is broken

ratchet will get broken if anyone stays offline > 30 days (and there were messages exchanged), but other than that it's a bug if they are getting broken

we could reduce the chance of broken ratchets by increasing the number of rvs the user subscribes to (instead of subscribing to 1 recv rv per user, subscribe to 2, 3, ..., N). but that increases the cost (because user pays to subscribe to each RV on server)

if increasing the cost per user is ok, i can work on increasing the nb of subscriptions