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

feat: account sync - primary SRP filtering, bulk accounts creation and synced accounts limit removal #30317 #30529

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Feb 24, 2025

Description

This PR bumps:

  • @metamask/profile-sync-controller from ^7.0.1 to ^8.1.0

This package bump alongside the files changed will ensure that:

  • Account syncing will only "care" about primary SRP HD keyring accounts
    • This doesn't change the current implementation of account syncing, it will only ensure that if multi-SRP releases before account syncing fully supports it, nothing will break and account sync will still work at least the same as of right now
  • During account syncing, new accounts will be added in bulk
    • This will vastly improve client performance by being able to batch RPC calls that previously happened sequentially when we added accounts one by one
    • We are then removing the maximum accounts to sync limit

Open in GitHub Codespaces

Related issues

Related to:

Manual testing steps

  1. Import an SRP with a lot of accounts synced
  2. Verify that every account is added
  3. Verify that you can sync more than 100 accounts

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.

Copy link
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.

Copy link

socket-security bot commented Feb 24, 2025

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 0 B
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 1.49 MB metamaskbot

View full report↗︎

@mathieuartu mathieuartu marked this pull request as ready for review February 24, 2025 15:01
@metamaskbot
Copy link
Collaborator

Builds ready [015c562]
Page Load Metrics (1979 ± 134 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint39527491905445214
domContentLoaded158827201937282135
load164927411979280134
domInteractive27206725225
backgroundConnect1283392311
firstReactRender1590332411
getState764252110
initialActions00000
loadScripts114821901450260125
setupStore76421209
uiStartup187930992248299144
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 190 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 1.6 KiB (0.02%)

@@ -1267,6 +1268,7 @@ export default class MetamaskController extends EventEmitter {
state: initState.UserStorageController,
config: {
accountSyncing: {
maxNumberOfAccountsToAdd: isProduction() ? undefined : 100,
Copy link
Contributor

@mirceanis mirceanis Feb 24, 2025

Choose a reason for hiding this comment

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

This jumps out at me as something that we won't detect as a problem some months down the line because in tests it doesn't show up.
I suspect I half know the reason for this but I wonder if we are still bound by the same constraints here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mirceanis The QA team would know, believe me 😂 When we didn't have a limit, we (righfully) received a lot of complaints.
But yeah, jokes aside, there's no clear way of testing this because we don't expose the result of this config publicly from the controller.

But all in all, I'd say last week incident was in fact caught by @cmd-ob so I'm confident to include this line as well

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, but can we make it a bigger number, and something unique that would raise eyebrows, like 420 or 1337?

@mathieuartu mathieuartu added this pull request to the merge queue Feb 24, 2025
Merged via the queue into main with commit cfa0467 Feb 24, 2025
85 checks passed
@mathieuartu mathieuartu deleted the feat/account-sync-primary-srp-and-bulk-addition branch February 24, 2025 18:35
@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2025
@metamaskbot metamaskbot added the release-12.14.0 Issue or pull request that will be included in release 12.14.0 label Feb 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.14.0 Issue or pull request that will be included in release 12.14.0 team-identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants