Page MenuHomePhabricator

[web] Convert ids during state check
ClosedPublic

Authored by michal on May 17 2023, 5:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 11:00 PM
Unknown Object (File)
Wed, May 1, 5:13 PM
Unknown Object (File)
Thu, Apr 18, 12:00 PM
Unknown Object (File)
Mon, Apr 15, 8:54 PM
Unknown Object (File)
Mon, Apr 15, 3:53 PM
Unknown Object (File)
Mon, Apr 15, 1:56 AM
Unknown Object (File)
Fri, Apr 12, 4:31 AM
Unknown Object (File)
Tue, Apr 9, 6:35 PM
Subscribers

Details

Summary

Because the ids will be different on the client and on the server we need to convert them during state sync. We convert them before hashing on the client side

Depends on D7851

Test Plan

Enable id conversion and load a fresh (migration are not yet implemented) web app. Log invalidKeys in processClientResponses in session-utils.js.

  • without the state check conversion there are invalid keys displayed
  • with the state check conversion there are no errors

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
lib/selectors/socket-selectors.js
108–127 ↗(On Diff #26606)

It is a good first step but that has to become a lot more complicated before we start supporting multiple keyservers. In multi-keyserver world, each e.g. thread info might come from a different keyserver, which means that 1. converting it should use different id prefix 2. state check should happen against a different keyserver. Solving this issue now will increase the scope significantly, but at least we should create a task for it. CC @ashoat

This revision is now accepted and ready to land.May 19 2023, 1:16 AM
lib/selectors/socket-selectors.js
108–127 ↗(On Diff #26606)

ENG-3915. I feel like this is more part of the "multi-keyserver support for clients" and less part of the "new id schema".

lib/selectors/socket-selectors.js
108–127 ↗(On Diff #26606)

Agree with both of you! Definitely needs to be done, but can be deferred for now. Thanks for creating a task @michal