-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add RPC "simulate" to execute a dry run of a transaction #5069
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5069 +/- ##
=========================================
+ Coverage 78.0% 78.1% +0.1%
=========================================
Files 789 790 +1
Lines 67061 67279 +218
Branches 8108 8101 -7
=========================================
+ Hits 52324 52562 +238
+ Misses 14737 14717 -20
|
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.
Only some minor remarks. I do not feel strongly about any of these, so please just do what you consider to be reasonable and ignore the rest.
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.
LGTM
simulate
RPC to dry-run a tx (XLS-69d)- Spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0069d-simulate - Also update signing methods to autofill fees better and properly handle transactions that require a non-standard fee.
High Level Overview of Change
This PR adds a new API method, titled
simulate
, which executes a dry run of a transaction submission.This PR also fixes #5070.
Context of Change
It is useful to take a transaction, simulate execution it in the current ledger, and return the metadata - but not persist the transaction in the ledger. This can be used for testing, analysis, and more.
XLS spec: XRPLF/XRPL-Standards#207
Type of Change
.gitignore
, formatting, dropping support for older tooling)API Impact
libxrpl
change (any change that may affectlibxrpl
or dependents oflibxrpl
)Test Plan
Testing is still in progress. Unit tests are and will be added.
Current Status
This PR is complete and ready for review. You can build this branch and sync with the network of your choice (including Mainnet). The public is welcome to test and use this code (at your own risk). Next steps are code review and QA testing.