Skip to content

feat: add multi-SRP EVM Account Syncing#15357

Merged
mathieuartu merged 46 commits into
mainfrom
test/core-PR-5753-testdrive
Jun 12, 2025
Merged

feat: add multi-SRP EVM Account Syncing#15357
mathieuartu merged 46 commits into
mainfrom
test/core-PR-5753-testdrive

Conversation

@mathieuartu

@mathieuartu mathieuartu commented May 15, 2025

Copy link
Copy Markdown
Contributor

Description

This PR implements the core changes seen in this PR.
In short, this changes the implementation of AuthenticationController so that it can manage parallel sessions based on entropySource.
In turn, this addition permits UserStorageController to scope user storage requests to a specific entropySource.

Using all those changes, account syncing now iterates over each entropySource present in the client and syncs accounts in consequence. This will ensure that each SRP has its own data, that can be synced independently of the context (e.g Device 1 (SRP 1 + SRP 2), Device 2 (SRP 2 only) will bi-directionally sync).

Related issues

Fixes:

Manual testing steps

  1. Import or create an SRP, complete onboarding, add and rename an EVM account
  2. Import a second SRP, add and rename an EVM account
  3. Uninstall and reinstall extension, onboard with one or both previous SRPs
  4. Verify that EVM accounts are restored

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@mathieuartu mathieuartu self-assigned this May 15, 2025
@mathieuartu mathieuartu added the team-identity-deprecated DEPRECATED: team no longer exists label May 15, 2025
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@socket-security

socket-security Bot commented May 15, 2025

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​profile-sync-controller@​16.0.0 ⏵ 17.1.095 +310086 +1100 +1100

View full report

@mathieuartu mathieuartu added No QA Needed Apply this label when your PR does not need any QA effort. No E2E Smoke Needed and removed No E2E Smoke Needed labels May 15, 2025
@github-actions

github-actions Bot commented May 15, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: e7072f6
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0338d6ec-04ca-4d59-a349-4aef6f042003

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@github-actions

github-actions Bot commented May 16, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: fc8d96c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/bdc92cc2-00e9-4033-afad-7c297867bfd1

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@github-actions

github-actions Bot commented May 19, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: e0af901
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4f934596-a6f5-486e-821d-343ae3c3006b

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@MetaMask MetaMask deleted a comment from github-actions Bot Jun 11, 2025
@mathieuartu mathieuartu marked this pull request as ready for review June 11, 2025 10:13
@mathieuartu mathieuartu requested review from a team as code owners June 11, 2025 10:13
@MetaMask MetaMask deleted a comment from github-actions Bot Jun 11, 2025
@github-actions

github-actions Bot commented Jun 11, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: cbf49fe
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d39c9cc1-9650-4ffa-a536-cc215f58f92d

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@sonarqubecloud

Copy link
Copy Markdown

Comment thread e2e/specs/identity/account-syncing/sync-with-multi-srp.spec.js
Comment thread e2e/specs/identity/utils/helpers.js

@cmd-ob cmd-ob left a comment

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.

Looks good. One small question about reducing the base timeout.

@mirceanis mirceanis left a comment

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.

Looks good.
I'm concerned about the overload of 'has synced at least once', though.
Can you take a look at the question I left?

Comment thread app/actions/identity/index.ts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. release-7.50.0 Issue or pull request that will be included in release 7.50.0 team-identity-deprecated DEPRECATED: team no longer exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants