* XRPLF/develop:
chore: Set version 3.1.0-b0 (5986)
ci: Clean workspace on Windows self-hosted runners (6024)
docs: fix spelling in comments (6002)
fix: floating point representation errors in vault (5997)
ci: Specify bash as the default shell in workflows (6021)
refactor: Add `XRPL_RETIRE_FIX` and `XRPL_RETIRE_FEATURE` macros (6014)
refactor: Retire DepositPreAuth and DepositAuth amendments (5978)
chore: Move running of unit tests out of coverage target (6018)
refactor: Retire PayChanRecipientOwnerDir amendment (5946)
Technically b0 is not a release, so no "release" prefix here. It marks the point at which we moved the preceding release (3.0.0 in this case) from Beta to Release Candidate.
This change fixes floating point errors in conversion of shares to assets and other way, used in `VaultDeposit`, `VaultWithdraw` and `VaultClawback`. In the floating point calculations the division introduces a larger error than multiplication. If we do division first, then the error introduced will be increased by the multiplication that follows, which is therefore the wrong order to perform these two operations. This change flips the order of arithmetic operations, which minimizes the error.
Rather than having a single `XRPL_RETIRE` macro that applies to both feature and fix amendments, this change replaces it by new `XRPL_RETIRE_FIX` and `XRPL_RETIRE_FEATURE` macros that avoids confusion between whether to prefix the amendment name with `feature` or `fix`.
- Since all the special cases are now specified with flags, the order is
less important.
- Avoids computing the periodic payment parts that are not needed for
full payment computation.
- A late payment without the late payment flag will override everything
else, though.
- A regular payment that is late, or a tfLoanLatePayment that is not
late will fail.
- Flags are mutually exclusive.
- Add a few interest computation shortcuts and overflow prevention
checks that return 0 if there's no time to compute for.
This updates the CI image hashes after following change: https://github.com/XRPLF/ci/pull/81. And, since we use latest Conan, we can have `conan.lock` with a newline at the end, and we don't need to exclude it from `pre-commit` hooks any longer.
This change fixes JSON parsing of negative `int` input in `STNumber` and `STAmount`. The conversion of JSON to `STNumber` or `STAmount` may trigger a condition where we negate smallest possible `int` value, which is undefined behaviour. We use a temporary storage as `int64_t` to avoid this bug. Note that this only affects RPC, because we do not parse JSON in the protocol layer, and hence no amendment is needed.
This change removes unused definitions from the CMake files, moves variable definitions from `XrplSanity` to `XrplSettings` where they better belong, and updates the minimum GCC and Clang versions to match what we actually minimally support.