Commit Graph

79 Commits

Author SHA1 Message Date
tequ
021eaa81bf fix Co-Signed Sponsoring Bypasses Sponsor Balance Check 2026-04-13 15:30:33 +09:00
tequ
700a528a25 Merge remote-tracking branch 'upstream/develop' into sponsor 2026-04-10 03:38:07 +09:00
Gregory Tsipenyuk
dfcad69155 feat: Add MPT support to DEX (#5285) 2026-04-08 16:17:37 +00:00
tequ
3f4e88c300 Merge remote-tracking branch 'xrplf/develop' into sponsor 2026-04-08 11:47:16 +09:00
Alex Kremer
2502befb42 chore: Enable clang-tidy misc checks (#6655) 2026-03-31 17:29:45 +00:00
tequ
41429dcc99 Merge remote-tracking branch 'upstream/develop' into sponsor 2026-03-25 11:59:44 +09:00
Mayukha Vadari
f7bb4018fa fix: Assorted Vault fixes (#6607) 2026-03-24 18:53:49 +00:00
Mayukha Vadari
8b986e4ab0 refactor: Improve imports to only call the needed helpers (#6624) 2026-03-24 10:20:32 +00:00
Mayukha Vadari
e0dbe90370 refactor: Move ledger entry helper functions from View.h/View.cpp to dedicated helper files (#6453)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-23 15:39:58 +00:00
tequ
f13945eff9 Merge remote-tracking branch 'upstream/develop' into sponsor 2026-03-19 11:10:44 +09:00
Mayukha Vadari
d360e7c5b6 refactor: Rename transactor files/classes to match the tx name (#6580) 2026-03-18 19:52:07 +00:00
Alex Kremer
57e4cbbcd9 refactor: Add simple clang-tidy readability checks (#6556)
This change enables the following clang-tidy checks:
-  readability-avoid-nested-conditional-operator,
-  readability-avoid-return-with-void-value,
-  readability-braces-around-statements,
-  readability-const-return-type,
-  readability-container-contains,
-  readability-container-size-empty,
-  readability-else-after-return,
-  readability-make-member-function-const,
-  readability-redundant-casting,
-  readability-redundant-inline-specifier,
-  readability-redundant-member-init,
-  readability-redundant-string-init,
-  readability-reference-to-constructed-temporary,
-  readability-static-definition
2026-03-18 16:41:49 +00:00
Mayukha Vadari
dcaef828b4 refactor: Replace !=/== tesSuccess with using isTesSuccess (#6409)
This change replaces all instances of `<variable> != tesSUCCESS` with `!isTesSuccess(<variable>)` and `<variable> == tesSUCCESS` with `isTesSuccess(<variable>)`.
2026-03-18 14:15:10 +00:00
tequ
013c2d6a56 refactor: Add const qualifier to SLE in verifyDepositPreauth parameter (#6555) 2026-03-17 19:33:18 +00:00
tequ
024ab07eb4 minor fixes 2026-03-17 21:35:08 +09:00
tequ
d95b6e41e5 Refactor variable declarations in xrpLiquid 2026-03-17 21:15:41 +09:00
tequ
eb7e01de7e Remove unused tx parameter from removeEmptyHolding() 2026-03-17 21:04:40 +09:00
tequ
c9666d7b45 refactor adjustOwnerCount() to use adjustSponsorOwnerCountHlp() 2026-03-17 20:28:01 +09:00
tequ
839ba17dae Refactor: sponsorship-related helpers 2026-03-17 20:11:49 +09:00
tequ
85e1f2b16c Rename [sponsor|sponsee]Acc,[sponsor|sponsee]Account to [sponsor|sponsee]AccountID for clarity 2026-03-17 18:32:30 +09:00
tequ
8c8ecffe1f remove tx parameter from adjustOwnerCount() 2026-03-17 18:14:24 +09:00
tequ
53f407e1bd Merge remote-tracking branch 'upstream/develop' into sponsor 2026-03-17 17:22:54 +09:00
Alex Kremer
0335076359 chore: Fix additional clang-tidy issues for unused-local-non-trivial-variable check (#6509) 2026-03-09 17:16:04 +00:00
tequ
062ece321b Merge remote-tracking branch 'upstream/develop' into sponsor 2026-02-23 23:20:21 +09:00
Ayaz Salikhov
2c1fad1023 chore: Apply clang-format width 100 (#6387) 2026-02-19 23:30:00 +00:00
Sergey Kuznetsov
31302877ab ci: Add clang tidy workflow to ci (#6369) 2026-02-19 14:06:44 -05:00
tequ
9cde57d284 audit 10 2026-02-18 15:09:12 +09:00
tequ
9859ba85a8 audit 9 2026-02-18 15:01:35 +09:00
tequ
f6d79f74d6 audit 8 2026-02-18 14:53:21 +09:00
tequ
392a913631 audit 3 2026-02-18 14:09:11 +09:00
tequ
49c52695cb sfSponsorAccount -> sfSponsor/sfCounterpartySponsor 2026-02-02 12:51:35 +09:00
tequ
4a205eb9d8 add checks to accountReserve and fix sponsored owner count for xrpLiquid 2026-01-30 22:23:45 +09:00
tequ
c0de722cfa sfHigh/LowSponsorAccount -> High/LowSponsor 2026-01-30 12:32:48 +09:00
tequ
65768237cd Payback ReserveCount 2026-01-30 11:36:56 +09:00
tequ
5f385e0f9b update to use sfSponsorFlags 2026-01-30 10:36:48 +09:00
tequ
8be44c7fc4 Merge remote-tracking branch 'upstream/develop' into sponsor 2026-01-29 11:22:42 +09:00
Ayaz Salikhov
5f638f5553 chore: Set ColumnLimit to 120 in clang-format (#6288)
This change updates the ColumnLimit from 80 to 120, and applies clang-format to reformat the code.
2026-01-28 18:09:50 +00:00
tequ
88e870b1c6 change sfSponsor to STAccount, Sponsor flags as global flags 2026-01-27 12:38:01 +09:00
tequ
990627fc9e Merge remote-tracking branch 'upstream/develop' into sponsor 2026-01-27 10:38:24 +09:00
Pratik Mankawde
96d17b7f66 ci: Add sanitizers to CI builds (#5996)
This change adds support for sanitizer build options in CI builds workflow. Currently `asan+ubsan` is enabled, while `tsan+ubsan` is left disabled as more changes are required.
2026-01-15 16:18:14 +00:00
tequ
204138fb0e Revert the use of calculateReserve in xrpLiquid 2026-01-15 18:48:35 +09:00
tequ
52ae31bb17 Merge commit 'c9458b72cab68d3cbbf533cc87d14309c2eb93b7' into sponsor 2026-01-15 16:34:24 +09:00
tequ
3568df43c4 add calculateReserve helper 2026-01-15 15:01:55 +09:00
tequ
5b91d815d1 address revew (std::optional + std::shared_ptr<SLE>) 2026-01-15 14:29:37 +09:00
Ed Hennis
2601442e16 Improve and fix bugs in Lending Protocol (#6102)
- Spec: XLS-66

    Fix overpayment asserts (#6084)

    MPTTester::operator() parameter should be std::int64_t
    - Originally defined as uint64_t, but the testIssuerLoan() test called
      it with a negative number, causing an overflow to a very large number
      that in some circumstances could be silently cast back to an int64_t,
      but might not be. I believe this is UB, and we don't want to rely on
      that.

    Review feedback from @Tapanito: overpayment value change
    - In overpayment results, the management fee was being calculated twice:
      once as part of the value change, and as part of the fees paid.
      Exclude it from the value change.

    Fix Overpayment Calculation  (#6087)
    - Adds additional unit tests to cover math calculations.
    - Removes unused methods.

    Review feedback from @shawnxie999: even more rounding
    - Round the initial total value computation upward, unless there is
      0-interest.
    - Rename getVaultScale to getAssetsTotalScale, and convert one incorrect
      computation to use it.
    - Use adjustImpreciseNumber for LossUnrealized.
    - Add some logging to computeLoanProperties.

    Fix LoanBrokerSet debtMaximum limits (#6116)

    Fix some minor bugs in Lending Protocol (#6101)
    - add nodiscard to unimpairLoan, and check result in LoanPay
    - add a check to verify that issuer exists
    - improve LoanManage error code for dust amounts

    Check permissions in LoanSet and LoanPay (#6108)

    Disallow pseudo accounts to be Destination for LoanBrokerCoverWithdraw (#6106)

    Ensure vault asset cap is not exceeded (#6124)

    Fix Overpayment ValueChange calculation in Lending Protocol (#6114)
    - Adds loan state to LoanProperties.
    - Cleans up computeLoanProperties.
    - Fixes missing management fee from overpayment.

    fix: Enable LP Deposits when the broker is the asset issuer (#6119)
    * Replace accountHolds with accountSpendable when checking
    for account funds in VaultDeposit and LoanBrokerCoverDeposit

    Add a few minor changes (#6158)
    - Updates or fixes a couple of things I noticed while reviewing changes
      to the spec.
    - Rename sfPreviousPaymentDate to sfPreviousPaymentDueDate.
    - Make the vault asset cap check added in #6124 a little more robust:
      1. Check in preflight if the vault is _already_ over the limit.
      2. Prevent overflow when checking with the loan value. (Subtract
         instead of adding, in case the values are near maxint. Both return
         the same result. Also add a unit test so each case is covered.

    Add minimum grace period validation (#6133)

    Fix bugs: frozen pseudo-account, and FLC cutoff (#6170)

    refactor: Rename raw state to theoretical state (#6187)

    Check if a withdrawal amount exceeds any applicable receiving limit. (#6117)

    Fix overpayment result calculation (#6195)

    Address review feedback from Lending Protocol re-review (#6161)

---------

Co-authored-by: Gregory Tsipenyuk <gregtatcam@users.noreply.github.com>
Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
Co-authored-by: Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
Co-authored-by: Jingchen <a1q123456@users.noreply.github.com>
2026-01-13 19:42:58 +00:00
tequ
ffb538242a Merge remote-tracking branch 'upstream/develop' into sponsor 2026-01-09 16:38:44 +09:00
Mayukha Vadari
3c9f5b6252 refactor: Fix typos in comments, configure cspell (#6164)
This change sets up a `cspell `configuration and fixes lots of typos in comments. There are no other code changes.
2026-01-07 12:10:19 -05:00
tequ
edddf3fe4b address review 2026-01-07 12:34:51 +09:00
tequ
cf03c4cb8f change Sponsor related fields to soeDEFAULT 2026-01-07 12:31:01 +09:00
tequ
198f3f83db remove unused insSponsorCoSigning args 2026-01-07 11:14:01 +09:00