Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move add and remove members to use wallet addresses #363

Merged
merged 22 commits into from
Dec 11, 2023

Conversation

insipx
Copy link
Contributor

@insipx insipx commented Dec 5, 2023

closes #357

  • slight refactor to retry_async to allow retrying functions that accept a mutable ref
  • remove add_members_by_installation_id and remove_members_by_installation_id
  • wallet_address stored on intent instead of KeyPackages
  • key packages are fetched while getting publish intents
  • simple validation of Ethereum addresses in xmtp_cryptography (Does not cover EIP-55)

I accidentally pulled some changes from #354 from proto, so this should be merged after that (just some changes to GroupMembership names/tests that need to be merged in)

dev/gen_protos.sh Outdated Show resolved Hide resolved
@insipx insipx marked this pull request as ready for review December 7, 2023 15:12
@insipx insipx requested a review from a team December 7, 2023 15:12
@neekolas
Copy link
Contributor

neekolas commented Dec 7, 2023

I think something must have gotten miscommunicated in the goals here. We do need some mechanism to add members by installation_id. This is necessary to add new devices to a conversation, and to support revocation.

What we're hoping to achieve here is that when you are adding or removing a member by wallet address we look up the full list of installation_ids to add/remove at the last possible moment to ensure no changes slip in between the intent being created and being fulfilled.

@neekolas
Copy link
Contributor

neekolas commented Dec 7, 2023

Looking through the discussion, including my own comments, I completely see how this confusion happened

@insipx insipx marked this pull request as draft December 7, 2023 21:02
@insipx insipx marked this pull request as ready for review December 8, 2023 19:23
@insipx insipx requested a review from richardhuaaa December 8, 2023 19:23
Copy link
Contributor

@richardhuaaa richardhuaaa left a comment

Choose a reason for hiding this comment

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

Apologies for the confusion! I could probably have talked through the issue more in advance just to make sure we were all on the same page. Thanks for tackling this, and for always refactoring and improving the code quality!

Copy link
Contributor

@neekolas neekolas left a comment

Choose a reason for hiding this comment

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

This looks great. Thank you @insipx

@insipx insipx merged commit e9c654b into main Dec 11, 2023
7 checks passed
@insipx insipx deleted the insipx/357/key-package-to-wallet-address branch December 11, 2023 20:46
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.

Move AddMembers and RemoveMembers intents to store the wallet address instead of key packages
3 participants