HomePhabricator
Diffusion Comm e9701fa2be81

[lib] create hook to run Device List Update Protocol

Tags
None
Referenced Files
F3307435: image.png
Nov 25 2024, 4:06 AM
File Not Attached
Subscribers
None

Description

[lib] create hook to run Device List Update Protocol

Summary:
ENG-9905.

Currently, updating the device list and broadcasting device list update is easily coupled in the codebase, which makes it hard to maintain, as those two should always be done together. I just wanted to create one call that matches 5.3 from the whitepaper:

image.png (2×2 px, 592 KB)

This is not fully correct yet, we need to change to order to first send the device list update to all the peers, but it's not yet possible before ENG-9769. Creating ENG-9948 to address that.

I am still keeping util functions, bad for readability but those are used in unit tests.

Logic should remain mostly unchanged, small changes are annotated with inline comments.

NOTE: It's not that easy to slice this into diffs, so it's possible that the middle of the stack protocol is not working, it needs to be reviewed as a whole.

Test Plan:
Tested later in the stack but:

  1. Log in secondary device
  2. Log out secondary device
  3. Remove device from Linked Devices list

And making sure that device list updates are disseminated

Reviewers: bartek, tomek, varun, ashoat

Reviewed By: bartek, ashoat

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D13963

Details

Provenance
kamilAuthored on Nov 18 2024, 4:33 AM
Reviewer
bartek
Differential Revision
D13963: [lib] create hook to run Device List Update Protocol
Parents
rCOMM1e8dc9871fd5: [docs] Remove section on supported flows from Nix dev env doc
Branches
Unknown
Tags
Unknown