-
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
Add preflight checks to sendTransaction RPC method #10338
Conversation
6b9fc20
to
6cf67bd
Compare
@CriesofCarrots - I think this is ready for review. Mostly just playing whack-a-test right now, in some places like program deploy where we (currently) intentionally don't wait for max confirmation between the different phases of deployment and thus the new default sendTransaction preflight checks will fail. |
(also CI is being a 🐻) |
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.
Nice, this looks good to me, pending tests. And (note to self) now that the trusted validators are available in JsonRpcRequestProcessor via health, it will be straightforward to address #9882
Pull request has been modified.
Added |
Codecov Report
@@ Coverage Diff @@
## master #10338 +/- ##
=========================================
+ Coverage 81.3% 81.4% +0.1%
=========================================
Files 288 289 +1
Lines 67150 67315 +165
=========================================
+ Hits 54607 54811 +204
+ Misses 12543 12504 -39 |
OMG finally got through CI. |
sendTransaction
blindly dumps the transaction it receives into a TPU. It can do better by:and on failure, return an error to the caller. If the RPC node is unhealthy it will refuse to run the simulation
Preflight checks may be disabled if desired with
sendTransaction
's newconfig
input parameter. By default they are enabled for the convenience of existing API users.Towards #10336