-
Notifications
You must be signed in to change notification settings - Fork 380
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
SIMD-0256: Raise block limit to 60M #5171
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,7 +94,10 @@ use { | |
solana_builtins::{prototype::BuiltinPrototype, BUILTINS, STATELESS_BUILTINS}, | ||
solana_compute_budget::compute_budget::ComputeBudget, | ||
solana_compute_budget_instruction::instructions_processor::process_compute_budget_instructions, | ||
solana_cost_model::{block_cost_limits::simd_0207_block_limits, cost_tracker::CostTracker}, | ||
solana_cost_model::{ | ||
block_cost_limits::{simd_0207_block_limits, simd_0256_block_limits}, | ||
cost_tracker::CostTracker, | ||
}, | ||
solana_feature_set::{self as feature_set, FeatureSet}, | ||
solana_fee::FeeFeatures, | ||
solana_lattice_hash::lt_hash::LtHash, | ||
|
@@ -4844,6 +4847,18 @@ impl Bank { | |
); | ||
} | ||
|
||
if self | ||
.feature_set | ||
.is_active(&feature_set::raise_block_limits_to_60m::id()) | ||
{ | ||
let (account_cost_limit, block_cost_limit, vote_cost_limit) = simd_0256_block_limits(); | ||
self.write_cost_tracker().unwrap().set_limits( | ||
account_cost_limit, | ||
block_cost_limit, | ||
vote_cost_limit, | ||
); | ||
} | ||
|
||
// If the accounts delta hash is still in use, start the background account hasher | ||
if !self | ||
.feature_set | ||
|
@@ -6525,6 +6540,15 @@ impl Bank { | |
); | ||
} | ||
|
||
if new_feature_activations.contains(&feature_set::raise_block_limits_to_60m::id()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure exactly how we want to handle this conditional logic.. E.g. what would we want to happen if both features were activated in the same epoch? Currently, we will write the 207 limits then the 256 limits. That seems right to me. Practically speaking, we will activate these in separate epochs, of course. same thing applies to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. intent is for 207, then 256. the ordering here to me makes sense; if 256 is active, we use 256 limits, regardless of the status of 207. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should have a test for that case as well? activate 256 first, then 207, make sure we have 256 limits. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. test added |
||
let (account_cost_limit, block_cost_limit, vote_cost_limit) = simd_0256_block_limits(); | ||
self.write_cost_tracker().unwrap().set_limits( | ||
account_cost_limit, | ||
block_cost_limit, | ||
vote_cost_limit, | ||
); | ||
} | ||
|
||
if new_feature_activations.contains(&feature_set::remove_accounts_delta_hash::id()) { | ||
// If the accounts delta hash has been removed, then we no longer need to compute the | ||
// AccountHash for modified accounts, and can stop the background account hasher. | ||
|
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.
@t-nelson - this probably makes your eyes bleed... mea culpa.
Given we're going to keep doing this several more times, what would you like this to look like?
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.
Given we plan to continue this chain, maybe it's better to not use a tuple, and just define a new structure:
refactor
CostTracker::set_limit
to take this object and store it internally in theCostTracker
as well.edit: fields can be private as well...so then only constructors of this are guaranteed to be from one of our functions in
block_cost_limit.rs
😄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.
if we plan to backport this, would prefer to keep the simple tuple. then do refactoring only on master