From 851d99d99e9015d2d9918df56b01885bae5234e5 Mon Sep 17 00:00:00 2001 From: Vlad <129996061+vvysokikh1@users.noreply.github.com> Date: Fri, 4 Apr 2025 13:28:33 +0100 Subject: [PATCH 1/4] fix: uint128 ambiguousness breaking macos unity build (#5386) --- src/libxrpl/basics/mulDiv.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libxrpl/basics/mulDiv.cpp b/src/libxrpl/basics/mulDiv.cpp index 882878ebec..57c3dd81cd 100644 --- a/src/libxrpl/basics/mulDiv.cpp +++ b/src/libxrpl/basics/mulDiv.cpp @@ -31,9 +31,7 @@ namespace ripple { std::optional mulDiv(std::uint64_t value, std::uint64_t mul, std::uint64_t div) { - using namespace boost::multiprecision; - - uint128_t result; + boost::multiprecision::uint128_t result; result = multiply(result, value, mul); result /= div; From e923ec6d3641d6f03de2b2bc53b0f533ea999b74 Mon Sep 17 00:00:00 2001 From: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com> Date: Fri, 4 Apr 2025 19:21:17 +0100 Subject: [PATCH 2/4] Fix to correct memory ordering for compare_exchange_weak and wait in the intrusive reference counting logic (#5381) This change addresses a memory ordering assertion failure observed on one of the Windows test machines during the IntrusiveShared_test suite. --- include/xrpl/basics/IntrusiveRefCounts.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/xrpl/basics/IntrusiveRefCounts.h b/include/xrpl/basics/IntrusiveRefCounts.h index f3c707422b..750b945803 100644 --- a/include/xrpl/basics/IntrusiveRefCounts.h +++ b/include/xrpl/basics/IntrusiveRefCounts.h @@ -294,7 +294,7 @@ IntrusiveRefCounts::releaseStrongRef() const } if (refCounts.compare_exchange_weak( - prevIntVal, nextIntVal, std::memory_order_release)) + prevIntVal, nextIntVal, std::memory_order_acq_rel)) { // Can't be in partial destroy because only decrementing the strong // count to zero can start a partial destroy, and that can't happen @@ -351,7 +351,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const } } if (refCounts.compare_exchange_weak( - prevIntVal, nextIntVal, std::memory_order_release)) + prevIntVal, nextIntVal, std::memory_order_acq_rel)) { XRPL_ASSERT( (!(prevIntVal & partialDestroyStartedMask)), @@ -374,7 +374,7 @@ IntrusiveRefCounts::releaseWeakRef() const // This case should only be hit if the partialDestroyStartedBit is // set non-atomically (and even then very rarely). The code is kept // in case we need to set the flag non-atomically for perf reasons. - refCounts.wait(prevIntVal, std::memory_order_acq_rel); + refCounts.wait(prevIntVal, std::memory_order_acquire); prevIntVal = refCounts.load(std::memory_order_acquire); prev = RefCountPair{prevIntVal}; } @@ -382,7 +382,7 @@ IntrusiveRefCounts::releaseWeakRef() const { // partial destroy MUST finish before running a full destroy (when // using weak pointers) - refCounts.wait(prevIntVal - weakDelta, std::memory_order_acq_rel); + refCounts.wait(prevIntVal - weakDelta, std::memory_order_acquire); } return ReleaseWeakRefAction::destroy; } @@ -396,7 +396,7 @@ IntrusiveRefCounts::checkoutStrongRefFromWeak() const noexcept auto desiredValue = RefCountPair{2, 1}.combinedValue(); while (!refCounts.compare_exchange_weak( - curValue, desiredValue, std::memory_order_release)) + curValue, desiredValue, std::memory_order_acq_rel)) { RefCountPair const prev{curValue}; if (!prev.strong) From 4ba9288935672b237a36b894d34733ec6f7bd485 Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Fri, 4 Apr 2025 21:08:34 -0400 Subject: [PATCH 3/4] fix: disable `channel_authorize` when `signing_support` is disabled (#5385) --- API-CHANGELOG.md | 10 +++++++++- src/xrpld/rpc/handlers/PayChanClaim.cpp | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/API-CHANGELOG.md b/API-CHANGELOG.md index 0d5d8a8196..dd3fcd018b 100644 --- a/API-CHANGELOG.md +++ b/API-CHANGELOG.md @@ -83,9 +83,17 @@ The [commandline](https://xrpl.org/docs/references/http-websocket-apis/api-conve The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it is not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode). However, use of reporting mode is now discouraged, in favor of using [Clio](https://github.com/XRPLF/clio) instead. +## XRP Ledger server version 2.5.0 + +As of 2025-04-04, version 2.5.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu). + +### Additions and bugfixes in 2.5.0 + +- `channel_authorize`: If `signing_support` is not enabled in the config, the RPC is disabled. + ## XRP Ledger server version 2.4.0 -As of 2025-01-28, version 2.4.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu). +[Version 2.4.0](https://github.com/XRPLF/rippled/releases/tag/2.4.0) was released on March 4, 2025. ### Additions and bugfixes in 2.4.0 diff --git a/src/xrpld/rpc/handlers/PayChanClaim.cpp b/src/xrpld/rpc/handlers/PayChanClaim.cpp index aaa559895c..b62f5e54e5 100644 --- a/src/xrpld/rpc/handlers/PayChanClaim.cpp +++ b/src/xrpld/rpc/handlers/PayChanClaim.cpp @@ -17,6 +17,7 @@ */ //============================================================================== +#include #include #include #include @@ -40,6 +41,12 @@ namespace ripple { Json::Value doChannelAuthorize(RPC::JsonContext& context) { + if (context.role != Role::ADMIN && !context.app.config().canSign()) + { + return RPC::make_error( + rpcNOT_SUPPORTED, "Signing is not supported by this server."); + } + auto const& params(context.params); for (auto const& p : {jss::channel_id, jss::amount}) if (!params.isMember(p)) From ca0bc767fee9c10532754c874de5697722c43986 Mon Sep 17 00:00:00 2001 From: Michael Legleux Date: Fri, 4 Apr 2025 19:24:31 -0700 Subject: [PATCH 4/4] fix: Use the build image from ghcr.io (#5390) The ci pipelines are constantly hitting Docker Hub's public rate limiting since increasing the number of jobs we're running. This change switches over to images hosted in GitHub's registry. --- .github/workflows/doxygen.yml | 2 +- .github/workflows/libxrpl.yml | 2 +- .github/workflows/nix.yml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index e2265d1b83..0693308ef0 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - container: rippleci/rippled-build-ubuntu:aaf5e3e + container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e steps: - name: checkout uses: actions/checkout@v4 diff --git a/.github/workflows/libxrpl.yml b/.github/workflows/libxrpl.yml index 2834595e3a..92deff7810 100644 --- a/.github/workflows/libxrpl.yml +++ b/.github/workflows/libxrpl.yml @@ -20,7 +20,7 @@ jobs: version: ${{ steps.version.outputs.version }} channel: ${{ steps.channel.outputs.channel }} runs-on: [self-hosted, heavy] - container: rippleci/rippled-build-ubuntu:aaf5e3e + container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e steps: - name: Wait for essential checks to succeed uses: lewagon/wait-on-check-action@v1.3.4 diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index c4507c8440..abae2ee84a 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -62,7 +62,7 @@ jobs: cc: /usr/bin/clang-14 cxx: /usr/bin/clang++-14 runs-on: [self-hosted, heavy] - container: rippleci/rippled-build-ubuntu:aaf5e3e + container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e env: build_dir: .build steps: @@ -124,7 +124,7 @@ jobs: - "-Dunity=ON" needs: dependencies runs-on: [self-hosted, heavy] - container: rippleci/rippled-build-ubuntu:aaf5e3e + container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e env: build_dir: .build steps: @@ -178,7 +178,7 @@ jobs: - "-DUNIT_TEST_REFERENCE_FEE=1000" needs: dependencies runs-on: [self-hosted, heavy] - container: rippleci/rippled-build-ubuntu:aaf5e3e + container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e env: build_dir: .build steps: @@ -229,7 +229,7 @@ jobs: - Debug needs: dependencies runs-on: [self-hosted, heavy] - container: rippleci/rippled-build-ubuntu:aaf5e3e + container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e env: build_dir: .build steps: @@ -303,7 +303,7 @@ jobs: conan: needs: dependencies runs-on: [self-hosted, heavy] - container: rippleci/rippled-build-ubuntu:aaf5e3e + container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e env: build_dir: .build configuration: Release