Commit Graph

10283 Commits

Author SHA1 Message Date
Nicholas Dudfield
69b82beafa Merge remote-tracking branch 'origin/dev' into multisign-xahaud-pr-squashed
# Conflicts:
#	include/xrpl/protocol/detail/features.macro
2026-04-29 15:10:20 +07:00
tequ
49fd0c33b5 fixIOULockedBalanceInvariant Amendment (#732) 2026-04-29 17:05:18 +10:00
tequ
0ffb6e8c21 Replace vendored magic_enum header with Conan package dependency (#727) 2026-04-29 17:00:25 +10:00
tequ
61138058a6 Delete unused sfHookDefinition (#715) 2026-04-29 16:45:35 +10:00
Nicholas Dudfield
d6aad6744e chore: align nested multisign quorum terminology 2026-04-29 11:33:54 +07:00
Fomo
dd9e6053a0 fix: Expand the pathing tables and lower weight on sabbxd, also return up … (#723) 2026-04-29 14:28:00 +10:00
Nicholas Dudfield
339f1b7f6f test: port nested multisign review coverage 2026-04-29 11:25:01 +07:00
Nicholas Dudfield
bb6553193e fix: port nested multisign review fixes after dev merge 2026-04-29 11:01:41 +07:00
Nicholas Dudfield
ffcfd94327 Merge remote-tracking branch 'origin/dev' into multisign-xahaud-pr-squashed
# Conflicts:
#	include/xrpl/protocol/Feature.h
#	src/libxrpl/protocol/Feature.cpp
#	src/test/jtx/multisign.h
#	src/xrpld/app/tx/detail/Transactor.cpp
2026-04-29 11:00:14 +07:00
tequ
8c1be39f70 Fix LedgerNameSpace to ensure uniqueness (#710) 2026-04-29 12:01:57 +10:00
tequ
61d1d6e441 Add test for rejected Remit to AMM account (#698) 2026-04-29 11:20:13 +10:00
tequ
788ba43266 Refactor getFieldU16(sfTransactionType) with getTxnType() (#711) 2026-04-29 11:17:49 +10:00
tequ
55710c4baf Disallow setting a AMM account as Issuer/Destination/Inform (#709) 2026-04-29 11:00:25 +10:00
tequ
7bf5bcaf20 Add new TSH tests (#704) 2026-04-29 10:40:50 +10:00
Niq Dudfield
9f2160f42e fix: resolve switch fall-through in util_keylet unimplemented cases (#701) 2026-04-29 10:37:17 +10:00
tequ
ef7a03ec10 fix owner count assertion at XahauGenesis_test (#688) 2026-04-29 10:32:43 +10:00
tequ
ea92477d21 Test: hint build_test_hooks.sh when hook wasm is empty in hso() 2026-04-28 18:23:32 +10:00
tequ
6aabbc940b fix: typo SignersListSet 2026-04-28 18:23:31 +10:00
tequ
3111ecea52 Update util_keylet fee test 2026-04-28 18:23:31 +10:00
tequ
1008508c9b Updated tests to align with the changes merged into the dev branch. 2026-04-28 18:23:31 +10:00
tequ
58e278289b Add tests for Hooks fee 2026-04-28 18:23:31 +10:00
tequ
d3d24f781b Merge fixAMMClawbackRounding amendment into featureAMMClawback amendment 2026-04-28 18:23:31 +10:00
yinyiqian1
131d659032 fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
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`.
2026-04-28 18:23:31 +10:00
tequ
503dee619a Merge fixAMMv1_3 amendment into featureAMM amendment 2026-04-28 18:23:31 +10:00
Gregory Tsipenyuk
1703d96a48 fix: Add AMMv1_3 amendment (#5203)
* 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.
2026-04-28 18:23:31 +10:00
Nicholas Dudfield
fff46e3dd0 chore: clang-format 2026-02-20 08:22:49 +09:00
Nicholas Dudfield
52369f3ebb fix: resolve merge issues from dev sync
- Add missing getHookOn declaration and implementation (build blocker)
- Add else branches for HookOnOutgoing/HookOnIncoming in hsoUPDATE path
- Guard unprotected optional dereferences in hsoINSTALL path
- Reorder features.macro per review (HookOnV2/HooksUpdate2 before fixHookAPI20251128)
2026-02-20 08:22:15 +09:00
tequ
57c4e3c9cc Support new STIs for sto_* HookAPI (#657) 2026-02-20 08:18:45 +09:00
tequ
8e1ae86ce2 Add new keylets to util_keylet (#533) 2026-02-20 08:18:45 +09:00
tequ
de1f57819f Fix differences such as LedgerHash that occurred due to NetworkID in ltFeeSettings 2026-02-20 08:15:16 +09:00
tequ
6dd6393bb8 Add ltORACLE for Remarks target (#562) 2026-02-20 08:15:16 +09:00
tequ
5a2bf0e0b1 Add Remit test to AMM Account 2026-02-20 08:15:14 +09:00
tequ
5e9d961c5d Optimize AccountDelete and Creadentials tests, Update tests priority 2026-02-20 08:15:14 +09:00
tequ
3380b7e2fd Add TSH processing for AMM, AMMClawback, Clawback, Oracle (#532)
* Add TSH processing for `AMM`, `AMMClawback`, `Oracle`, `Clawback`

* Add empty TSH processing for other transaction types

* Add AMMTsh tests
2026-02-20 08:14:39 +09:00
tequ
da6bd8cac1 Support Hook execution in simulate RPC (#531) 2026-02-20 08:10:52 +09:00
tequ
d4db9276c6 Supported::No for featureDynamicNFT 2026-02-20 08:10:51 +09:00
tequ
a6824770fc Supported::No for featureCredentials 2026-02-20 08:10:50 +09:00
tequ
5678b8fbb1 Supported::No for featureMPTokensV1 2026-02-20 08:10:50 +09:00
tequ
bfeef7fd91 Supported::No for featureNFTokenMintOffer 2026-02-20 08:10:49 +09:00
tequ
b78c4abece Supported::No for featureDID 2026-02-20 08:10:49 +09:00
tequ
3540148941 Combine AMM Amendments (#521)
* fixAMMv1_2
* fixAMMv1_1
* fixAMMOverflowOffer
* fixLPTokenTransfer
* suppress AMM test logs
* exclude `ltAMM` from `fixPreviousTxnID` Amendment
    - make `sfPreviousTxnID` and `sfPreviousTxnLgrSeq` required for ltAMM
2026-02-20 08:10:43 +09:00
tequ
8ec0e9bb22 Combine XChainBridge Amendments (#523) 2026-02-20 08:10:05 +09:00
tequ
7bfa595c6c Combine fixInnerObjTemplate Amendments (#524) 2026-02-20 08:10:05 +09:00
tequ
293266519d Combine DID Amendments (#522)
fixEmptyDID -> featureDID
2026-02-20 08:09:58 +09:00
tequ
96e3851c51 Additional support for HookDefinition, HookState, ImportVLSequence at fixPreviousTxnID Amendment 2026-02-20 08:09:58 +09:00
Mark Travis
c9e886e5e3 Log detailed correlated consensus data together (#5302)
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.
2026-02-20 08:09:57 +09:00
Mark Travis
7eb3c96e8b fix: Acquire previously failed transaction set from network as new proposal arrives (#5318)
Reset the failure variable.
2026-02-20 08:09:57 +09:00
Bronek Kozicki
14edb034bb Fix Replace assert with XRPL_ASSERT (#5312) 2026-02-20 08:09:56 +09:00
Bronek Kozicki
8b45539f9c fix: Remove 'new parent hash' assert (#5313)
This assert is known to occasionally trigger, without causing errors
downstream. It is replaced with a log message.
2026-02-20 08:09:55 +09:00
Ed Hennis
a95832668c Add logging and improve counting of amendment votes from UNL (#5173)
* Add logging for amendment voting decision process
* When counting "received validations" to determine quorum, count the number of validators actually voting, not the total number of possible votes.
2026-02-20 08:09:55 +09:00