Skip to content

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Oct 17, 2025

Description

Update JSON-RPC related packages. This includes two major updates:

The @metamask/network-controller has also been updated to a later version that uses these updated JSON-RPC packages. This version includes a new lookupNetwork parameter for the initializeProvider method, which lets us finally eliminate the network-controller patch we have to prevent the lookupNetwork call during initialization.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

N/A

Manual testing steps

N/A

Screenshots/Recordings

N/A

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.

@metamaskbot metamaskbot added the team-core-platform Core Platform team label Oct 17, 2025
Copy link

socket-security bot commented Oct 17, 2025

Copy link

socket-security bot commented Oct 17, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

View full report

@Gudahtt Gudahtt force-pushed the update-json-rpc-packages branch from 3dc67a8 to 616116e Compare October 17, 2025 16:05
@github-actions github-actions bot added size-S and removed size-XS labels Oct 17, 2025
@Gudahtt
Copy link
Member Author

Gudahtt commented Oct 17, 2025

@metamaskbot update-policies

@Gudahtt
Copy link
Member Author

Gudahtt commented Oct 17, 2025

@SocketSecurity ignore npm/@metamask/[email protected]

Trusted author

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🧩 @MetaMask/extension-devs (5 files, +15 -85)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +3 -17
      • 📁 experimental/
        • 📄 policy.json +3 -17
      • 📁 flask/
        • 📄 policy.json +3 -17
      • 📁 main/
        • 📄 policy.json +3 -17
    • 📁 webpack/
      • 📄 policy.json +3 -17

📜 @MetaMask/policy-reviewers (5 files, +15 -85)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +3 -17
      • 📁 experimental/
        • 📄 policy.json +3 -17
      • 📁 flask/
        • 📄 policy.json +3 -17
      • 📁 main/
        • 📄 policy.json +3 -17
    • 📁 webpack/
      • 📄 policy.json +3 -17

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.


🔗 @MetaMask/supply-chain (5 files, +15 -85)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +3 -17
      • 📁 experimental/
        • 📄 policy.json +3 -17
      • 📁 flask/
        • 📄 policy.json +3 -17
      • 📁 main/
        • 📄 policy.json +3 -17
    • 📁 webpack/
      • 📄 policy.json +3 -17

Gudahtt and others added 2 commits October 17, 2025 14:21
Update JSON-RPC related packages. This includes two major updates:

* `eth-json-rpc-provider` is updated from v4 to v5
  * The breaking change is the removal of the `data` event, which we don't use.
  * Changelog: https://github.com/MetaMask/core/blob/main/packages/eth-json-rpc-provider/CHANGELOG.md#500
* `eth-json-rpc-middlware` is updated from v18 to v21
  * Breaking changes include:
    * Remove `ethersProviderAsMiddleware` (which we don't use).
    * Add `exports` field, which breaks sub-path exports (which we don't use).
    * Update minimum Node.js version from v18.16 to v18.18
  * Changelogs:
    * Old repo: https://github.com/MetaMask/eth-json-rpc-middleware/blob/main/CHANGELOG.md
    * Core: https://github.com/MetaMask/core/blob/main/packages/eth-json-rpc-middleware/CHANGELOG.md#2100

The `@metamask/network-controller` has also been updated to a later version
that uses these updated JSON-RPC packages. This version includes a new
`lookupNetwork` parameter for the `initializeProvider` method, which lets us
finally eliminate the `network-controller` patch we have to prevent the
`lookupNetwork` call during initialization.
@Gudahtt Gudahtt force-pushed the update-json-rpc-packages branch from 581a270 to c127664 Compare October 17, 2025 16:51
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 581a270 | Date: 10/17/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±72ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±69ms) 🟢 | historical mean value: 738ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±12ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 72ms 993ms 1.32s 1.28s 1.32s
domContentLoaded 731ms 69ms 691ms 1.01s 953ms 1.01s
firstPaint 77ms 12ms 60ms 180ms 92ms 180ms
firstContentfulPaint 77ms 12ms 60ms 180ms 92ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [581a270]
UI Startup Metrics (1231 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1231111014046412671357
load105995411895710911164
domContentLoaded105394911845610851157
domInteractive1913134141737
firstPaint624134119443310761131
backgroundConnect2502372757254262
firstReactRender26184662840
getState18687112140
initialActions50416613
loadScripts80871393854840909
setupStore1063041120
WebpackHomeuiStartup8477231129758631045
load63558694172637859
domContentLoaded62757993472632839
domInteractive15115071436
firstPaint18755920193178771
backgroundConnect22103862533
firstReactRender28176993337
getState942331114
initialActions308246
loadScripts62557892469630828
setupStore1051731315
FirefoxBrowserifyHomeuiStartup14141226204212314831573
load1203104613787712681337
domContentLoaded1203104613777712671337
domInteractive1153230254124262
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3621139183990
firstReactRender24204642533
getState11421022822
initialActions5113814311
loadScripts1179102913317512451314
setupStore125158171034
WebpackHomeuiStartup16081405200411716551870
load1371121417369714181571
domContentLoaded1371121417369614171571
domInteractive1113238770115362
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3721113154366
firstReactRender30227993038
getState10512013936
initialActions51659419
loadScripts1347119717069413931546
setupStore136110161060
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -24.85 KiB (-0.55%)
  • ui: -1 Bytes (0%)
  • common: -8.06 KiB (-0.1%)

@metamaskbot
Copy link
Collaborator

❌ test-e2e-chrome-api-specs failed. View the html report here.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: c127664 | Date: 10/17/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±71ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±84ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±45ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 71ms 998ms 1.35s 1.24s 1.35s
domContentLoaded 734ms 84ms 697ms 1.30s 924ms 1.30s
firstPaint 80ms 45ms 60ms 520ms 88ms 520ms
firstContentfulPaint 80ms 45ms 60ms 520ms 88ms 520ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [c127664]
UI Startup Metrics (1243 ± 66 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1243112114846612761391
load106796612645911021181
domContentLoaded106196112535910961169
domInteractive1813137131737
firstPaint70788126243210861148
backgroundConnect2552373109259265
firstReactRender26185372746
getState1653982031
initialActions50497516
loadScripts81371999457845924
setupStore1063241018
WebpackHomeuiStartup8467181176838611045
load64757596284643888
domContentLoaded63956995283637876
domInteractive16115791441
firstPaint19756904197198690
backgroundConnect21103972736
firstReactRender2717135133234
getState942331115
initialActions3014248
loadScripts63656793881636874
setupStore1052331215
FirefoxBrowserifyHomeuiStartup1397121716949014531540
load1198106214547612561338
domContentLoaded1197106214537612551338
domInteractive1043325843113214
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3422141183565
firstReactRender24204952536
getState84465913
initialActions4162638
loadScripts1174102114237412311311
setupStore952231015
WebpackHomeuiStartup15761427204711216271819
load1346121515718513981519
domContentLoaded1346121415708513981518
domInteractive1033336558108212
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3921145224195
firstReactRender302278123071
getState82566812
initialActions42294311
loadScripts1319119815158113701492
setupStore13523525959
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -24.85 KiB (-0.55%)
  • ui: -1 Bytes (0%)
  • common: -8.06 KiB (-0.1%)

@Gudahtt
Copy link
Member Author

Gudahtt commented Oct 17, 2025

Blocked by #36061

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants