synth-bench: update nonces on disk independently of tx outcome #12753
Labels
A-benchmark
Area: performance benchmarks
C-good-first-issue
Category: issues that are self-contained and easy for newcomers to work on.
Context
synth-bm
was initially built for high throughput workloads of simple transactions like native token transfers withwait_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.The text was updated successfully, but these errors were encountered: