-
Notifications
You must be signed in to change notification settings - Fork 257
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
bench-tps: allow option to not set account data size on every transaction #209
Conversation
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 except for one small change
bench-tps/src/bench.rs
Outdated
@@ -1131,6 +1155,10 @@ pub fn fund_keypairs<T: 'static + BenchTpsClient + Send + Sync + ?Sized>( | |||
return Err(BenchTpsError::AirdropFailure); | |||
} | |||
} | |||
let data_size_limit = match skip_tx_account_data_size { |
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.
I think match is not needed here, can be done with if
statement.
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.
In the light of the Greg's comment, maybe something like:
let data_size_limit = (!skip_tx_account_data_size)
.then(|| get_transaction_loaded_accounts_data_size(enable_padding));
bench-tps/src/bench.rs
Outdated
let data_size_limit = match skip_tx_account_data_size { | ||
true => 0, |
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.
using data_size_limit <- 0
to indicate there is no limit is a little confusing. maybe I'd use an Option<u32>
. That way if it is Some()
then there is a limit and if it is None
there is no limit
bench-tps/src/send_batch.rs
Outdated
instructions.push( | ||
ComputeBudgetInstruction::set_loaded_accounts_data_size_limit(data_size_limit), | ||
); | ||
if data_size_limit != 0 { |
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 data_size_limit
becomes Option<u32>
:
if data_size_limit != 0 { | |
if let Some(data_size_limit) = data_size_limit { |
e9ea404
to
9139719
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.
lgtm!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #209 +/- ##
=======================================
Coverage 81.9% 81.9%
=======================================
Files 837 837
Lines 226539 226490 -49
=======================================
- Hits 185548 185508 -40
+ Misses 40991 40982 -9 |
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
…tion (anza-xyz#209) bench-tps: allow option to not set account data size
Problem
Bench TPS needs this feature activated on the cluster since all transactions are hardcoded to include the instruction to set the account data size. However, this will not work on a test cluster where this feature is not activated. Moreover, Firedancer currently does not support that instruction.
Summary of Changes
This adds a flag
--skip-tx-account-data-size
which when specified, will not add that instruction. This makes Bench TPS work with FIredancer (and Solana clusters without any features activated).Fixes #