You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User has 3 installations associated with their inbox. Highest sequence ID is 3.
The user creates a new group using installation 3, where that installation is automatically added as the first member
What should the sequence_id be on the initial GroupMembership?
If we set it to 3, we will never be able to add the first two installations since they are happened before sequence_id 3 and we only allow for updates that increment the sequence_id for the group and for installations to be added that match a diff between the old and new sequence_id.
We could set it initially to 0, and then have the add_missing_members function create a commit that adds all the missing installations. But that poses a problem: moving from 0 -> 3 will also add the group creator installation, who is already a member of the group. This is not allowed.
I've instituted a hack for this problem where we set the initial sequence_id to 0 and then allowing members to be missing from the installation diff so long as they are already members of the group. This is confusing and not ideal. Even if we can't come up with a better solution we'll want to document this clearly.
The text was updated successfully, but these errors were encountered:
## tl;dr
- Gets identity working end to end, with tests (pretty much) all uncommented
- Updates bindings to have all required methods
- Removes a bunch of TODOs in the code
## Follow-ups
There are a few changes I had to make to get everything passing that need some follow-up.
- xmtp/xmtp-node-go#391
- #760
- #761
- #750
- #762
- #763
There are also many places that need better test coverage.
I found an oversight in our original design.
Imagine the following situation:
What should the
sequence_id
be on the initialGroupMembership
?If we set it to 3, we will never be able to add the first two installations since they are happened before
sequence_id
3 and we only allow for updates that increment thesequence_id
for the group and for installations to be added that match a diff between the old and newsequence_id
.We could set it initially to 0, and then have the
add_missing_members
function create a commit that adds all the missing installations. But that poses a problem: moving from 0 -> 3 will also add the group creator installation, who is already a member of the group. This is not allowed.I've instituted a hack for this problem where we set the initial
sequence_id
to 0 and then allowing members to be missing from the installation diff so long as they are already members of the group. This is confusing and not ideal. Even if we can't come up with a better solution we'll want to document this clearly.The text was updated successfully, but these errors were encountered: