Resolves the 28 conflicts from cherry-picking XRPLF/rippled 1506e65558
(#5570) onto origin/dev:
- io_service -> io_context everywhere upstream renamed it, keeping the
xahaud-only code around those lines (UDP door in ServerImpl, sticky
endpoint selection in WorkBase with bind_executor instead of
strand.wrap, useSqLiteStore in PeerfinderManager, RPCSub after #677).
- src/xrpld/rpc/detail/RPCSub.cpp (upstream path) dropped; xahaud's copy
lives at src/xrpld/net/detail/RPCSub.cpp and its local io_service is
renamed there.
- conanfile.py: boost/1.88.0 in xahaud's override form, without_cobalt on
gcc/clang; boost::boost kept.
- Boost 1.88 removes the io_service typedef and address::from_string and
makes Boost.Process v2 the default: the #677 tests move to io_context,
executor_work_guard and make_address; Main.cpp includes the v1 process
headers it already uses instead of the umbrella.
Not yet compiled.
Raw result of cherry-picking XRPLF/rippled 1506e65558 onto origin/dev
c208a40ce8: 78 files applied clean, 28 in conflict (36 hunks), conflict
markers left in place so the merge is visible. Resolution follows in the
next commit. src/xrpld/rpc/detail/RPCSub.cpp is upstream's copy of a file
xahaud moved to src/xrpld/net/detail/RPCSub.cpp (delete/modify).
(cherry picked from commit 1506e65558818ea73a2233d2a55c1d1441d5fb10)
Due to rounding, the LPTokenBalance of the last LP might not match the LP's trustline balance. This was fixed for `AMMWithdraw` in `fixAMMv1_1` by adjusting the LPTokenBalance to be the same as the trustline balance. Since `AMMClawback` is also performing a withdrawal, we need to adjust LPTokenBalance as well in `AMMClawback.`
This change includes:
1. Refactored `verifyAndAdjustLPTokenBalance` function in `AMMUtils`, which both`AMMWithdraw` and `AMMClawback` call to adjust LPTokenBalance.
2. Added the unit test `testLastHolderLPTokenBalance` to test the scenario.
3. Modify the existing unit tests for `fixAMMClawbackRounding`.
* Add AMM bid/create/deposit/swap/withdraw/vote invariants:
- Deposit, Withdrawal invariants: `sqrt(asset1Balance * asset2Balance) >= LPTokens`.
- Bid: `sqrt(asset1Balance * asset2Balance) > LPTokens` and the pool balances don't change.
- Create: `sqrt(asset1Balance * assetBalance2) == LPTokens`.
- Swap: `asset1BalanceAfter * asset2BalanceAfter >= asset1BalanceBefore * asset2BalanceBefore`
and `LPTokens` don't change.
- Vote: `LPTokens` and pool balances don't change.
- All AMM and swap transactions: amounts and tokens are greater than zero, except on withdrawal if all tokens
are withdrawn.
* Add AMM deposit and withdraw rounding to ensure AMM invariant:
- On deposit, tokens out are rounded downward and deposit amount is rounded upward.
- On withdrawal, tokens in are rounded upward and withdrawal amount is rounded downward.
* Add Order Book Offer invariant to verify consumed amounts. Consumed amounts are less than the offer.
* Fix Bid validation. `AuthAccount` can't have duplicate accounts or the submitter account.
Combine multiple related debug log data points into a single
message. Allows quick correlation of events that
previously were either not logged or, if logged, strewn
across multiple lines, making correlation difficult.
The Heartbeat Timer and consensus ledger accept processing
each have this capability.
Also guarantees that log entries will be written if the
node is a validator, regardless of log severity level.
Otherwise, the level of these messages is at INFO severity.
In PeerImpl.cpp, if the function is a message handler (onMessage) or called directly from a message handler, then it should use fee_, since when the handler returns (OnMessageEnd) then the charge function is called. If the function is not a message handler, such as a job queue item, it should remain charge.
- Also get the branch name.
- Use rev-parse instead of describe to get a clean hash.
- Return the git hash and branch name in server_info for admin
connections.
- Include git hash and branch name on separate lines in --version.