-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Split compute budget instructions process from struct itself #33513
Split compute budget instructions process from struct itself #33513
Conversation
f624bf9
to
b4317e7
Compare
Codecov Report
@@ Coverage Diff @@
## master #33513 +/- ##
=======================================
Coverage 81.8% 81.8%
=======================================
Files 806 807 +1
Lines 217937 217907 -30
=======================================
- Hits 178322 178318 -4
+ Misses 39615 39589 -26 |
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.
No functional change, a lot tests updates tho
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.
Left a few comments. I think this is the right direction, we want to separate the initial processing from ComputeBudget so we can do this processing early on and carry the result until we need to construct a ComputeBudget
8704f16
to
0c10518
Compare
e451ecf
to
4cdcb77
Compare
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.
Most of the diff comes from moved code and tests being changed.
I'm much happier with this than the current state of things; it will make it significantly easier to create a RuntimeTransaction
type that holds additional meta data to avoid unneccessary re-processing.
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.
Looks good, just a couple of minor nits
… itself, so CB instructions can be processed elsewhere without involving CompueBudget
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
4cdcb77
to
297353f
Compare
automerge label removed due to a CI failure |
…olana-labs#33513)" This reverts commit c73bebe. This commit was found to be a consensus breaking change for the tip of master.
Just a heads up that this commit is going to get reverted from master. One of the canaries running tip-of-master diverged from consensus, and I narrowed the divergence down to this commit. See #33784 for more details, especially #33784 (comment) |
Thanks for heads up, Looking into the cause ... |
Do we consider |
It shouldn't be public api. (https://discord.com/channels/428295358100013066/439194979856809985/1166387183389782167) |
Problem
struct ComputeBudget
is to be passed to vm for tracking compute unit consumption, but it'sprocess_instructions(...)
are being used elsewhere, unrelate to vm, to parse and get limits compute_budget_instructions set.the instruction processing function can/should be separated from the struct that holds budget limits. This would clean up logic, is a precursor step for
RuntimeTransaction
at #33471Summary of Changes
ComputeBudget
to be pure structure that is passed via invoke_context.Fixes #