This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Moves where the TransactionExecutionDetails::accounts_data_len_delta is interpreted #34692
Merged
brooksprumo
merged 3 commits into
solana-labs:master
from
brooksprumo:accounts-data-size/transaction-execution-details/accounts-data-len-delta
Jan 9, 2024
Merged
Moves where the TransactionExecutionDetails::accounts_data_len_delta is interpreted #34692
brooksprumo
merged 3 commits into
solana-labs:master
from
brooksprumo:accounts-data-size/transaction-execution-details/accounts-data-len-delta
Jan 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #34692 +/- ##
=======================================
Coverage 81.8% 81.8%
=======================================
Files 824 824
Lines 222687 222686 -1
=======================================
+ Hits 182245 182258 +13
+ Misses 40442 40428 -14 |
Lichtso
reviewed
Jan 8, 2024
runtime/src/bank.rs
Outdated
@@ -4916,7 +4915,7 @@ impl Bank { | |||
durable_nonce_fee, | |||
return_data, | |||
executed_units, | |||
accounts_data_len_delta, | |||
accounts_data_len_delta: accounts_resize_delta, |
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.
Could rename variable definition to be accounts_data_len_delta
.
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.
Yep, that'll just move this change to the destructing line. Would you prefer that?
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.
Done in 815888b
Lichtso
approved these changes
Jan 9, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
After executing a transaction, we build and return a
TransactionExecutionResult
. This value is used later when committing transactions.For recording the accounts data size delta, currently we are modifying the value stored into the execution result during
execute
based on the transaction's status, and then using the delta incommit
. Since this code is split, it's possible to miss one side vs the other. Also, we're conditionally changing what actually happened during transaction execution. It would be better to not change the delta, but instead move the interpretation tocommit
.Summary of Changes
The commits are: