Commit Graph

14206 Commits

Author SHA1 Message Date
Ed Hennis
9405f8823d Merge branch 'ximinez/lending-XLS-66' into ximinez/lending-enabled 2025-11-28 15:52:59 -05:00
Ed Hennis
060ee70eb0 Merge branch 'develop' into ximinez/lending-XLS-66 2025-11-28 15:46:31 -05:00
Bart
b33b506b90 refactor: Replaces ed25519-donna source by Conan package (#6088)
This change substitutes the `ed25519-donna` source code copy by the Conan recipe added in https://github.com/XRPLF/conan-center-index/pull/23.
2025-11-27 16:51:32 +00:00
Ed Hennis
bea3ce952e Merge branch 'develop' into ximinez/lending-XLS-66 2025-11-27 01:48:44 -05:00
Ayaz Salikhov
f399749ee2 chore: Add black pre-commit hook (#6086)
This change adds Black as a pre-commit hook to format Python files.
2025-11-26 19:14:17 +00:00
Ayaz Salikhov
2ed4047840 chore: Make conan lockfile generation commands into a script (#6085)
This change moves the lockfile instructions into a script, and instead of removing packages it sets the Conan home directory to a temporary directory.

There are several advantages, such as:
* Not affecting the user's Conan home directory, so there is no need to remove packages.
* Only the script needs to be run, rather than several commands.
2025-11-26 18:43:14 +00:00
Ayaz Salikhov
4e25dc9291 chore: Update lockfile (#6083)
This change update recipes, to make sure we have the best compatibility with latest compilers and so on.
2025-11-26 17:54:36 +00:00
Bart
a18b30b765 docs: Update instructions how to (re)generate conan.lock file (#6070)
This change updates the instructions for how to generate a Conan lockfile that is compatible with Linux, macOS, and Windows.

Whenever Conan dependencies change, the Conan lock file needs to be regenerated. However, different OSes have slightly different requirements, and thus require slightly different dependencies. Luckily a single `conan.lock` file can be used, as long as the union of dependencies is included.

The current instructions in the `BUILD.md` file are insufficient to regenerate the lock file such that it is compatible with all OSes, which this change addresses. The three profiles contain the bare minimum needed to generate the lockfile; it does not particularly matter whether the build type is Debug or Release, for instance.
2025-11-26 17:28:06 +00:00
Ed Hennis
06e79bd3d5 Merge branch 'ximinez/lending-XLS-66' into ximinez/lending-enabled 2025-11-26 00:25:51 -05:00
Ed Hennis
8035a46514 Merge branch 'develop' into ximinez/lending-XLS-66 2025-11-26 00:25:02 -05:00
Bart
856470203a ci: Trigger clio pipeline on PRs targeting release branches (#6080)
This change triggers the Clio pipeline on PRs that target any of the `release*` branches (in addition to the `master` branch), as opposed to only the `release` branch.
2025-11-25 21:03:17 +00:00
Ed Hennis
315b511326 Merge branch 'develop' into ximinez/lending-XLS-66 2025-11-25 14:54:52 -05:00
Ed Hennis
40cd57355d Review feedback from @shawnxie999: MPT Clawback
- MPTs do not require the lsfMPTCanLock flag to be able to clawback
2025-11-25 14:46:46 -05:00
Ed Hennis
77e3bbdc89 Move the ValidPseudoAccounts class back to its original location
- The class didn't actually change much, if at all, but somehow got
  relocated.
- This should make the review easier, and reduce the footprint of the
  PR.
2025-11-25 13:29:05 -05:00
Ed Hennis
49ee70ea28 Fix formatting again 2025-11-25 12:22:15 -05:00
Jingchen
b124c9f7e3 refactor: Retire Flow and FlowSortStrands amendments (#6054)
Amendments activated for more than 2 years can be retired. This change retires the Flow and FlowSortStrands amendments.
2025-11-25 14:21:17 +00:00
Vito Tumas
5773f2440a Add additional documentation to Lending Protocol (#6037)
- documents core equations of the lending protocol
2025-11-25 05:37:04 +00:00
Ed Hennis
50a523f77a Merge branch 'ximinez/lending-XLS-66' into ximinez/lending-enabled 2025-11-24 21:49:43 -05:00
Ed Hennis
08a6bef7f3 Merge branch 'develop' into ximinez/lending-XLS-66 2025-11-24 21:48:57 -05:00
Bart
b550dc00ed ci: Remove missing commits check (#6077)
This change removes the CI check for missing commits, as well as a stray path to the publish-docs workflow that isn't used in the on-trigger workflow.
2025-11-24 21:43:39 -05:00
Ed Hennis
67886de4ab Merge branch 'ximinez/lending-XLS-66' into ximinez/lending-enabled 2025-11-24 21:43:03 -05:00
Ed Hennis
b8d830a812 Fix formatting 2025-11-24 21:38:21 -05:00
Ed Hennis
814fe018b7 Merge branch 'develop' into ximinez/lending-XLS-66 2025-11-24 21:30:08 -05:00
Ed Hennis
dedafbe326 Review feedback from @gregtatcam: typo 2025-11-24 20:54:31 -05:00
Ed Hennis
71bb08cd78 Review feedback from @Tapanito, @gregtatcam, and @shawnxie999
- Created a common doWithdraw function for VaultWithdraw and
  LoanBrokerCoverWithdraw. Added verifyDepositPreauth to it, so that
  both transactions will get the check.
- Add a missing null check to LoanBrokerSet, and add log messages to the
  existing checks.
2025-11-24 20:42:40 -05:00
Ed Hennis
25e72d7844 Update src/xrpld/app/tx/detail/LoanBrokerCoverClawback.cpp
Co-authored-by: Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
2025-11-24 21:42:03 -04:00
Ed Hennis
005390e266 Fix formatting 2025-11-24 19:48:57 -05:00
Vito Tumas
24586ef394 Add deep freeze check to LoanBrokerDelete (#6053)
- Add logging for missing vault
- Fix unit test
2025-11-24 23:17:34 +00:00
Ed Hennis
3ef6508490 Fix build error with LoanBroker invariant 2025-11-24 17:55:29 -05:00
Ed Hennis
c5f5edebcc Address a couple of feedback items from @Tapanito and @shawnxie999:
- Call verifyDepositAuth in VaultWithdraw and LoanBrokerCoverWithdraw to
  a destination.
- Update a couple of impossible error returns to log a message, but
  exclude from coverage.
- Fail if the LoanBroker.LoanSequence overflows to 0.
2025-11-24 17:45:56 -05:00
Ed Hennis
bb3bd74457 Review feedback from @shawnxie999: removeEmptyHolding
- removeEmptyHolding will succeed if the account is the issuer
- If it encounters a trust line in that state, the line will always be
  deleted.
- If it encounters an MPTToken in that state, which should be
  impossible, the token will be deleted if it doesn't have a balance.
2025-11-24 17:44:58 -05:00
Ed Hennis
7e6647e769 Review feedback from @shawnxie999: broker owner count
Annotate loan broker owner set/delete owner count adjustment
2025-11-24 17:44:57 -05:00
Ed Hennis
b7b0a65735 Update src/xrpld/app/tx/detail/LoanBrokerCoverClawback.cpp
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
2025-11-24 18:44:16 -04:00
Ed Hennis
e850b9f799 Update src/xrpld/app/tx/detail/LoanBrokerCoverDeposit.cpp
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
2025-11-24 18:25:56 -04:00
Ed Hennis
4081c9b8e9 Update src/xrpld/app/tx/detail/LoanBrokerSet.cpp
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
2025-11-24 18:20:00 -04:00
Ed Hennis
a7af773dd8 Add a LoanBroker invariant to compare CoverAvailable to balance
- Ensures that LoanBroker.CoverAvailable is never less than the
  pseudo-account balance for the Vault asset.
2025-11-24 16:24:35 -05:00
Jingchen
21c02232a5 refactor: Retire RequireFullyCanonicalSig amendment (#6035)
Amendments activated for more than 2 years can be retired. This change retires the RequireFullyCanonicalSig amendment.
2025-11-24 13:58:37 +00:00
Jingchen
a791c03dc1 refactor: Retire DeletableAccounts amendment (#6056)
Amendments activated for more than 2 years can be retired. This change retires the DeletableAccounts amendment.
2025-11-24 11:52:08 +00:00
Jingchen
800a315383 refactor: Retire CryptoConditionsSuite amendment (#6036)
Amendments activated for more than 2 years can be retired. This change retires the CryptoConditionsSuite amendment.
2025-11-24 06:23:16 -05:00
Ed Hennis
1ba010031d Review feedback from @gregtatcam: variable name
- Renamed "fee" to "overpaymentFee" in "computeOverpaymentComponents".
2025-11-23 23:32:23 -05:00
Ed Hennis
76766e93df Review feedback from @gregtatcam: readability 2025-11-23 23:14:26 -05:00
Ed Hennis
dd5464d921 From discussion with @gregtatcam: Revert "Payment"
- Revert Payment transactor (Payment.*) back to what is in "develop".
- Change LoanBrokerCoverWithdraw to do a direct transfer, whether it's
  too the account or the destination. Similar to VaultWithdraw, and as
  specified
- https://github.com/XRPLF/rippled/pull/5270#discussion_r2554560222
2025-11-23 23:06:44 -05:00
Ed Hennis
4c28e750ff Review feedback from @gregtatcam: compute vs. calculate
- Rename the LendingHelper functions that started with `calculate` to
  start with `compute`.
2025-11-23 21:41:38 -05:00
Ed Hennis
4ba2514bfa Review feedback from @gregtatcam: LoanDeltas
- Renamed to LoanStateDeltas, and document what it's for
2025-11-23 21:28:09 -05:00
Ed Hennis
27a7138f88 Review feedback from @gregtatcam: constructRoundedLoanState
- Rename the overload of constructRoundedLoanState that takes components
  as inputs to constructLoanState. The original function did no rounding
  or enforcement of the inputs being rounded.
- Left the overload constructRoundedLoanState(SLE::const_ref loan)
  alone, because Loan objects are assumed to be rounded.
2025-11-23 21:09:56 -05:00
Ed Hennis
36c1dd18ee Review feedback from @Tapanito: final payment
- Optimize final payment by checking and returning that case before
  doing any other computations. Removes some asserts that weren't really
  adding value.
2025-11-23 17:28:32 -05:00
Ed Hennis
deab24b580 Review feedback from @gregtatcam: full interest
- Found computed full interest downward, per spec.
2025-11-23 17:10:15 -05:00
Ed Hennis
58497541c7 Review feedback from @gregtatcam: LoanPay flags
- Used std::popcount instead of a loop to check for mutually exclusive
  flags
2025-11-23 15:29:48 -05:00
Ed Hennis
b8ad6d3950 Review feedback from @a1q123456: LoanDelete
- Update the ValidLoan invariant to guarantee that Loan fields are
  consistent for the paid off and not paid off state.
2025-11-23 14:58:45 -05:00
Ed Hennis
63724e4405 Review feedback from @gregtatcam: seconds per year
- Define a constexpr secondsInYear in LedgerHelpers.h
2025-11-23 00:03:52 -05:00