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): rename the getters for the gas prices struct #2269

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

ArniStarkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@ArniStarkware ArniStarkware changed the title chore(blockifier) rename the getters for the gas prices struct chore(blockifier): rename the getters for the gas prices struct Nov 25, 2024
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/separate_new_from_validate branch from 8ed2ee0 to 0056b67 Compare November 25, 2024 11:49
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from ffe02e2 to eaf0c44 Compare November 25, 2024 11:49
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.15%. Comparing base (e3165c4) to head (fd17761).
Report is 616 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2269       +/-   ##
===========================================
+ Coverage   40.10%   64.15%   +24.05%     
===========================================
  Files          26      143      +117     
  Lines        1895    18053    +16158     
  Branches     1895    18053    +16158     
===========================================
+ Hits          760    11582    +10822     
- Misses       1100     5671     +4571     
- Partials       35      800      +765     

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

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.

:lgtm:

Reviewed 10 of 10 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)

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.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware and @dorimedini-starkware)


crates/blockifier/src/transaction/account_transactions_test.rs line 1054 at r1 (raw file):

        (steps_per_l1_gas
            * max_fee
                .checked_div(block_context.block_info.gas_prices.l1_gas_price(&FeeType::Eth),)

When the call is trivial, it's better to access the field directly instead of using this method.

Code quote:

gas_prices.l1_gas_price(&FeeType::Eth)

@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/separate_new_from_validate branch from 0056b67 to b761166 Compare November 25, 2024 14:44
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from eaf0c44 to d9f3e4a Compare November 25, 2024 14:44
@ArniStarkware ArniStarkware requested a review from alonh5 November 25, 2024 14:46
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: 8 of 10 files reviewed, 1 unresolved discussion (waiting on @alonh5 and @dorimedini-starkware)


crates/blockifier/src/transaction/account_transactions_test.rs line 1054 at r1 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

When the call is trivial, it's better to access the field directly instead of using this method.

Done.

@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/separate_new_from_validate branch from b761166 to 7d6ad29 Compare November 25, 2024 14:56
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from d9f3e4a to 4bc7104 Compare November 25, 2024 14:56
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 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware and @dorimedini-starkware)


crates/blockifier/src/transaction/account_transactions_test.rs line 1054 at r1 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

Done.

Please do the same below (you can search all locations with FeeType::Strk/FeeType::Eth)

@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/separate_new_from_validate branch from 7d6ad29 to 5be9f3c Compare November 26, 2024 13:24
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from 4bc7104 to 627bc1c Compare November 26, 2024 13:24
@ArniStarkware ArniStarkware requested a review from alonh5 November 26, 2024 13:49
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: 8 of 10 files reviewed, 1 unresolved discussion (waiting on @alonh5 and @dorimedini-starkware)


crates/blockifier/src/transaction/account_transactions_test.rs line 1054 at r1 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

Please do the same below (you can search all locations with FeeType::Strk/FeeType::Eth)

Done.

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 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware and @dorimedini-starkware)


crates/blockifier/src/transaction/account_transactions_test.rs line 1209 at r3 (raw file):

        GasVectorComputationMode::All => ValidResourceBounds::all_bounds_from_vectors(
            &tx_execution_info1.receipt.gas,
            block_context.block_info.gas_prices.gas_price_vector(&FeeType::Strk),

Also here (I didn't search myself, so please make sure there aren't any left).

Code quote:

(&FeeType::Strk)

@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/separate_new_from_validate branch from 5be9f3c to e677ebf Compare November 26, 2024 15:23
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from 627bc1c to 5f0afd1 Compare November 26, 2024 15:23
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/separate_new_from_validate branch from e677ebf to dd596b9 Compare November 27, 2024 09:31
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from 5f0afd1 to 10c0624 Compare November 27, 2024 09:31
@ArniStarkware ArniStarkware requested a review from alonh5 November 27, 2024 09:43
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: 9 of 10 files reviewed, 1 unresolved discussion (waiting on @alonh5 and @dorimedini-starkware)


crates/blockifier/src/transaction/account_transactions_test.rs line 1209 at r3 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

Also here (I didn't search myself, so please make sure there aren't any left).

Done.
I double-checked the whole repo (Last time, I ignored this type of change as I missed its relevancy).

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 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)

@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/separate_new_from_validate branch from dd596b9 to d60ce60 Compare November 28, 2024 07:05
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from 10c0624 to 4017110 Compare November 28, 2024 07:06
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 5 of 5 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)

@ArniStarkware ArniStarkware changed the base branch from arni/gas_prices/separate_new_from_validate to graphite-base/2269 November 28, 2024 09:15
@ArniStarkware ArniStarkware changed the base branch from graphite-base/2269 to main November 28, 2024 09:15
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from 4017110 to e716b71 Compare November 28, 2024 09:15
@ArniStarkware ArniStarkware force-pushed the arni/gas_prices/rename_getters branch from e716b71 to fd17761 Compare November 28, 2024 09:16
@ArniStarkware ArniStarkware merged commit 48037a7 into main Nov 28, 2024
20 checks passed
Copy link
Contributor Author

Merge activity

  • Nov 28, 4:39 AM EST: A user merged this pull request with Graphite.

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