Include loaded accounts data size in TransactionResults #1525
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Total loaded-accounts-data-size for successfully loaded transaction is accumulated during
load_transaction_accounts()
. It is useful information, could be included inTransactionResults
that is returned fromload_execute_and_commit_transactions()
, so call sites can access stats of loaded accounts of sanitized transactions.For now, such stats includes the actual loaded-accounts-data-size, count of loaded accounts.
The use of this information is planned for:
cost_tracker
uses it to adjust reserved block space for transaction, in the same fashion as it adjust for estimated/actual execution cost. (note: loaded accounts data size contributes to transaction cost in term of CU, charging CU for loaded accounts data size #1356 )replay_stage
uses it to report histogram of loaded accounts data size per transaction.Summary of Changes
pub struct TransactionLoadedAccountsStats
TransactionResults
Fixes #