Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mooori opened this issue Jan 17, 2025 · 0 comments
Open

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

mooori opened this issue Jan 17, 2025 · 0 comments
Labels
A-benchmark Area: performance benchmarks C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on.

Comments

@mooori
Copy link
Contributor

mooori commented Jan 17, 2025

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.

@mooori mooori added A-benchmark Area: performance benchmarks C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on. labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-benchmark Area: performance benchmarks C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on.
Projects
None yet
Development

No branches or pull requests

1 participant