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

refactor(blockifier): split pre validate test by charge fee #994

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

yoavGrs
Copy link
Contributor

@yoavGrs yoavGrs commented Sep 24, 2024

This change is Reviewable

Copy link
Contributor Author

yoavGrs commented Sep 24, 2024

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.05%. Comparing base (b0cfe82) to head (8cb19f7).
Report is 82 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #994      +/-   ##
==========================================
- Coverage   74.18%   70.05%   -4.13%     
==========================================
  Files         359       87     -272     
  Lines       36240    11219   -25021     
  Branches    36240    11219   -25021     
==========================================
- Hits        26886     7860   -19026     
+ Misses       7220     2971    -4249     
+ Partials     2134      388    -1746     
Flag Coverage Δ
70.05% <ø> (-4.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @yoavGrs)

a discussion (no related file):
why split? lots of code duplication now, no?


Copy link
Contributor Author

@yoavGrs yoavGrs 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 1 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)

a discussion (no related file):

Previously, dorimedini-starkware wrote…

why split? lots of code duplication now, no?

In the last PR, there is some code duplication in the second scenario. I can move this duplication to a shared source, but it's not too bad IMO to leave it like that.
I don't like long tests, in which the state at the beginning is not necessary for the validations at the end.
It's also possible to split it another way (test for each case?).


@yoavGrs yoavGrs changed the base branch from yoav/blockifier/remove_constants/pre_validate/01 to main September 25, 2024 11:50
@yoavGrs yoavGrs force-pushed the yoav/blockifier/remove_constants/pre_validate/02 branch from dad0891 to 7531510 Compare September 25, 2024 12:43
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware 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 r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yoavGrs)


crates/blockifier/src/transaction/execution_flavors_test.rs line 385 at r1 (raw file):

    // Second scenario: resource bounds greater than balance.

    // TODO(Ori, 1/2/2024): Write an indicative expect message explaining why the conversion works.

you can delete this

Code quote:

// TODO(Ori, 1/2/2024): Write an indicative expect message explaining why the conversion works.

@yoavGrs yoavGrs force-pushed the yoav/blockifier/remove_constants/pre_validate/02 branch from 7531510 to 8cb19f7 Compare September 25, 2024 14:40
Copy link
Collaborator

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

Copy link
Contributor Author

yoavGrs commented Sep 26, 2024

Merge activity

  • Sep 25, 11:35 PM EDT: @yoavGrs started a stack merge that includes this pull request via Graphite.
  • Sep 25, 11:36 PM EDT: @yoavGrs merged this pull request with Graphite.

@yoavGrs yoavGrs merged commit 3a43d1d into main Sep 26, 2024
14 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 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.

2 participants