Skip to content

Conversation

@codyborn
Copy link

@codyborn codyborn commented May 6, 2025

On Unichain, we see:

  1. Keys remaining locked due to long running rpc calls
  2. Txs failing due to replacement transaction underpriced (aka nonce re-use)

Note, this is not occurring on Base despite using the same logic.

The hypothesis as to why this is happening:
On Unichain, RPC providers experience extreme latency (100-1k blocks of delay). This causes the thread to get stuck waiting for confirmations which never arrive. This prevents the keys from being unlocked. When re-deploying the service, the keys are all unlocked again however the old txs are stuck in the mem-pool. Because the old txs are still stuck in the mempool, the new txs cannot be processed without first burning the nonce.

This PR adds a 10 second timeout to the awaiting confirmation process and a nonce burning method in case the tx submission fails due to replacement transaction underpriced.

Bonus: the PR also adds some new order metrics and logs.

@codyborn codyborn merged commit 5343b88 into main May 6, 2025
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.

3 participants