MetaMask / MetaMask/core

Not working `ACCELERATED_INTERVAL` for `onLatestBlock` of `PendingTransactionTracker`

Open
#5,043 0 comments 0 reactions 0 assignees View on GitHub
team-transactions
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

https://github.com/MetaMask/core/blob/a4b99231ff2ed406862938d38790611dcc8af37b/packages/transaction-controller/src/helpers/TransactionPoller.ts#L108
https://github.com/MetaMask/core/blob/a4b99231ff2ed406862938d38790611dcc8af37b/packages/transaction-controller/src/helpers/PendingTransactionTracker.ts#L197

According to this code snippet logic, `onLatestBlock` of `PendingTransactionTracker` should be called every 3 seconds first 10 times.
I've filtered RPC requests for `eth_blockNumber` & `eth_sendRawTransaction` & `eth_getTransactionReceipt`.
As a result, it takes around 20 seconds from sending `eth_sendRawTransaction` to sending `eth_getTransactionReceipt`.
If ACCELERATED_INTERVAL is working correctly, `eth_blockNumber` request should be sent every 3 seconds first 10 times, we should get the confirms of transactions within 3 seconds at least.
Acctually, I am getting it within 10~20 seconds.

![Image](https://github.com/user-attachments/assets/2e34d9d9-c3f2-4c03-a3ce-f7590223217d)
![Image](https://github.com/user-attachments/assets/0b02a595-91b3-4877-9c67-a29af5ec3d8f)
![Image](https://github.com/user-attachments/assets/caad8343-d048-4804-9b04-38b08298f3f2)
![Image](https://github.com/user-attachments/assets/64cb643f-866c-4b53-bace-43cc7b1a5a12)
![Image](https://github.com/user-attachments/assets/331683c3-ee79-4031-8fb5-90b767f34dfa)
![Image](https://github.com/user-attachments/assets/e86e1982-1b60-4fb1-bb18-a7ff5845fe48)
![Image](https://github.com/user-attachments/assets/2a5ceaf7-5b12-4d11-850f-9f9c917676b5)
![Image](https://github.com/user-attachments/assets/e77d834a-3687-41f2-ad3d-ffd3efd98b02)
![Image](https://github.com/user-attachments/assets/5b180255-98fd-4e69-a1a6-a180c82ffd3f)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with packages/transaction-controller/src/helpers/TransactionPoller.ts around line 108 and PendingTransactionTracker.ts around line 197. Reproduce the transaction flow while filtering eth_blockNumber, eth_sendRawTransaction, and eth_getTransactionReceipt, then compare the observed polling intervals with the expected ACCELERATED_INTERVAL behavior. Done means the accelerated polling behavior and transaction receipt timing match the issue’s stated expectation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, blockchain
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.