Skip to content
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

feat: add simulate RPC (XLS-69d) #5069

Open
wants to merge 50 commits into
base: develop
Choose a base branch
from
Open

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Jul 18, 2024

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

XLS spec: XRPLF/XRPL-Standards#207

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

Test Plan

Testing is still in progress. Unit tests are and will be added.

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 99.24528% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.6%. Comparing base (0d887ad) to head (abed90c).

Files with missing lines Patch % Lines
src/xrpld/rpc/detail/TransactionSign.cpp 98.5% 1 Missing ⚠️
src/xrpld/rpc/handlers/Simulate.cpp 99.2% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5069     +/-   ##
=========================================
+ Coverage     77.5%   77.6%   +0.1%     
=========================================
  Files          777     778      +1     
  Lines        65831   66033    +202     
  Branches      8184    8177      -7     
=========================================
+ Hits         51026   51236    +210     
+ Misses       14805   14797      -8     
Files with missing lines Coverage Δ
include/xrpl/protocol/ErrorCodes.h 100.0% <ø> (ø)
src/libxrpl/protocol/ErrorCodes.cpp 71.4% <ø> (ø)
src/libxrpl/protocol/InnerObjectFormats.cpp 100.0% <100.0%> (ø)
src/xrpld/app/ledger/detail/LedgerMaster.cpp 44.4% <100.0%> (+0.1%) ⬆️
src/xrpld/app/ledger/detail/OpenLedger.cpp 73.4% <100.0%> (+0.3%) ⬆️
src/xrpld/app/main/Main.cpp 79.8% <ø> (ø)
src/xrpld/app/misc/NetworkOPs.cpp 70.1% <100.0%> (+<0.1%) ⬆️
src/xrpld/app/misc/TxQ.h 98.2% <ø> (ø)
src/xrpld/app/misc/detail/TxQ.cpp 98.9% <100.0%> (+0.1%) ⬆️
src/xrpld/app/tx/applySteps.h 100.0% <ø> (ø)
... and 17 more

... and 7 files with indirect coverage changes

Impacted file tree graph

@mvadari mvadari requested review from godexsoft and removed request for godexsoft July 18, 2024 21:49
@mvadari
Copy link
Collaborator Author

mvadari commented Jul 29, 2024

This is now fully finished and ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sign-and-submit mode doesn't autofill the correct tx fee (Version: rippled 2.1.0)
2 participants