This repository was archived by the owner on Oct 16, 2025. It is now read-only.
Conversation
…ter being called` with `should not start a timer to clear the current block number later`
… if the block tracker is running` to `checkForLatestBlock`
Gudahtt
reviewed
Oct 14, 2025
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
7 tasks
github-merge-queue bot
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Oct 15, 2025
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Resolves `@metamask/eth-block-tracker` to `12.2.1` to fix a bug. See changelog. [](https://codespaces.new/MetaMask/metamask-extension/pull/36869?quickstart=1) ## **Changelog** CHANGELOG entry: Fixed a bug where the block number returned by the EVM provider would get stuck and fail to update in certain scenarios ## **Related issues** See: MetaMask/eth-block-tracker#348 Fixes: https://consensyssoftware.atlassian.net/browse/NWNT-615 ## **Manual testing steps** 1. Navigate to a dApp website (e.g., Etherscan, OpenSea) 1. Connect MetaMask wallet to the site 1. Note which network is connected to the website (shown in the "Manage permissions" area) 1. Click the network selector dropdown in the activity section (below the main balance area) 1. Select a DIFFERENT network than the one connected to the website 1. Open browser console 1. Run: `Number(await window.ethereum.request({method: "eth_blockNumber"}))` 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/c44a9b00-9d74-4274-9cf0-f6c9be3539ed ### **After** https://github.com/user-attachments/assets/6a2630c9-7f56-425a-806e-eeeaa1700611 ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates @metamask/eth-block-tracker to 12.2.1 and aligns @metamask/eth-json-rpc-provider to ^5.0.0. > > - **Dependencies**: > - Update `@metamask/eth-block-tracker` to `12.2.1`. > - Align `@metamask/eth-json-rpc-provider` to `^5.0.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 64156b8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
runway-github bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Oct 15, 2025
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Resolves `@metamask/eth-block-tracker` to `12.2.1` to fix a bug. See changelog. [](https://codespaces.new/MetaMask/metamask-extension/pull/36869?quickstart=1) ## **Changelog** CHANGELOG entry: Fixed a bug where the block number returned by the EVM provider would get stuck and fail to update in certain scenarios ## **Related issues** See: MetaMask/eth-block-tracker#348 Fixes: https://consensyssoftware.atlassian.net/browse/NWNT-615 ## **Manual testing steps** 1. Navigate to a dApp website (e.g., Etherscan, OpenSea) 1. Connect MetaMask wallet to the site 1. Note which network is connected to the website (shown in the "Manage permissions" area) 1. Click the network selector dropdown in the activity section (below the main balance area) 1. Select a DIFFERENT network than the one connected to the website 1. Open browser console 1. Run: `Number(await window.ethereum.request({method: "eth_blockNumber"}))` 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/c44a9b00-9d74-4274-9cf0-f6c9be3539ed ### **After** https://github.com/user-attachments/assets/6a2630c9-7f56-425a-806e-eeeaa1700611 ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates @metamask/eth-block-tracker to 12.2.1 and aligns @metamask/eth-json-rpc-provider to ^5.0.0. > > - **Dependencies**: > - Update `@metamask/eth-block-tracker` to `12.2.1`. > - Align `@metamask/eth-json-rpc-provider` to `^5.0.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 64156b8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
runway-github bot
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Oct 15, 2025
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Resolves `@metamask/eth-block-tracker` to `12.2.1` to fix a bug. See changelog. [](https://codespaces.new/MetaMask/metamask-extension/pull/36869?quickstart=1) ## **Changelog** CHANGELOG entry: Fixed a bug where the block number returned by the EVM provider would get stuck and fail to update in certain scenarios ## **Related issues** See: MetaMask/eth-block-tracker#348 Fixes: https://consensyssoftware.atlassian.net/browse/NWNT-615 ## **Manual testing steps** 1. Navigate to a dApp website (e.g., Etherscan, OpenSea) 1. Connect MetaMask wallet to the site 1. Note which network is connected to the website (shown in the "Manage permissions" area) 1. Click the network selector dropdown in the activity section (below the main balance area) 1. Select a DIFFERENT network than the one connected to the website 1. Open browser console 1. Run: `Number(await window.ethereum.request({method: "eth_blockNumber"}))` 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/c44a9b00-9d74-4274-9cf0-f6c9be3539ed ### **After** https://github.com/user-attachments/assets/6a2630c9-7f56-425a-806e-eeeaa1700611 ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates @metamask/eth-block-tracker to 12.2.1 and aligns @metamask/eth-json-rpc-provider to ^5.0.0. > > - **Dependencies**: > - Update `@metamask/eth-block-tracker` to `12.2.1`. > - Align `@metamask/eth-json-rpc-provider` to `^5.0.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 64156b8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
runway-github bot
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Oct 15, 2025
…ker` to `12.2.1` (#36869) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Resolves `@metamask/eth-block-tracker` to `12.2.1` to fix a bug. See changelog. [](https://codespaces.new/MetaMask/metamask-extension/pull/36869?quickstart=1) ## **Changelog** CHANGELOG entry: Fixed a bug where the block number returned by the EVM provider would get stuck and fail to update in certain scenarios ## **Related issues** See: MetaMask/eth-block-tracker#348 Fixes: https://consensyssoftware.atlassian.net/browse/NWNT-615 ## **Manual testing steps** 1. Navigate to a dApp website (e.g., Etherscan, OpenSea) 1. Connect MetaMask wallet to the site 1. Note which network is connected to the website (shown in the "Manage permissions" area) 1. Click the network selector dropdown in the activity section (below the main balance area) 1. Select a DIFFERENT network than the one connected to the website 1. Open browser console 1. Run: `Number(await window.ethereum.request({method: "eth_blockNumber"}))` 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/c44a9b00-9d74-4274-9cf0-f6c9be3539ed ### **After** https://github.com/user-attachments/assets/6a2630c9-7f56-425a-806e-eeeaa1700611 ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates @metamask/eth-block-tracker to 12.2.1 and aligns @metamask/eth-json-rpc-provider to ^5.0.0. > > - **Dependencies**: > - Update `@metamask/eth-block-tracker` to `12.2.1`. > - Align `@metamask/eth-json-rpc-provider` to `^5.0.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 64156b8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
7 tasks
gauthierpetetin
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Oct 15, 2025
…ker` to `12.2.1` (#36903) - chore: Resolve `@metamask/eth-block-tracker` to `12.2.1` (#36869) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Resolves `@metamask/eth-block-tracker` to `12.2.1` to fix a bug. See changelog. [](https://codespaces.new/MetaMask/metamask-extension/pull/36869?quickstart=1) ## **Changelog** CHANGELOG entry: Fixed a bug where the block number returned by the EVM provider would get stuck and fail to update in certain scenarios ## **Related issues** See: MetaMask/eth-block-tracker#348 Fixes: https://consensyssoftware.atlassian.net/browse/NWNT-615 ## **Manual testing steps** 1. Navigate to a dApp website (e.g., Etherscan, OpenSea) 1. Connect MetaMask wallet to the site 1. Note which network is connected to the website (shown in the "Manage permissions" area) 1. Click the network selector dropdown in the activity section (below the main balance area) 1. Select a DIFFERENT network than the one connected to the website 1. Open browser console 1. Run: `Number(await window.ethereum.request({method: "eth_blockNumber"}))` 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed 1. Wait 1-2 minutes 1. Run the same command again 1. Observe that the block number changed ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/c44a9b00-9d74-4274-9cf0-f6c9be3539ed ### **After** https://github.com/user-attachments/assets/6a2630c9-7f56-425a-806e-eeeaa1700611 ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Bumps `@metamask/eth-block-tracker` to 12.2.1 (with `@metamask/eth-json-rpc-provider` -> ^5.0.0) and updates attribution. > > - **Dependencies**: > - Bump `@metamask/eth-block-tracker` to `12.2.1` in `yarn.lock`. > - Update transitive dep `@metamask/eth-json-rpc-provider` to `^5.0.0`. > - **Attribution**: > - Update `attribution.txt` to reflect `@metamask/eth-block-tracker` `12.2.1`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ce58db4. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [3e55943](3e55943) --------- Co-authored-by: jiexi <jiexiluan@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com>
Gudahtt
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Oct 16, 2025
`@metamask/eth-block-tracker` had a bug where a block could be cached indefinitely if the block tracker was not actively polling. This was fixed in version 12.2.1. Details: MetaMask/eth-block-tracker#348 Dependencies that use the block tracker have been updated to ensure we're only using the version with this fix.
7 tasks
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Oct 16, 2025
## **Description** `@metamask/eth-block-tracker` had a bug where a block could be cached indefinitely if the block tracker was not actively polling. This was fixed in version 12.2.1. Details: MetaMask/eth-block-tracker#348 Dependencies that use the block tracker have been updated to ensure we're only using the version with this fix. I'm not aware of any end-user impact here, but this cache problem was exposed in some in-progress work. ## **Changelog** CHANGELOG entry: null ## **Related issues** MetaMask/eth-block-tracker#348 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates key MetaMask dependencies across the network/JSON-RPC stack, including `eth-block-tracker@12.2.1`, `eth-json-rpc-middleware@19.0.1`, and `network-controller@24.2.2`. > > - **Dependencies**: > - **Network/JSON-RPC stack updates**: > - `@metamask/eth-block-tracker` → `12.2.1` (transitive) > - `@metamask/eth-json-rpc-middleware` → `^19.0.1` > - `@metamask/eth-json-rpc-provider` → `^5.0.1` > - `@metamask/eth-json-rpc-infura` → `^10.3.0` > - `@metamask/json-rpc-engine` → `^10.1.1` > - `@metamask/network-controller` → `^24.2.2` > - `@metamask/eip-5792-middleware` → `^1.2.3` > - `@metamask/transaction-controller` → `^60.7.0` > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 839459d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clears the cached block after
blockResetTimeoutduration when polling is not running and an update is triggered viacheckForLatestBlockorgetLatestBlockNote
Clears the cached block after
blockResetDurationwhengetLatestBlock/checkForLatestBlockrun while the tracker is not polling, with corresponding tests and changelog updates.PollingBlockTracker._updateLatestBlock()now schedules a cache reset via_setupBlockResetTimeout()when_isRunningis false, clearinggetCurrentBlock()afterblockResetDuration.src/PollingBlockTracker.test.ts):getLatestBlock()andcheckForLatestBlock().useCache: falsescenarios to respectpollingIntervaltiming and cached state.CHANGELOG.md: Add Fixed entry describing the new cache-clear behavior when not polling.Written by Cursor Bugbot for commit 172f249. This will update automatically on new commits. Configure here.