Skip to content

Update InboxV2 to use IdentityProvider#103

Open
jazzz wants to merge 8 commits into
mainfrom
jazzz/accounts
Open

Update InboxV2 to use IdentityProvider#103
jazzz wants to merge 8 commits into
mainfrom
jazzz/accounts

Conversation

@jazzz
Copy link
Copy Markdown
Collaborator

@jazzz jazzz commented May 20, 2026

This PR is the sibling PR to #102. It updates InboxV2 to use and abstract IdentityProvider, rather than requiring the internal LogosAccount implementation.

Changes

  • Removes the direct dependency on LogosAccount within InboxV2 and GroupV1 in preparation for its removal.
  • Remove MLSContext as suggested by @kaichaosun. Instead the functionality is flattened to mimic a OpenMLSProvider. This enables future implementation of MLS storage.

Deferred Work:

  • The context interface is left unchanged. Once this and Add crate logos-accounts #102 land, the interface, examples and tests can be updated. This keeps the PR smaller.
  • Removal of conversations::LogosAccount. The internal representation is still used. It can be removed once the Context constructors accept external IdentityProvider Impls.

Notes

Future PRs

  • Remove generics at in GroupV1.
  • Remove Runtime borrow checks in GroupV1

@jazzz jazzz force-pushed the jazzz/accounts branch from 467c11f to 96d3310 Compare May 20, 2026 21:16
@jazzz jazzz marked this pull request as ready for review May 21, 2026 14:31
@jazzz jazzz requested review from kaichaosun and osmaczko and removed request for kaichaosun and osmaczko May 21, 2026 14:38
Comment thread Cargo.toml Outdated
Comment thread core/conversations/src/inbox_v2.rs Outdated
IP: IdentityProvider,
{
account_id: AccountId,
account: Rc<RefCell<MlsIdentityProvider<IP>>>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be identity, right?
Also I'm wondering if we can derive account_id from IdentityProvider?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm great point. We need to lock down our language for the Accounts/Identity Model. Will handle offline

impl MlsEphemeralPqProvider {
pub fn new() -> Result<Self, CryptoError> {
let crypto = LibcruxCryptoProvider::new()?;
let storage = MemoryStorage::default();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we inject the storage, so it can be easier to be replaced later with actual store engine.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only ever initialized in a single location - Its east to change the types.

Skipping injection for now, as we can solve the problem later.

Copy link
Copy Markdown
Contributor

@kaichaosun kaichaosun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to merge once clearness is finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants