Skip to content

synth-bench: update nonces on disk independently of tx outcome #12753

Open
@mooori

Description

Context

synth-bm was initially built for high throughput workloads of simple transactions like native token transfers with wait_until: NONE. In such a setting, all RPC calls are expected to succeed with successful outcomes. Hence, to avoid slowing down TPS, account nonces are updated on disk only after all transactions succeeded.

Problem

When benchmarking more complex function calls with wait_until: EXECUTED_OPTIMISTIC, transactions with error outcome might occure as part of regular workload execution flow. So account nonces should be updated independently of transaction outcomes. Otherwise nonces on disk become outdated and benchmark runs re-using the same account will fail with nonce errors.

Implementation

This is how nonces are updated currently.

Nonce updates on disk should happen in the background to avoid reducing the number of transactions the tooling can generate. This approach could take inspiration from RPCResponseHandler which runs in a tokio task and receives work via a channel.

Metadata

Assignees

No one assigned

    Labels

    A-benchmarkArea: performance benchmarksC-good-first-issueCategory: issues that are self-contained and easy for newcomers to work on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions