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

Unit tests for AMM offer overflow fix #4986

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

Bronek
Copy link
Collaborator

@Bronek Bronek commented Apr 12, 2024

High Level Overview of Change

Unit tests for #4968

Context of Change

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

Copy link
Collaborator

@gregtatcam gregtatcam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to add expected offer balances? This way we can see the amounts going via AMM/LOB.

@ckeshava
Copy link
Collaborator

@gregtatcam I agree, please view it here: Bronek#1

Qualitatively, the LOB offers are being used when one side of the AMM is being overwhelmed by sendmax parameter. This makes sense because LOB provides better quality offers whereas the AMM becomes capital-inefficient towards extremities.

However, I'm not familiar enough with the synthetic offer generation process to validate the actual numbers myself. Let me know if I can improve the validation further.

Copy link
Collaborator

@scottschurr scottschurr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test looks good to me as it is. If you want to enhance it, I'm good with that too.

Copy link
Collaborator

@gregtatcam gregtatcam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Bronek Bronek self-assigned this Apr 16, 2024
@Bronek Bronek added Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. Perf impact not expected Change is not expected to improve nor harm performance. labels Apr 16, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 72.05882% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 76.98%. Comparing base (659bd99) to head (34ff8e7).

Files Patch % Lines
src/test/app/AMM_test.cpp 72.05% 18 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4986      +/-   ##
===========================================
+ Coverage    76.97%   76.98%   +0.01%     
===========================================
  Files         1129     1129              
  Lines       131958   132026      +68     
  Branches     39576    39604      +28     
===========================================
+ Hits        101570   101639      +69     
- Misses       24423    24447      +24     
+ Partials      5965     5940      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ximinez ximinez merged commit 8b0d049 into XRPLF:develop Apr 18, 2024
16 of 17 checks passed
sophiax851 pushed a commit to sophiax851/rippled that referenced this pull request Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. Perf impact not expected Change is not expected to improve nor harm performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants