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

test(protocol): add a fuzz test with a lot of blocks #13543

Merged

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Apr 5, 2023

Added this test to generate many blocks with random blocktimes, calldata, gasLimit, gasUsed... and print info as CSV file format for future analysis. The test can be run using pnpm test:sim.

The test is incomplete and shall be updated once @adaki2004 gets his fee/reward PR merged.

Function Name min avg median max # calls
proposeBlock 24853 51348 24853 100852 99
proveBlock (including verifyBlocks) 62109 88701 62109 163013 99

@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #13543 (3979652) into major_protocol_upgrade_rebase (624a4b5) will not change coverage.
The diff coverage is n/a.

@@                      Coverage Diff                       @@
##           major_protocol_upgrade_rebase   #13543   +/-   ##
==============================================================
  Coverage                          38.82%   38.82%           
==============================================================
  Files                                113      113           
  Lines                               3480     3480           
  Branches                             400      400           
==============================================================
  Hits                                1351     1351           
  Misses                              2040     2040           
  Partials                              89       89           
Flag Coverage Δ *Carryforward flag
bridge-ui 94.20% <ø> (ø) Carriedforward from 9d6a449
eventindexer ∅ <ø> (∅) Carriedforward from 9d6a449
protocol 0.00% <ø> (ø)
relayer 62.55% <ø> (ø) Carriedforward from 9d6a449
ui 100.00% <ø> (ø) Carriedforward from 9d6a449

*This pull request uses carry forward flags. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dantaik dantaik marked this pull request as ready for review April 5, 2023 14:32
@dantaik dantaik changed the title test(protocol): add more tests test(protocol): WIP-add more tests Apr 5, 2023
@dantaik dantaik changed the title test(protocol): WIP-add more tests test(protocol): add a simulation test Apr 7, 2023
@dantaik dantaik changed the title test(protocol): add a simulation test test(protocol): add a fuzz test with a lot of blocks Apr 7, 2023
@dantaik dantaik merged commit c40dbb3 into major_protocol_upgrade_rebase Apr 8, 2023
@dantaik dantaik deleted the major_protocol_upgrade_rebase-sim branch April 8, 2023 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant