element-hq / element-hq/synapse

One time key counts differ between /sync and /keys/upload

Open
#10,766 1 comment 0 reactions 0 assignees View on GitHub
A-E2EE A-Sync S-Major T-Defect z-cross-signing
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#10766](https://github.com/matrix-org/synapse/issues/10766).

---

### Description

I noticed that after sending an encrypted in a large E2EE room ([#e2ee-test:grin.hu](https://matrix.to/#/%23e2ee-test%3Agrin.hu)) my key count responses got out of sync (might have happened earlier). On sync I got a count of 55, while when doing an empty key upload request returned a count of 33. Does synapse cache the key count for /sync somehow and that got out of sync?

After uploading some keys, the counts synchronized themselves to 50, so I am assuming the ones in /sync were wrong.

### Steps to reproduce

- after sending some e2ee messages, check what an empty key upload response returns vs the count in /sync.

### Version information

- **Homeserver**: neko.dev

If not matrix.org:

- **Version**: 1.42.0rc1

- **Install method**: ebuild

- **Platform**: Gentoo

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.