Fix stalled consensus detection to prevent false positives in situations where there are no disputed transactions.
Stalled consensus detection was added to 2.5.0 in response to a network consensus halt that caused a round to run for over an hour. However, it has a flaw that makes it very easy to have false positives. Those false positives are usually mitigated by other checks that prevent them from having an effect, but there have been several instances of validators "running ahead" because there are circumstances where the other checks are "successful", allowing the stall state to be checked.
* XRPLF/develop:
Switch Conan 1 commands to Conan 2 and fix credentials (#5655)
perf: Move mutex to the partition level (#5486)
Upload Conan dependencies upon merge into develop (#5654)
This change updates some incorrect Conan commands for Conan 2. As some flags do not exist in Conan 2, such as --settings build_type=[configuration], the commands have been adjusted accordingly. This change further uses the org-level variables and secrets rather than the repo-level ones.
This change introduces two key optimizations:
* Mutex scope reduction: Limits the lock to individual partitions within `TaggedCache`, reducing contention.
* Decoupling: Removes the tight coupling between `LedgerHistory` and `TaggedCache`, improving modularity and testability.
Lock contention analysis based on eBPF showed significant improvements as a result of this change.
This change uploads built Conan dependencies to the Conan remote upon merge into the develop branch.
At the moment, whenever Conan dependencies change, we need to remember to manually push them to our Conan remote, so they are cached for future reuse. If we forget to do so, these changed dependencies need to be rebuilt over and over again, which can take a long time.
- Still required for the transaction to succeed (except inside a Batch,
because the batch signers take care of that).
- Started adding tests for Loan-related RPC and low-level math checks.
Currently only implemented "sign" on a LoanSet to verify it can be
done.
- Addresses FIND-012 from audit.
- If computePeriodicPaymentParts rounds the principal part to 0, add
a small amount so that some principal is paid regardless of how
extreme the loan parameters are. For XRP and MPTs, this just adds 1.
For IOUs, compute an epsilon based on the scale of the original loan.
(IOUs untested.)
- Also move this function out of the detail namespace so direct unit
tests can be written. (Pending.)
- Adds the testLoanPayComputePeriodicPaymentValidRateInvariant from
auditors with some minor modifications.
- Fixes an assert that the periodic rate > 0, which won't be true if the
loan interest rate is 0.
This change:
* Removes the patched Conan recipes from the `external/` directory.
* Adds instructions for contributors how to obtain our patched recipes.
* Updates the Conan remote name and remote URL (the underlying package repository isn't changed).
* If the remote already exists, updates the URL instead of removing and re-adding.
* This is not done for the libXRPL job as it still uses Conan 1. This job will be switched to Conan 2 soon.
* Removes duplicate Conan remote CI pipeline steps.
* Overwrites the existing global.conf on MacOS and Windows machines, as those do not run CI pipelines in isolation but all share the same Conan installation; appending the same config over and over bloats the file.
This change updates BUILD.md for Conan 2, add fixes/workarounds for Apple Clang 17, Clang 20 and CMake 4. This also removes (from BUILD.md only) workarounds for compiler versions which we no longer support e.g. Clang 15 and adds compilation flag -Wno-deprecated-declarations to enable building with Clang 20 on Linux.
This change fixes an issue where the order of `PriceDataSeries` was out of sync between when `PriceOracle` was created and when it was updated. Although they are registered in the canonical order when updated, they are created using the order specified in the transaction; this change ensures that they are also registered in the canonical order when created.
- Move several tests from `STObject_test` to new `STParsedJSON_test`
unchanged.
- Add 3 test cases to cover edge cases for UInt16 values.
Co-authored-by: Denis Angell <dangell@transia.co>
This change decouples `ledger` from `xrpld/app`, and therefore fully clears the path to the modularisation of the ledger component. Before this change, `View.cpp` relied on `MPTokenAuthorize::authorize; this change moves `MPTokenAuthorize::authorize` to `View.cpp` to invert the dependency, making ledger a standalone module.
- Addresses FIND-003 from audit.
- Behavior changed to treat a DebtMaximum value of 0 to mean "no limit",
as defined in spec.
- No need to add unit tests, because the previous commit covers 0, and
tests already exist for non-zero limits.
- Addresses FIND-001 from audit
- LoanSet::preflight will require Counterparty to be set (it's normally
optional) for an inner batch transaction, because the checks are done
before the LoanBroker object can be accessed.
- Adjust LoanSet::calculateBaseFee to not charge extra if an inner
transaction.
- Adds a Loan-specific test to Batch_test.
- Mark variable only used in asserts as [[maybe_unused]].
- Restore commented out line that I think I resolved wrong in an earlier
merge to fix Vault tests.
The Payment transaction metadata is missing the `DeliveredAmount` field that displays the actual amount delivered to the destination excluding transfer fees. This amendment fixes this problem.