Benchmark: Max Transactions Per Second
Determination of the maximum transactions per second that can be processed in a single thread. This is useful as an upper bound on max throughput assuming infinite proving speeds (ex. TEE or parallel ZK proving).
Note: Please keep in mind that this benchmark shows results for single-threaded performance only.
Setup
Before running the benchmark, make sure your machine is set up and ready to go. Refer to the Setup Guide for how to set everything up with dependencies.
Running
Run the benchmark with the following command:
cd benchmarks/max-tps
cargo run --release
Options
The following options are available:
Options:
--tps <TPS>
The target TPS [default: 100000]
--active-accounts-percentage <ACTIVE_ACCOUNTS_PERCENTAGE>
The target percentage of accounts active per second [default: 10]
--block-time <BLOCK_TIME>
The target block time in ms [default: 1000]
--max-blocks-per-fetch <MAX_BLOCKS_PER_FETCH>
Maximum blocks per fetch [default: 4]
-h, --help
Print help
-V, --version
Print version
Output
The code will run a node in a mock setup where it simulates a large load of transactions to process. The benchmark will tell you if your machine was able to keep up with the target TPS or not. Keep an eye on the output. If your machine is struggling to keep up, you will see output like:
2025-09-12T18:16:48.602157Z INFO [TestEventFetcher]: Fetched events num_blocks=2 num_events=200000 height=28
When the fetcher starts pulling more than one block at a time, it is because the node is behind and is trying to catch up by processing multiple blocks at a time. This is a sign that your machine might be struggling. You want to see a consistent num_blocks=1 for all fetching and processing.
Benchmark Results
The following results were obtained on the various reference machines.
AMD Ryzen 9 9950X
Benchmarking max single-threaded transactions per second.
Targeting 225000 tps, with 2250000 accounts (10% of accounts active per second).
Block time 1000ms, with 4 max blocks per fetch.
Running node with test scenario for 30 seconds...
2025-09-14T01:42:49.959604Z INFO [TestScenario]: Building scenario num_accounts=2250000
2025-09-14T01:43:00.528375Z INFO [TestScenario]: Building scenario finished [root hash: 0x913c053cc632c131e0d8c7fca22193fe20cea80356b74bcc01fca853c5e96355]
2025-09-14T01:43:00.528461Z INFO [ByteArchiver]: Clearing archive data
2025-09-14T01:43:01.048078Z INFO [TestEventFetcher]: Fetched events num_blocks=1 num_events=225000 height=1
2025-09-14T01:43:01.379821Z INFO [Main]: Processed 225000 events in 304.317354ms
2025-09-14T01:43:01.379869Z INFO [Main]: Flushing State
2025-09-14T01:43:01.936981Z INFO [Main]: State Flushed in 557.102564ms
2025-09-14T01:43:02.040865Z INFO [TestEventFetcher]: Fetched events num_blocks=1 num_events=225000 height=2
2025-09-14T01:43:02.334959Z INFO [Main]: Processed 225000 events in 265.485934ms
2025-09-14T01:43:02.335012Z INFO [Main]: Flushing State
2025-09-14T01:43:02.786079Z INFO [Main]: State Flushed in 451.058817ms
2025-09-14T01:43:03.037290Z INFO [TestEventFetcher]: Fetched events num_blocks=1 num_events=225000 height=3
2025-09-14T01:43:03.350340Z INFO [Main]: Processed 225000 events in 284.56389ms
2025-09-14T01:43:03.350388Z INFO [Main]: Flushing State
2025-09-14T01:43:03.796402Z INFO [Main]: State Flushed in 446.004813ms
...
2025-09-14T01:43:23.039395Z INFO [TestEventFetcher]: Fetched events num_blocks=1 num_events=225000 height=23
2025-09-14T01:43:23.375318Z INFO [Main]: Processed 225000 events in 308.390141ms
2025-09-14T01:43:23.375362Z INFO [Main]: Flushing State
2025-09-14T01:43:23.757519Z INFO [Main]: State Flushed in 382.146872ms
2025-09-14T01:43:23.757610Z INFO [ByteArchiver]: Archiving data height=23
2025-09-14T01:43:24.768893Z INFO [TestEventFetcher]: Fetched events num_blocks=2 num_events=450000 height=25
2025-09-14T01:43:25.338158Z INFO [Main]: Processed 450000 events in 512.587512ms
2025-09-14T01:43:25.338205Z INFO [Main]: Flushing State
2025-09-14T01:43:26.114338Z INFO [Main]: State Flushed in 776.123226ms
2025-09-14T01:43:26.137219Z INFO [TestEventFetcher]: Fetched events num_blocks=2 num_events=450000 height=27
2025-09-14T01:43:26.734739Z INFO [Main]: Processed 450000 events in 540.856893ms
2025-09-14T01:43:26.734795Z INFO [Main]: Flushing State
2025-09-14T01:43:27.668884Z INFO [Main]: State Flushed in 934.078759ms
2025-09-14T01:43:27.690574Z INFO [TestEventFetcher]: Fetched events num_blocks=2 num_events=450000 height=29
2025-09-14T01:43:28.308201Z INFO [Main]: Processed 450000 events in 561.210425ms
2025-09-14T01:43:28.308245Z INFO [Main]: Flushing State
2025-09-14T01:43:29.297216Z INFO [Main]: State Flushed in 988.961423ms
2025-09-14T01:43:29.306080Z WARN [TestEventFetcher]: Event fetching behind head (1 block behind) num_blocks=1 num_events=225000 height=30
2025-09-14T01:43:29.639557Z INFO [Main]: Processed 225000 events in 305.266548ms
2025-09-14T01:43:29.639608Z INFO [Main]: Flushing State
2025-09-14T01:43:30.110050Z INFO [Main]: State Flushed in 470.433196ms
AWS c6i.8xlarge
Benchmarking max single-threaded transactions per second.
Targeting 150000 tps, with 1500000 accounts (10% of accounts active per second).
Block time 1000ms, with 4 max blocks per fetch.
Running node with test scenario for 30 seconds...
2025-09-12T18:29:53.843441Z INFO [TestScenario]: Building scenario num_accounts=1500000
2025-09-12T18:30:01.798250Z INFO [TestScenario]: Building scenario finished [root hash: 0x630adb403c1a384def0b0b491f3df1fec0b899711ee200a2c1fce50fb94d18e9]
2025-09-12T18:30:01.798291Z INFO [ByteArchiver]: Clearing archive data
2025-09-12T18:30:02.384816Z INFO [TestEventFetcher]: Fetched events num_blocks=1 num_events=150000 height=1
2025-09-12T18:30:02.670385Z INFO [Main]: Processed 150000 events in 252.241129ms
2025-09-12T18:30:02.670409Z INFO [Main]: Flushing State
2025-09-12T18:30:03.128541Z INFO [Main]: State Flushed in 458.12584ms
2025-09-12T18:30:03.386808Z INFO [TestEventFetcher]: Fetched events num_blocks=1 num_events=150000 height=2
2025-09-12T18:30:03.619979Z INFO [Main]: Processed 150000 events in 199.967273ms
2025-09-12T18:30:03.619999Z INFO [Main]: Flushing State
2025-09-12T18:30:04.115729Z INFO [Main]: State Flushed in 495.722781ms
2025-09-12T18:30:04.385084Z INFO [TestEventFetcher]: Fetched events num_blocks=1 num_events=150000 height=3
2025-09-12T18:30:04.656647Z INFO [Main]: Processed 150000 events in 238.33803ms
2025-09-12T18:30:04.656671Z INFO [Main]: Flushing State
2025-09-12T18:30:05.152038Z INFO [Main]: State Flushed in 495.359951ms
...
2025-09-12T18:30:24.383323Z INFO [TestEventFetcher]: Fetched events num_blocks=1 num_events=150000 height=23
2025-09-12T18:30:24.680214Z INFO [Main]: Processed 150000 events in 263.571881ms
2025-09-12T18:30:24.680240Z INFO [Main]: Flushing State
2025-09-12T18:30:25.096985Z INFO [Main]: State Flushed in 416.7377ms
2025-09-12T18:30:25.097023Z INFO [ByteArchiver]: Archiving data height=23
2025-09-12T18:30:25.660007Z INFO [TestEventFetcher]: Fetched events num_blocks=2 num_events=300000 height=25
2025-09-12T18:30:26.194475Z INFO [Main]: Processed 300000 events in 468.049724ms
2025-09-12T18:30:26.194500Z INFO [Main]: Flushing State
2025-09-12T18:30:26.889529Z INFO [Main]: State Flushed in 695.021649ms
2025-09-12T18:30:26.927824Z INFO [TestEventFetcher]: Fetched events num_blocks=2 num_events=300000 height=27
2025-09-12T18:30:27.481511Z INFO [Main]: Processed 300000 events in 487.178985ms
2025-09-12T18:30:27.481537Z INFO [Main]: Flushing State
2025-09-12T18:30:28.300224Z INFO [Main]: State Flushed in 818.678707ms
2025-09-12T18:30:28.336438Z INFO [TestEventFetcher]: Fetched events num_blocks=2 num_events=300000 height=29
2025-09-12T18:30:28.910408Z INFO [Main]: Processed 300000 events in 507.384298ms
2025-09-12T18:30:28.910433Z INFO [Main]: Flushing State
2025-09-12T18:30:29.693407Z INFO [Main]: State Flushed in 782.966297ms
2025-09-12T18:30:29.707989Z WARN [TestEventFetcher]: Event fetching behind head (1 block behind) num_blocks=1 num_events=150000 height=30
2025-09-12T18:30:29.972715Z INFO [Main]: Processed 150000 events in 231.425624ms
2025-09-12T18:30:29.972748Z INFO [Main]: Flushing State
2025-09-12T18:30:30.381386Z INFO [Main]: State Flushed in 408.630229ms
Benchmark complete (elapsed time: 28.24s)
Node was able to keep up with targeted 150000 tps, with 1500000 accounts (10% of accounts active per second).
However, double check the node output to see if there was any struggle.
Try running the benchmark again with a higher tps target to find the limit (--tps <value>).