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: Transition from Multiple Networks with Same ChainID to Unique Networks with Distinct ChainIDs and Multiple RPC URLs #11705

Merged
merged 5 commits into from
Oct 11, 2024

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Oct 9, 2024

Description

This PR refactors our network configuration to eliminate the use of multiple networks with the same ChainID but different RPC URLs. Instead, we are moving towards a setup where each network is uniquely identified by a distinct ChainID and can have multiple RPC URLs associated with it.

This PR includes three merge commits. The first primarily addresses the Network Controller upgrade, as outlined in issue #11229. The second commit contains the script for migrating the state to v21, and the third commit includes all the UI changes along with the fix for the e2e tests.

For more details, please refer to this .

related PRs:

Related issues

Fixes: #11229 #11232 #11234 #11233

Manual testing steps

  1. Go to add network flow and test

Screenshots/Recordings

Before

After

https://drive.google.com/drive/folders/149Xji42k5of5Vl8nBlI0pFYFgPnWqILH?usp=drive_link

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.

@salimtb salimtb requested review from a team as code owners October 9, 2024 14:16
Copy link
Contributor

github-actions bot commented Oct 9, 2024

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 Oct 9, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/json-rpc-engine@9.0.3 None 0 177 kB metamaskbot
npm/reselect@5.1.1 None 0 646 kB acemarke

🚮 Removed packages: npm/@metamask/json-rpc-engine@9.0.2

View full report↗︎

Copy link
Contributor

@legobeat legobeat left a comment

Choose a reason for hiding this comment

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

patch-package is failing.

 **ERROR** Failed to apply patch for package @metamask/preferences-controller
    
  This happened because the patch file patches/@metamask+preferences-controller+11.0.0.patch could not be parsed.
   
  If you just upgraded patch-package, you can try running:
  
    patch -p1 -i patches/@metamask+preferences-controller+11.0.0.patch
    npx patch-package @metamask/preferences-controller
    
  Otherwise, try manually creating the patch file again.
  
  If the problem persists, please submit a bug report:
  
    https://github.com/ds300/patch-package/issues/new?title=Patch+file+parse+error&body=%3CPlease+attach+the+patch+file+in+question%3E

@salimtb salimtb marked this pull request as draft October 10, 2024 11:51
@salimtb salimtb marked this pull request as ready for review October 10, 2024 13:05
@salimtb
Copy link
Contributor Author

salimtb commented Oct 10, 2024

patch-package is failing.

 **ERROR** Failed to apply patch for package @metamask/preferences-controller
    
  This happened because the patch file patches/@metamask+preferences-controller+11.0.0.patch could not be parsed.
   
  If you just upgraded patch-package, you can try running:
  
    patch -p1 -i patches/@metamask+preferences-controller+11.0.0.patch
    npx patch-package @metamask/preferences-controller
    
  Otherwise, try manually creating the patch file again.
  
  If the problem persists, please submit a bug report:
  
    https://github.com/ds300/patch-package/issues/new?title=Patch+file+parse+error&body=%3CPlease+attach+the+patch+file+in+question%3E

rsolved cc @legobeat

@salimtb salimtb added the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 10, 2024
Copy link
Contributor

github-actions bot commented Oct 10, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 0920582
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b20b0ee1-548f-4c96-b839-24b3b85a3afb

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

@salimtb salimtb requested a review from legobeat October 10, 2024 13:16
@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 10, 2024
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 28ca838
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/a1ecebf7-2d94-4838-b561-1cf54922f333

Note

  • This comment will auto-update when build completes
  • 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

@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 10, 2024
@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 11, 2024
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 963f438
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/7ffec7ef-3411-4086-97cf-5e54097f658f

Note

  • This comment will auto-update when build completes
  • 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

@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 11, 2024
Copy link
Contributor

github-actions bot commented Oct 11, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 54af1c4
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/106a6675-5592-4857-9864-82231f06ac7c

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
Member

@andreahaku andreahaku 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
Contributor

@brianacnguyen brianacnguyen left a comment

Choose a reason for hiding this comment

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

Approved with DS changes

Copy link
Member

@wachunei wachunei left a comment

Choose a reason for hiding this comment

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

ramp changes lgtm

Copy link

sonarcloud bot commented Oct 11, 2024

@salimtb salimtb added this pull request to the merge queue Oct 11, 2024
Merged via the queue into main with commit 87b82d9 Oct 11, 2024
37 checks passed
@salimtb salimtb deleted the salim/default-rpc-feature branch October 11, 2024 18:38
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Run Smoke E2E Triggers smoke e2e on Bitrise team-assets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.