Skip to content

Staging branch for 3.1.3#6703

Open
ximinez wants to merge 37 commits intorelease-3.1from
ripple/staging-313
Open

Staging branch for 3.1.3#6703
ximinez wants to merge 37 commits intorelease-3.1from
ripple/staging-313

Conversation

@ximinez
Copy link
Copy Markdown
Collaborator

@ximinez ximinez commented Apr 1, 2026

High Level Overview of Change

To be used as the base branch for PRs that are intended for release 3.1.3.

Do not use the Github UI to merge this PR. Push the branch with all individual commits using the command line.

Context of Change

API Impact

@ximinez ximinez closed this Apr 1, 2026
@ximinez ximinez force-pushed the ripple/staging-313 branch from f0e3bb7 to 3ba3fcf Compare April 1, 2026 17:24
@ximinez ximinez reopened this Apr 1, 2026
@ximinez ximinez force-pushed the ripple/staging-313 branch from f0e3bb7 to 96af56a Compare April 1, 2026 18:22
@ximinez
Copy link
Copy Markdown
Collaborator Author

ximinez commented Apr 1, 2026

For the first two commits, I cherry-picked the respective commits from #6668 and #6644. However, because the files that were changed had been renamed / refactored, I essentially had to copy and paste all the changes.

So far the git range-diff is not super helpful. #6668 is too small to be detected as the "same" change, and #6644 has several formatting changes.

Range-diff output
# Range diff
$ git range-diff -w 76e3b4fb0f^..upstream/develop 3.1.2..ripple/staging-313

 1:  76e3b4fb0f <  -:  ---------- fix: Improve loan invariant message (#6668)
 2:  faf69da4b0 <  -:  ---------- chore: Shorten job names to stay within Linux 15-char thread limit (#6669)
 3:  addc1e8e25 <  -:  ---------- refactor: Make function naming in ServiceRegistry consistent (#6390)
 4:  509677abfd <  -:  ---------- ci: Don't publish docs on release branches (#6673)
 5:  9b944ee8c2 <  -:  ---------- refactor: Split LoanInvariant into LoanBrokerInvariant and LoanInvariant (#6674)
 6:  3d9c545f59 <  -:  ---------- fix: Guard Coro::resume() against completed coroutines (#6608)
 7:  e0cabb9f8c <  -:  ---------- ci: [DEPENDABOT] bump codecov/codecov-action from 5.5.3 to 6.0.0 (#6685)
 8:  de671863e2 <  -:  ---------- ci: [DEPENDABOT] bump actions/deploy-pages from 4.0.5 to 5.0.0 (#6684)
 9:  96bfc32fe2 <  -:  ---------- chore: Fix clang-tidy header filter (#6686)
10:  3a477e4d01 <  -:  ---------- refactor: Address PR comments after the modularisation PRs (#6389)
11:  ab8c168e3b <  -:  ---------- chore: Enable remaining clang-tidy `performance` checks (#6648)
12:  5c8dfe5456 <  -:  ---------- ci: Only publish docs in public repos (#6687)
13:  bb95a7d6cd <  -:  ---------- fix: Fix Workers::stop() race between m_allPaused and m_runningTaskCount (#6574)
14:  7f53351920 <  -:  ---------- chore: Remove unnecessary clang-format off/on directives (#6682)
15:  c3fae847f3 <  -:  ---------- ci: Use pull_request_target to check for signed commits (#6697)
16:  2502befb42 <  -:  ---------- chore: Enable clang-tidy misc checks (#6655)
17:  a9afd2c116 <  -:  ---------- fix: Fix previous ledger size typo in RCLConsensus (#6696)
18:  b6aa4a8fde <  -:  ---------- chore: Use nudb recipe from the upstream (#6701)
 -:  ---------- >  1:  96af56a1d3 fix: Improve loan invariant message (#6668)
19:  bee1056faa !  2:  490fe68979 fix: Enforce aggregate MaximumAmount in multi-send MPT (#6644)
    @@ Commit message
     
         Co-authored-by: xrplf-ai-reviewer[bot] <266832837+xrplf-ai-reviewer[bot]@users.noreply.github.com>
     
    - ## src/libxrpl/ledger/helpers/TokenHelpers.cpp ##
    -@@ src/libxrpl/ledger/helpers/TokenHelpers.cpp: rippleSendMultiMPT(
    + ## src/libxrpl/ledger/View.cpp ##
    +@@ src/libxrpl/ledger/View.cpp: rippleSendMultiMPT(
          beast::Journal j,
          WaiveTransferFee waiveFee)
      {
    @@ src/libxrpl/ledger/helpers/TokenHelpers.cpp: rippleSendMultiMPT(
     +    // small-scale mantissa (~16 digits) can lose precision for values near
     +    // maxMPTokenAmount (19 digits).
     +    std::uint64_t totalSendAmount{0};
    -+    std::uint64_t const maximumAmount = sle->at(~sfMaximumAmount).value_or(maxMPTokenAmount);
    -+    std::uint64_t const outstandingAmount = sle->getFieldU64(sfOutstandingAmount);
    ++    std::uint64_t const maximumAmount =
    ++        sle->at(~sfMaximumAmount).value_or(maxMPTokenAmount);
    ++    std::uint64_t const outstandingAmount =
    ++        sle->getFieldU64(sfOutstandingAmount);
     +
     +    // actual accumulates the total cost to the sender (includes transfer
     +    // fees for third-party transit sends). takeFromSender accumulates only
    @@ src/libxrpl/ledger/helpers/TokenHelpers.cpp: rippleSendMultiMPT(
     +    for (auto const& [receiverID, amt] : receivers)
          {
     -        auto const& receiverID = r.first;
    --        STAmount const amount{mptIssue, r.second};
    -+        STAmount const amount{mptIssue, amt};
    +-        STAmount amount{mptIssue, r.second};
    ++        STAmount amount{mptIssue, amt};
      
              if (amount < beast::zero)
     -        {
    @@ src/libxrpl/ledger/helpers/TokenHelpers.cpp: rippleSendMultiMPT(
                  {
                      XRPL_ASSERT_PARTS(
                          takeFromSender == beast::zero,
    -                     "xrpl::rippleSendMultiMPT",
    +                     "rippler::rippleSendMultiMPT",
                          "sender == issuer, takeFromSender == zero");
     -                auto const sendAmount = amount.mpt().value();
    --                auto const maximumAmount = sle->at(~sfMaximumAmount).value_or(maxMPTokenAmount);
    +-                auto const maximumAmount =
    +-                    sle->at(~sfMaximumAmount).value_or(maxMPTokenAmount);
     -                if (sendAmount > maximumAmount ||
    --                    sle->getFieldU64(sfOutstandingAmount) > maximumAmount - sendAmount)
    +-                    sle->getFieldU64(sfOutstandingAmount) >
    +-                        maximumAmount - sendAmount)
     -                    return tecPATH_DRY;
     +
     +                std::uint64_t const sendAmount = amount.mpt().value();
    @@ src/libxrpl/ledger/helpers/TokenHelpers.cpp: rippleSendMultiMPT(
     +                        // The aggregate of all sends exceeds the max cap
     +                        totalSendAmount > maximumAmount - sendAmount ||
     +                        // Outstanding + aggregate exceeds the max cap
    -+                        outstandingAmount > maximumAmount - sendAmount - totalSendAmount;
    ++                        outstandingAmount >
    ++                            maximumAmount - sendAmount - totalSendAmount;
     +
     +                    if (exceedsMaximumAmount)
     +                        return tecPATH_DRY;
    @@ src/libxrpl/ledger/helpers/TokenHelpers.cpp: rippleSendMultiMPT(
                  }
      
                  // Direct send: redeeming MPTs and/or sending own MPTs.
    -             if (auto const ter = rippleCreditMPT(view, senderID, receiverID, amount, j))
    +@@ src/libxrpl/ledger/View.cpp: rippleSendMultiMPT(
    +                     rippleCreditMPT(view, senderID, receiverID, amount, j))
                      return ter;
                  actual += amount;
     -            // Do not add amount to takeFromSender, because rippleCreditMPT took
    @@ src/test/app/MPToken_test.cpp: class MPToken_test : public beast::unit_test::sui
     +        Env env{*this, features};
     +
     +        MPTTester mptt(env, issuer, {.holders = {alice, bob}});
    -+        mptt.create({.maxAmt = maxAmt, .ownerCount = 1, .flags = tfMPTCanTransfer});
    ++        mptt.create(
    ++            {.maxAmt = maxAmt, .ownerCount = 1, .flags = tfMPTCanTransfer});
     +        mptt.authorize({.account = alice});
     +        mptt.authorize({.account = bob});
     +
    @@ src/test/app/MPToken_test.cpp: class MPToken_test : public beast::unit_test::sui
     +
     +        // Each test case creates a fresh ApplyView and calls
     +        // accountSendMulti from the issuer to the given receivers.
    -+        auto const runTest = [&](MultiplePaymentDestinations const& receivers,
    ++        auto const runTest =
    ++            [&](MultiplePaymentDestinations const& receivers,
     +                TER expectedTer,
     +                std::optional<std::uint64_t> expectedOutstanding,
     +                std::string const& label) {
     +                ApplyViewImpl av(&*env.current(), tapNONE);
    -+            auto const ter =
    -+                accountSendMulti(av, issuer.id(), asset, receivers, env.app().getJournal("View"));
    ++                auto const ter = accountSendMulti(
    ++                    av,
    ++                    issuer.id(),
    ++                    asset,
    ++                    receivers,
    ++                    env.app().getJournal("View"));
     +                BEAST_EXPECTS(ter == expectedTer, label);
     +
     +                // Only verify OutstandingAmount on success — on error the
     +                // view may contain partial state and must be discarded.
     +                if (expectedOutstanding)
     +                {
    -+                auto const sle = av.peek(keylet::mptIssuance(mptt.issuanceID()));
    ++                    auto const sle =
    ++                        av.peek(keylet::mptIssuance(mptt.issuanceID()));
     +                    if (!BEAST_EXPECT(sle))
     +                        return;
    -+                BEAST_EXPECTS(sle->getFieldU64(sfOutstandingAmount) == *expectedOutstanding, label);
    ++                    BEAST_EXPECTS(
    ++                        sle->getFieldU64(sfOutstandingAmount) ==
    ++                            *expectedOutstanding,
    ++                        label);
     +                }
     +            };
     +
    @@ src/test/app/MPToken_test.cpp: class MPToken_test : public beast::unit_test::sui
     +            std::nullopt,
     +            "aggregate exceeds max");
     +
    -+        runTest(R{{alice.id(), 75}, {bob.id(), 75}}, tesSUCCESS, maxAmt, "aggregate at boundary");
    ++        runTest(
    ++            R{{alice.id(), 75}, {bob.id(), 75}},
    ++            tesSUCCESS,
    ++            maxAmt,
    ++            "aggregate at boundary");
     +
    -+        runTest(R{{alice.id(), 50}, {bob.id(), 50}}, tesSUCCESS, 100, "aggregate within limit");
    ++        runTest(
    ++            R{{alice.id(), 50}, {bob.id(), 50}},
    ++            tesSUCCESS,
    ++            100,
    ++            "aggregate within limit");
     +
     +        runTest(
     +            R{{alice.id(), 150}, {bob.id(), 0}},
    @@ src/test/app/MPToken_test.cpp: class MPToken_test : public beast::unit_test::sui
     +            "one receiver exceeds max, other zero");
     +
     +        // Issue 50 tokens so outstandingAmount is nonzero, then verify
    -+        // the third condition: outstandingAmount > maximumAmount - sendAmount - totalSendAmount
    ++        // the third condition: outstandingAmount > maximumAmount - sendAmount -
    ++        // totalSendAmount
     +        mptt.pay(issuer, alice, 50);
     +        env.close();
     +
    @@ src/test/app/MPToken_test.cpp: class MPToken_test : public beast::unit_test::sui
     +        // individual send (100 <= 150) even though the aggregate (200)
     +        // exceeds MaximumAmount. Preserved for ledger replay.
     +        {
    -+            // KNOWN BUG (pre-fixSecurity3_1_3): preserved for ledger replay only
    ++            // KNOWN BUG (pre-fixSecurity3_1_3): preserved for ledger replay
    ++            // only
     +            env.disableFeature(fixSecurity3_1_3);
     +            runTest(
     +                R{{alice.id(), 100}, {bob.id(), 100}},
20:  ae21f53e4d <  -:  ---------- ci: Allow uploading artifacts for XRPLF org (#6702)
21:  29e49abd3c <  -:  ---------- chore: Enable clang-tidy `coreguidelines` checks (#6698)
22:  6e2452207d <  -:  ---------- fix: Remove fatal assertion on Linux thread name truncation  (#6690)
Directly compare the commits for #6668
$ diff -w -U1 <(git show 76e3b4fb0f) <(git show 96af56a1d3)

--- /dev/fd/63	2026-04-01 14:46:44
+++ /dev/fd/62	2026-04-01 14:46:44
@@ -1,2 +1,2 @@
-commit 76e3b4fb0f89d432958414cde29fd26d0c3dccae
+commit 96af56a1d326442a5d459cb8843744866c0886b6
 Author: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
@@ -6,7 +6,7 @@
 
-diff --git a/src/libxrpl/tx/invariants/LoanInvariant.cpp b/src/libxrpl/tx/invariants/LoanInvariant.cpp
-index c0ce320846..b590eab8fd 100644
---- a/src/libxrpl/tx/invariants/LoanInvariant.cpp
-+++ b/src/libxrpl/tx/invariants/LoanInvariant.cpp
-@@ -236,8 +236,7 @@ ValidLoan::finalize(
+diff --git a/src/xrpld/app/tx/detail/InvariantCheck.cpp b/src/xrpld/app/tx/detail/InvariantCheck.cpp
+index 9dec921278..6da1cc0f05 100644
+--- a/src/xrpld/app/tx/detail/InvariantCheck.cpp
++++ b/src/xrpld/app/tx/detail/InvariantCheck.cpp
+@@ -2593,8 +2593,8 @@ ValidLoan::finalize(
              after->at(sfPrincipalOutstanding) == beast::zero &&
@@ -16,5 +16,6 @@
 -                               "remaining has not been paid off";
-+            JLOG(j.fatal()) << "Invariant failed: Fully paid off Loan still has payments remaining";
++            JLOG(j.fatal()) << "Invariant failed: Fully paid off Loan still "
++                               "has payments remaining";
              return false;
          }
-         if (before && (before->isFlag(lsfLoanOverpayment) != after->isFlag(lsfLoanOverpayment)))
+         if (before &&

Note that the last line is not a diff in the changes, but a difference in the starting state (which is because of formatting differences in the branches).

@ximinez ximinez force-pushed the ripple/staging-313 branch from 490fe68 to 0eb77f9 Compare April 1, 2026 22:57
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 84.31062% with 99 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.4%. Comparing base (3ba3fcf) to head (7ea4a5f).

Files with missing lines Patch % Lines
src/xrpld/overlay/detail/PeerImp.cpp 9.1% 40 Missing ⚠️
src/xrpld/app/tx/detail/VaultWithdraw.cpp 65.2% 8 Missing ⚠️
src/xrpld/app/tx/detail/InvariantCheck.cpp 97.1% 7 Missing ⚠️
src/xrpld/app/tx/detail/LoanPay.cpp 93.0% 6 Missing ⚠️
src/xrpld/app/misc/NetworkOPs.cpp 60.0% 4 Missing ⚠️
src/libxrpl/beast/core/CurrentThreadName.cpp 62.5% 3 Missing ⚠️
src/xrpld/app/tx/detail/Transactor.cpp 50.0% 3 Missing ⚠️
src/xrpld/overlay/detail/OverlayImpl.cpp 0.0% 3 Missing ⚠️
src/xrpld/rpc/detail/RPCCall.cpp 75.0% 3 Missing ⚠️
src/xrpld/app/consensus/RCLConsensus.cpp 0.0% 2 Missing ⚠️
... and 14 more
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##           release-3.1   #6703     +/-   ##
=============================================
+ Coverage         79.3%   80.4%   +1.1%     
=============================================
  Files              839     840      +1     
  Lines            71738   75352   +3614     
  Branches          8237    8198     -39     
=============================================
+ Hits             56920   60591   +3671     
+ Misses           14818   14761     -57     
Files with missing lines Coverage Δ
include/xrpl/basics/Number.h 98.7% <ø> (ø)
include/xrpl/beast/core/CurrentThreadName.h 100.0% <100.0%> (ø)
include/xrpl/protocol/Rules.h 100.0% <ø> (ø)
include/xrpl/protocol/STAmount.h 96.2% <100.0%> (+<0.1%) ⬆️
src/libxrpl/basics/Number.cpp 98.8% <100.0%> (+<0.1%) ⬆️
src/libxrpl/ledger/CredentialHelpers.cpp 98.5% <100.0%> (+0.7%) ⬆️
src/libxrpl/protocol/Keylet.cpp 100.0% <ø> (ø)
src/libxrpl/protocol/Rules.cpp 98.4% <100.0%> (+0.3%) ⬆️
src/libxrpl/protocol/STAmount.cpp 89.0% <ø> (+0.4%) ⬆️
src/libxrpl/protocol/STNumber.cpp 95.2% <ø> (+0.4%) ⬆️
... and 55 more

... and 459 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Tapanito and others added 2 commits April 6, 2026 12:54
Co-authored-by: xrplf-ai-reviewer[bot] <266832837+xrplf-ai-reviewer[bot]@users.noreply.github.com>
This change will only attempt to upload artifacts for CI runs performed in the XRPLF/rippled repository.
@ximinez ximinez force-pushed the ripple/staging-313 branch from 628230a to f85b917 Compare April 6, 2026 16:55
@ximinez
Copy link
Copy Markdown
Collaborator Author

ximinez commented Apr 10, 2026

Notes before pushing to release:

Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Note: This is a large diff (222,814 chars). Complex issues deep in the diff may receive less attention.

Had a look at this

Four issues flagged: a critical consensus-divergence risk in LoanManage.cpp where the pre-amendment noop path no longer calls associateAsset, a misleading modulo truncation in OrderBookDB.cpp, swapped comments and duplicate assertions in the NFToken test. See inline comments for details.


Review by ReviewBot 🤖

Review by Claude Opus 4.6 · Prompt: V14

return tesSUCCESS;
// Pre-amendment, associateAsset was only called on the noop (no flags)
// path. Post-amendment, we call associateAsset on all successful paths.
if (view.rules().enabled(fixSecurity3_1_3) && isTesSuccess(result))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-amendment noop path skips associateAsset entirely — breaks ledger replay. The guard should only gate the expanded (all-paths) behavior; the noop case must still call associateAsset unconditionally to preserve pre-amendment ledger hashes and avoid consensus divergence.

env(token::cancelOffer(buyer, {buyOffer1, sellOffer1}));
if (features[fixSecurity3_1_3])
{
// The buy offer was deleted, so no need to cancel it
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are swapped — the sell offer (sellOffer1) was auto-deleted; the buy offer (buyOffer1) still exists and is cancelled on line 3609:

                // The sell offer was deleted, so no need to cancel it
                // The buy offer still exists, so we can cancel it

// handlers/Ledger, Unsubscribe
JSS(accounts_proposed); // in: Subscribe, Unsubscribe
JSS(action);
JSS(active); // out: OverlayImpl
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSS(active) is out of alphabetical order — "active" sorts after "acquiring". Swap the two lines:

JSS(acquiring);               // out: LedgerRequest
JSS(active);                  // out: OverlayImpl

BEAST_EXPECT(ownerCount(env, buyer) == 1);
aliceCount++;
buyerCount++;
BEAST_EXPECT(ownerCount(env, alice) == aliceCount);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate assertions — identical checks at 1239-1240 and 1242-1243 with no state change between them. Remove the first pair:


app_.getJobQueue().addJob(
jtUPDATE_PF,
"OrderBookDB::update: " + std::to_string(ledger->seq()),
"OB" + std::to_string(ledger->seq() % 1000000000),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

% 1000000000 truncates valid uint32 seq values ≥ 1,000,000,000, showing a wrong value in logs. The comment's "max 9 digits" claim is also wrong (uint32 max is 10 digits, total still fits in 15 chars). Drop the modulo:

Suggested change
"OB" + std::to_string(ledger->seq() % 1000000000),
"OB" + std::to_string(ledger->seq()),

Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Note: This is a large diff (253,801 chars). Complex issues deep in the diff may receive less attention.

Went through the changes

Two issues flagged inline: a potential consensus-breaking replay difference in LoanManage.cpp (pre-amendment noop path no longer calls associateAsset), and an unnecessary modulo in OrderBookDB.cpp that introduces thread-name collisions.


Review by ReviewBot 🤖

Review by Claude Opus 4.6 · Prompt: V15

return tesSUCCESS;
// Pre-amendment, associateAsset was only called on the noop (no flags)
// path. Post-amendment, we call associateAsset on all successful paths.
if (view.rules().enabled(fixSecurity3_1_3) && isTesSuccess(result))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-amendment noop path behavior changed — old code called associateAsset unconditionally on noop; new code skips it without fixSecurity3_1_3. This is a potential consensus-breaking replay difference if any pre-amendment noop LoanManage transactions exist on-ledger. Confirm no such transactions exist, or add an else branch to preserve the old noop behavior:

app_.getJobQueue().addJob(
jtUPDATE_PF,
"OrderBookDB::update: " + std::to_string(ledger->seq()),
"OB" + std::to_string(ledger->seq() % 1000000000),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary % 1000000000 — seq fits in 15 chars without it and the modulo causes seq collisions (e.g. 1 and 1000000001 get the same thread name).

Suggested change
"OB" + std::to_string(ledger->seq() % 1000000000),
"OB" + std::to_string(ledger->seq()),

@ximinez ximinez added this to the 3.1.3 milestone Apr 15, 2026
Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

mathbunnyru and others added 11 commits April 22, 2026 15:09
This change fixes the `account_tx` RPC method to properly validate malformed limit parameter values. Previously, invalid values like `0`, `1.2`, `"10"`, `true`, `false`, `-1`, `[]`, `{}`, etc. were either accepted without errors or caused internal errors. Now all malformed values correctly return the `invalidParams` error.

Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
The `ledger_entry` and `deposit_preauth` requests require an array of credentials. However, the array size is not checked before is gets processing. This fix adds checks and return errors in case array size is too big.
This change fixes an indexing typo in the `book_offers` CLI processing, and does not affect the HTTPS/WS RPC processing.
If the config disables SQL db usage, such as a validator:

```
[ledger_tx_tables]
use_tx_tables = 0
```

then the pointer to DB engine is null, but it was still resolved during startup. Although it didn't crash in Release mode, possibly due to the compiler optimizing it away, it did crash in Debug mode. This change explicitly checks for the validity of the pointer and generates a runtime error if not set.
This change:
* Truncates thread names if more than 15 chars with `snprintf`.
* Adds warnings for truncated thread names if `-DTRUNCATED_THREAD_NAME_LOGS=ON`.
* Add a static assert for string literals to stop compiling if > 15 chars.
* Shortens `Resource::Manager` to `Resource::Mngr` to fix the static assert failure.
* Updates `CurrentThreadName_test` unit test specifically for Linux to verify truncation.
`PeerImp` processes `TMGetObjectByHash` queries with an unbounded per-request loop, which performs a `NodeStore` fetch and then appends retrieved data to the reply for each queried object without a local count cap or reply-byte budget. However, the `Nodestore` fetches are expensive when high in numbers, which might slow down the process overall. Hence this code change adds an upper cap on the response size.
This change introduces the `fixExpiredNFTokenOfferRemoval` amendment that allows expired offers to pass through `preclaim()` and be deleted in `doApply()`, following the same pattern used for expired credentials.
PeterChen13579 and others added 22 commits April 22, 2026 15:09
When `gateway_balances` gets called on an account that is involved in the `EscrowCreate` transaction (with MPT being escrowed), the method returns internal error. This change fixes this case by excluding the MPT type when totaling escrow amount.
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com>
Co-authored-by: Mayukha Vadari <mvadari@gmail.com>
Co-authored-by: Mayukha Vadari <mvadari@ripple.com>
Co-authored-by: Bart <bthomee@users.noreply.github.com>
This change:
* Removes a set of unnecessary brackets in the initialization of an `std::uint32_t`.
* Fixes a couple of incorrect flags (same value, just wrong variables - so no amendment needed).
…#6212)

This change continues the thread naming work from #5691 and #5758, which enables more useful lock contention profiling by ensuring threads/jobs have short, stable, human-readable names (rather than being truncated/failing due to OS limits). This changes diagnostic naming only (thread names and job/load-event labels), not behavior.

Specific modifications are:
* Shortens all thread/job names used with `beast::setCurrentThreadName`, so the effective Linux thread name stays within the 15-character limit.
* Removes per-ledger sequence numbers from job/thread names to avoid long labels. This improves aggregation in lock contention profiling for short-lived job executions.
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
Co-authored-by: Bart <bthomee@users.noreply.github.com>
Co-authored-by: Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
…ant (#6716) (#6945)

Co-authored-by: Ed Hennis <ed@ripple.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
Co-authored-by: Vito <5780819+Tapanito@users.noreply.github.com>
@ximinez ximinez force-pushed the ripple/staging-313 branch from 22264fa to 7ea4a5f Compare April 22, 2026 19:15
Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.