From 5e33ca56fd51b02a5490e8e156e2de65937cf88e Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Wed, 22 Oct 2025 22:43:04 +0400 Subject: [PATCH 1/2] Use "${ENVVAR}" instead of ${{ env.ENVVAR }} syntax in GitHub Actions (#5923) --- .github/actions/build-deps/action.yml | 12 ++++++------ .github/actions/setup-conan/action.yml | 4 ++-- .github/workflows/publish-docs.yml | 4 ++-- .github/workflows/reusable-build.yml | 8 ++++---- .github/workflows/reusable-notify-clio.yml | 8 ++++---- .github/workflows/reusable-strategy-matrix.yml | 2 +- .github/workflows/upload-conan-deps.yml | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/actions/build-deps/action.yml b/.github/actions/build-deps/action.yml index d99ea77bf5..d5897bc52a 100644 --- a/.github/actions/build-deps/action.yml +++ b/.github/actions/build-deps/action.yml @@ -31,14 +31,14 @@ runs: VERBOSITY: ${{ inputs.verbosity }} run: | echo 'Installing dependencies.' - mkdir -p '${{ env.BUILD_DIR }}' - cd '${{ env.BUILD_DIR }}' + mkdir -p "${BUILD_DIR}" + cd "${BUILD_DIR}" conan install \ --output-folder . \ - --build=${{ env.BUILD_OPTION }} \ + --build="${BUILD_OPTION}" \ --options:host='&:tests=True' \ --options:host='&:xrpld=True' \ - --settings:all build_type='${{ env.BUILD_TYPE }}' \ - --conf:all tools.build:verbosity='${{ env.VERBOSITY }}' \ - --conf:all tools.compilation:verbosity='${{ env.VERBOSITY }}' \ + --settings:all build_type="${BUILD_TYPE}" \ + --conf:all tools.build:verbosity="${VERBOSITY}" \ + --conf:all tools.compilation:verbosity="${VERBOSITY}" \ .. diff --git a/.github/actions/setup-conan/action.yml b/.github/actions/setup-conan/action.yml index 02061c7a64..1184cfd3d9 100644 --- a/.github/actions/setup-conan/action.yml +++ b/.github/actions/setup-conan/action.yml @@ -39,8 +39,8 @@ runs: CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }} CONAN_REMOTE_URL: ${{ inputs.conan_remote_url }} run: | - echo "Adding Conan remote '${{ env.CONAN_REMOTE_NAME }}' at '${{ env.CONAN_REMOTE_URL }}'." - conan remote add --index 0 --force '${{ env.CONAN_REMOTE_NAME }}' '${{ env.CONAN_REMOTE_URL }}' + echo "Adding Conan remote '${CONAN_REMOTE_NAME}' at '${CONAN_REMOTE_URL}'." + conan remote add --index 0 --force "${CONAN_REMOTE_NAME}" "${CONAN_REMOTE_URL}" echo 'Listing Conan remotes.' conan remote list diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 84771ee4f7..46d377a41d 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -48,8 +48,8 @@ jobs: doxygen --version - name: Build documentation run: | - mkdir -p ${{ env.BUILD_DIR }} - cd ${{ env.BUILD_DIR }} + mkdir -p "${BUILD_DIR}" + cd "${BUILD_DIR}" cmake -Donly_docs=ON .. cmake --build . --target docs --parallel $(nproc) - name: Publish documentation diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 05423f7511..24650858f9 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -84,8 +84,8 @@ jobs: cmake \ -G '${{ runner.os == 'Windows' && 'Visual Studio 17 2022' || 'Ninja' }}' \ -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \ - -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ - ${{ env.CMAKE_ARGS }} \ + -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ + ${CMAKE_ARGS} \ .. - name: Build the binary @@ -97,9 +97,9 @@ jobs: run: | cmake \ --build . \ - --config ${{ env.BUILD_TYPE }} \ + --config "${BUILD_TYPE}" \ --parallel $(nproc) \ - --target ${{ env.CMAKE_TARGET }} + --target "${CMAKE_TARGET}" - name: Upload rippled artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 diff --git a/.github/workflows/reusable-notify-clio.yml b/.github/workflows/reusable-notify-clio.yml index fe749beac9..0941d5f2e3 100644 --- a/.github/workflows/reusable-notify-clio.yml +++ b/.github/workflows/reusable-notify-clio.yml @@ -51,7 +51,7 @@ jobs: run: | echo 'Generating user and channel.' echo "user=clio" >> "${GITHUB_OUTPUT}" - echo "channel=pr_${{ env.PR_NUMBER }}" >> "${GITHUB_OUTPUT}" + echo "channel=pr_${PR_NUMBER}" >> "${GITHUB_OUTPUT}" echo 'Extracting version.' echo "version=$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')" >> "${GITHUB_OUTPUT}" - name: Calculate conan reference @@ -66,13 +66,13 @@ jobs: - name: Log into Conan remote env: CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }} - run: conan remote login ${{ env.CONAN_REMOTE_NAME }} "${{ secrets.conan_remote_username }}" --password "${{ secrets.conan_remote_password }}" + run: conan remote login "${CONAN_REMOTE_NAME}" "${{ secrets.conan_remote_username }}" --password "${{ secrets.conan_remote_password }}" - name: Upload package env: CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }} run: | conan export --user=${{ steps.generate.outputs.user }} --channel=${{ steps.generate.outputs.channel }} . - conan upload --confirm --check --remote=${{ env.CONAN_REMOTE_NAME }} xrpl/${{ steps.conan_ref.outputs.conan_ref }} + conan upload --confirm --check --remote="${CONAN_REMOTE_NAME}" xrpl/${{ steps.conan_ref.outputs.conan_ref }} outputs: conan_ref: ${{ steps.conan_ref.outputs.conan_ref }} @@ -88,4 +88,4 @@ jobs: gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \ /repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \ -F "client_payload[conan_ref]=${{ needs.upload.outputs.conan_ref }}" \ - -F "client_payload[pr_url]=${{ env.PR_URL }}" + -F "client_payload[pr_url]=${PR_URL}" diff --git a/.github/workflows/reusable-strategy-matrix.yml b/.github/workflows/reusable-strategy-matrix.yml index e8621527c9..129f65938b 100644 --- a/.github/workflows/reusable-strategy-matrix.yml +++ b/.github/workflows/reusable-strategy-matrix.yml @@ -38,4 +38,4 @@ jobs: env: GENERATE_CONFIG: ${{ inputs.os != '' && format('--config={0}.json', inputs.os) || '' }} GENERATE_OPTION: ${{ inputs.strategy_matrix == 'all' && '--all' || '' }} - run: ./generate.py ${{ env.GENERATE_OPTION }} ${{ env.GENERATE_CONFIG }} >> "${GITHUB_OUTPUT}" + run: ./generate.py ${GENERATE_OPTION} ${GENERATE_CONFIG} >> "${GITHUB_OUTPUT}" diff --git a/.github/workflows/upload-conan-deps.yml b/.github/workflows/upload-conan-deps.yml index aedd367f65..0bea36cea7 100644 --- a/.github/workflows/upload-conan-deps.yml +++ b/.github/workflows/upload-conan-deps.yml @@ -85,10 +85,10 @@ jobs: - name: Log into Conan remote if: ${{ github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' }} - run: conan remote login ${{ env.CONAN_REMOTE_NAME }} "${{ secrets.CONAN_REMOTE_USERNAME }}" --password "${{ secrets.CONAN_REMOTE_PASSWORD }}" + run: conan remote login "${CONAN_REMOTE_NAME}" "${{ secrets.CONAN_REMOTE_USERNAME }}" --password "${{ secrets.CONAN_REMOTE_PASSWORD }}" - name: Upload Conan packages if: ${{ github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' && github.event_name != 'schedule' }} env: FORCE_OPTION: ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }} - run: conan upload "*" --remote='${{ env.CONAN_REMOTE_NAME }}' --confirm ${{ env.FORCE_OPTION }} + run: conan upload "*" --remote="${CONAN_REMOTE_NAME}" --confirm ${FORCE_OPTION} From 2bf77cc8f6925e0a6ae5441a87bdb9517c0c71fe Mon Sep 17 00:00:00 2001 From: Pratik Mankawde Date: Thu, 23 Oct 2025 14:35:54 +0100 Subject: [PATCH 2/2] refactor: Retire fix1515 amendment (#5920) Amendments activated for more than 2 years can be retired. This change retires the fix1515 amendment. Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com> --- include/xrpl/protocol/detail/features.macro | 3 +- src/xrpld/app/paths/detail/BookStep.cpp | 41 ++++----------------- 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index 0d50596a61..32dc1a1e3c 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -109,8 +109,6 @@ XRPL_FIX (MasterKeyAsRegularKey, Supported::yes, VoteBehavior::DefaultYe XRPL_FIX (TakerDryOfferRemoval, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(MultiSignReserve, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (1578, Supported::yes, VoteBehavior::DefaultYes) -// fix1515: Use liquidity from strands that consume max offers, but mark as dry -XRPL_FIX (1515, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(DepositPreauth, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (1623, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (1543, Supported::yes, VoteBehavior::DefaultYes) @@ -156,3 +154,4 @@ XRPL_RETIRE(fix1523) XRPL_RETIRE(fix1528) XRPL_RETIRE(FlowCross) XRPL_RETIRE(fix1513) +XRPL_RETIRE(fix1515) diff --git a/src/xrpld/app/paths/detail/BookStep.cpp b/src/xrpld/app/paths/detail/BookStep.cpp index 54d0d8d0c9..5ac08295fc 100644 --- a/src/xrpld/app/paths/detail/BookStep.cpp +++ b/src/xrpld/app/paths/detail/BookStep.cpp @@ -47,7 +47,7 @@ class BookStep : public StepImp> protected: enum class OfferType { AMM, CLOB }; - uint32_t const maxOffersToConsume_; + static constexpr uint32_t MaxOffersToConsume{1000}; Book book_; AccountID strandSrc_; AccountID strandDst_; @@ -82,18 +82,9 @@ protected: std::optional cache_; - static uint32_t - getMaxOffersToConsume(StrandContext const& ctx) - { - if (ctx.view.rules().enabled(fix1515)) - return 1000; - return 2000; - } - public: BookStep(StrandContext const& ctx, Issue const& in, Issue const& out) - : maxOffersToConsume_(getMaxOffersToConsume(ctx)) - , book_(in, out, ctx.domainID) + : book_(in, out, ctx.domainID) , strandSrc_(ctx.strandSrc) , strandDst_(ctx.strandDst) , prevStep_(ctx.prevStep) @@ -738,7 +729,7 @@ BookStep::forEachOffer( ownerPaysTransferFee_ ? rate(book_.out.account) : QUALITY_ONE; typename FlowOfferStream::StepCounter counter( - maxOffersToConsume_, j_); + MaxOffersToConsume, j_); FlowOfferStream offers( sb, afView, book_, sb.parentCloseTime(), counter, j_); @@ -1093,18 +1084,9 @@ BookStep::revImp( offersUsed_ = offersConsumed; SetUnion(ofrsToRm, toRm); - if (offersConsumed >= maxOffersToConsume_) + // Too many iterations, mark this strand as inactive + if (offersConsumed >= MaxOffersToConsume) { - // Too many iterations, mark this strand as inactive - if (!afView.rules().enabled(fix1515)) - { - // Don't use the liquidity - cache_.emplace(beast::zero, beast::zero); - return {beast::zero, beast::zero}; - } - - // Use the liquidity, but use this to mark the strand as inactive so - // it's not used further inactive_ = true; } } @@ -1266,18 +1248,9 @@ BookStep::fwdImp( offersUsed_ = offersConsumed; SetUnion(ofrsToRm, toRm); - if (offersConsumed >= maxOffersToConsume_) + // Too many iterations, mark this strand as inactive (dry) + if (offersConsumed >= MaxOffersToConsume) { - // Too many iterations, mark this strand as inactive (dry) - if (!afView.rules().enabled(fix1515)) - { - // Don't use the liquidity - cache_.emplace(beast::zero, beast::zero); - return {beast::zero, beast::zero}; - } - - // Use the liquidity, but use this to mark the strand as inactive so - // it's not used further inactive_ = true; } }