-
Notifications
You must be signed in to change notification settings - Fork 242
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
fix: archive decryption fail #5076
Conversation
Jenkins BuildsClick to see older builds (46)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Nice find and test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice test indeed! And a good candidate for -count=1000 👮
b18626c
to
e45af80
Compare
😬 communities_messenger_token_permissions_test.go:1837:
Error Trace: /Users/igorsirotin/Repositories/Status/status-desktop/vendor/status-go/protocol/communities_messenger_token_permissions_test.go:1837
Error: "[]" should have 1 item(s), but has 0
Test: TestMessengerCommunitiesTokenPermissionsSuite/TestImportDecryptedArchiveMessages |
So I have 2 main reasons for the test flakiness:
|
9f18f00
to
2ab63b9
Compare
390506f
to
138505d
Compare
138505d
to
343965f
Compare
* fix_: delay archive import if decryption failed * chore_: minor cleanup * chore_: test archive import of encrypted channel * test(TestImportDecryptedArchiveMessages)_: first iteration * feat_: GetHashRatchetMessagesCountForGroup * chore_: log community description and shard info message ids * test(TestImportDecryptedArchiveMessages)_: cleanup * fix_: rebase issues * chore_: remove temporal test * test(TestImportDecryptedArchiveMessages)_: cleanup * chore_: lint fix * fix(TestImportDecryptedArchiveMessages)_: ForceMembersReevaluation
Closes status-im/status-desktop#13105
➡️ Pro Tip: review by commits.
The problem was that we kept trying to decrypt the archives in a loop, though we obviously didn't have hash ratchet keys for it (for the archives themselves, not the messages inside). The fix is to postpone the next attempt import attempt. If we don't have the key for this archive, we don't have all the further ones as well.
I also wrote a test that ensures that the the archive protocol works properly for the community channel-level encryption.