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

chore(blockifier): fix default strk l2 gas price test util #2444

Conversation

ArniStarkware
Copy link
Contributor

No description provided.

Copy link
Contributor Author

ArniStarkware commented Dec 4, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@reviewable-StarkWare
Copy link

This change is Reviewable

@ArniStarkware ArniStarkware requested a review from alonh5 December 4, 2024 09:57
Copy link

github-actions bot commented Dec 4, 2024

Artifacts upload workflows:

Copy link
Contributor Author

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, all discussions resolved (waiting on @alonh5)


crates/blockifier/src/versioned_constants_test.rs line 213 at r1 (raw file):

    assert_eq!(expected_l2_gas_price.get(), result_l2_gas_price.get());
}

I'm not sure we want to add this test.

  1. In theory, we are testing the convert function here. In practice, we test that the test util is correct.
  2. Each time versioned constants change, we must change this value.
  3. a. I am not sure it is interesting to keep the test util accurate for this conversion.

Code quote:

#[rstest]
#[case::strk(DEFAULT_STRK_L1_GAS_PRICE, DEFAULT_STRK_L2_GAS_PRICE)]
fn test_convert_l1_to_l2_gas_price_round_up(
    #[case] l1_gas_price: NonzeroGasPrice,
    #[case] expected_l2_gas_price: NonzeroGasPrice,
) {
    let result_l2_gas_price = NonzeroGasPrice::new(
        VersionedConstants::latest_constants()
            .convert_l1_to_l2_gas_price_round_up(l1_gas_price.into()),
    )
    .unwrap();

    assert_eq!(expected_l2_gas_price.get(), result_l2_gas_price.get());
}

@ArniStarkware ArniStarkware marked this pull request as ready for review December 4, 2024 10:01
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (arni/test_utils/gas_prices/move_consts_to_snapi@cbd8129). Learn more about missing BASE report.

Additional details and impacted files
@@                                Coverage Diff                                 @@
##             arni/test_utils/gas_prices/move_consts_to_snapi    #2444   +/-   ##
==================================================================================
  Coverage                                                   ?   51.56%           
==================================================================================
  Files                                                      ?      291           
  Lines                                                      ?    33227           
  Branches                                                   ?    33227           
==================================================================================
  Hits                                                       ?    17133           
  Misses                                                     ?    14951           
  Partials                                                   ?     1143           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ArniStarkware ArniStarkware force-pushed the arni/test_utils/gas_prices/move_consts_to_snapi branch from f1030a1 to 4760d79 Compare December 9, 2024 09:42
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/fix_default_strk_l1_gas_price branch from 0dcf39a to 71ef06d Compare December 9, 2024 09:42
Copy link

github-actions bot commented Dec 9, 2024

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [34.585 ms 34.879 ms 35.216 ms]
change: [+1.0484% +1.9830% +2.9618%] (p = 0.00 < 0.05)
Performance has regressed.
Found 20 outliers among 100 measurements (20.00%)
4 (4.00%) high mild
16 (16.00%) high severe

Copy link
Collaborator

@alonh5 alonh5 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r2, all commit messages.
Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)


crates/blockifier/src/versioned_constants_test.rs line 213 at r1 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

I'm not sure we want to add this test.

  1. In theory, we are testing the convert function here. In practice, we test that the test util is correct.
  2. Each time versioned constants change, we must change this value.
  3. a. I am not sure it is interesting to keep the test util accurate for this conversion.

When you say test util, do you mean the DEFAULT_STRK_L2_GAS_PRICE constant?
I agree, I think we can remove this test and restore the value. In that case this PR can be closed right?

@ArniStarkware ArniStarkware force-pushed the arni/test_utils/gas_prices/move_consts_to_snapi branch 2 times, most recently from 105bf9a to 3e497cf Compare December 16, 2024 18:31
@ArniStarkware ArniStarkware deleted the arni/gas_prices/fix_default_strk_l1_gas_price branch December 16, 2024 18:40
@ArniStarkware
Copy link
Contributor Author

Closed due to no need.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants