-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Update cost model and cost tracker logic when runtime starts to consume CU for all builtins #32080
Conversation
e6ded48
to
ec7d167
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #32080 +/- ##
=========================================
- Coverage 82.0% 81.9% -0.1%
=========================================
Files 769 765 -4
Lines 208993 208735 -258
=========================================
- Hits 171390 171112 -278
- Misses 37603 37623 +20 |
assert_eq!(*expected_execution_cost, tx_cost.builtins_execution_cost); | ||
assert_eq!(0, tx_cost.bpf_execution_cost); | ||
assert_eq!(3, tx_cost.data_bytes_cost); | ||
for feature_set in [FeatureSet::default(), FeatureSet::all_enabled()] { |
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.
is default()
all disabled? this seems like we're testing more than 1 feature at a time.
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.
All features are disabled by default()
. Yea, the point is valid. I did this because it's easy and (looks) clean - it tests two status: all on or all off, but that may have added ambiguity
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.
Yeah testing features is unfortunately kind of messy, particularly if we've got multiple "in flight" features in a single component such as cost model
…rograms_consume_cu status; 2. TransactionCost to combine builtin and bpf execution cost into programs_execution_cost; 3. enhance tests to cover feature gate native_programs_consume_cu status
8841096
to
31c2018
Compare
This repository is no longer in use. Please re-open this pull request in the agave repo: https://github.com/anza-xyz/agave |
Problem
feature gate
native_programs_consume_cu
(#30620) changes how builtins consume compute units:This change requires cost model and cost tracker logic to be updated accordingly.
Summary of Changes
compute_unit_limit
would apply to both builtin and bpf programs inget_transaction_cost()
.programs_execution_cost()
to TransactionCost to combine builtin and bpf execution costsNote: behind feature gate #30620