Do not allow overriding an intent that is already published #1416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this change parallel executing threads could calculate two different
payload_hash
for the sameintent id
and the second executing thread could override the first's intent in the DB even though it was already published to the network.libxmtp/xmtp_mls/src/groups/mls_sync.rs
Lines 980 to 1025 in 4336127
This was causing an intent that was already on the network to be overwritten locally, causing the incoming message to be interpreted as an external message, which would cause the sender of the intent to be forked from the rest of the group, this was shows in tests on the following React Native PRs:
After this change the parallel executing commit messages in React Native do not cause the forked state.