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

Westlad/enhanced gas test #612

Merged
merged 3 commits into from
Apr 29, 2022
Merged

Westlad/enhanced gas test #612

merged 3 commits into from
Apr 29, 2022

Conversation

Westlad
Copy link
Contributor

@Westlad Westlad commented Apr 8, 2022

This PR enhances the coverage of the test-gas test. This test will now measure the L1 and L2 gas usage for all four types of nightfall transaction (deposit, single transfer, double transfer, withdraw) and also for the finalise withdraw. The latter is already covered by the e2e tests, but it uses minimal resources, and so I included it here so that this test provides a complete measure of all gas used.

To use this test locally, you will need to set the environment variable TRANSACTIONS_PER_BLOCK to the value that you want to use in the test run. For example:

export TRANSACTIONS_PER_BLOCK=32

Do this in both the window from which you start nightfall and the window from which you run the test. Do not forget to set it back to 2 when you have finished (same command as above but with 2, rather than 32) otherwise you'll spend half a day wondering why none of your other tests pass any more. Closing the windows will also work as the export does not persist past logout.

Other than that, the test is completely standard ./start-nightfall -g -s -d and npm run test-gas.

Copy link
Contributor

@signorecello signorecello left a comment

Choose a reason for hiding this comment

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

LGTM 🙂

@Westlad Westlad added the One more approval needed One reviewer has approved this PR but another is needed label Apr 19, 2022
@druiz0992 druiz0992 merged commit 0a16fcc into master Apr 29, 2022
@druiz0992 druiz0992 deleted the westlad/enhanced-gas-test branch April 29, 2022 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
One more approval needed One reviewer has approved this PR but another is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants