Skip to content

feat: add migration 082 to reset PhishingController phishingLists #14573

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

Merged
merged 11 commits into from
May 30, 2025

Conversation

AugmentedMode
Copy link
Contributor

@AugmentedMode AugmentedMode commented Apr 10, 2025

Description

This PR adds migration 082 to reset the phishingLists array in the PhishingController while preserving all other controller state.

  1. Reason for change: We have introduced real-time dapp scanning to replace the traditional eth phishing detection functionality. As a result, the large local phishing lists are no longer needed, which have been contributing to memory issues on low-end devices and increased app startup time.

  2. Improvement/solution: This targeted migration removes the outdated phishing lists data by resetting only the phishingLists array to empty, while preserving all other user preferences and controller state. This approach:

    • Reduces app memory footprint and state size
    • Improves app startup performance
    • Prevents memory-related issues on low-end devices
    • Maintains all user customizations like whitelisted sites

Related issues

Fixes: [Issue number/link]

Manual testing steps

  1. Install previous version of the app and observe app startup time
  2. Check memory usage with the old phishing lists in place
  3. Update to version with this migration
  4. Verify improved startup time and reduced memory usage
  5. Confirm dapp security scanning still functions correctly with the real-time implementation

Screenshots/Recordings

Before

N/A - Performance improvement in background process

After

N/A - Performance improvement in background process

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.

@AugmentedMode AugmentedMode requested a review from a team April 10, 2025 03:37
@AugmentedMode AugmentedMode marked this pull request as draft April 10, 2025 03:37
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.

@metamaskbot metamaskbot added the team-product-safety Push issues to Product Safety team label Apr 10, 2025
@AugmentedMode AugmentedMode added the Run Smoke E2E Requires smoke E2E testing label Apr 10, 2025
@AugmentedMode AugmentedMode self-assigned this Apr 10, 2025
@AugmentedMode AugmentedMode marked this pull request as ready for review April 10, 2025 03:40
Copy link
Contributor

github-actions bot commented Apr 10, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: fb4bf79
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/6611b629-47a0-4dca-8f1e-f169c482f9a0

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

Copy link

mindofmar
mindofmar previously approved these changes Apr 10, 2025
Copy link
Contributor

@mindofmar mindofmar left a comment

Choose a reason for hiding this comment

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

LGTM

@sethkfman
Copy link
Contributor

@mindofmar Does this need to be cherry-picked into 7.45.0? If so, can you add cp-7.45.0 to the PR title

sethkfman
sethkfman previously approved these changes Apr 16, 2025
Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@mindofmar mindofmar added the DO-NOT-MERGE Pull requests that should not be merged label Apr 17, 2025
@hesterbruikman
Copy link
Contributor

@mindofmar Is there a dependency here to require a Do Not Merge label?

@AugmentedMode AugmentedMode dismissed stale reviews from sethkfman and mindofmar via 3cbf2cb May 15, 2025 13:33
@AugmentedMode AugmentedMode changed the title feat: add migration 074 to reset PhishingController phishingLists feat: add migration 079 to reset PhishingController phishingLists May 22, 2025
@AugmentedMode AugmentedMode changed the title feat: add migration 079 to reset PhishingController phishingLists feat: add migration 082 to reset PhishingController phishingLists May 28, 2025
@AugmentedMode AugmentedMode added Run Smoke E2E Requires smoke E2E testing and removed DO-NOT-MERGE Pull requests that should not be merged Run Smoke E2E Requires smoke E2E testing labels May 28, 2025
Copy link
Contributor

github-actions bot commented May 28, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 4fa4c8d
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c3bbf97c-63c2-411a-a952-2092698cedb3

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

@AugmentedMode AugmentedMode added the QA Passed QA testing has been completed and passed label May 28, 2025
Copy link
Contributor

@mindofmar mindofmar left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Copy link
Contributor

@MarioAslau MarioAslau 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! I'm looking forward to seeing how this change will impact our app Performance 🎉

@AugmentedMode AugmentedMode added No E2E Smoke Needed If the PR does not need E2E smoke test run and removed Run Smoke E2E Requires smoke E2E testing labels May 30, 2025
@AugmentedMode AugmentedMode added this pull request to the merge queue May 30, 2025
Merged via the queue into main with commit d09eb95 May 30, 2025
55 of 62 checks passed
@AugmentedMode AugmentedMode deleted the migration/clean-phishing-lists-state branch May 30, 2025 13:50
@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2025
@metamaskbot metamaskbot added the release-7.48.0 Issue or pull request that will be included in release 7.48.0 label May 30, 2025
@dylanbutler1 dylanbutler1 added the area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. label Jun 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. No E2E Smoke Needed If the PR does not need E2E smoke test run QA Passed QA testing has been completed and passed release-7.48.0 Issue or pull request that will be included in release 7.48.0 team-product-safety Push issues to Product Safety team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants