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): inject VC into CallInfo::summarize #2122

Conversation

dorimedini-starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator Author

dorimedini-starkware commented Nov 17, 2024

Copy link

Artifacts upload triggered. View details here

Copy link

codecov bot commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.38%. Comparing base (e3165c4) to head (70bfbca).
Report is 502 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2122       +/-   ##
===========================================
+ Coverage   40.10%   69.38%   +29.28%     
===========================================
  Files          26      108       +82     
  Lines        1895    13984    +12089     
  Branches     1895    13984    +12089     
===========================================
+ Hits          760     9703     +8943     
- Misses       1100     3874     +2774     
- Partials       35      407      +372     

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


🚨 Try these New Features:

@dorimedini-starkware dorimedini-starkware force-pushed the 11-17-refactor_blockifier_move_logic_to_function branch from 7a27e86 to 65e10b3 Compare November 18, 2024 09:31
@dorimedini-starkware dorimedini-starkware force-pushed the 11-17-refactor_blockifier_inject_vc_into_callinfo_summarize branch from 179fe8c to a9e2006 Compare November 18, 2024 09:31
Copy link

Artifacts upload triggered. View details here

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

I suggest a cleaner approach - don't pass the VC.
Summarize regularly, and if the flag is on, drop the event summary and calc it again on validate & execute call infos.

Also, this should not affect the bouncer.

Reviewable status: 0 of 10 files reviewed, all discussions resolved (waiting on @aner-starkware)

Copy link
Collaborator Author

@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.

  1. why is this cleaner? replacing an already-calculated object with another seems jumbled
  2. this will have no effect on the bouncer because this will have no effect on post-0.13.1 blocks; you are saying, it is worth adding code to ensure the 0.13.1 bouncer still gets "correct" event counting, and only the fee computation should be effected?

Reviewable status: 0 of 10 files reviewed, all discussions resolved (waiting on @aner-starkware)

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

  1. No, I say, if we don't pass the VC, you don't need to fix the calc for the bouncer, just for the fee calc.
  2. It is more local and framed. Doesn't require passing another argument to many places just for this. I prefer not to have this hack in call_info.summarize()

Reviewable status: 0 of 10 files reviewed, all discussions resolved (waiting on @aner-starkware)

Copy link
Collaborator Author

@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.

the TransactionResources struct doesn't store call infos. I would need to compute the "alternative" event resources when computing the resources, and then choose what to charge for in to_gas_vector.
injecting call infos as a dependency of resource computation seems like a worse option; did you have some specific place in mind where it makes sense to recompute?

Reviewable status: 0 of 10 files reviewed, all discussions resolved (waiting on @aner-starkware)

Copy link
Collaborator Author

@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.

No, I say, if we don't pass the VC, you don't need to fix the calc for the bouncer, just for the fee calc.

why would we want to fix this for the bouncer at all? bouncer is irrelevant for reexecution, and we should not support "no inner event charge" mode in latest sequencer version, right?

It is more local and framed. Doesn't require passing another argument to many places just for this.

where would we get the callinfos from...? (above question)

Reviewable status: 0 of 10 files reviewed, all discussions resolved (waiting on @aner-starkware)

@dorimedini-starkware dorimedini-starkware force-pushed the 11-17-refactor_blockifier_move_logic_to_function branch from 65e10b3 to 975ff5a Compare November 19, 2024 09:54
@dorimedini-starkware dorimedini-starkware force-pushed the 11-17-refactor_blockifier_inject_vc_into_callinfo_summarize branch from a9e2006 to d525dc2 Compare November 19, 2024 09:54
Copy link

Artifacts upload triggered. View details here

Copy link
Collaborator

@Yoni-Starkware Yoni-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 4 of 10 files at r1, 6 of 6 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @aner-starkware)

Copy link
Collaborator Author

dorimedini-starkware commented Nov 19, 2024

Merge activity

  • Nov 19, 7:52 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Nov 19, 7:55 AM EST: Graphite rebased this pull request as part of a merge.
  • Nov 19, 8:10 AM EST: A user merged this pull request with Graphite.

@dorimedini-starkware dorimedini-starkware changed the base branch from 11-17-refactor_blockifier_move_logic_to_function to graphite-base/2122 November 19, 2024 12:53
@dorimedini-starkware dorimedini-starkware changed the base branch from graphite-base/2122 to main November 19, 2024 12:53
@dorimedini-starkware dorimedini-starkware force-pushed the 11-17-refactor_blockifier_inject_vc_into_callinfo_summarize branch from d525dc2 to 70bfbca Compare November 19, 2024 12:54
Copy link

Artifacts upload triggered. View details here

Copy link

Artifacts upload triggered. View details here

@dorimedini-starkware dorimedini-starkware merged commit 510321b into main Nov 19, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants