matrix-rust-sdk icon indicating copy to clipboard operation
matrix-rust-sdk copied to clipboard

crypto: Add more logs when sharing keys

Open BillCarsonFr opened this issue 3 months ago • 1 comments

I have been investigating some rageshakes recently, and often we don't have enough log history to see when/if a key was correctly distributed to another device.

This is an attempt to not only log to whom a key is shared in the current round, but also to log the other devices that we already tried to distribute too. It might be a bit verbose? Let me know what you think.

The log look like that:

2024-03-22T10:13:02.688119Z DEBUG matrix_sdk_crypto::session_manager::group_sessions: Keys already shared or 
withheld to the following devices. sharing_full_log=[("@vXXXXXX:matrix.org", "MTQYWIFEPO", "Shared(0)"), 
("@vXXXXX:matrix.org", "FJVZCJJRRU", "Shared(3)"), ("@xxxx:yyyyyy.net", "YDCXXXXZB", " withheld: m.no_olm")
  • [ ] Public API changes documented in changelogs (optional)

Signed-off-by:

BillCarsonFr avatar Mar 25 '24 13:03 BillCarsonFr