-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New group consistency algorithm #6404
base: main
Are you sure you want to change the base?
Conversation
c10da92
to
c66590b
Compare
c66590b
to
2c16e9b
Compare
4c7102e
to
6cfccd5
Compare
39143a1
to
f03bf1d
Compare
6eb0571
to
d7fe3d3
Compare
Sorry for the uninformed input, I just find algorithm questions interesting. What about a timestamp, where if the backup is older than 24 hours then it might prompt other group members via an automated mail to try to get the updated member list? (This should probably be done in some way to avoid that being done repeatedly when the system time is wrong, however.) |
Instead of adding self to the To field, create an empty group in the To field. It is important for group consistency algorithm that if Alice removes Bob from a group consisting only of the Alice and Bob, she sends "member removed" message with empty group in the To field rather than self address in the To field.
This operation may itself fail and with timestamps reverting addition is non-trivial.
…embers if the message is encrypted
The problem is that in the given algorithm it's not possible to find out whose state for the given membership is actual because timestamps are forgotten after 60 days. We can't store timestamps forever, that wouldn't scale and isn't good for privacy (there should be some time limit after which it shouldn't be known for new members when a particular member was added or removed in the past). As for automated mails in general, currently there are not many such ones, we should avoid them to not reveal the user's network state, whether they restore a backup (as in your question) etc. |
d7fe3d3
to
04dfe98
Compare
e2f6bcf
to
81c68f8
Compare
4988595
to
2f93ea9
Compare
b1aec86
to
cab88e7
Compare
TODO:
To
field for compatibility with Delta Chat clients that don't have fix Prepare the receiver for self-sent messages with empty To field #6407add_timestamp
when adding member locally.remove_timestamp
when removing member locally.There are some attempts to workaround the case when "member added" (
0a0e715) or "member removed" (1855f84) messages fail to be sent. I am removing them here, going to update
add_timestamp
orremove_timestamp
locally and then do an attempt to send the message out. If the message is not sent because of missing peerstate or because the app is killed, this is the same as having the network lose the message. Especially in the case of removing multiple members by making multiple parallel JSON-RPC or FFI calls it seems better to update the timestamp locally and then send out local state than sending out multiple "member removed" messages which each remove one member but not all the others, not sure if it even worked properly in case the bot or the UI requests multiple member removal in parallel.Closes #6401