-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add (preflight) simulation to BanksClient #22084
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22084 +/- ##
=========================================
- Coverage 81.2% 81.1% -0.1%
=========================================
Files 521 521
Lines 146060 146126 +66
=========================================
+ Hits 118630 118632 +2
- Misses 27430 27494 +64 |
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.
Just a few thoughts, looking good so far!
9e5cc71
to
e83f548
Compare
@joncinque , ready for proper review! I verified this against the case that came up in |
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 great! Just one tiny nit, which you can absolutely take or leave
e83f548
to
00d004f
Compare
Pull request has been modified.
* Add more-legitimate conversion from legacy Transaction to SanitizedTransaction * Add Banks method with preflight checks * Expose BanksClient method with preflight checks * Unwrap simulation err * Add Bank simulation method that works on unfrozen Banks * Add simpler api * Better name: BanksTransactionResultWithSimulation (cherry picked from commit 422a095)
* Add more-legitimate conversion from legacy Transaction to SanitizedTransaction * Add Banks method with preflight checks * Expose BanksClient method with preflight checks * Unwrap simulation err * Add Bank simulation method that works on unfrozen Banks * Add simpler api * Better name: BanksTransactionResultWithSimulation (cherry picked from commit 422a095) Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Oops, I never responded to this part. I didn't have any specific test cases unfortunately |
No worries, wrote my own post-merge. |
This PR has been automatically locked since there has not been any activity in past 14 days after it was merged. |
Problem
BanksServer operation is confusing or clunky for cases where a transaction does not land (successfully or with InstructionError). See #22029 for more details and examples.
Summary of Changes
Add Banks method with preflight checks, and expose via the BanksClient::process_transaction_with_preflight() method.
Consider adding stronger comments recommending this api.
Fixes #22029
cc @joncinque