Skip to content

Optimize polling#125

Merged
Cafe137 merged 9 commits intomainfrom
fix/optimize_polling
Mar 17, 2026
Merged

Optimize polling#125
Cafe137 merged 9 commits intomainfrom
fix/optimize_polling

Conversation

@0xCardiE
Copy link
Copy Markdown
Collaborator

@0xCardiE 0xCardiE commented Mar 17, 2026

waitForTransactionReceipt polls the RPC with eth_getTransactionByHash to check if a tx is mined. Viem's default polling interval is ~1 second for chains like Ethereum mainnet. So during the approval step, the app was hammering eth.merkle.io every second until it got rate-limited (429).

solution is to make this flexible and per chain speed, so we dont get too many requests

- Keep verified RPC list from add_multiple_rpcs (eth.drpc.org, base.drpc.org, etc.)
- Keep optimized polling: CHAIN_POLLING_INTERVALS, getPollingInterval, 6s mainnet
- Keep HTTP_TRANSPORT_OPTIONS and transport retry in transportForChain

Made-with: Cursor
@Cafe137 Cafe137 merged commit 0d74e8c into main Mar 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants