We are on an amendment retiring spree, but each change results in conflicts in `features.macro` because currently they all add the retired amendment to the end of the list. By sorting the list the number of conflicts should be reduced, making it easier to merge them.
Amendments activated for more than 2 years can be retired. This change retires the fix1571 amendment.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
To protect the identity of UNL validators, the IP addresses are redacted from the log messages sent to the common Grafana instance. However, without such identifying information it is challenging to debug issues. This change adds a node's public key to logs to improve our ability to debug issues.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
* Retired fix1781 amendment
Signed-off-by: Pratik Mankawde <pmankawde@ripple.com>
* refactor: Retire fix1781 amendment
Amendments activated for more than 2 years can be retired. This change retires the fix1781 amendment.
---------
Signed-off-by: Pratik Mankawde <pmankawde@ripple.com>
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
This change reduces the number of cores used to build and test, as using all cores may be contributing to occasional build and test failures.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
* XRPLF/develop:
ci: Use commit hash so workflows are not canceled when merging multiple PRs (5950)
ci: Only upload codecov reports in the original repo, not in forks (5953)
ci: Only log into Conan when uploading packages (5952)
fix: invariant error in fee-sized `VaultWithdraw` (5876)
fix: account_tx limit parameter validation for malformed values (5891)
refactor: Retire fix1543 amendment (5926)
ci: Only run .exe files during test phase on Windows (5947)
refactor: Migrate json unit tests to use doctest (5533)
Change `fixMPTDeliveredAmount` to `Supported::yes` (5833)
fix: Upload all test binaries (5932)
chore: Better pre-commit failure message (5940)
- Compute the next "true" state, round the values off, then compute the
deltas needed to get the current state to that state. Plus some data
integrity checks.
- Add `Number::zero`, which is longer to type, but more readable than
`Number{}`.
- Prepare to improve Loan unit tests: track managementFeeRate in
BrokerInfo, define a LoanParameters object for creation options and
start adding support for it, track and verify loan state while making
payments.
This change changes the CI concurrency group for pushes to the `develop` branch to use the commit hash instead of the target branch.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
There are separate steps for logging into Conan and uploading packages. However, at the moment sometimes the login step is executed even though no packages will be uploaded. The condition for performing both steps should be the same.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
This changes fixes an invariant error where the amount withdrawn is equal to the transaction fee.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
This change fixes the `account_tx` RPC method to properly validate malformed limit parameter values. Previously, invalid values like `0`, `1.2`, `"10"`, `true`, `false`, `-1`, `[]`, `{}`, etc. were either accepted without errors or caused internal errors. Now all malformed values correctly return the `invalidParams` error.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
Amendments activated for more than 2 years can be retired. This change retires the fix1543 amendment.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
- Addresses FIND-013 from audit.
- Bases the limit on the current ledger time, and ensures that
"payments * interval <= limit". This allows a loan to potentially run through
"the end of time" successfully, but not go a second over.
- Wrote several test cases, including a few that go right to "the end of
time".
- FIND-005, FIND-009, and FIND-010.
- Add the finding number to existing tests - FIND-001, FIND-003,
FIND-012, FIND-007.
- Tweak the interest rate failure log messages in LoanSet.
- Addresses FIND-005 from audit.
- Tuning values defined in Protocol.h. Optimal values TBD.
- loanPaymentsPerFeeIncrement: calculateBaseFee estimates the number
of payments included in the Amount and charges
"baseFee * number / loanPaymentsPerFeeIncrement".
- loanMaximumPaymentsPerTransaction: If the number of payments
(including overpayments if applicable) hits this limit, stop
processing more payments, but DO NOT FAIL.
- Fix the rounding in LoanSet for Guard 4 (sufficient computed payments)
- Tweak several test parameters to account for the new limits.
- Change payment component rounding for IOUs to "towards_zero".
- Add some safety limits to loan calculations to prevent nonsensical
values.
- Addresses FIND-006 from audit.
- Removes the "minimum" check for sfLoanOriginationFee, and replaces it
with a "valid range" check with the max value being
sfPrincipalRequested.
- Reuses the test from the report, with some modifications.
- Also adds some more test cases for existing interest rate tests.
- Changes:
1. Removed the `AssetType` template parameter from all functions in
favor of just using the `Asset` class.
2. Fully moved all `ripple::detail` functions from .h to .cpp.
3. Moved all definitions of non `detail` functions from .h to .cpp,
except roundPeriodicPayment, just because it's small and I want it
to be visible. Left declarations in .h
4. Moved `PaymentSpecialCase`, `PaymentComponents` and
`computePaymentComponents` into `detail` and updated references.
- This is an intermediate commit. It leaves the old variables in place,
so I can do verifications that the new computations are correct. They
will be removed in the next commit.
- PaymentComponents is an class used internally to break a payment value
into principal, interest, and fees.
- Adds a check to the MPToken creation invariant to ensure none are created for the issuer.
- `addEmptyHolding()` will return success without doing anything for these scenarios. There is nothing to do, as with XRP.
---------
Co-authored-by: Ed Hennis <ed@ripple.com>
The `-Wno-missing-template-arg-list-after-template-kw` flag is only needed for the grpc library. Use `+=` for the default build flags to make it easier to extend in the future.
Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
- Renamed canSendToAccount to canWithdraw, because the semantics are
a little different from a payment. Notably, if withdrawing to self,
you can still include a destination tag.
- Simplified the interface to canWithdraw to just pass in the
STTx.
- preflightDestinationAndTag is pretty pointless now, so removed it.