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.
is default() all disabled? this seems like we're testing more than 1 feature at a time.
There was a problem hiding this comment.
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.
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_limitwould 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