-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Moves where the TransactionExecutionDetails::accounts_data_len_delta is interpreted #34692
Moves where the TransactionExecutionDetails::accounts_data_len_delta is interpreted #34692
Conversation
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 |
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
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: