Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Fix ViemClient to support concurrent transactions #1266

@dcposch

Description

@dcposch

Summary

Under load / many people trying to sign up or transact simultaneously, there's contention for the next nonce.

This has resulted in production downtime.

Proposed fix

Two options, not mutually exclusive:

  • Use multiple EOAs. This lets us send transactions without nonce contention.
  • Track pending nonces. This is what we're currently doing, and have seen unexpected behavior. We have to submit multiple pending transactions into an upcoming block from a single EOA. If a transaction fails (eg because of a gas price spike > underpriced), we then have to reset the nonce and try again.

In either case (= even with multiple EOAs each submitting at most one tx per block, no pending stacked nonces), we will sometimes have transactions fail without reverting during gas price spikes and sequencer issues.

In that case, we must retry the same nonce.

Open question: what is the exact condition where the sequencer returns replacement transaction underpriced ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions