-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Increased time interval of pending tx tracker #4872
base: main
Are you sure you want to change the base?
Conversation
@cloudonshore Hi Sam, some of us on the Wallet Framework team took a look at the PR and the details you left in your strategy doc. Improving the user experience on chains that aren't Mainnet sounds like a worthwhile goal. However, we still need to mindful of Mainnet, and we're not sure the strategy you've implemented would be ideal across the board. It seems that in your PR you are increasing the number of times a request is made to fetch the status of a transaction. We suspect that this kind of request (or any request that fetches on-chain data) is likely fairly expensive in comparison to fetching the block number. Not only this, but the transaction status request seems to be made regardless of whether a new block is available. This seems wasteful for slower chains like Mainnet. Instead of checking transaction statuses more often, wouldn't it be more efficient to check for a new block more often, i.e. reduce the polling interval of the block tracker? It seems that you were concerned about the impact of this change for other parts of the codebase that rely on the block tracker, especially on faster chains, so here are a couple of alternative strategies for your consideration:
What are your thoughts? |
92% of transactions on metamask are not eth mainnet. In my PR, accelerated transaction polling only occurs when a new pending transaction is added, and it only runs for a short burst after the transaction is added. This should help resolve transactions faster while using the absolute minimum number of calls. @mcmire |
This may also introduce issues with integrations with 3rd party RPC providers as it would vastly increase requests the user is sending to 3rd party RPC clients - leading to more occurrences of hitting rate limits for users. |
Explanation
References
Changelog
@metamask/package-a
@metamask/package-b
Checklist