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

Fix benchmark genesis address to match block production address #829

Merged
merged 4 commits into from
Sep 9, 2023

Conversation

dubbelosix
Copy link
Contributor

@dubbelosix dubbelosix commented Sep 8, 2023

Summary

This PR addresses an issue with our benchmarking script that used a sequencer address without first registering it with the rollup. This caused all blocks to have their transactions skipped, leading to misleadingly high throughput measurements.

Changes

  1. Register correct address: Now the RNG block generator used in benchmarking produces blocks that match the sequencer address registered during genesis. This ensures the benchmark properly processes the blocks.
  2. Benchmark Output: A new row has been added to the benchmark output that shows the number of successfully processed transactions. This serves as an additional layer of verification for the user

Root Cause

  • The benchmark script and the main code were using different types (and addresses) for sequencer addresses in genesis.
  • Type checking was not in place, allowing the discrepancy to go unnoticed.
  • Benchmark script was using CelestiaAddress in the genesis and rng_xfers.rs was using a default MockAddress [99u8;32] in the headers for the blocks it produced

Test Plan

  1. Run the benchmark script to ensure that it no longer rejects all blocks.
  2. Verify that the throughput measurement is now accurate/reasonable.
  3. Confirm that the new row in the benchmark output shows the correct number of successfully processed transactions.

@dubbelosix dubbelosix marked this pull request as ready for review September 8, 2023 22:54
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Merging #829 (16ed369) into nightly (cefacb1) will decrease coverage by 0.1%.
The diff coverage is n/a.

Files Changed Coverage Δ
module-system/sov-modules-stf-template/src/lib.rs 83.4% <ø> (-0.2%) ⬇️

... and 1 file with indirect coverage changes

@dubbelosix dubbelosix added this pull request to the merge queue Sep 9, 2023
Merged via the queue into nightly with commit 80230c8 Sep 9, 2023
12 checks passed
@dubbelosix dubbelosix deleted the dub/fix_benchmark branch September 9, 2023 00:44
preston-evans98 pushed a commit that referenced this pull request Sep 14, 2023
* fix benchmark genesis address to match block production address

* some formatting and cleanup

* cleanup the logic to exclude token creation txn

---------

Co-authored-by: dubbelosix <dub@006.com>
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.

2 participants