Skip to content

Conversation

@karolk91
Copy link
Contributor

@karolk91 karolk91 commented Jan 21, 2024

The sTPS calculation is based on the following assumptions about smart-bench:

  • smart-bench instantiates smart contracts on the chain and waits for the completion of these transactions.
  • Starting from some future block (after creation), smart-bench uploads transactions related to contract calls to the node.
  • Sending contract call transactions to the node is continuous once started and is not mixed with any other type of transactions.
  • Smart-bench finishes benchmarking at the block that contains the last contract call from the set.

sTPS calculation is exclusively concerned with contract calls, disregarding any system or contract-creating transactions.

sTPS calculation excludes the last block of the benchmark, as its full utilization is not guaranteed. In other words, only blocks in the middle will consist entirely of contract calls.

@smiasojed
Copy link
Contributor

Now the results look much better, LGTM

src/stats.rs Outdated
println!("TPS - Transaction execution time per second, assuming a 0.5-second execution time per block");
println!(
"TPS: {}",
tps_total_extrinsics as f64 / (tps_blocks as f64 * 0.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With async_backing we should have a 2s execution time now. Not sure if the target test bins have been updated to a version which has that enabled or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given currently used zombienet configuration for launching polkadot relay chain, I can see in the resulting/output chain configuration that async is disabled (see example below)

cat /tmp/zombie-1d78b25178b5f5a041c1558f57a34514_-123208-MoKciO8z6eTZ/cfg/rococo-local-plain.json | grep -A5 async
            "async_backing_params": {
              "allowed_ancestry_len": 0,
              "max_candidate_depth": 0
            },
            "code_retention_period": 1200,
            "coretime_cores": 0,
cat /tmp/zombie-1d78b25178b5f5a041c1558f57a34514_-123208-MoKciO8z6eTZ/cfg/rococo-local-plain.json | grep scheduling
            "scheduling_lookahead": 1,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moonbeam did not support async backing until last release, which was made last week.
I think that first we need to make the flow working and after this we can adjust graphs and configuration.
WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we calculate sTPS using block build time. Async backing will be delivered with this PR: #60

@smiasojed smiasojed changed the title Improve TPS calculation (ignore non-call txs, ignore last block) Improve sTPS calculation (ignore non-call txs, ignore last block) Apr 19, 2024
@karolk91 karolk91 requested review from a team and cmichi as code owners April 23, 2024 20:32
@smiasojed smiasojed merged commit f30d741 into paritytech:master Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants