-
Notifications
You must be signed in to change notification settings - Fork 65
blockifier: compute_proving_gas for cairo_primitives #12469
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
base: avivg/blockifier/cairo_primitives_to_gas
Are you sure you want to change the base?
blockifier: compute_proving_gas for cairo_primitives #12469
Conversation
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
bf253d4 to
7abd78e
Compare
ddde9e6 to
2c59ece
Compare
7abd78e to
8bf6bd2
Compare
2c59ece to
4a50c7f
Compare
2d7e0f6 to
d6b5bfd
Compare
4a50c7f to
31ccc82
Compare
avivg-starkware
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avivg-starkware made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion.
crates/blockifier/src/bouncer.rs line 900 at r1 (raw file):
// TODO(AvivG): To support opcodes in the computation, os resources should include opcode // counters.
Will happen as part of modifying tx_resources.computation.os_vm_resources
Code quote:
// TODO(AvivG): To support opcodes in the computation, os resources should include opcode
// counters.d6b5bfd to
7a891bf
Compare
31ccc82 to
f0672b5
Compare
7a891bf to
698ceda
Compare

Note
Medium Risk
Touches core gas/weight accounting used for block capacity and fee-related limits; mistakes could shift proving-gas totals and affect block admission decisions.
Overview
Updates proving-gas calculation to operate directly on
CairoPrimitiveCounterMaprather than converting from builtin-only counters.In
get_tx_weights, the proving-gas path now builds Cairo-primitive counters from OS VM builtins and merges in the transaction’s Cairo-primitive counters (to avoid double-countingtx_vm_resources), then uses these counters consistently throughcompute_proving_gas/proving_gas_from_cairo_primitives_and_sierra_gas.Written by Cursor Bugbot for commit 698ceda. This will update automatically on new commits. Configure here.