This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Refactor: Improve type safety and readability of transaction execution#22215
Merged
jstarry merged 4 commits intosolana-labs:masterfrom Jan 5, 2022
Merged
Refactor: Improve type safety and readability of transaction execution#22215jstarry merged 4 commits intosolana-labs:masterfrom
jstarry merged 4 commits intosolana-labs:masterfrom
Conversation
9a0984a to
facb06b
Compare
facb06b to
f2c8a11
Compare
f2c8a11 to
79f59be
Compare
79f59be to
a48f5c2
Compare
Codecov Report
@@ Coverage Diff @@
## master #22215 +/- ##
=========================================
- Coverage 81.1% 81.1% -0.1%
=========================================
Files 523 523
Lines 146705 146742 +37
=========================================
+ Hits 118995 119013 +18
- Misses 27710 27729 +19 |
b3b56a3 to
d6fd639
Compare
d6fd639 to
de19eee
Compare
Contributor
Author
|
@Lichtso can you take another look? |
Lichtso
reviewed
Jan 4, 2022
Lichtso
reviewed
Jan 4, 2022
Lichtso
reviewed
Jan 4, 2022
Lichtso
reviewed
Jan 4, 2022
Contributor
Author
|
Thanks for the feedback @Lichtso, did you finish your review pass? I've addressed your comments |
Lichtso
previously approved these changes
Jan 4, 2022
Contributor
|
automerge label removed due to a CI failure |
f412e9a to
83906a9
Compare
Contributor
|
automerge label removed due to a CI failure |
mergify Bot
pushed a commit
that referenced
this pull request
Jan 5, 2022
#22215) * Refactor Bank::load_and_execute_transactions * Refactor: improve type safety of TransactionExecutionResult * Add enum for extra type safety in execution results * feedback (cherry picked from commit 45458e7) # Conflicts: # programs/bpf/benches/bpf_loader.rs # programs/bpf/tests/programs.rs # runtime/src/bank.rs
jstarry
added a commit
that referenced
this pull request
Jan 5, 2022
Closed
This file contains hidden or 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
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
Bank::can_commitinfamously handles this)NonceFullis used in bothLoadedTransactionandTransactionExecutionResultBank::load_and_execute_transactionsis 300 lines long and confusing to follow because it re-assignsprocess_resulta lotSummary of Changes
TransactionExecutionDetailswhich aims to make it easier to differentiate between tx errors which should be committed or not. It also holds recorded log messages and inner instructions now to avoid some zipping of data structures.Bank::execute_loaded_transactionmethod to makeBank::load_and_execute_transactionseasier to readFixes #