From 459d0da010626e5669d53966ff14cd1ae9e77957 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Tue, 14 Oct 2025 16:18:34 +0100 Subject: [PATCH 1/5] chore: Support CMake 4 without workarounds (#5866) --- .github/scripts/strategy-matrix/linux.json | 44 +++++++++++----------- BUILD.md | 22 +---------- conan/profiles/default | 3 -- 3 files changed, 23 insertions(+), 46 deletions(-) diff --git a/.github/scripts/strategy-matrix/linux.json b/.github/scripts/strategy-matrix/linux.json index bae5c57087..b8da322118 100644 --- a/.github/scripts/strategy-matrix/linux.json +++ b/.github/scripts/strategy-matrix/linux.json @@ -15,154 +15,154 @@ "distro_version": "bookworm", "compiler_name": "gcc", "compiler_version": "12", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "gcc", "compiler_version": "13", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "gcc", "compiler_version": "15", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "16", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "17", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "18", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "19", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "20", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "rhel", "distro_version": "9", "compiler_name": "gcc", "compiler_version": "12", - "image_sha": "d133ce3" + "image_sha": "6948666" }, { "distro_name": "rhel", "distro_version": "9", "compiler_name": "gcc", "compiler_version": "13", - "image_sha": "d133ce3" + "image_sha": "6948666" }, { "distro_name": "rhel", "distro_version": "9", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "d133ce3" + "image_sha": "6948666" }, { "distro_name": "rhel", "distro_version": "9", "compiler_name": "clang", "compiler_version": "any", - "image_sha": "d133ce3" + "image_sha": "6948666" }, { "distro_name": "rhel", "distro_version": "10", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "d133ce3" + "image_sha": "6948666" }, { "distro_name": "rhel", "distro_version": "10", "compiler_name": "clang", "compiler_version": "any", - "image_sha": "d133ce3" + "image_sha": "6948666" }, { "distro_name": "ubuntu", "distro_version": "jammy", "compiler_name": "gcc", "compiler_version": "12", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "gcc", "compiler_version": "13", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "clang", "compiler_version": "16", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "clang", "compiler_version": "17", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "clang", "compiler_version": "18", - "image_sha": "6f723eb" + "image_sha": "6948666" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "clang", "compiler_version": "19", - "image_sha": "6f723eb" + "image_sha": "6948666" } ], "build_type": ["Debug", "Release"], diff --git a/BUILD.md b/BUILD.md index fd7a0b855d..ef6b5259df 100644 --- a/BUILD.md +++ b/BUILD.md @@ -39,17 +39,12 @@ found here](./docs/build/environment.md). - [Python 3.11](https://www.python.org/downloads/), or higher - [Conan 2.17](https://conan.io/downloads.html)[^1], or higher -- [CMake 3.22](https://cmake.org/download/)[^2], or higher +- [CMake 3.22](https://cmake.org/download/), or higher [^1]: It is possible to build with Conan 1.60+, but the instructions are significantly different, which is why we are not recommending it. -[^2]: - CMake 4 is not yet supported by all dependencies required by this project. - If you are affected by this issue, follow [conan workaround for cmake - 4](#workaround-for-cmake-4) - `rippled` is written in the C++20 dialect and includes the `` header. The [minimum compiler versions][2] required are: @@ -282,21 +277,6 @@ sed -i.bak -e 's|^arch=.*$|arch=x86_64|' $(conan config home)/profiles/default sed -i.bak -e 's|^compiler\.runtime=.*$|compiler.runtime=static|' $(conan config home)/profiles/default ``` -#### Workaround for CMake 4 - -If your system CMake is version 4 rather than 3, you may have to configure Conan -profile to use CMake version 3 for dependencies, by adding the following two -lines to your profile: - -```text -[tool_requires] -!cmake/*: cmake/[>=3 <4] -``` - -This will force Conan to download and use a locally cached CMake 3 version, and -is needed because some of the dependencies used by this project do not support -CMake 4. - #### Clang workaround for grpc If your compiler is clang, version 19 or later, or apple-clang, version 17 or diff --git a/conan/profiles/default b/conan/profiles/default index 3a7bcda1c6..03f19ca118 100644 --- a/conan/profiles/default +++ b/conan/profiles/default @@ -29,6 +29,3 @@ tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw'] {% if compiler == "gcc" and compiler_version < 13 %} tools.build:cxxflags=['-Wno-restrict'] {% endif %} - -[tool_requires] -!cmake/*: cmake/[>=3 <4] From 3509de9c5f6a62ebe02a916265a4238dd4f3bcd1 Mon Sep 17 00:00:00 2001 From: tequ Date: Wed, 15 Oct 2025 03:37:39 +0900 Subject: [PATCH 2/5] refactor: Add `paychan` namespace and update related tests (#5840) This change adds a paychan namespace to the TestHelpers and implementation files, improving organization and clarity. Additionally, it updates the AMM test to use the new `paychan::create` function for payment channel creation. Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com> --- src/test/app/AMM_test.cpp | 2 +- src/test/app/PayChan_test.cpp | 2 ++ src/test/jtx/TestHelpers.h | 3 +++ src/test/jtx/impl/TestHelpers.cpp | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/test/app/AMM_test.cpp b/src/test/app/AMM_test.cpp index 1fe37bb7c1..3e0d65894f 100644 --- a/src/test/app/AMM_test.cpp +++ b/src/test/app/AMM_test.cpp @@ -3666,7 +3666,7 @@ private: auto const settleDelay = 100s; NetClock::time_point const cancelAfter = env.current()->info().parentCloseTime + 200s; - env(create( + env(paychan::create( carol, ammAlice.ammAccount(), XRP(1'000), diff --git a/src/test/app/PayChan_test.cpp b/src/test/app/PayChan_test.cpp index fe9b70cf7f..595a12aed9 100644 --- a/src/test/app/PayChan_test.cpp +++ b/src/test/app/PayChan_test.cpp @@ -31,6 +31,8 @@ namespace ripple { namespace test { +using namespace jtx::paychan; + struct PayChan_test : public beast::unit_test::suite { FeatureBitset const disallowIncoming{featureDisallowIncoming}; diff --git a/src/test/jtx/TestHelpers.h b/src/test/jtx/TestHelpers.h index 7d14f23c92..a7bdbb9b9f 100644 --- a/src/test/jtx/TestHelpers.h +++ b/src/test/jtx/TestHelpers.h @@ -502,6 +502,7 @@ expectLedgerEntryRoot( /* Payment Channel */ /******************************************************************************/ +namespace paychan { Json::Value create( @@ -561,6 +562,8 @@ channelBalance(ReadView const& view, uint256 const& chan); bool channelExists(ReadView const& view, uint256 const& chan); +} // namespace paychan + /* Crossing Limits */ /******************************************************************************/ diff --git a/src/test/jtx/impl/TestHelpers.cpp b/src/test/jtx/impl/TestHelpers.cpp index 20f24f0d84..71f44c691e 100644 --- a/src/test/jtx/impl/TestHelpers.cpp +++ b/src/test/jtx/impl/TestHelpers.cpp @@ -237,6 +237,8 @@ expectLedgerEntryRoot( /* Payment Channel */ /******************************************************************************/ +namespace paychan { + Json::Value create( AccountID const& account, @@ -328,6 +330,8 @@ channelExists(ReadView const& view, uint256 const& chan) return bool(slep); } +} // namespace paychan + /* Crossing Limits */ /******************************************************************************/ From 34619f2504c92f2967c855fcc0ca3d80682dcd3a Mon Sep 17 00:00:00 2001 From: zingero Date: Tue, 14 Oct 2025 22:10:19 +0300 Subject: [PATCH 3/5] docs: Fix typo in JSON writer documentation (#5881) Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com> --- include/xrpl/json/json_writer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xrpl/json/json_writer.h b/include/xrpl/json/json_writer.h index 7e21e766e3..ba3a51013f 100644 --- a/include/xrpl/json/json_writer.h +++ b/include/xrpl/json/json_writer.h @@ -46,7 +46,7 @@ public: * without formatting (not human friendly). * * The JSON document is written in a single line. It is not intended for 'human' - * consumption, but may be useful to support feature such as RPC where bandwith + * consumption, but may be useful to support feature such as RPC where bandwidth * is limited. \sa Reader, Value */ From 97bc94a7f6c6be467728d1da363eabdcbd2803f9 Mon Sep 17 00:00:00 2001 From: Michael Legleux Date: Tue, 14 Oct 2025 15:02:38 -0700 Subject: [PATCH 4/5] feat: Install validator-keys (#5841) * feat: Install validator-keys * output validator-keys with everything else --- cmake/RippledInstall.cmake | 4 ++-- cmake/RippledValidatorKeys.cmake | 16 +++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cmake/RippledInstall.cmake b/cmake/RippledInstall.cmake index 95c25a212f..50f09d5a4b 100644 --- a/cmake/RippledInstall.cmake +++ b/cmake/RippledInstall.cmake @@ -38,7 +38,7 @@ install(CODE " set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\") include(create_symbolic_link) create_symbolic_link(xrpl \ - \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/ripple) + \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/ripple) ") install (EXPORT RippleExports @@ -72,7 +72,7 @@ if (is_root_project AND TARGET rippled) set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\") include(create_symbolic_link) create_symbolic_link(rippled${suffix} \ - \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/xrpld${suffix}) + \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/xrpld${suffix}) ") endif () diff --git a/cmake/RippledValidatorKeys.cmake b/cmake/RippledValidatorKeys.cmake index b6760ca496..fa520ce9c1 100644 --- a/cmake/RippledValidatorKeys.cmake +++ b/cmake/RippledValidatorKeys.cmake @@ -1,4 +1,4 @@ -option (validator_keys "Enables building of validator-keys-tool as a separate target (imported via FetchContent)" OFF) +option (validator_keys "Enables building of validator-keys tool as a separate target (imported via FetchContent)" OFF) if (validator_keys) git_branch (current_branch) @@ -6,17 +6,15 @@ if (validator_keys) if (NOT (current_branch STREQUAL "release")) set (current_branch "master") endif () - message (STATUS "tracking ValidatorKeys branch: ${current_branch}") + message (STATUS "Tracking ValidatorKeys branch: ${current_branch}") FetchContent_Declare ( - validator_keys_src + validator_keys GIT_REPOSITORY https://github.com/ripple/validator-keys-tool.git GIT_TAG "${current_branch}" ) - FetchContent_GetProperties (validator_keys_src) - if (NOT validator_keys_src_POPULATED) - message (STATUS "Pausing to download ValidatorKeys...") - FetchContent_Populate (validator_keys_src) - endif () - add_subdirectory (${validator_keys_src_SOURCE_DIR} ${CMAKE_BINARY_DIR}/validator-keys) + FetchContent_MakeAvailable(validator_keys) + set_target_properties(validator-keys PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") + install(TARGETS validator-keys RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif () From 3d44758e5af811fc7dbdb47e81e887eaca87e184 Mon Sep 17 00:00:00 2001 From: Bart Date: Wed, 15 Oct 2025 14:23:44 -0400 Subject: [PATCH 5/5] fix: Update tools image shas (#5896) This change updates the Docker image hashes of the tools-rippled images to fix a missing dependency. Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com> --- .github/workflows/pre-commit.yml | 2 +- .github/workflows/publish-docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 9b85a3bd11..da0fb02c19 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -12,4 +12,4 @@ jobs: uses: XRPLF/actions/.github/workflows/pre-commit.yml@af1b0f0d764cda2e5435f5ac97b240d4bd4d95d3 with: runs_on: ubuntu-latest - container: '{ "image": "ghcr.io/xrplf/ci/tools-rippled-pre-commit:sha-d1496b8" }' + container: '{ "image": "ghcr.io/xrplf/ci/tools-rippled-pre-commit:sha-a8c7be1" }' diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index efd89a5b22..84771ee4f7 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -27,7 +27,7 @@ env: jobs: publish: runs-on: ubuntu-latest - container: ghcr.io/xrplf/ci/tools-rippled-documentation:sha-d1496b8 + container: ghcr.io/xrplf/ci/tools-rippled-documentation:sha-a8c7be1 permissions: contents: write steps: