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

Proposed 2.2.0-rc1 #5003

Merged
merged 16 commits into from
Apr 26, 2024
Merged

Proposed 2.2.0-rc1 #5003

merged 16 commits into from
Apr 26, 2024

Conversation

ximinez
Copy link
Collaborator

@ximinez ximinez commented Apr 26, 2024

High Level Overview of Change

This is a release candidate for the 2.2.0 release.

Highlights:

The base branch is release. All releases (including betas) go in release. This PR will be merged with --ff-only (not squashed or rebased, and not using the GitHub UI) to both release and develop.

Context of Change

This introduces

  • the fixAMMRounding amendment which fixes rounding to better preserve the AMM swap invariant new_balance_1*new_balance_2 >= old_balance_1*old_balance_2

It also introduces the first step in a physical code reorganization, unit test utilities to test RPC calls, and a global Rules object for transaction processing.

Type of Change

  • Release

API Impact

No API impact.

thejohnfreeman and others added 16 commits April 19, 2024 11:32
$ find src/ripple/ src/test/ -type f -exec sed -i 's:include\s*["<]ripple/\(.*\)\.h\(pp\)\?[">]:include <ripple/\1.h>:' {} +
It can be difficult to make transaction breaking changes to low level
code because the low level code does not have access to a ledger and the
current activated amendments in that ledger (the "rules"). This patch
adds global access to the current ledger rules as a `std::optional`. If
the optional is not seated, then there is no active transaction.
The AMM has an invariant for swaps where:
new_balance_1*new_balance_2 >= old_balance_1*old_balance_2

Due to rounding, this invariant could sometimes be violated (although by
very small amounts).

This patch introduces an amendment `fixAMMRounding` that changes the
rounding to always favor the AMM. Doing this should maintain the
invariant.

Co-authored-by: Bronek Kozicki
Co-authored-by: thejohnfreeman
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 70.9%. Comparing base (676aae2) to head (02ec8b7).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           release   #5003     +/-   ##
=========================================
- Coverage     71.0%   70.9%   -0.0%     
=========================================
  Files          796     796             
  Lines        66727   66792     +65     
  Branches     10973   10997     +24     
=========================================
+ Hits         47348   47377     +29     
- Misses       19379   19415     +36     
Files Coverage Δ
src/ripple/app/main/Main.cpp 47.0% <ø> (ø)
src/ripple/app/misc/TxQ.h 98.1% <ø> (ø)
src/ripple/app/paths/AMMLiquidity.h 100.0% <ø> (ø)
src/ripple/app/paths/impl/Steps.h 93.1% <ø> (ø)
src/ripple/app/reporting/ETLSource.cpp 0.0% <ø> (ø)
src/ripple/app/tx/impl/NFTokenAcceptOffer.cpp 89.6% <ø> (ø)
src/ripple/app/tx/impl/Transactor.cpp 84.5% <100.0%> (+<0.1%) ⬆️
src/ripple/basics/Number.h 100.0% <100.0%> (ø)
src/ripple/overlay/impl/TxMetrics.cpp 16.2% <ø> (ø)
src/ripple/overlay/impl/TxMetrics.h 100.0% <ø> (ø)
... and 9 more

... and 4 files with indirect coverage changes

Impacted file tree graph

@intelliot intelliot merged commit 02ec8b7 into XRPLF:release Apr 26, 2024
35 of 36 checks passed
@ximinez ximinez deleted the develop-next branch April 26, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants