-
Notifications
You must be signed in to change notification settings - Fork 264
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
Fix reserve minimal cus for builtins #3755
Fix reserve minimal cus for builtins #3755
Conversation
f3ead6a
to
abf2430
Compare
@@ -313,7 +346,9 @@ mod tests { | |||
use { | |||
super::*, | |||
itertools::Itertools, | |||
log::debug, |
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.
The tests here for the most part should be testing the cost model with and without the new feature enabled
solana_svm_transaction::instruction::SVMInstruction, | ||
std::num::NonZero, | ||
}; | ||
|
||
const ONE_PAGE: u32 = 32 * 1024; | ||
const SIXTY_FOUR_MB: u32 = 64 * 1024 * 1024; | ||
|
||
fn feature_set() -> FeatureSet { |
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.
The benches should create the feature_set()
outside of the bench run to avoid creating the feature hashmap each iteration
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.
Creating default feature_set in each bench, outside bench_function, to be friendlier for backporting. Will do followup PR to add for feature_set_enabled in [true, false] { bench_function(...) }
@@ -17,6 +18,10 @@ use { | |||
const NUM_TRANSACTIONS_PER_ITER: usize = 1024; | |||
const DUMMY_PROGRAM_ID: &str = "dummmy1111111111111111111111111111111111111"; | |||
|
|||
fn feature_set() -> FeatureSet { | |||
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.
same with these benches, shouldn't create the feature set hashmap on each bench iter
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.
made same change
6b850be
to
8394c7a
Compare
8394c7a
to
45d9672
Compare
…on meta, so it is in sync with cu-meter
45d9672
to
75826ae
Compare
If this PR represents a change to the public RPC API:
Thank you for keeping the RPC clients in sync with the server API @tao-stones. |
Adding Close this in fav of #3799, which caches "migrating builtin info" as part of static meta, only to resolve its actual status during sanitizing where feature_set is available. |
Problem
Implementing SIMD-170 by defining
MAX_BUILTIN_ALLOCATION_COMPUTE_UNIT_LIMIT
to 3K CUs, then use it to allocate CU Meters for VM and cost tracking for leaders.Summary of Changes
MAX_BUILTIN_ALLOCATION_COMPUTE_UNIT_LIMIT
per builtin instruction, including compute-budget program instructions.feature_set
parameters (touch many files)Feature Gate Issue: #2562