- Adds a Permission::getTxFeature lookup function to find the
controlling amendment for a Transactor, if any.
- Returns temDISABLED from preflight if there is an amendment and it's
not enabled.
- Still need to go through and remove all the now-redundant isEnabled
functions.
* XRPLF/develop:
fix: Add restrictions to Permission Delegation: fixDelegateV1_1 (5650)
ci: Add missing dependencies to workflows (5783)
ci: Use default conan install format (5784)
Switch CI pipeline bookworm:gcc-13 from arm64 to amd64 (5779)
- Amendment: fixDelegateV1_1
- In DelegateSet, disallow invalid PermissionValues like 0, and transaction values when the transaction's amendment is not enabled. Acts as if the transaction doesn't exist, which is the same thing older versions without the amendment will do.
- Payment burn/mint should disallow DEX currency exchange.
- Support MPT for Payment burn/mint.
- Rewrite to_short_string to call strHex directly instead of building
the whole hex string first.
- Change PrettyAsset::scale_ back to a uint32 since the Number
conversion elides any potential multiplication overflow.
- Clean ups.
* Add and Scale to VaultCreate
* Add round-trip calculation to VaultDeposit VaultWithdraw and VaultClawback
* Implement Number::truncate() for VaultClawback
* Add rounding to DepositWithdraw
* Disallow zero shares withdraw or deposit with tecPRECISION_LOSS
* Return tecPATH_DRY on overflow when converting shares/assets
* Remove empty shares MPToken in clawback or withdraw (except for vault owner)
* Implicitly create shares MPToken for vault owner in VaultCreate
* Review feedback: defensive checks in shares/assets calculations
---------
Co-authored-by: Ed Hennis <ed@ripple.com>
- Rewrite isTesSuccess to use TERSubset::operator bool
- Add Transactor::preflightSigValidated for expensive operations that
should be done after signature validation. These things would have
been done after preflight2 before this refactor.
- Split Batch and EscrowFinish preflight to use preflightSigValidated, too.
- Remove unnecessary #include
- Explanatory comments
- Make the MPT InvariantCheck related to EscrowFinish amendment safe
- Convert SField maps to unordered_maps
- Make jtx::fee::operator() clearer
- Rename checkMyPrivilege to hasPrivilege
This is a major refactor of LedgerEntry.cpp. It adds a number of helper functions to make the code easier to maintain.
It also splits up the ledger and ledger_entry tests into different files, and cleans up the ledger_entry tests to make them easier to write and maintain.
This refactor also caught a few bugs in some of the other RPC processing, so those are fixed along the way.
This updates Boost to 1.88, which is needed because Clio wants to move to 1.88 as that fixes several ASAN false positives around coroutine usage. In order for Clio to move to newer boost, libXRPL needs to move too. Hence the changes in this PR. A lot has changed between 1.83 and 1.88 so there are lots of changes in the diff, especially in regards to Boost.Asio and coroutines in particular.
* XRPLF/develop:
chore: Update clang-format and prettier with pre-commit (5709)
fix(test): handle null metadata for unvalidated tx in Env::meta (5715)
chore: Workaround for CI build errors on arm64 (5717)
chore: Fix file formatting (5718)
fix: Skip notify-clio when running in a fork, reorder config fields (5712)
chore: Reverts formatting changes to external files, adds formatting changes to proto files (5711)
This change reverts the formatting applied to external files and adds formatting of proto files.
As clang-format will complain if a proto file is modified or moved, since the .clang-format file does not explicitly contain a section for proto files, the change has been included in this PR as well.
- Cleaned up some of the `LEDGER_ENTRY` macros by eliding unnecessary
parameters.
- Define the transaction privileges in one place (InvariantCheck.cpp).
- Give `EscrowFinish` the `mayAuthorizeMPT` privilege.
- Rename the test helper `expectLine` to `expectHolding` since
it handles both trust lines and MPTs.
- Restructure the ""pseudo-account has 2 pseudo-account fields set"
invariant test to loop over all defined pseudo-account fields.
- Fix `operator<<` for `PrettyAmount` to handle `MPTIssue`s.
- Add enforcement of the `AccountRootsDeletedClean` invariant if SAV is
enabled, and clarify the comment for the pseudo-account field check.
- Delete the 100% redundant `ttMPTOKEN_ISSUANCE_SET` check in
`ValidMPTIssuance`.
* XRPLF/develop:
fix: Modify jobs to use '>>' instead of 'tee' for GITHUB_OUTPUT (#5699)
refactor: Revamp CI workflows (#5661)
refactor: Decouple net from xrpld and move rpc-related classes to the rpc folder (#5477)
Set version to 2.6.0-rc2
docs: Updates list of maintainers and reviewers (#5687)
fix: Change log to debug level for AMM offer retrieval and IOU payment check (#5686)
fix: Add -Wno-deprecated-declarations for Clang only (#5680)
Update .git-blame-ignore-revs for #5657 (#5675)
Fix BUILD.md instruction (#5676)
Set version to 2.6.0-rc1
fix: Improve logging of the reason to refuse a peer connection (#5664)
fix: Make test suite names match the directory name (#5597)
chore: Run prettier on all files (#5657)
chore: Set CONAN_REMOTE_URL also for forks (#5662)
chore: Cleanup bin/ directory (#5660)
perf: Optimize hash performance by avoiding allocating hash state object (#5469)
We're currently calling `XXH3_createState` and `XXH3_freeState` when hashing an object. However, it may be slow because they call `malloc` and `free`, which may affect the performance. This change avoids the use of the streaming API as much as possible by using an internal buffer.
* 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 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 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.
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.
#5224 added (among other things) a `VaultWithdraw` transaction that allows setting the recipient of the withdrawn funds in the `Destination` transaction field. This technically turns this transaction into a payment, and in some respect the implementation does follow payment rules, e.g. enforcement of `lsfRequireDestTag` or `lsfDepositAuth`, or that MPT transfer has destination `MPToken`. However for IOUs, it missed verification that the destination account has a trust line to the asset issuer. Since the default behavior of `accountSendIOU` is to create this trust line (if missing), this is what `VaultWithdraw` currently does. This is incorrect, since the `Destination` might not be interested in holding the asset in question; this basically enables spammy transfers. This change, therefore, removes automatic creation of a trust line to the `Destination` account in `VaultWithdraw`.