Merge branch 'develop' into ximinez/online-delete-gaps

This commit is contained in:
Ed Hennis
2025-10-23 13:24:25 -04:00
committed by GitHub
9 changed files with 29 additions and 57 deletions

View File

@@ -31,14 +31,14 @@ runs:
VERBOSITY: ${{ inputs.verbosity }} VERBOSITY: ${{ inputs.verbosity }}
run: | run: |
echo 'Installing dependencies.' echo 'Installing dependencies.'
mkdir -p '${{ env.BUILD_DIR }}' mkdir -p "${BUILD_DIR}"
cd '${{ env.BUILD_DIR }}' cd "${BUILD_DIR}"
conan install \ conan install \
--output-folder . \ --output-folder . \
--build=${{ env.BUILD_OPTION }} \ --build="${BUILD_OPTION}" \
--options:host='&:tests=True' \ --options:host='&:tests=True' \
--options:host='&:xrpld=True' \ --options:host='&:xrpld=True' \
--settings:all build_type='${{ env.BUILD_TYPE }}' \ --settings:all build_type="${BUILD_TYPE}" \
--conf:all tools.build:verbosity='${{ env.VERBOSITY }}' \ --conf:all tools.build:verbosity="${VERBOSITY}" \
--conf:all tools.compilation:verbosity='${{ env.VERBOSITY }}' \ --conf:all tools.compilation:verbosity="${VERBOSITY}" \
.. ..

View File

@@ -39,8 +39,8 @@ runs:
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }} CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
CONAN_REMOTE_URL: ${{ inputs.conan_remote_url }} CONAN_REMOTE_URL: ${{ inputs.conan_remote_url }}
run: | run: |
echo "Adding Conan remote '${{ env.CONAN_REMOTE_NAME }}' at '${{ env.CONAN_REMOTE_URL }}'." echo "Adding Conan remote '${CONAN_REMOTE_NAME}' at '${CONAN_REMOTE_URL}'."
conan remote add --index 0 --force '${{ env.CONAN_REMOTE_NAME }}' '${{ env.CONAN_REMOTE_URL }}' conan remote add --index 0 --force "${CONAN_REMOTE_NAME}" "${CONAN_REMOTE_URL}"
echo 'Listing Conan remotes.' echo 'Listing Conan remotes.'
conan remote list conan remote list

View File

@@ -48,8 +48,8 @@ jobs:
doxygen --version doxygen --version
- name: Build documentation - name: Build documentation
run: | run: |
mkdir -p ${{ env.BUILD_DIR }} mkdir -p "${BUILD_DIR}"
cd ${{ env.BUILD_DIR }} cd "${BUILD_DIR}"
cmake -Donly_docs=ON .. cmake -Donly_docs=ON ..
cmake --build . --target docs --parallel $(nproc) cmake --build . --target docs --parallel $(nproc)
- name: Publish documentation - name: Publish documentation

View File

@@ -84,8 +84,8 @@ jobs:
cmake \ cmake \
-G '${{ runner.os == 'Windows' && 'Visual Studio 17 2022' || 'Ninja' }}' \ -G '${{ runner.os == 'Windows' && 'Visual Studio 17 2022' || 'Ninja' }}' \
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \ -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
${{ env.CMAKE_ARGS }} \ ${CMAKE_ARGS} \
.. ..
- name: Build the binary - name: Build the binary
@@ -97,9 +97,9 @@ jobs:
run: | run: |
cmake \ cmake \
--build . \ --build . \
--config ${{ env.BUILD_TYPE }} \ --config "${BUILD_TYPE}" \
--parallel $(nproc) \ --parallel $(nproc) \
--target ${{ env.CMAKE_TARGET }} --target "${CMAKE_TARGET}"
- name: Upload rippled artifact - name: Upload rippled artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

View File

@@ -51,7 +51,7 @@ jobs:
run: | run: |
echo 'Generating user and channel.' echo 'Generating user and channel.'
echo "user=clio" >> "${GITHUB_OUTPUT}" echo "user=clio" >> "${GITHUB_OUTPUT}"
echo "channel=pr_${{ env.PR_NUMBER }}" >> "${GITHUB_OUTPUT}" echo "channel=pr_${PR_NUMBER}" >> "${GITHUB_OUTPUT}"
echo 'Extracting version.' echo 'Extracting version.'
echo "version=$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')" >> "${GITHUB_OUTPUT}" echo "version=$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')" >> "${GITHUB_OUTPUT}"
- name: Calculate conan reference - name: Calculate conan reference
@@ -66,13 +66,13 @@ jobs:
- name: Log into Conan remote - name: Log into Conan remote
env: env:
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }} 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 - name: Upload package
env: env:
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }} CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
run: | run: |
conan export --user=${{ steps.generate.outputs.user }} --channel=${{ steps.generate.outputs.channel }} . 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: outputs:
conan_ref: ${{ steps.conan_ref.outputs.conan_ref }} 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" \ 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" \ /repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \
-F "client_payload[conan_ref]=${{ needs.upload.outputs.conan_ref }}" \ -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}"

View File

@@ -38,4 +38,4 @@ jobs:
env: env:
GENERATE_CONFIG: ${{ inputs.os != '' && format('--config={0}.json', inputs.os) || '' }} GENERATE_CONFIG: ${{ inputs.os != '' && format('--config={0}.json', inputs.os) || '' }}
GENERATE_OPTION: ${{ inputs.strategy_matrix == 'all' && '--all' || '' }} 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}"

View File

@@ -85,10 +85,10 @@ jobs:
- name: Log into Conan remote - name: Log into Conan remote
if: ${{ github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' }} 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 - name: Upload Conan packages
if: ${{ github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' && github.event_name != 'schedule' }} if: ${{ github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' && github.event_name != 'schedule' }}
env: env:
FORCE_OPTION: ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }} 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}

View File

@@ -109,8 +109,6 @@ XRPL_FIX (MasterKeyAsRegularKey, Supported::yes, VoteBehavior::DefaultYe
XRPL_FIX (TakerDryOfferRemoval, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (TakerDryOfferRemoval, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(MultiSignReserve, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(MultiSignReserve, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FIX (1578, 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_FEATURE(DepositPreauth, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FIX (1623, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (1623, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FIX (1543, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (1543, Supported::yes, VoteBehavior::DefaultYes)
@@ -156,3 +154,4 @@ XRPL_RETIRE(fix1523)
XRPL_RETIRE(fix1528) XRPL_RETIRE(fix1528)
XRPL_RETIRE(FlowCross) XRPL_RETIRE(FlowCross)
XRPL_RETIRE(fix1513) XRPL_RETIRE(fix1513)
XRPL_RETIRE(fix1515)

View File

@@ -47,7 +47,7 @@ class BookStep : public StepImp<TIn, TOut, BookStep<TIn, TOut, TDerived>>
protected: protected:
enum class OfferType { AMM, CLOB }; enum class OfferType { AMM, CLOB };
uint32_t const maxOffersToConsume_; static constexpr uint32_t MaxOffersToConsume{1000};
Book book_; Book book_;
AccountID strandSrc_; AccountID strandSrc_;
AccountID strandDst_; AccountID strandDst_;
@@ -82,18 +82,9 @@ protected:
std::optional<Cache> cache_; std::optional<Cache> cache_;
static uint32_t
getMaxOffersToConsume(StrandContext const& ctx)
{
if (ctx.view.rules().enabled(fix1515))
return 1000;
return 2000;
}
public: public:
BookStep(StrandContext const& ctx, Issue const& in, Issue const& out) 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) , strandSrc_(ctx.strandSrc)
, strandDst_(ctx.strandDst) , strandDst_(ctx.strandDst)
, prevStep_(ctx.prevStep) , prevStep_(ctx.prevStep)
@@ -738,7 +729,7 @@ BookStep<TIn, TOut, TDerived>::forEachOffer(
ownerPaysTransferFee_ ? rate(book_.out.account) : QUALITY_ONE; ownerPaysTransferFee_ ? rate(book_.out.account) : QUALITY_ONE;
typename FlowOfferStream<TIn, TOut>::StepCounter counter( typename FlowOfferStream<TIn, TOut>::StepCounter counter(
maxOffersToConsume_, j_); MaxOffersToConsume, j_);
FlowOfferStream<TIn, TOut> offers( FlowOfferStream<TIn, TOut> offers(
sb, afView, book_, sb.parentCloseTime(), counter, j_); sb, afView, book_, sb.parentCloseTime(), counter, j_);
@@ -1093,18 +1084,9 @@ BookStep<TIn, TOut, TDerived>::revImp(
offersUsed_ = offersConsumed; offersUsed_ = offersConsumed;
SetUnion(ofrsToRm, toRm); 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; inactive_ = true;
} }
} }
@@ -1266,18 +1248,9 @@ BookStep<TIn, TOut, TDerived>::fwdImp(
offersUsed_ = offersConsumed; offersUsed_ = offersConsumed;
SetUnion(ofrsToRm, toRm); 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; inactive_ = true;
} }
} }