Commit Graph

14420 Commits

Author SHA1 Message Date
Vito
6884d5181f fix: Re-clamp clawback recovery after mid-grid scale amplification 2026-08-25 15:38:24 +02:00
Vito
79a0e98050 fix: Return tecPRECISION_LOSS instead of asserting on clawback dust 2026-08-25 14:41:54 +02:00
Vito
3b550b720e Merge remote-tracking branch 'origin/develop' into tapanito/vault-precision-transactor 2026-08-25 11:20:12 +02:00
Bart
0fdaf69e2c chore: Bump version to 3.4.0-b1 (#8102) 3.4.0-b1 2026-08-24 20:41:58 +00:00
Timur Yalymov
9d41b1bd1c fix: Exempt vault and loan broker accounts from IOU authorization (#8013)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 16:23:43 +00:00
Jingchen
f137d71510 test: Split Invariants_test.cpp into per-topic files (#8077) 2026-08-24 16:17:33 +00:00
Bart
8bc6e81c5f fix: Reject an inner node claimed at leaf depth in verifyProofPath (#7940)
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 16:17:12 +00:00
Ed Hennis
764cbe7c29 perf: Pause online delete if there any gaps in recent ledger history (#5531)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-24 14:16:03 +00:00
Vito
37dbfc0447 Merge remote-tracking branch 'origin/develop' into tapanito/vault-precision-transactor 2026-08-24 16:12:06 +02:00
Vito
67b0991fbc fix: Mark untestable vault clamp overflow and zero-collapse paths
Exclude defense-in-depth precision-loss and overflow_error handlers from
coverage and assert they are unreachable so codecov/patch can pass.
2026-08-24 16:11:42 +02:00
Timur Yalymov
520650081b fix: Remove credentials pinned to Vault, LoanBroker, and AMM pseudo-accounts (#7877)
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
2026-08-24 13:06:44 +00:00
Timur Yalymov
a097ccebae fix: Tighten destination checks on vault withdrawal (#7977)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
2026-08-24 12:50:57 +00:00
Vito
79ef10c529 Merge remote-tracking branch 'origin/develop' into tapanito/vault-precision-transactor
# Conflicts:
#	src/test/app/vault/VaultBugs_test.cpp
2026-08-24 11:14:03 +02:00
Mayukha Vadari
fe4ccdf750 fix: Add assert for account_info flags (#7987) 2026-08-21 15:20:44 +00:00
Timur Yalymov
046d4dd4af fix: Reject vault deposits that move nothing from the depositor (#8014)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 12:30:17 +00:00
Vito
fbda53aa8b fix: Guard debitIsNonZeroDust against overflow_error in VaultClawback
Mirrors the equivalent guard already applied to VaultWithdraw: wrap
the dust check in try/catch so a sufficiently abused sfScale pushing
assetsTotal/assetsAvailable out of STAmount's representable range
returns tecPATH_DRY instead of surfacing as a raw overflow_error.

Also address other outstanding review nits: fix
VaultTransactorPrecision_test's suite module (tx -> app, matching
every other Vault suite), replace the "PR 2" comment in
VaultPrecisionFixture.h with a stable description, and tighten the
clampToAssetsTotalScale docstring in VaultHelpers.h.
2026-08-21 11:14:31 +02:00
Vito
59d4aff3b2 test: Add release regression tests for FN-80/FN-81 vault bugs
Add pre-fix/post-fix VaultBugs_test.cpp coverage for the two
fixCleanup3_4_0 fixes not yet exercised by a dedicated regression: a
VaultDeposit overcrediting the vault across an IOU 16-digit scale
boundary, and a partial VaultWithdraw permanently locking a large IOU
vault by draining sfAssetsTotal to zero while shares remain
outstanding.
2026-08-21 11:14:18 +02:00
Vito
248076d387 fix: Guard debitIsNonZeroDust against overflow_error in VaultWithdraw
debitIsNonZeroDust converts assetsTotal/assetsAvailable to STAmount,
which a sufficiently abused sfScale can push out of STAmount's
representable range -- the same exposure already guarded around
clampToAssetsTotalScale a few lines below. Wrap it the same way,
returning tecPATH_DRY instead of letting the exception reach the
generic tefEXCEPTION handler in applySteps.cpp.

Also marks the clampToAssetsTotalScale catch as LCOV_EXCL: with the
debitIsNonZeroDust check now guarded first, that catch is only
reachable via RoundingMode::Upward carrying a value that was in range
under the ambient rounding mode just past the max representable
exponent -- not realistically triggerable from a test.
2026-08-21 10:36:55 +02:00
Ed Hennis
d27beef500 perf: Speed up addition time for drastically different exponents (#7825) 2026-08-20 19:40:42 +00:00
Mayukha Vadari
85512541ad refactor: Collapse transactions.macro settings into a TxSettings struct (#8001)
Co-authored-by: Timur Yalymov <36795566+tyalymov@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2026-08-20 19:25:27 +00:00
Gregory Tsipenyuk
3ab5288ef2 fix: Enforce MPT balance invariants under the latest cleanup amendment (#7889) 2026-08-20 19:05:28 +00:00
Kassaking7
d0dbf9163c fix: Prevent AMM auction slots from being acquired at zero cost when trading fee is zero (#7430) 2026-08-20 19:04:04 +00:00
Ayaz Salikhov
a1478fac39 docs: Fix yum installation baseurl (#8066) 2026-08-20 16:28:43 +00:00
Timur Yalymov
cc76708563 fix: Return specific and consistent errors from vault_info (#8015)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 16:05:18 +00:00
Sergey Kuznetsov
422e5245e4 ci: Save cargo cache only from develop by default (#8063) 2026-08-20 16:02:26 +00:00
Shawn Xie
e3ba569187 fix: Check credential for LoanBrokerCoverWithdraw and VaultWithdraw (#7107)
Co-authored-by: Peter Chen <ychen@ripple.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2026-08-20 15:33:46 +00:00
Jingchen
959a186a0f build: Suppress MSVC linker warning LNK4099 (#8049) 2026-08-20 13:19:07 +00:00
dependabot[bot]
3b1c9e4320 chore: [DEPENDABOT] Bump cxx from 1.0.198 to 1.0.199 in /crates in the rust-dependencies group across 1 directory (#8050)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-20 13:12:14 +00:00
Ayaz Salikhov
a3a2c85c41 build: Use debian any distribution & signed (hosted) rpm repo (#8053) 2026-08-20 13:05:18 +00:00
Vito
38e7a6dd21 fix: Catch overflow_error from clampToAssetsTotalScale in VaultWithdraw
Mirrors the try/catch already used by VaultDeposit and VaultClawback
around the same helper, returning tecPATH_DRY instead of letting the
exception propagate.
2026-08-20 14:55:52 +02:00
Ayaz Salikhov
b1ac891210 ci: Do not cache cargo binaries (#8062) 2026-08-20 11:47:27 +00:00
Vito
2417a911ac fix: clang-tidy pt2 2026-08-20 13:17:32 +02:00
Vito
c95a1329ea fix: clang-tidy 2026-08-20 12:44:48 +02:00
Vito
1583772faf fix: Guard clamp for zero-payout withdrawals; address review feedback
The clamp block added in VaultWithdraw::doApply unconditionally returned
tecPRECISION_LOSS when the clamped payout was zero. That undid the
develop-side guard that deliberately permits fixed-share zero-asset
withdrawals in a fully-impaired vault (assetsTotalForWithdrawal == 0),
causing xrpl.tx.LoanRounding to fail on all three build-test configs
(linux-clang, linux-gcc-coverage, windows). Skip the clamp when
assetsWithdrawn is already zero, and also on the final-withdrawal path
where the value is overwritten with sfAssetsAvailable a few lines later.

Also addresses review feedback:
- Correct clampToAssetsTotalScale docstring to reflect that it returns a
  non-negative magnitude; the caller applies the sign.
- Add XRPL_ASSERT precondition matching sibling helpers, and canonicalize
  totalBefore/totalAfter under a single NumberRoundModeGuard so the
  returned delta reflects only `delta`, not a rounding difference between
  the two endpoints.
- Move VaultPrecisionFixture.h and VaultTransactorPrecision_test.cpp
  from src/test/app/lending/ to src/test/app/vault/ so vault tests live
  alongside the other vault-specific suites.
- Simplify inline commentary across VaultDeposit/VaultWithdraw/
  VaultClawback.
2026-08-20 12:12:25 +02:00
Vito
0db000bc97 Merge remote-tracking branch 'origin/develop' into tapanito/vault-precision-transactor
# Conflicts:
#	src/libxrpl/ledger/helpers/VaultHelpers.cpp
#	src/libxrpl/tx/transactors/vault/VaultWithdraw.cpp
2026-08-20 11:00:36 +02:00
Vito
ec8a9cdbf8 fix: Clamp Vault Deposit, Withdraw, and Clawback to assetsTotal grid
sfAssetsTotal is stored on a coarser STAmount grid than sfAssetsAvailable
and the vault's trust line, so adding the same amount to all three
quantizes differently on each and leaves the vault's books disagreeing
with its actual holdings by a sub-ULP amount. Fix by clamping the
credited/withdrawn amount to what sfAssetsTotal can represent before
applying it to the other rails, via a shared clampToAssetsTotalScale
helper used by all three transactors.

- Deposit: clamp assetsDeposited downward to the assetsTotal grid, then
  re-derive shares from the clamped amount so the depositor cannot
  receive shares worth more than they paid. Return tecPRECISION_LOSS if
  the clamp rounds the deposit to zero.
- Withdraw: clamp assetsWithdrawn upward (i.e. the vault pays out
  slightly less) so it never pays out more than it can account for.
  Shares are not re-derived, so the withdrawer receives slightly less
  per share, favouring remaining holders.
- Clawback: same pattern as withdraw, guarded on assetsRecovered > 0 and
  placed after the existing clamp-to-available.

Gated on fixCleanup3_4_0.
2026-08-19 19:54:50 +02:00
Ayaz Salikhov
da57183e0c build: Compress the RPM payload with zstd (#8047) 2026-08-19 15:05:04 +00:00
Sergey Kuznetsov
f370289733 chore: Rust-C++ cmake and CI integration (#7034) 2026-08-19 14:30:06 +00:00
Vito Tumas
d1dc7a6ccf refactor: Extract invariant invocation into free checkInvariants runner (#7404)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 14:10:11 +00:00
Ayaz Salikhov
5639863715 docs: Rewrite the install guide (#8048) 2026-08-19 14:02:42 +00:00
Ayaz Salikhov
1be4868875 build: Sign RPM packages (#8046) 2026-08-19 13:46:11 +00:00
Timur Yalymov
368ff1afce fix: Exempt loan default from asset freeze (#7932)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2026-08-19 13:43:40 +00:00
Vito Tumas
3adf2d40b5 fix: Reject VaultWithdraw fixed-share amounts that round to zero (#7950) 2026-08-19 13:09:38 +00:00
Ayaz Salikhov
a6983f8bf3 build: Use AlmaLinux for the RHEL packaging image (#8045) 2026-08-19 00:25:46 +00:00
Ayaz Salikhov
4113b105a5 build: Run nix macos builds in CI; deny nix store references (#8023) 2026-08-18 23:34:16 +00:00
Olek
7442ff2dec fix: Enable reserve checking on ending sponsorship (#8044) 2026-08-18 22:39:32 +00:00
Kassaking7
666e77b22c fix: Add ValidPermissionedDEX invariant track for fully consumed offer (#6736) 2026-08-18 21:08:02 +00:00
Vito Tumas
8c12de6c56 test: Split Vault_test into topical suites under src/test/app/vault/ (#8041) 2026-08-18 17:57:12 +00:00
Shawn Xie
b21fd86f6e fix: Fix assorted NFT and pDEX bugs (#7749) 2026-08-18 17:56:33 +00:00
Ayaz Salikhov
f5f47f1cf5 chore: Publish debian/rpm packages from GitHub directly (#8031) 2026-08-18 15:03:45 +00:00