Compare commits

..

9 Commits

Author SHA1 Message Date
Michael Legleux
8bfc19d0e1 PR comments and more tweaks 2026-04-02 12:01:00 -07:00
Michael Legleux
08a42f5d52 pr comments 2026-03-31 12:35:01 -07:00
Michael Legleux
cf38fc54db more tweaks 2026-03-31 00:54:26 -07:00
Michael Legleux
9776d466ba cp lic/readme 2026-03-31 00:54:26 -07:00
Michael Legleux
b66178f6fc more fixes/updates 2026-03-31 00:54:26 -07:00
Michael Legleux
587f5d2f5e update download-artifacts version 2026-03-31 00:54:26 -07:00
Michael Legleux
cb94f83c7f handle tmpfiles in rpm 2026-03-31 00:54:25 -07:00
Michael Legleux
a9a4446674 address review comments 2026-03-31 00:54:25 -07:00
Michael Legleux
c001f703dc feat: Build Linux packages in GitHub 2026-03-31 00:54:25 -07:00
765 changed files with 7359 additions and 7546 deletions

View File

@@ -78,28 +78,25 @@ Checks: "-*,
bugprone-unused-return-value, bugprone-unused-return-value,
bugprone-unused-local-non-trivial-variable, bugprone-unused-local-non-trivial-variable,
bugprone-virtual-near-miss, bugprone-virtual-near-miss,
cppcoreguidelines-init-variables, # cppcoreguidelines-init-variables, # has issues
cppcoreguidelines-misleading-capture-default-by-value, # cppcoreguidelines-misleading-capture-default-by-value, # has issues
cppcoreguidelines-no-suspend-with-lock, cppcoreguidelines-no-suspend-with-lock,
cppcoreguidelines-pro-type-member-init, # cppcoreguidelines-pro-type-member-init, # has issues
cppcoreguidelines-pro-type-static-cast-downcast, cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-rvalue-reference-param-not-moved, # cppcoreguidelines-rvalue-reference-param-not-moved, # has issues
cppcoreguidelines-use-default-member-init, # cppcoreguidelines-use-default-member-init, # has issues
cppcoreguidelines-virtual-class-destructor, # cppcoreguidelines-virtual-class-destructor, # has issues
hicpp-ignored-remove-result, hicpp-ignored-remove-result,
misc-const-correctness, # misc-definitions-in-headers, # has issues
misc-definitions-in-headers,
misc-header-include-cycle, misc-header-include-cycle,
misc-misplaced-const, misc-misplaced-const,
misc-redundant-expression,
misc-static-assert, misc-static-assert,
misc-throw-by-value-catch-by-reference, # misc-throw-by-value-catch-by-reference, # has issues
misc-unused-alias-decls, misc-unused-alias-decls,
misc-unused-using-decls, misc-unused-using-decls,
modernize-deprecated-headers, modernize-deprecated-headers,
modernize-make-shared, modernize-make-shared,
modernize-make-unique, modernize-make-unique,
llvm-namespace-comment,
performance-faster-string-find, performance-faster-string-find,
performance-for-range-copy, performance-for-range-copy,
performance-implicit-conversion-in-loop, performance-implicit-conversion-in-loop,
@@ -137,7 +134,10 @@ Checks: "-*,
# --- # ---
# other checks that have issues that need to be resolved: # other checks that have issues that need to be resolved:
# #
# llvm-namespace-comment,
# misc-const-correctness,
# misc-include-cleaner, # misc-include-cleaner,
# misc-redundant-expression,
# #
# readability-inconsistent-declaration-parameter-name, # in this codebase this check will break a lot of arg names # readability-inconsistent-declaration-parameter-name, # in this codebase this check will break a lot of arg names
# readability-static-accessed-through-instance, # this check is probably unnecessary. it makes the code less readable # readability-static-accessed-through-instance, # this check is probably unnecessary. it makes the code less readable

View File

@@ -1,7 +1,7 @@
--- ---
name: Feature Request name: Feature Request
about: Suggest a new feature for the xrpld project about: Suggest a new feature for the rippled project
title: "[Title with short description] (Version: [xrpld version])" title: "[Title with short description] (Version: [rippled version])"
labels: Feature Request labels: Feature Request
assignees: "" assignees: ""
--- ---

View File

@@ -1,14 +1,14 @@
# Levelization # Levelization
Levelization is the term used to describe efforts to prevent xrpld from Levelization is the term used to describe efforts to prevent rippled from
having or creating cyclic dependencies. having or creating cyclic dependencies.
xrpld code is organized into directories under `src/xrpld`, `src/libxrpl` (and rippled code is organized into directories under `src/xrpld`, `src/libxrpl` (and
`src/test`) representing modules. The modules are intended to be `src/test`) representing modules. The modules are intended to be
organized into "tiers" or "levels" such that a module from one level can organized into "tiers" or "levels" such that a module from one level can
only include code from lower levels. Additionally, a module only include code from lower levels. Additionally, a module
in one level should never include code in an `impl` or `detail` folder of any level in one level should never include code in an `impl` or `detail` folder of any level
other than its own. other than it's own.
The codebase is split into two main areas: The codebase is split into two main areas:
@@ -22,7 +22,7 @@ levelization violations they find (by moving files or individual
classes). At the very least, don't make things worse. classes). At the very least, don't make things worse.
The table below summarizes the _desired_ division of modules, based on the current The table below summarizes the _desired_ division of modules, based on the current
state of the xrpld code. The levels are numbered from state of the rippled code. The levels are numbered from
the bottom up with the lower level, lower numbered, more independent the bottom up with the lower level, lower numbered, more independent
modules listed first, and the higher level, higher numbered modules with modules listed first, and the higher level, higher numbered modules with
more dependencies listed later. more dependencies listed later.
@@ -72,10 +72,10 @@ that `test` code should _never_ be included in `xrpl` or `xrpld` code.)
The [levelization](generate.py) script takes no parameters, The [levelization](generate.py) script takes no parameters,
reads no environment variables, and can be run from any directory, reads no environment variables, and can be run from any directory,
as long as it is in the expected location in the xrpld repo. as long as it is in the expected location in the rippled repo.
It can be run at any time from within a checked out repo, and will It can be run at any time from within a checked out repo, and will
do an analysis of all the `#include`s in do an analysis of all the `#include`s in
the xrpld source. The only caveat is that it runs much slower the rippled source. The only caveat is that it runs much slower
under Windows than in Linux. It hasn't yet been tested under MacOS. under Windows than in Linux. It hasn't yet been tested under MacOS.
It generates many files of [results](results): It generates many files of [results](results):

View File

@@ -34,8 +34,6 @@ run from the repository root.
6. `.github/scripts/rename/config.sh`: This script will rename the config from 6. `.github/scripts/rename/config.sh`: This script will rename the config from
`rippled.cfg` to `xrpld.cfg`, and updating the code accordingly. The old `rippled.cfg` to `xrpld.cfg`, and updating the code accordingly. The old
filename will still be accepted. filename will still be accepted.
7. `.github/scripts/rename/docs.sh`: This script will rename any lingering
references of `ripple(d)` to `xrpl(d)` in code, comments, and documentation.
You can run all these scripts from the repository root as follows: You can run all these scripts from the repository root as follows:
@@ -46,5 +44,4 @@ You can run all these scripts from the repository root as follows:
./.github/scripts/rename/binary.sh . ./.github/scripts/rename/binary.sh .
./.github/scripts/rename/namespace.sh . ./.github/scripts/rename/namespace.sh .
./.github/scripts/rename/config.sh . ./.github/scripts/rename/config.sh .
./.github/scripts/rename/docs.sh .
``` ```

View File

@@ -29,7 +29,7 @@ if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist." echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1 exit 1
fi fi
pushd "${DIRECTORY}" pushd ${DIRECTORY}
# Remove the binary name override added by the cmake.sh script. # Remove the binary name override added by the cmake.sh script.
${SED_COMMAND} -z -i -E 's@\s+# For the time being.+"rippled"\)@@' cmake/XrplCore.cmake ${SED_COMMAND} -z -i -E 's@\s+# For the time being.+"rippled"\)@@' cmake/XrplCore.cmake
@@ -49,7 +49,6 @@ ${SED_COMMAND} -i -E 's@ripple/xrpld@XRPLF/rippled@g' BUILD.md
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' BUILD.md ${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' BUILD.md
${SED_COMMAND} -i -E 's@xrpld \(`xrpld`\)@xrpld@g' BUILD.md ${SED_COMMAND} -i -E 's@xrpld \(`xrpld`\)@xrpld@g' BUILD.md
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' CONTRIBUTING.md ${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' CONTRIBUTING.md
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' docs/build/install.md
popd popd
echo "Processing complete." echo "Processing complete."

View File

@@ -38,7 +38,7 @@ if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist." echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1 exit 1
fi fi
pushd "${DIRECTORY}" pushd ${DIRECTORY}
# Rename the files. # Rename the files.
find cmake -type f -name 'Rippled*.cmake' -exec bash -c 'mv "${1}" "${1/Rippled/Xrpl}"' - {} \; find cmake -type f -name 'Rippled*.cmake' -exec bash -c 'mv "${1}" "${1/Rippled/Xrpl}"' - {} \;

View File

@@ -28,7 +28,7 @@ if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist." echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1 exit 1
fi fi
pushd "${DIRECTORY}" pushd ${DIRECTORY}
# Add the xrpld.cfg to the .gitignore. # Add the xrpld.cfg to the .gitignore.
if ! grep -q 'xrpld.cfg' .gitignore; then if ! grep -q 'xrpld.cfg' .gitignore; then
@@ -52,15 +52,16 @@ for DIRECTORY in "${DIRECTORIES[@]}"; do
find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" -o -name "*.cmake" -o -name "*.txt" -o -name "*.cfg" -o -name "*.md" \) | while read -r FILE; do find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" -o -name "*.cmake" -o -name "*.txt" -o -name "*.cfg" -o -name "*.md" \) | while read -r FILE; do
echo "Processing file: ${FILE}" echo "Processing file: ${FILE}"
${SED_COMMAND} -i -E 's/rippled(-example)?[ .]cfg/xrpld\1.cfg/g' "${FILE}" ${SED_COMMAND} -i -E 's/rippled(-example)?[ .]cfg/xrpld\1.cfg/g' "${FILE}"
${SED_COMMAND} -i 's/rippleConfig/xrpldConfig/g' "${FILE}"
done done
done done
${SED_COMMAND} -i 's/rippled/xrpld/g' cfg/xrpld-example.cfg ${SED_COMMAND} -i 's/rippled/xrpld/g' cfg/xrpld-example.cfg
${SED_COMMAND} -i 's/rippled/xrpld/g' src/test/core/Config_test.cpp ${SED_COMMAND} -i 's/rippled/xrpld/g' src/test/core/Config_test.cpp
${SED_COMMAND} -i 's/ripplevalidators/xrplvalidators/g' src/test/core/Config_test.cpp # cspell: disable-line ${SED_COMMAND} -i 's/ripplevalidators/xrplvalidators/g' src/test/core/Config_test.cpp # cspell: disable-line
${SED_COMMAND} -i 's/rippleConfig/xrpldConfig/g' src/test/core/Config_test.cpp
${SED_COMMAND} -i 's@ripple/@xrpld/@g' src/test/core/Config_test.cpp ${SED_COMMAND} -i 's@ripple/@xrpld/@g' src/test/core/Config_test.cpp
${SED_COMMAND} -i 's/Rippled/File/g' src/test/core/Config_test.cpp ${SED_COMMAND} -i 's/Rippled/File/g' src/test/core/Config_test.cpp
# Restore the old config file name in the code that maintains support for now. # Restore the old config file name in the code that maintains support for now.
${SED_COMMAND} -i 's/configLegacyName = "xrpld.cfg"/configLegacyName = "rippled.cfg"/g' src/xrpld/core/detail/Config.cpp ${SED_COMMAND} -i 's/configLegacyName = "xrpld.cfg"/configLegacyName = "rippled.cfg"/g' src/xrpld/core/detail/Config.cpp

View File

@@ -31,7 +31,7 @@ if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist." echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1 exit 1
fi fi
pushd "${DIRECTORY}" pushd ${DIRECTORY}
# Prevent sed and echo from removing newlines and tabs in string literals by # Prevent sed and echo from removing newlines and tabs in string literals by
# temporarily replacing them with placeholders. This only affects one file. # temporarily replacing them with placeholders. This only affects one file.
@@ -76,11 +76,11 @@ fi
if ! grep -q 'Dev Null' src/test/rpc/ValidatorInfo_test.cpp; then if ! grep -q 'Dev Null' src/test/rpc/ValidatorInfo_test.cpp; then
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/rpc/ValidatorInfo_test.cpp)" > src/test/rpc/ValidatorInfo_test.cpp echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/rpc/ValidatorInfo_test.cpp)" > src/test/rpc/ValidatorInfo_test.cpp
fi fi
if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/server_info/Manifest.cpp; then if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/DoManifest.cpp; then
echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/server_info/Manifest.cpp)" > src/xrpld/rpc/handlers/server_info/Manifest.cpp echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/DoManifest.cpp)" > src/xrpld/rpc/handlers/DoManifest.cpp
fi fi
if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/admin/status/ValidatorInfo.cpp; then if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/ValidatorInfo.cpp; then
echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/admin/status/ValidatorInfo.cpp)" > src/xrpld/rpc/handlers/admin/status/ValidatorInfo.cpp echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/ValidatorInfo.cpp)" > src/xrpld/rpc/handlers/ValidatorInfo.cpp
fi fi
if ! grep -q 'Bougalis' include/xrpl/basics/SlabAllocator.h; then if ! grep -q 'Bougalis' include/xrpl/basics/SlabAllocator.h; then
echo -e "// Copyright (c) 2022, Nikolaos D. Bougalis <nikb@bougalis.net>\n\n$(cat include/xrpl/basics/SlabAllocator.h)" > include/xrpl/basics/SlabAllocator.h # cspell: ignore Nikolaos Bougalis nikb echo -e "// Copyright (c) 2022, Nikolaos D. Bougalis <nikb@bougalis.net>\n\n$(cat include/xrpl/basics/SlabAllocator.h)" > include/xrpl/basics/SlabAllocator.h # cspell: ignore Nikolaos Bougalis nikb

View File

@@ -1,96 +0,0 @@
#!/bin/bash
# Exit the script as soon as an error occurs.
set -e
# On MacOS, ensure that GNU sed is installed and available as `gsed`.
SED_COMMAND=sed
if [[ "${OSTYPE}" == 'darwin'* ]]; then
if ! command -v gsed &> /dev/null; then
echo "Error: gsed is not installed. Please install it using 'brew install gnu-sed'."
exit 1
fi
SED_COMMAND=gsed
fi
# This script renames all remaining references to `ripple` and `rippled` to
# `xrpl` and `xrpld`, respectively, in code, comments, and documentation.
# Usage: .github/scripts/rename/docs.sh <repository directory>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <repository directory>"
exit 1
fi
DIRECTORY=$1
echo "Processing directory: ${DIRECTORY}"
if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1
fi
pushd "${DIRECTORY}"
find . -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" -o -name "*.txt" -o -name "*.cfg" -o -name "*.md" -o -name "*.proto" \) -not -path "./.github/scripts/*" | while read -r FILE; do
echo "Processing file: ${FILE}"
${SED_COMMAND} -i 's/rippleLockEscrowMPT/lockEscrowMPT/g' "${FILE}"
${SED_COMMAND} -i 's/rippleUnlockEscrowMPT/unlockEscrowMPT/g' "${FILE}"
${SED_COMMAND} -i 's/rippleCredit/directSendNoFee/g' "${FILE}"
${SED_COMMAND} -i 's/rippleSend/directSendNoLimit/g' "${FILE}"
${SED_COMMAND} -i -E 's@([^/+-])rippled@\1xrpld@g' "${FILE}"
${SED_COMMAND} -i -E 's@([^/+-])Rippled@\1Xrpld@g' "${FILE}"
${SED_COMMAND} -i -E 's/^rippled/xrpld/g' "${FILE}"
${SED_COMMAND} -i -E 's/^Rippled/Xrpld/g' "${FILE}"
# cspell: disable
${SED_COMMAND} -i -E 's/(r|R)ipple (a|A)ddress/XRPL address/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (a|A)ccount/XRPL account/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (a|A)lgorithm/XRPL algorithm/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (c|C)lient/XRPL client/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (c|C)luster/XRPL cluster/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (c|C)onsensus/XRPL consensus/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (d|D)efault/XRPL default/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (e|E)poch/XRPL epoch/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (f|F)eature/XRPL feature/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (n|N)etwork/XRPL network/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (p|P)ayment/XRPL payment/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (p|P)rotocol/XRPL protocol/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (r|R)epository/XRPL repository/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple RPC/XRPL RPC/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (s|S)erialization/XRPL serialization/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (s|S)erver/XRPL server/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (s|S)pecific/XRPL specific/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple Source/XRPL Source/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (t|T)imestamp/XRPL timestamp/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple uses the consensus/XRPL uses the consensus/g' "${FILE}"
${SED_COMMAND} -i -E 's/(r|R)ipple (v|V)alidator/XRPL validator/g' "${FILE}"
# cspell: enable
${SED_COMMAND} -i 's/RippleLib/XrplLib/g' "${FILE}"
${SED_COMMAND} -i 's/ripple-lib/XrplLib/g' "${FILE}"
${SED_COMMAND} -i 's@opt/ripple/@opt/xrpld/@g' "${FILE}"
${SED_COMMAND} -i 's@src/ripple/@src/xrpld/@g' "${FILE}"
${SED_COMMAND} -i 's@ripple/app/@xrpld/app/@g' "${FILE}"
${SED_COMMAND} -i 's@github.com/ripple/rippled@github.com/XRPLF/rippled@g' "${FILE}"
${SED_COMMAND} -i 's/\ba xrpl/an xrpl/g' "${FILE}"
${SED_COMMAND} -i 's/\ba XRPL/an XRPL/g' "${FILE}"
done
${SED_COMMAND} -i 's/ripple_libs/xrpl_libs/' BUILD.md
${SED_COMMAND} -i 's/Ripple integrators/XRPL developers/' README.md
${SED_COMMAND} -i 's/sanitizer-configuration-for-rippled/sanitizer-configuration-for-xrpld/' docs/build/sanitizers.md
${SED_COMMAND} -i 's/rippled/xrpld/g' .github/scripts/levelization/README.md
${SED_COMMAND} -i 's/rippled/xrpld/g' .github/scripts/strategy-matrix/generate.py
${SED_COMMAND} -i 's@/rippled@/xrpld@g' docs/build/install.md
${SED_COMMAND} -i 's@github.com/XRPLF/xrpld@github.com/XRPLF/rippled@g' docs/build/install.md
${SED_COMMAND} -i 's/rippled/xrpld/g' docs/Doxyfile
${SED_COMMAND} -i 's/ripple_basics/basics/' include/xrpl/basics/CountedObject.h
${SED_COMMAND} -i 's/<ripple/<xrpl/' include/xrpl/protocol/AccountID.h
${SED_COMMAND} -i 's/Ripple:/the XRPL:/g' include/xrpl/protocol/SecretKey.h
${SED_COMMAND} -i 's/Ripple:/the XRPL:/g' include/xrpl/protocol/Seed.h
${SED_COMMAND} -i 's/ripple/xrpl/g' src/test/README.md
${SED_COMMAND} -i 's/www.ripple.com/www.xrpl.org/g' src/test/protocol/Seed_test.cpp
# Restore specific changes.
${SED_COMMAND} -i 's@b5efcc/src/xrpld@b5efcc/src/ripple@' include/xrpl/protocol/README.md
${SED_COMMAND} -i 's/dbPrefix_ = "xrpldb"/dbPrefix_ = "rippledb"/' src/xrpld/app/misc/SHAMapStoreImp.h # cspell: disable-line
${SED_COMMAND} -i 's/configLegacyName = "xrpld.cfg"/configLegacyName = "rippled.cfg"/' src/xrpld/core/detail/Config.cpp
popd
echo "Renaming complete."

View File

@@ -31,17 +31,16 @@ if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist." echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1 exit 1
fi fi
pushd "${DIRECTORY}" pushd ${DIRECTORY}
DIRECTORIES=("include" "src" "tests") DIRECTORIES=("include" "src" "tests")
for DIRECTORY in "${DIRECTORIES[@]}"; do for DIRECTORY in "${DIRECTORIES[@]}"; do
echo "Processing directory: ${DIRECTORY}" echo "Processing directory: ${DIRECTORY}"
find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" -o -name "*.macro" \) | while read -r FILE; do find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" \) | while read -r FILE; do
echo "Processing file: ${FILE}" echo "Processing file: ${FILE}"
${SED_COMMAND} -i 's/namespace ripple/namespace xrpl/g' "${FILE}" ${SED_COMMAND} -i 's/namespace ripple/namespace xrpl/g' "${FILE}"
${SED_COMMAND} -i 's/ripple::/xrpl::/g' "${FILE}" ${SED_COMMAND} -i 's/ripple::/xrpl::/g' "${FILE}"
${SED_COMMAND} -i 's/"ripple:/"xrpl::/g' "${FILE}"
${SED_COMMAND} -i -E 's/(BEAST_DEFINE_TESTSUITE.+)ripple(.+)/\1xrpl\2/g' "${FILE}" ${SED_COMMAND} -i -E 's/(BEAST_DEFINE_TESTSUITE.+)ripple(.+)/\1xrpl\2/g' "${FILE}"
done done
done done

View File

@@ -99,14 +99,15 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
continue continue
# RHEL: # RHEL:
# - 9 using GCC 12: Debug on linux/amd64. # - 9 using GCC 12: Debug and Release on linux/amd64
# (Release is required for RPM packaging).
# - 10 using Clang: Release on linux/amd64. # - 10 using Clang: Release on linux/amd64.
if os["distro_name"] == "rhel": if os["distro_name"] == "rhel":
skip = True skip = True
if os["distro_version"] == "9": if os["distro_version"] == "9":
if ( if (
f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-12" f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-12"
and build_type == "Debug" and build_type in ["Debug", "Release"]
and architecture["platform"] == "linux/amd64" and architecture["platform"] == "linux/amd64"
): ):
skip = False skip = False
@@ -121,7 +122,8 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
continue continue
# Ubuntu: # Ubuntu:
# - Jammy using GCC 12: Debug on linux/arm64. # - Jammy using GCC 12: Debug on linux/arm64, Release on
# linux/amd64 (Release is required for DEB packaging).
# - Noble using GCC 14: Release on linux/amd64. # - Noble using GCC 14: Release on linux/amd64.
# - Noble using Clang 18: Debug on linux/amd64. # - Noble using Clang 18: Debug on linux/amd64.
# - Noble using Clang 19: Release on linux/arm64. # - Noble using Clang 19: Release on linux/arm64.
@@ -134,6 +136,12 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
and architecture["platform"] == "linux/arm64" and architecture["platform"] == "linux/arm64"
): ):
skip = False skip = False
if (
f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-12"
and build_type == "Release"
and architecture["platform"] == "linux/amd64"
):
skip = False
elif os["distro_version"] == "noble": elif os["distro_version"] == "noble":
if ( if (
f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-14" f"{os['compiler_name']}-{os['compiler_version']}" == "gcc-14"
@@ -235,7 +243,7 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
# so that they are easier to identify in the GitHub Actions UI, as long # so that they are easier to identify in the GitHub Actions UI, as long
# names get truncated. # names get truncated.
# Add Address and Thread (both coupled with UB) sanitizers for specific bookworm distros. # Add Address and Thread (both coupled with UB) sanitizers for specific bookworm distros.
# GCC-Asan xrpld-embedded tests are failing because of https://github.com/google/sanitizers/issues/856 # GCC-Asan rippled-embedded tests are failing because of https://github.com/google/sanitizers/issues/856
if ( if (
os["distro_version"] == "bookworm" os["distro_version"] == "bookworm"
and f"{os['compiler_name']}-{os['compiler_version']}" == "clang-20" and f"{os['compiler_name']}-{os['compiler_version']}" == "clang-20"

View File

@@ -1,7 +1,7 @@
name: Check PR commits name: Check PR commits
on: on:
pull_request_target: pull_request:
# The action needs to have write permissions to post comments on the PR. # The action needs to have write permissions to post comments on the PR.
permissions: permissions:
@@ -10,4 +10,4 @@ permissions:
jobs: jobs:
check_commits: check_commits:
uses: XRPLF/actions/.github/workflows/check-pr-commits.yml@e2c7f400d1e85ae65dad552fd425169fbacca4a3 uses: XRPLF/actions/.github/workflows/check-pr-commits.yml@481048b78b94ac3343d1292b4ef125a813879f2b

View File

@@ -11,4 +11,4 @@ on:
jobs: jobs:
check_title: check_title:
if: ${{ github.event.pull_request.draft != true }} if: ${{ github.event.pull_request.draft != true }}
uses: XRPLF/actions/.github/workflows/check-pr-title.yml@a5d8dd35be543365e90a11358447130c8763871d uses: XRPLF/actions/.github/workflows/check-pr-title.yml@e2c7f400d1e85ae65dad552fd425169fbacca4a3

View File

@@ -67,6 +67,7 @@ jobs:
.github/workflows/reusable-build-test.yml .github/workflows/reusable-build-test.yml
.github/workflows/reusable-clang-tidy.yml .github/workflows/reusable-clang-tidy.yml
.github/workflows/reusable-clang-tidy-files.yml .github/workflows/reusable-clang-tidy-files.yml
.github/workflows/reusable-package.yml
.github/workflows/reusable-strategy-matrix.yml .github/workflows/reusable-strategy-matrix.yml
.github/workflows/reusable-test.yml .github/workflows/reusable-test.yml
.github/workflows/reusable-upload-recipe.yml .github/workflows/reusable-upload-recipe.yml
@@ -81,6 +82,8 @@ jobs:
CMakeLists.txt CMakeLists.txt
conanfile.py conanfile.py
conan.lock conan.lock
package/**
- name: Check whether to run - name: Check whether to run
# This step determines whether the rest of the workflow should # This step determines whether the rest of the workflow should
# run. The rest of the workflow will run if this job runs AND at # run. The rest of the workflow will run if this job runs AND at
@@ -137,6 +140,39 @@ jobs:
secrets: secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
generate-version:
needs: should-run
if: ${{ needs.should-run.outputs.go == 'true' }}
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Generate version
id: version
uses: ./.github/actions/generate-version
package-deb:
needs: [should-run, build-test, generate-version]
if: ${{ needs.should-run.outputs.go == 'true' }}
uses: ./.github/workflows/reusable-package.yml
with:
pkg_type: deb
artifact_name: xrpld-ubuntu-jammy-gcc-12-amd64-release
version: ${{ needs.generate-version.outputs.version }}
container_image: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12
package-rpm:
needs: [should-run, build-test, generate-version]
if: ${{ needs.should-run.outputs.go == 'true' }}
uses: ./.github/workflows/reusable-package.yml
with:
pkg_type: rpm
artifact_name: xrpld-rhel-9-gcc-12-amd64-release
version: ${{ needs.generate-version.outputs.version }}
container_image: ghcr.io/xrplf/ci/rhel-9:gcc-12
upload-recipe: upload-recipe:
needs: needs:
- should-run - should-run

View File

@@ -1,5 +1,5 @@
# This workflow uploads the libxrpl recipe to the Conan remote when a versioned # This workflow uploads the libxrpl recipe to the Conan remote and builds
# tag is pushed. # release packages when a versioned tag is pushed.
name: Tag name: Tag
on: on:
@@ -22,3 +22,49 @@ jobs:
secrets: secrets:
remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }} remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }} remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
build-test:
if: ${{ github.repository == 'XRPLF/rippled' }}
uses: ./.github/workflows/reusable-build-test.yml
strategy:
fail-fast: true
matrix:
os: [linux]
with:
ccache_enabled: false
os: ${{ matrix.os }}
strategy_matrix: minimal
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
generate-version:
if: ${{ github.repository == 'XRPLF/rippled' }}
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Generate version
id: version
uses: ./.github/actions/generate-version
package-deb:
needs: [build-test, generate-version]
if: ${{ github.repository == 'XRPLF/rippled' }}
uses: ./.github/workflows/reusable-package.yml
with:
pkg_type: deb
artifact_name: xrpld-ubuntu-jammy-gcc-12-amd64-release
version: ${{ needs.generate-version.outputs.version }}
container_image: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12
package-rpm:
needs: [build-test, generate-version]
if: ${{ github.repository == 'XRPLF/rippled' }}
uses: ./.github/workflows/reusable-package.yml
with:
pkg_type: rpm
artifact_name: xrpld-rhel-9-gcc-12-amd64-release
version: ${{ needs.generate-version.outputs.version }}
container_image: ghcr.io/xrplf/ci/rhel-9:gcc-12

View File

@@ -38,6 +38,8 @@ on:
- "CMakeLists.txt" - "CMakeLists.txt"
- "conanfile.py" - "conanfile.py"
- "conan.lock" - "conan.lock"
- "package/**"
- ".github/workflows/reusable-package.yml"
# Run at 06:32 UTC on every day of the week from Monday through Friday. This # Run at 06:32 UTC on every day of the week from Monday through Friday. This
# will force all dependencies to be rebuilt, which is useful to verify that # will force all dependencies to be rebuilt, which is useful to verify that
@@ -98,3 +100,32 @@ jobs:
secrets: secrets:
remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }} remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }} remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
generate-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Generate version
id: version
uses: ./.github/actions/generate-version
package-deb:
needs: [build-test, generate-version]
uses: ./.github/workflows/reusable-package.yml
with:
pkg_type: deb
artifact_name: xrpld-ubuntu-jammy-gcc-12-amd64-release
version: ${{ needs.generate-version.outputs.version }}
container_image: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12
package-rpm:
needs: [build-test, generate-version]
uses: ./.github/workflows/reusable-package.yml
with:
pkg_type: rpm
artifact_name: xrpld-rhel-9-gcc-12-amd64-release
version: ${{ needs.generate-version.outputs.version }}
container_image: ghcr.io/xrplf/ci/rhel-9:gcc-12

View File

@@ -14,7 +14,7 @@ on:
jobs: jobs:
# Call the workflow in the XRPLF/actions repo that runs the pre-commit hooks. # Call the workflow in the XRPLF/actions repo that runs the pre-commit hooks.
run-hooks: run-hooks:
uses: XRPLF/actions/.github/workflows/pre-commit.yml@9307df762265e15c745ddcdb38a581c989f7f349 uses: XRPLF/actions/.github/workflows/pre-commit.yml@e7896f15cc60d0da1a272c77ee5c4026b424f9c7
with: with:
runs_on: ubuntu-latest runs_on: ubuntu-latest
container: '{ "image": "ghcr.io/xrplf/ci/tools-rippled-pre-commit:sha-41ec7c1" }' container: '{ "image": "ghcr.io/xrplf/ci/tools-rippled-pre-commit:sha-41ec7c1" }'

View File

@@ -36,7 +36,7 @@ env:
BUILD_DIR: build BUILD_DIR: build
# ubuntu-latest has only 2 CPUs for private repositories # ubuntu-latest has only 2 CPUs for private repositories
# https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for--private-repositories # https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for--private-repositories
NPROC_SUBTRACT: ${{ github.event.repository.visibility == 'public' && '2' || '1' }} NPROC_SUBTRACT: ${{ github.event.repository.private && '1' || '2' }}
jobs: jobs:
build: build:
@@ -47,7 +47,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Prepare runner - name: Prepare runner
uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab uses: XRPLF/actions/prepare-runner@2bbc2dc1abeec7bfaa886804ab86871ac201764e
with: with:
enable_ccache: false enable_ccache: false
@@ -87,7 +87,7 @@ jobs:
path: ${{ env.BUILD_DIR }}/docs/html path: ${{ env.BUILD_DIR }}/docs/html
deploy: deploy:
if: ${{ github.repository == 'XRPLF/rippled' && github.event_name == 'push' }} if: ${{ github.event.repository.visibility == 'public' && github.event_name == 'push' }}
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:

View File

@@ -107,7 +107,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Prepare runner - name: Prepare runner
uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab uses: XRPLF/actions/prepare-runner@2bbc2dc1abeec7bfaa886804ab86871ac201764e
with: with:
enable_ccache: ${{ inputs.ccache_enabled }} enable_ccache: ${{ inputs.ccache_enabled }}

View File

@@ -33,8 +33,6 @@ jobs:
run: .github/scripts/rename/config.sh . run: .github/scripts/rename/config.sh .
- name: Check include guards - name: Check include guards
run: .github/scripts/rename/include.sh . run: .github/scripts/rename/include.sh .
- name: Check documentation
run: .github/scripts/rename/docs.sh .
- name: Check for differences - name: Check for differences
env: env:
MESSAGE: | MESSAGE: |

View File

@@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Prepare runner - name: Prepare runner
uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab uses: XRPLF/actions/prepare-runner@2bbc2dc1abeec7bfaa886804ab86871ac201764e
with: with:
enable_ccache: false enable_ccache: false
@@ -80,7 +80,7 @@ jobs:
env: env:
TARGETS: ${{ inputs.files != '' && inputs.files || 'src tests' }} TARGETS: ${{ inputs.files != '' && inputs.files || 'src tests' }}
run: | run: |
run-clang-tidy -j ${{ steps.nproc.outputs.nproc }} -p "${BUILD_DIR}" -quiet -allow-no-checks ${TARGETS} 2>&1 | tee clang-tidy-output.txt run-clang-tidy -j ${{ steps.nproc.outputs.nproc }} -p "${BUILD_DIR}" ${TARGETS} 2>&1 | tee clang-tidy-output.txt
- name: Upload clang-tidy output - name: Upload clang-tidy output
if: ${{ github.event.repository.visibility == 'public' && steps.run_clang_tidy.outcome != 'success' }} if: ${{ github.event.repository.visibility == 'public' && steps.run_clang_tidy.outcome != 'success' }}

83
.github/workflows/reusable-package.yml vendored Normal file
View File

@@ -0,0 +1,83 @@
# Build a Linux package (DEB or RPM) from a pre-built binary artifact.
name: Package
on:
workflow_call:
inputs:
pkg_type:
description: "Package type to build: deb or rpm."
required: true
type: string
artifact_name:
description: "Name of the pre-built binary artifact to download."
required: true
type: string
version:
description: "Version string used for naming the output artifact."
required: true
type: string
pkg_release:
description: "Package release number. Increment when repackaging the same executable."
required: false
type: string
default: "1"
container_image:
description: "Container image to use for packaging."
required: true
type: string
defaults:
run:
shell: bash
env:
BUILD_DIR: build
jobs:
package:
name: ${{ inputs.pkg_type }} (${{ inputs.version }})
runs-on: ["self-hosted", "Linux", "X64", "heavy"]
container: ${{ inputs.container_image }}
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Download pre-built binary
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ inputs.artifact_name }}
path: ${{ env.BUILD_DIR }}
- name: Make binary executable
run: chmod +x "${BUILD_DIR}/xrpld"
- name: Generate RPM spec from template
if: ${{ inputs.pkg_type == 'rpm' }}
env:
PKG_VERSION: ${{ inputs.version }}
PKG_RELEASE: ${{ inputs.pkg_release }}
run: |
mkdir -p "${BUILD_DIR}/package/rpm"
sed -e "s/@xrpld_version@/${PKG_VERSION}/" \
-e "s/@pkg_release@/${PKG_RELEASE}/" \
package/rpm/xrpld.spec.in > "${BUILD_DIR}/package/rpm/xrpld.spec"
- name: Build package
env:
PKG_TYPE: ${{ inputs.pkg_type }}
PKG_VERSION: ${{ inputs.version }}
PKG_RELEASE: ${{ inputs.pkg_release }}
run: |
./package/build_pkg.sh "$PKG_TYPE" . "$BUILD_DIR" "$PKG_VERSION" "$PKG_RELEASE"
- name: Upload package artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: xrpld-${{ inputs.pkg_type }}-${{ inputs.version }}
path: |
${{ env.BUILD_DIR }}/debbuild/*.deb
${{ env.BUILD_DIR }}/debbuild/*.ddeb
${{ env.BUILD_DIR }}/rpmbuild/RPMS/**/*.rpm
if-no-files-found: error

View File

@@ -70,7 +70,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Prepare runner - name: Prepare runner
uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab uses: XRPLF/actions/prepare-runner@2bbc2dc1abeec7bfaa886804ab86871ac201764e
with: with:
enable_ccache: false enable_ccache: false

View File

@@ -4,23 +4,23 @@ This changelog is intended to list all updates to the [public API methods](https
For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior. For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.
The API version controls the API behavior you see. This includes what properties you see in responses, what parameters you're permitted to send in requests, and so on. You specify the API version in each of your requests. When a breaking change is introduced to the `xrpld` API, a new version is released. To avoid breaking your code, you should set (or increase) your version when you're ready to upgrade. The API version controls the API behavior you see. This includes what properties you see in responses, what parameters you're permitted to send in requests, and so on. You specify the API version in each of your requests. When a breaking change is introduced to the `rippled` API, a new version is released. To avoid breaking your code, you should set (or increase) your version when you're ready to upgrade.
The [commandline](https://xrpl.org/docs/references/http-websocket-apis/api-conventions/request-formatting/#commandline-format) always uses the latest API version. The command line is intended for ad-hoc usage by humans, not programs or automated scripts. The command line is not meant for use in production code. The [commandline](https://xrpl.org/docs/references/http-websocket-apis/api-conventions/request-formatting/#commandline-format) always uses the latest API version. The command line is intended for ad-hoc usage by humans, not programs or automated scripts. The command line is not meant for use in production code.
For a log of breaking changes, see the **API Version [number]** headings. In general, breaking changes are associated with a particular API Version number. For non-breaking changes, scroll to the **XRP Ledger version [x.y.z]** headings. Non-breaking changes are associated with a particular XRP Ledger (`xrpld`) release. For a log of breaking changes, see the **API Version [number]** headings. In general, breaking changes are associated with a particular API Version number. For non-breaking changes, scroll to the **XRP Ledger version [x.y.z]** headings. Non-breaking changes are associated with a particular XRP Ledger (`rippled`) release.
## API Version 3 (Beta) ## API Version 3 (Beta)
API version 3 is currently a beta API. It requires enabling `[beta_rpc_api]` in the xrpld configuration to use. See [API-VERSION-3.md](API-VERSION-3.md) for the full list of changes in API version 3. API version 3 is currently a beta API. It requires enabling `[beta_rpc_api]` in the rippled configuration to use. See [API-VERSION-3.md](API-VERSION-3.md) for the full list of changes in API version 3.
## API Version 2 ## API Version 2
API version 2 is available in `xrpld` version 2.0.0 and later. See [API-VERSION-2.md](API-VERSION-2.md) for the full list of changes in API version 2. API version 2 is available in `rippled` version 2.0.0 and later. See [API-VERSION-2.md](API-VERSION-2.md) for the full list of changes in API version 2.
## API Version 1 ## API Version 1
This version is supported by all `xrpld` versions. For WebSocket and HTTP JSON-RPC requests, it is currently the default API version used when no `api_version` is specified. This version is supported by all `rippled` versions. For WebSocket and HTTP JSON-RPC requests, it is currently the default API version used when no `api_version` is specified.
## Unreleased ## Unreleased
@@ -38,8 +38,6 @@ This section contains changes targeting a future version.
### Bugfixes ### Bugfixes
- Peer Crawler: The `port` field in `overlay.active[]` now consistently returns an integer instead of a string for outbound peers. [#6318](https://github.com/XRPLF/rippled/pull/6318) - Peer Crawler: The `port` field in `overlay.active[]` now consistently returns an integer instead of a string for outbound peers. [#6318](https://github.com/XRPLF/rippled/pull/6318)
- `ping`: The `ip` field is no longer returned as an empty string for proxied connections without a forwarded-for header. It is now omitted, consistent with the behavior for identified connections. [#6730](https://github.com/XRPLF/rippled/pull/6730)
- gRPC `GetLedgerDiff`: Fixed error message that incorrectly said "base ledger not validated" when the desired ledger was not validated. [#6730](https://github.com/XRPLF/rippled/pull/6730)
## XRP Ledger server version 3.1.0 ## XRP Ledger server version 3.1.0

View File

@@ -1,6 +1,6 @@
# API Version 2 # API Version 2
API version 2 is available in `xrpld` version 2.0.0 and later. To use this API, clients specify `"api_version" : 2` in each request. API version 2 is available in `rippled` version 2.0.0 and later. To use this API, clients specify `"api_version" : 2` in each request.
For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior. For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.

View File

@@ -1,6 +1,6 @@
# API Version 3 # API Version 3
API version 3 is currently a **beta API**. It requires enabling `[beta_rpc_api]` in the xrpld configuration to use. To use this API, clients specify `"api_version" : 3` in each request. API version 3 is currently a **beta API**. It requires enabling `[beta_rpc_api]` in the rippled configuration to use. To use this API, clients specify `"api_version" : 3` in each request.
For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior. For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.

View File

@@ -141,7 +141,7 @@ Alternatively, you can pull our recipes from the repository and export them loca
```bash ```bash
# Define which recipes to export. # Define which recipes to export.
recipes=('abseil' 'ed25519' 'grpc' 'm4' 'mpt-crypto' 'openssl' 'secp256k1' 'snappy' 'soci' 'wasm-xrplf' 'wasmi') recipes=('abseil' 'ed25519' 'grpc' 'm4' 'mpt-crypto' 'nudb' 'openssl' 'secp256k1' 'snappy' 'soci' 'wasm-xrplf' 'wasmi')
# Selectively check out the recipes from our CCI fork. # Selectively check out the recipes from our CCI fork.
cd external cd external
@@ -603,8 +603,8 @@ If you want to experiment with a new package, follow these steps:
`default_options` property (with syntax `'$package:$option': $value`). `default_options` property (with syntax `'$package:$option': $value`).
3. Modify [`CMakeLists.txt`](./CMakeLists.txt): 3. Modify [`CMakeLists.txt`](./CMakeLists.txt):
- Add a call to `find_package($package REQUIRED)`. - Add a call to `find_package($package REQUIRED)`.
- Link a library from the package to the target `xrpl_libs` - Link a library from the package to the target `ripple_libs`
(search for the existing call to `target_link_libraries(xrpl_libs INTERFACE ...)`). (search for the existing call to `target_link_libraries(ripple_libs INTERFACE ...)`).
4. Start coding! Don't forget to include whatever headers you need from the package. 4. Start coding! Don't forget to include whatever headers you need from the package.
[1]: https://github.com/conan-io/conan-center-index/issues/13168 [1]: https://github.com/conan-io/conan-center-index/issues/13168

View File

@@ -133,6 +133,7 @@ endif()
include(XrplCore) include(XrplCore)
include(XrplInstall) include(XrplInstall)
include(XrplPackaging)
include(XrplValidatorKeys) include(XrplValidatorKeys)
if(tests) if(tests)

View File

@@ -270,14 +270,14 @@ Before running clang-tidy, you must build the project to generate required files
Then run clang-tidy on your local changes: Then run clang-tidy on your local changes:
``` ```
run-clang-tidy -p build -allow-no-checks src tests run-clang-tidy -p build src include tests
``` ```
This will check all source files in the `src`, `include` and `tests` directories using the compile commands from your `build` directory. This will check all source files in the `src`, `include` and `tests` directories using the compile commands from your `build` directory.
If you wish to automatically fix whatever clang-tidy finds _and_ is capable of fixing, add `-fix` to the above command: If you wish to automatically fix whatever clang-tidy finds _and_ is capable of fixing, add `-fix` to the above command:
``` ```
run-clang-tidy -p build -quiet -fix -allow-no-checks src tests run-clang-tidy -p build -fix src include tests
``` ```
## Contracts and instrumentation ## Contracts and instrumentation
@@ -533,7 +533,7 @@ All releases, including release candidates and betas, are handled
differently from typical PRs. Most importantly, never use differently from typical PRs. Most importantly, never use
the Github UI to merge a release. the Github UI to merge a release.
Xrpld uses a linear workflow model that can be summarized as: Rippled uses a linear workflow model that can be summarized as:
1. In between releases, developers work against the `develop` branch. 1. In between releases, developers work against the `develop` branch.
2. Periodically, a maintainer will build and tag a beta version from 2. Periodically, a maintainer will build and tag a beta version from

View File

@@ -8,11 +8,11 @@ The [XRP Ledger](https://xrpl.org/) is a decentralized cryptographic ledger powe
[XRP](https://xrpl.org/xrp.html) is a public, counterparty-free crypto-asset native to the XRP Ledger, and is designed as a gas token for network services and to bridge different currencies. XRP is traded on the open-market and is available for anyone to access. The XRP Ledger was created in 2012 with a finite supply of 100 billion units of XRP. [XRP](https://xrpl.org/xrp.html) is a public, counterparty-free crypto-asset native to the XRP Ledger, and is designed as a gas token for network services and to bridge different currencies. XRP is traded on the open-market and is available for anyone to access. The XRP Ledger was created in 2012 with a finite supply of 100 billion units of XRP.
## xrpld ## rippled
The server software that powers the XRP Ledger is called `xrpld` and is available in this repository under the permissive [ISC open-source license](LICENSE.md). The `xrpld` server software is written primarily in C++ and runs on a variety of platforms. The `xrpld` server software can run in several modes depending on its [configuration](https://xrpl.org/rippled-server-modes.html). The server software that powers the XRP Ledger is called `rippled` and is available in this repository under the permissive [ISC open-source license](LICENSE.md). The `rippled` server software is written primarily in C++ and runs on a variety of platforms. The `rippled` server software can run in several modes depending on its [configuration](https://xrpl.org/rippled-server-modes.html).
If you are interested in running an **API Server** (including a **Full History Server**), take a look at [Clio](https://github.com/XRPLF/clio). (xrpld Reporting Mode has been replaced by Clio.) If you are interested in running an **API Server** (including a **Full History Server**), take a look at [Clio](https://github.com/XRPLF/clio). (rippled Reporting Mode has been replaced by Clio.)
### Build from Source ### Build from Source
@@ -41,19 +41,19 @@ If you are interested in running an **API Server** (including a **Full History S
Here are some good places to start learning the source code: Here are some good places to start learning the source code:
- Read the markdown files in the source tree: `src/xrpld/**/*.md`. - Read the markdown files in the source tree: `src/ripple/**/*.md`.
- Read [the levelization document](.github/scripts/levelization) to get an idea of the internal dependency graph. - Read [the levelization document](.github/scripts/levelization) to get an idea of the internal dependency graph.
- In the big picture, the `main` function constructs an `ApplicationImp` object, which implements the `Application` virtual interface. Almost every component in the application takes an `Application&` parameter in its constructor, typically named `app` and stored as a member variable `app_`. This allows most components to depend on any other component. - In the big picture, the `main` function constructs an `ApplicationImp` object, which implements the `Application` virtual interface. Almost every component in the application takes an `Application&` parameter in its constructor, typically named `app` and stored as a member variable `app_`. This allows most components to depend on any other component.
### Repository Contents ### Repository Contents
| Folder | Contents | | Folder | Contents |
| :--------- | :--------------------------------------------- | | :--------- | :----------------------------------------------- |
| `./bin` | Scripts and data files for XRPL developers. | | `./bin` | Scripts and data files for Ripple integrators. |
| `./Builds` | Platform-specific guides for building `xrpld`. | | `./Builds` | Platform-specific guides for building `rippled`. |
| `./docs` | Source documentation files and doxygen config. | | `./docs` | Source documentation files and doxygen config. |
| `./cfg` | Example configuration files. | | `./cfg` | Example configuration files. |
| `./src` | Source code. | | `./src` | Source code. |
Some of the directories under `src` are external repositories included using Some of the directories under `src` are external repositories included using
git-subtree. See those directories' README files for more details. git-subtree. See those directories' README files for more details.

View File

@@ -6,7 +6,7 @@ For more details on operating an XRP Ledger server securely, please visit https:
## Supported Versions ## Supported Versions
Software constantly evolves. In order to focus resources, we generally only accept vulnerability reports that affect recent and current versions of the software. We always accept reports for issues present in the **master**, **release** or **develop** branches, and with proposed, [open pull requests](https://github.com/XRPLF/rippled/pulls). Software constantly evolves. In order to focus resources, we only generally only accept vulnerability reports that affect recent and current versions of the software. We always accept reports for issues present in the **master**, **release** or **develop** branches, and with proposed, [open pull requests](https://github.com/ripple/rippled/pulls).
## Identifying and Reporting Vulnerabilities ## Identifying and Reporting Vulnerabilities
@@ -59,11 +59,11 @@ While we commit to responding with 24 hours of your initial report with our tria
## Bug Bounty Program ## Bug Bounty Program
[Ripple](https://ripple.com) is generously sponsoring a bug bounty program for vulnerabilities in [`xrpld`](https://github.com/XRPLF/rippled) (and other related projects, like [`xrpl.js`](https://github.com/XRPLF/xrpl.js), [`xrpl-py`](https://github.com/XRPLF/xrpl-py), [`xrpl4j`](https://github.com/XRPLF/xrpl4j)). [Ripple](https://ripple.com) is generously sponsoring a bug bounty program for vulnerabilities in [`rippled`](https://github.com/XRPLF/rippled) (and other related projects, like [`xrpl.js`](https://github.com/XRPLF/xrpl.js), [`xrpl-py`](https://github.com/XRPLF/xrpl-py), [`xrpl4j`](https://github.com/XRPLF/xrpl4j)).
This program allows us to recognize and reward individuals or groups that identify and report bugs. In summary, in order to qualify for a bounty, the bug must be: This program allows us to recognize and reward individuals or groups that identify and report bugs. In summary, in order to qualify for a bounty, the bug must be:
1. **In scope**. Only bugs in software under the scope of the program qualify. Currently, that means `xrpld`, `xrpl.js`, `xrpl-py`, `xrpl4j`. 1. **In scope**. Only bugs in software under the scope of the program qualify. Currently, that means `rippled`, `xrpl.js`, `xrpl-py`, `xrpl4j`.
2. **Relevant**. A security issue, posing a danger to user funds, privacy, or the operation of the XRP Ledger. 2. **Relevant**. A security issue, posing a danger to user funds, privacy, or the operation of the XRP Ledger.
3. **Original and previously unknown**. Bugs that are already known and discussed in public do not qualify. Previously reported bugs, even if publicly unknown, are not eligible. 3. **Original and previously unknown**. Bugs that are already known and discussed in public do not qualify. Previously reported bugs, even if publicly unknown, are not eligible.
4. **Specific**. We welcome general security advice or recommendations, but we cannot pay bounties for that. 4. **Specific**. We welcome general security advice or recommendations, but we cannot pay bounties for that.

View File

@@ -28,7 +28,7 @@
# https://vl.ripple.com # https://vl.ripple.com
# https://unl.xrplf.org # https://unl.xrplf.org
# http://127.0.0.1:8000 # http://127.0.0.1:8000
# file:///etc/opt/xrpld/vl.txt # file:///etc/opt/ripple/vl.txt
# #
# [validator_list_keys] # [validator_list_keys]
# #
@@ -43,11 +43,11 @@
# ED307A760EE34F2D0CAA103377B1969117C38B8AA0AA1E2A24DAC1F32FC97087ED # ED307A760EE34F2D0CAA103377B1969117C38B8AA0AA1E2A24DAC1F32FC97087ED
# #
# The default validator list publishers that the xrpld instance # The default validator list publishers that the rippled instance
# trusts. # trusts.
# #
# WARNING: Changing these values can cause your xrpld instance to see a # WARNING: Changing these values can cause your rippled instance to see a
# validated ledger that contradicts other xrpld instances' # validated ledger that contradicts other rippled instances'
# validated ledgers (aka a ledger fork) if your validator list(s) # validated ledgers (aka a ledger fork) if your validator list(s)
# do not sufficiently overlap with the list(s) used by others. # do not sufficiently overlap with the list(s) used by others.
# See: https://arxiv.org/pdf/1802.07242.pdf # See: https://arxiv.org/pdf/1802.07242.pdf

View File

@@ -9,7 +9,7 @@
# #
# 2. Peer Protocol # 2. Peer Protocol
# #
# 3. XRPL protocol # 3. Ripple Protocol
# #
# 4. HTTPS Client # 4. HTTPS Client
# #
@@ -383,7 +383,7 @@
# #
# These settings control security and access attributes of the Peer to Peer # These settings control security and access attributes of the Peer to Peer
# server section of the xrpld process. Peer Protocol implements the # server section of the xrpld process. Peer Protocol implements the
# XRPL payment protocol. It is over peer connections that transactions # Ripple Payment protocol. It is over peer connections that transactions
# and validations are passed from to machine to machine, to determine the # and validations are passed from to machine to machine, to determine the
# contents of validated ledgers. # contents of validated ledgers.
# #
@@ -406,7 +406,7 @@
# #
# [ips] # [ips]
# #
# List of hostnames or ips where the XRPL protocol is served. A default # List of hostnames or ips where the Ripple protocol is served. A default
# starter list is included in the code and used if no other hostnames are # starter list is included in the code and used if no other hostnames are
# available. # available.
# #
@@ -435,7 +435,7 @@
# List of IP addresses or hostnames to which xrpld should always attempt to # List of IP addresses or hostnames to which xrpld should always attempt to
# maintain peer connections with. This is useful for manually forming private # maintain peer connections with. This is useful for manually forming private
# networks, for example to configure a validation server that connects to the # networks, for example to configure a validation server that connects to the
# XRPL network through a public-facing server, or for building a set # Ripple network through a public-facing server, or for building a set
# of cluster peers. # of cluster peers.
# #
# One address or domain names per line is allowed. A port must be specified # One address or domain names per line is allowed. A port must be specified
@@ -748,8 +748,8 @@
# the folder in which the xrpld.cfg file is located. # the folder in which the xrpld.cfg file is located.
# #
# Examples: # Examples:
# /home/username/validators.txt # /home/ripple/validators.txt
# C:/home/username/validators.txt # C:/home/ripple/validators.txt
# #
# Example content: # Example content:
# [validators] # [validators]
@@ -840,7 +840,7 @@
# #
# 0: Disable the ledger replay feature [default] # 0: Disable the ledger replay feature [default]
# 1: Enable the ledger replay feature. With this feature enabled, when # 1: Enable the ledger replay feature. With this feature enabled, when
# acquiring a ledger from the network, an xrpld node only downloads # acquiring a ledger from the network, a xrpld node only downloads
# the ledger header and the transactions instead of the whole ledger. # the ledger header and the transactions instead of the whole ledger.
# And the ledger is built by applying the transactions to the parent # And the ledger is built by applying the transactions to the parent
# ledger. # ledger.
@@ -853,7 +853,7 @@
# #
# The xrpld server instance uses HTTPS GET requests in a variety of # The xrpld server instance uses HTTPS GET requests in a variety of
# circumstances, including but not limited to contacting trusted domains to # circumstances, including but not limited to contacting trusted domains to
# fetch information such as mapping an email address to an XRPL payment # fetch information such as mapping an email address to a Ripple Payment
# Network address. # Network address.
# #
# [ssl_verify] # [ssl_verify]
@@ -1227,7 +1227,7 @@
# #
#---------- #----------
# #
# The vote settings configure settings for the entire XRPL network. # The vote settings configure settings for the entire Ripple network.
# While a single instance of xrpld cannot unilaterally enforce network-wide # While a single instance of xrpld cannot unilaterally enforce network-wide
# settings, these choices become part of the instance's vote during the # settings, these choices become part of the instance's vote during the
# consensus process for each voting ledger. # consensus process for each voting ledger.

View File

@@ -12,14 +12,14 @@ if(is_root_project AND TARGET xrpld)
install( install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/cfg/xrpld-example.cfg" FILES "${CMAKE_CURRENT_SOURCE_DIR}/cfg/xrpld-example.cfg"
DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/xrpld" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}"
RENAME xrpld.cfg RENAME xrpld.cfg
COMPONENT runtime COMPONENT runtime
) )
install( install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/cfg/validators-example.txt" FILES "${CMAKE_CURRENT_SOURCE_DIR}/cfg/validators-example.txt"
DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/xrpld" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}"
RENAME validators.txt RENAME validators.txt
COMPONENT runtime COMPONENT runtime
) )

142
cmake/XrplPackaging.cmake Normal file
View File

@@ -0,0 +1,142 @@
#[===================================================================[
Linux packaging support: RPM and Debian targets + install tests
#]===================================================================]
if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/opt/xrpld")
message(
STATUS
"Packaging targets require -DCMAKE_INSTALL_PREFIX=/opt/xrpld "
"(current: '${CMAKE_INSTALL_PREFIX}'); skipping."
)
return()
endif()
if(NOT DEFINED pkg_release)
set(pkg_release 1)
endif()
configure_file(
${CMAKE_SOURCE_DIR}/package/rpm/xrpld.spec.in
${CMAKE_BINARY_DIR}/package/rpm/xrpld.spec
@ONLY
)
find_program(RPMBUILD_EXECUTABLE rpmbuild)
if(RPMBUILD_EXECUTABLE)
add_custom_target(
package-rpm
COMMAND
${CMAKE_SOURCE_DIR}/package/build_pkg.sh rpm ${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Building RPM package"
VERBATIM
)
else()
message(STATUS "rpmbuild not found; 'package-rpm' target not available")
endif()
find_program(DPKG_BUILDPACKAGE_EXECUTABLE dpkg-buildpackage)
if(DPKG_BUILDPACKAGE_EXECUTABLE)
add_custom_target(
package-deb
COMMAND
${CMAKE_SOURCE_DIR}/package/build_pkg.sh deb ${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR} ${xrpld_version}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Building Debian package"
VERBATIM
)
else()
message(
STATUS
"dpkg-buildpackage not found; 'package-deb' target not available"
)
endif()
#[===================================================================[
CTest fixtures for package install verification (requires docker)
#]===================================================================]
find_program(DOCKER_EXECUTABLE docker)
if(NOT DOCKER_EXECUTABLE)
message(STATUS "docker not found; package install tests not available")
return()
endif()
set(DEB_TEST_IMAGE "geerlingguy/docker-ubuntu2204-ansible:latest")
set(RPM_TEST_IMAGE "geerlingguy/docker-rockylinux9-ansible:latest")
foreach(PKG deb rpm)
if(PKG STREQUAL "deb")
set(IMAGE ${DEB_TEST_IMAGE})
else()
set(IMAGE ${RPM_TEST_IMAGE})
endif()
# This image runs systemd for full testing xrpld.service
add_test(
NAME ${PKG}_container_start
COMMAND
sh -c
"docker rm -f xrpld_${PKG}_install_test 2>/dev/null || true && \
docker run -d \
--name xrpld_${PKG}_install_test \
--cgroupns host \
--volume '${CMAKE_SOURCE_DIR}:/root:ro' \
--volume /sys/fs/cgroup:/sys/fs/cgroup:rw \
--tmpfs /tmp --tmpfs /run \
--tmpfs /run/lock \
${IMAGE} \
/usr/sbin/init"
)
set_tests_properties(
${PKG}_container_start
PROPERTIES FIXTURES_SETUP ${PKG}_container LABELS packaging
)
# On CI: always stop. Locally: leave running on failure for diagnosis.
add_test(
NAME ${PKG}_container_stop
COMMAND
sh -c
"if [ -n \"$CI\" ] || ! docker exec xrpld_${PKG}_install_test test -f /tmp/test_failed 2>/dev/null; then \
docker rm -f xrpld_${PKG}_install_test; \
else \
echo 'Tests failed — leaving xrpld_${PKG}_install_test running for diagnosis'; \
echo 'Clean up with: docker rm -f xrpld_${PKG}_install_test'; \
fi"
)
set_tests_properties(
${PKG}_container_stop
PROPERTIES FIXTURES_CLEANUP ${PKG}_container LABELS packaging
)
add_test(
NAME ${PKG}_install
COMMAND
docker exec -w /root xrpld_${PKG}_install_test bash
/root/package/test/smoketest.sh local
)
set_tests_properties(
${PKG}_install
PROPERTIES
FIXTURES_REQUIRED ${PKG}_container
FIXTURES_SETUP ${PKG}_installed
LABELS packaging
TIMEOUT 600
)
add_test(
NAME ${PKG}_install_paths
COMMAND
docker exec -w /root xrpld_${PKG}_install_test sh
/root/package/test/check_install_paths.sh
)
set_tests_properties(
${PKG}_install_paths
PROPERTIES
FIXTURES_REQUIRED "${PKG}_container;${PKG}_installed"
LABELS packaging
TIMEOUT 60
)
endforeach()

View File

@@ -3,22 +3,22 @@
"requires": [ "requires": [
"zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1774439233.809", "zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1774439233.809",
"xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1765850149.987", "xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1765850149.987",
"sqlite3/3.51.0#66aa11eabd0e34954c5c1c061ad44abe%1774467355.988", "sqlite3/3.51.0#66aa11eabd0e34954c5c1c061ad44abe%1763899256.358",
"soci/4.0.3#fe32b9ad5eb47e79ab9e45a68f363945%1774450067.231", "soci/4.0.3#fe32b9ad5eb47e79ab9e45a68f363945%1774450067.231",
"snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1765850147.878", "snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1765850147.878",
"secp256k1/0.7.1#481881709eb0bdd0185a12b912bbe8ad%1770910500.329", "secp256k1/0.7.1#481881709eb0bdd0185a12b912bbe8ad%1770910500.329",
"rocksdb/10.5.1#4a197eca381a3e5ae8adf8cffa5aacd0%1765850186.86", "rocksdb/10.5.1#4a197eca381a3e5ae8adf8cffa5aacd0%1765850186.86",
"re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1774398111.888", "re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1774398111.888",
"protobuf/6.33.5#d96d52ba5baaaa532f47bda866ad87a5%1774467363.12", "protobuf/6.33.5#d96d52ba5baaaa532f47bda866ad87a5%1773224203.27",
"openssl/3.6.1#e6399de266349245a4542fc5f6c71552%1774458290.139", "openssl/3.6.1#e6399de266349245a4542fc5f6c71552%1774458290.139",
"nudb/2.0.9#11149c73f8f2baff9a0198fe25971fc7%1774883011.384", "nudb/2.0.9#0432758a24204da08fee953ec9ea03cb%1769436073.32",
"lz4/1.10.0#59fc63cac7f10fbe8e05c7e62c2f3504%1765850143.914", "lz4/1.10.0#59fc63cac7f10fbe8e05c7e62c2f3504%1765850143.914",
"libiconv/1.17#1e65319e945f2d31941a9d28cc13c058%1765842973.492", "libiconv/1.17#1e65319e945f2d31941a9d28cc13c058%1765842973.492",
"libbacktrace/cci.20210118#a7691bfccd8caaf66309df196790a5a1%1765842973.03", "libbacktrace/cci.20210118#a7691bfccd8caaf66309df196790a5a1%1765842973.03",
"libarchive/3.8.1#ffee18995c706e02bf96e7a2f7042e0d%1765850144.736", "libarchive/3.8.1#ffee18995c706e02bf96e7a2f7042e0d%1765850144.736",
"jemalloc/5.3.0#e951da9cf599e956cebc117880d2d9f8%1729241615.244", "jemalloc/5.3.0#e951da9cf599e956cebc117880d2d9f8%1729241615.244",
"gtest/1.17.0#5224b3b3ff3b4ce1133cbdd27d53ee7d%1768312129.152", "gtest/1.17.0#5224b3b3ff3b4ce1133cbdd27d53ee7d%1768312129.152",
"grpc/1.78.1#b1a9e74b145cc471bed4dc64dc6eb2c1%1774467387.342", "grpc/1.78.1#b1a9e74b145cc471bed4dc64dc6eb2c1%1772623605.068",
"ed25519/2015.03#ae761bdc52730a843f0809bdf6c1b1f6%1765850143.772", "ed25519/2015.03#ae761bdc52730a843f0809bdf6c1b1f6%1765850143.772",
"date/3.0.4#862e11e80030356b53c2c38599ceb32b%1765850143.772", "date/3.0.4#862e11e80030356b53c2c38599ceb32b%1765850143.772",
"c-ares/1.34.6#545240bb1c40e2cacd4362d6b8967650%1774439234.681", "c-ares/1.34.6#545240bb1c40e2cacd4362d6b8967650%1774439234.681",
@@ -29,7 +29,7 @@
"build_requires": [ "build_requires": [
"zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1774439233.809", "zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1774439233.809",
"strawberryperl/5.32.1.1#8d114504d172cfea8ea1662d09b6333e%1774447376.964", "strawberryperl/5.32.1.1#8d114504d172cfea8ea1662d09b6333e%1774447376.964",
"protobuf/6.33.5#d96d52ba5baaaa532f47bda866ad87a5%1774467363.12", "protobuf/6.33.5#d96d52ba5baaaa532f47bda866ad87a5%1773224203.27",
"nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904%1765850144.707", "nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904%1765850144.707",
"msys2/cci.latest#d22fe7b2808f5fd34d0a7923ace9c54f%1770657326.649", "msys2/cci.latest#d22fe7b2808f5fd34d0a7923ace9c54f%1770657326.649",
"m4/1.4.19#5d7a4994e5875d76faf7acf3ed056036%1774365463.87", "m4/1.4.19#5d7a4994e5875d76faf7acf3ed056036%1774365463.87",
@@ -41,15 +41,16 @@
], ],
"python_requires": [], "python_requires": [],
"overrides": { "overrides": {
"boost/1.90.0#d5e8defe7355494953be18524a7f135b": [
null,
"boost/1.90.0"
],
"protobuf/[>=5.27.0 <7]": [ "protobuf/[>=5.27.0 <7]": [
"protobuf/6.33.5" "protobuf/6.33.5"
], ],
"lz4/1.9.4": [ "lz4/1.9.4": [
"lz4/1.10.0" "lz4/1.10.0"
], ],
"boost/[>=1.83.0 <1.91.0]": [
"boost/1.90.0"
],
"sqlite3/[>=3.44 <4]": [ "sqlite3/[>=3.44 <4]": [
"sqlite3/3.51.0" "sqlite3/3.51.0"
], ],

View File

@@ -93,11 +93,14 @@ words:
- desync - desync
- desynced - desynced
- determ - determ
- disablerepo
- distro - distro
- doxyfile - doxyfile
- dxrpl - dxrpl
- enablerepo
- endmacro - endmacro
- exceptioned - exceptioned
- EXPECT_STREQ
- Falco - Falco
- fcontext - fcontext
- finalizers - finalizers
@@ -151,6 +154,7 @@ words:
- Merkle - Merkle
- Metafuncton - Metafuncton
- misprediction - misprediction
- missingok
- mptbalance - mptbalance
- MPTDEX - MPTDEX
- mptflags - mptflags
@@ -181,7 +185,9 @@ words:
- NOLINT - NOLINT
- NOLINTNEXTLINE - NOLINTNEXTLINE
- nonxrp - nonxrp
- noreplace
- noripple - noripple
- notifempty
- nudb - nudb
- nullptr - nullptr
- nunl - nunl
@@ -201,6 +207,7 @@ words:
- preauthorize - preauthorize
- preauthorizes - preauthorizes
- preclaim - preclaim
- preun
- protobuf - protobuf
- protos - protos
- ptrs - ptrs
@@ -235,12 +242,14 @@ words:
- sfields - sfields
- shamap - shamap
- shamapitem - shamapitem
- shlibs
- sidechain - sidechain
- SIGGOOD - SIGGOOD
- sle - sle
- sles - sles
- soci - soci
- socidb - socidb
- SRPMS
- sslws - sslws
- statsd - statsd
- STATSDCOLLECTOR - STATSDCOLLECTOR
@@ -268,8 +277,8 @@ words:
- txn - txn
- txns - txns
- txs - txs
- UBSAN
- ubsan - ubsan
- UBSAN
- umant - umant
- unacquired - unacquired
- unambiguity - unambiguity
@@ -306,7 +315,6 @@ words:
- xbridge - xbridge
- xchain - xchain
- ximinez - ximinez
- EXPECT_STREQ
- XMACRO - XMACRO
- xrpkuwait - xrpkuwait
- xrpl - xrpl

View File

@@ -558,7 +558,7 @@ network delay. A test case specifies:
1. a UNL with different number of validators for different test cases, 1. a UNL with different number of validators for different test cases,
1. a network with zero or more non-validator nodes, 1. a network with zero or more non-validator nodes,
1. a sequence of validator reliability change events (by killing/restarting 1. a sequence of validator reliability change events (by killing/restarting
nodes, or by running modified xrpld that does not send all validation nodes, or by running modified rippled that does not send all validation
messages), messages),
1. the correct outcomes. 1. the correct outcomes.
@@ -566,7 +566,7 @@ For all the test cases, the correct outcomes are verified by examining logs. We
will grep the log to see if the correct negative UNLs are generated, and whether will grep the log to see if the correct negative UNLs are generated, and whether
or not the network is making progress when it should be. The ripdtop tool will or not the network is making progress when it should be. The ripdtop tool will
be helpful for monitoring validators' states and ledger progress. Some of the be helpful for monitoring validators' states and ledger progress. Some of the
timing parameters of xrpld will be changed to have faster ledger time. Most if timing parameters of rippled will be changed to have faster ledger time. Most if
not all test cases do not need client transactions. not all test cases do not need client transactions.
For example, the test cases for the prototype: For example, the test cases for the prototype:
@@ -583,7 +583,7 @@ For example, the test cases for the prototype:
We considered testing with the current unit test framework, specifically the We considered testing with the current unit test framework, specifically the
[Consensus Simulation [Consensus Simulation
Framework](https://github.com/XRPLF/rippled/blob/develop/src/test/csf/README.md) Framework](https://github.com/ripple/rippled/blob/develop/src/test/csf/README.md)
(CSF). However, the CSF currently can only test the generic consensus algorithm (CSF). However, the CSF currently can only test the generic consensus algorithm
as in the paper: [Analysis of the XRP Ledger Consensus as in the paper: [Analysis of the XRP Ledger Consensus
Protocol](https://arxiv.org/abs/1802.07242). Protocol](https://arxiv.org/abs/1802.07242).

View File

@@ -4,7 +4,7 @@ skinparam sequenceArrowThickness 2
skinparam roundcorner 20 skinparam roundcorner 20
skinparam maxmessagesize 160 skinparam maxmessagesize 160
actor "Xrpld Start" as RS actor "Rippled Start" as RS
participant "Timer" as T participant "Timer" as T
participant "NetworkOPs" as NOP participant "NetworkOPs" as NOP
participant "ValidatorList" as VL #lightgreen participant "ValidatorList" as VL #lightgreen

View File

@@ -1,5 +1,5 @@
# `xrpld` Docker Image # `rippled` Docker Image
- Some info relating to Docker containers can be found here: [../Builds/containers](../Builds/containers) - Some info relating to Docker containers can be found here: [../Builds/containers](../Builds/containers)
- Images for building and testing xrpld can be found here: [thejohnfreeman/rippled-docker](https://github.com/thejohnfreeman/rippled-docker/) - Images for building and testing rippled can be found here: [thejohnfreeman/rippled-docker](https://github.com/thejohnfreeman/rippled-docker/)
- These images do not have xrpld. They have all the tools necessary to build xrpld. - These images do not have rippled. They have all the tools necessary to build rippled.

View File

@@ -2,7 +2,7 @@
# Project related configuration options # Project related configuration options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8 DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "xrpld" PROJECT_NAME = "rippled"
PROJECT_NUMBER = PROJECT_NUMBER =
PROJECT_BRIEF = PROJECT_BRIEF =
PROJECT_LOGO = PROJECT_LOGO =

View File

@@ -1,4 +1,4 @@
## Heap profiling of xrpld with jemalloc ## Heap profiling of rippled with jemalloc
The jemalloc library provides a good API for doing heap analysis, The jemalloc library provides a good API for doing heap analysis,
including a mechanism to dump a description of the heap from within the including a mechanism to dump a description of the heap from within the
@@ -7,26 +7,26 @@ activity in general, as well as how to acquire the software, are available on
the jemalloc site: the jemalloc site:
[https://github.com/jemalloc/jemalloc/wiki/Use-Case:-Heap-Profiling](https://github.com/jemalloc/jemalloc/wiki/Use-Case:-Heap-Profiling) [https://github.com/jemalloc/jemalloc/wiki/Use-Case:-Heap-Profiling](https://github.com/jemalloc/jemalloc/wiki/Use-Case:-Heap-Profiling)
jemalloc is acquired separately from xrpld, and is not affiliated jemalloc is acquired separately from rippled, and is not affiliated
with Ripple Labs. If you compile and install jemalloc from the with Ripple Labs. If you compile and install jemalloc from the
source release with default options, it will install the library and header source release with default options, it will install the library and header
under `/usr/local/lib` and `/usr/local/include`, respectively. Heap under `/usr/local/lib` and `/usr/local/include`, respectively. Heap
profiling has been tested with xrpld on a Linux platform. It should profiling has been tested with rippled on a Linux platform. It should
work on platforms on which both xrpld and jemalloc are available. work on platforms on which both rippled and jemalloc are available.
To link xrpld with jemalloc, the argument To link rippled with jemalloc, the argument
`profile-jemalloc=<jemalloc_dir>` is provided after the optional target. `profile-jemalloc=<jemalloc_dir>` is provided after the optional target.
The `<jemalloc_dir>` argument should be the same as that of the The `<jemalloc_dir>` argument should be the same as that of the
`--prefix` parameter passed to the jemalloc configure script when building. `--prefix` parameter passed to the jemalloc configure script when building.
## Examples: ## Examples:
Build xrpld with jemalloc library under /usr/local/lib and Build rippled with jemalloc library under /usr/local/lib and
header under /usr/local/include: header under /usr/local/include:
$ scons profile-jemalloc=/usr/local $ scons profile-jemalloc=/usr/local
Build xrpld using clang with the jemalloc library under /opt/local/lib Build rippled using clang with the jemalloc library under /opt/local/lib
and header under /opt/local/include: and header under /opt/local/include:
$ scons clang profile-jemalloc=/opt/local $ scons clang profile-jemalloc=/opt/local

61
docs/README.md Normal file
View File

@@ -0,0 +1,61 @@
# Building documentation
## Dependencies
Install these dependencies:
- [Doxygen](http://www.doxygen.nl): All major platforms have [official binary
distributions](http://www.doxygen.nl/download.html#srcbin), or you can
build from [source](http://www.doxygen.nl/download.html#srcbin).
- MacOS: We recommend installing via Homebrew: `brew install doxygen`.
The executable will be installed in `/usr/local/bin` which is already
in the default `PATH`.
If you use the official binary distribution, then you'll need to make
Doxygen available to your command line. You can do this by adding
a symbolic link from `/usr/local/bin` to the `doxygen` executable. For
example,
```
$ ln -s /Applications/Doxygen.app/Contents/Resources/doxygen /usr/local/bin/doxygen
```
- [PlantUML](http://plantuml.com):
1. Install a functioning Java runtime, if you don't already have one.
2. Download [`plantuml.jar`](http://sourceforge.net/projects/plantuml/files/plantuml.jar/download).
- [Graphviz](https://www.graphviz.org):
- Linux: Install from your package manager.
- Windows: Use an [official installer](https://graphviz.gitlab.io/_pages/Download/Download_windows.html).
- MacOS: Install via Homebrew: `brew install graphviz`.
## Docker
Instead of installing the above dependencies locally, you can use the official
build environment Docker image, which has all of them installed already.
1. Install [Docker](https://docs.docker.com/engine/installation/)
2. Pull the image:
```
sudo docker pull rippleci/rippled-ci-builder:2944b78d22db
```
3. Run the image from the project folder:
```
sudo docker run -v $PWD:/opt/rippled --rm rippleci/rippled-ci-builder:2944b78d22db
```
## Build
There is a `docs` target in the CMake configuration.
```
mkdir build
cd build
cmake -Donly_docs=ON ..
cmake --build . --target docs --parallel
```
The output will be in `build/docs/html`.

View File

@@ -20,7 +20,7 @@ CMakeToolchain
``` ```
# If you want to depend on a version of libxrpl that is not in ConanCenter, # If you want to depend on a version of libxrpl that is not in ConanCenter,
# then you can export the recipe from the xrpld project. # then you can export the recipe from the rippled project.
conan export <path> conan export <path>
``` ```
@@ -49,9 +49,9 @@ cmake --build . --parallel
## CMake subdirectory ## CMake subdirectory
The second method adds the [xrpld][] project as a CMake The second method adds the [rippled][] project as a CMake
[subdirectory][add_subdirectory]. [subdirectory][add_subdirectory].
This method works well when you keep the xrpld project as a Git This method works well when you keep the rippled project as a Git
[submodule][]. [submodule][].
It's good for when you want to make changes to libxrpl as part of your own It's good for when you want to make changes to libxrpl as part of your own
project. project.
@@ -90,6 +90,6 @@ cmake --build . --parallel
[add_subdirectory]: https://cmake.org/cmake/help/latest/command/add_subdirectory.html [add_subdirectory]: https://cmake.org/cmake/help/latest/command/add_subdirectory.html
[submodule]: https://git-scm.com/book/en/v2/Git-Tools-Submodules [submodule]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
[xrpld]: https://github.com/XRPLF/rippled [rippled]: https://github.com/ripple/rippled
[Conan]: https://docs.conan.io/ [Conan]: https://docs.conan.io/
[CMake]: https://cmake.org/cmake/help/latest/ [CMake]: https://cmake.org/cmake/help/latest/

View File

@@ -55,7 +55,7 @@ clang --version
### Install Xcode Specific Version (Optional) ### Install Xcode Specific Version (Optional)
If you develop other applications using XCode you might be consistently updating to the newest version of Apple Clang. If you develop other applications using XCode you might be consistently updating to the newest version of Apple Clang.
This will likely cause issues building xrpld. You may want to install a specific version of Xcode: This will likely cause issues building rippled. You may want to install a specific version of Xcode:
1. **Download Xcode** 1. **Download Xcode**
- Visit [Apple Developer Downloads](https://developer.apple.com/download/more/) - Visit [Apple Developer Downloads](https://developer.apple.com/download/more/)

58
docs/build/install.md vendored
View File

@@ -1,4 +1,4 @@
This document contains instructions for installing xrpld. This document contains instructions for installing rippled.
The APT package manager is common on Debian-based Linux distributions like The APT package manager is common on Debian-based Linux distributions like
Ubuntu, Ubuntu,
while the YUM package manager is common on Red Hat-based Linux distributions while the YUM package manager is common on Red Hat-based Linux distributions
@@ -8,7 +8,7 @@ and the only supported option for installing custom builds.
## From source ## From source
From a source build, you can install xrpld and libxrpl using CMake's From a source build, you can install rippled and libxrpl using CMake's
`--install` mode: `--install` mode:
``` ```
@@ -16,7 +16,7 @@ cmake --install . --prefix /opt/local
``` ```
The default [prefix][1] is typically `/usr/local` on Linux and macOS and The default [prefix][1] is typically `/usr/local` on Linux and macOS and
`C:/Program Files/xrpld` on Windows. `C:/Program Files/rippled` on Windows.
[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html [1]: https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html
@@ -50,9 +50,9 @@ The default [prefix][1] is typically `/usr/local` on Linux and macOS and
In particular, make sure that the fingerprint matches. (In the above example, the fingerprint is on the third line, starting with `C001`.) In particular, make sure that the fingerprint matches. (In the above example, the fingerprint is on the third line, starting with `C001`.)
5. Add the appropriate XRPL repository for your operating system version: 5. Add the appropriate Ripple repository for your operating system version:
echo "deb [signed-by=/usr/local/share/keyrings/ripple-key.gpg] https://repos.ripple.com/repos/xrpld-deb focal stable" | \ echo "deb [signed-by=/usr/local/share/keyrings/ripple-key.gpg] https://repos.ripple.com/repos/rippled-deb focal stable" | \
sudo tee -a /etc/apt/sources.list.d/ripple.list sudo tee -a /etc/apt/sources.list.d/ripple.list
The above example is appropriate for **Ubuntu 20.04 Focal Fossa**. For other operating systems, replace the word `focal` with one of the following: The above example is appropriate for **Ubuntu 20.04 Focal Fossa**. For other operating systems, replace the word `focal` with one of the following:
@@ -61,33 +61,33 @@ The default [prefix][1] is typically `/usr/local` on Linux and macOS and
- `bullseye` for **Debian 11 Bullseye** - `bullseye` for **Debian 11 Bullseye**
- `buster` for **Debian 10 Buster** - `buster` for **Debian 10 Buster**
If you want access to development or pre-release versions of `xrpld`, use one of the following instead of `stable`: If you want access to development or pre-release versions of `rippled`, use one of the following instead of `stable`:
- `unstable` - Pre-release builds ([`release` branch](https://github.com/XRPLF/rippled/tree/release)) - `unstable` - Pre-release builds ([`release` branch](https://github.com/ripple/rippled/tree/release))
- `nightly` - Experimental/development builds ([`develop` branch](https://github.com/XRPLF/rippled/tree/develop)) - `nightly` - Experimental/development builds ([`develop` branch](https://github.com/ripple/rippled/tree/develop))
**Warning:** Unstable and nightly builds may be broken at any time. Do not use these builds for production servers. **Warning:** Unstable and nightly builds may be broken at any time. Do not use these builds for production servers.
6. Fetch the XRPL repository. 6. Fetch the Ripple repository.
sudo apt -y update sudo apt -y update
7. Install the `xrpld` software package: 7. Install the `rippled` software package:
sudo apt -y install xrpld sudo apt -y install rippled
8. Check the status of the `xrpld` service: 8. Check the status of the `rippled` service:
systemctl status xrpld.service systemctl status rippled.service
The `xrpld` service should start automatically. If not, you can start it manually: The `rippled` service should start automatically. If not, you can start it manually:
sudo systemctl start xrpld.service sudo systemctl start rippled.service
9. Optional: allow `xrpld` to bind to privileged ports. 9. Optional: allow `rippled` to bind to privileged ports.
This allows you to serve incoming API requests on port 80 or 443. (If you want to do so, you must also update the config file's port settings.) This allows you to serve incoming API requests on port 80 or 443. (If you want to do so, you must also update the config file's port settings.)
sudo setcap 'cap_net_bind_service=+ep' /opt/xrpld/bin/xrpld sudo setcap 'cap_net_bind_service=+ep' /opt/ripple/bin/rippled
## With the YUM package manager ## With the YUM package manager
@@ -106,8 +106,8 @@ The default [prefix][1] is typically `/usr/local` on Linux and macOS and
enabled=1 enabled=1
gpgcheck=0 gpgcheck=0
repo_gpgcheck=1 repo_gpgcheck=1
baseurl=https://repos.ripple.com/repos/xrpld-rpm/stable/ baseurl=https://repos.ripple.com/repos/rippled-rpm/stable/
gpgkey=https://repos.ripple.com/repos/xrpld-rpm/stable/repodata/repomd.xml.key gpgkey=https://repos.ripple.com/repos/rippled-rpm/stable/repodata/repomd.xml.key
REPOFILE REPOFILE
_Unstable_ _Unstable_
@@ -118,8 +118,8 @@ The default [prefix][1] is typically `/usr/local` on Linux and macOS and
enabled=1 enabled=1
gpgcheck=0 gpgcheck=0
repo_gpgcheck=1 repo_gpgcheck=1
baseurl=https://repos.ripple.com/repos/xrpld-rpm/unstable/ baseurl=https://repos.ripple.com/repos/rippled-rpm/unstable/
gpgkey=https://repos.ripple.com/repos/xrpld-rpm/unstable/repodata/repomd.xml.key gpgkey=https://repos.ripple.com/repos/rippled-rpm/unstable/repodata/repomd.xml.key
REPOFILE REPOFILE
_Nightly_ _Nightly_
@@ -130,22 +130,22 @@ The default [prefix][1] is typically `/usr/local` on Linux and macOS and
enabled=1 enabled=1
gpgcheck=0 gpgcheck=0
repo_gpgcheck=1 repo_gpgcheck=1
baseurl=https://repos.ripple.com/repos/xrpld-rpm/nightly/ baseurl=https://repos.ripple.com/repos/rippled-rpm/nightly/
gpgkey=https://repos.ripple.com/repos/xrpld-rpm/nightly/repodata/repomd.xml.key gpgkey=https://repos.ripple.com/repos/rippled-rpm/nightly/repodata/repomd.xml.key
REPOFILE REPOFILE
2. Fetch the latest repo updates: 2. Fetch the latest repo updates:
sudo yum -y update sudo yum -y update
3. Install the new `xrpld` package: 3. Install the new `rippled` package:
sudo yum install -y xrpld sudo yum install -y rippled
4. Configure the `xrpld` service to start on boot: 4. Configure the `rippled` service to start on boot:
sudo systemctl enable xrpld.service sudo systemctl enable rippled.service
5. Start the `xrpld` service: 5. Start the `rippled` service:
sudo systemctl start xrpld.service sudo systemctl start rippled.service

View File

@@ -1,9 +1,9 @@
# Sanitizer Configuration for Xrpld # Sanitizer Configuration for Rippled
This document explains how to properly configure and run sanitizers (AddressSanitizer, undefinedbehaviorSanitizer, ThreadSanitizer) with the xrpld project. This document explains how to properly configure and run sanitizers (AddressSanitizer, undefinedbehaviorSanitizer, ThreadSanitizer) with the xrpld project.
Corresponding suppression files are located in the `sanitizers/suppressions` directory. Corresponding suppression files are located in the `sanitizers/suppressions` directory.
- [Sanitizer Configuration for Xrpld](#sanitizer-configuration-for-xrpld) - [Sanitizer Configuration for Rippled](#sanitizer-configuration-for-rippled)
- [Building with Sanitizers](#building-with-sanitizers) - [Building with Sanitizers](#building-with-sanitizers)
- [Summary](#summary) - [Summary](#summary)
- [Build steps:](#build-steps) - [Build steps:](#build-steps)
@@ -100,7 +100,7 @@ export LSAN_OPTIONS="include=sanitizers/suppressions/runtime-lsan-options.txt:su
- Boost intrusive containers (used in `aged_unordered_container`) trigger false positives - Boost intrusive containers (used in `aged_unordered_container`) trigger false positives
- Boost context switching (used in `Workers.cpp`) confuses ASAN's stack tracking - Boost context switching (used in `Workers.cpp`) confuses ASAN's stack tracking
- Since we usually don't build Boost (because we don't want to instrument Boost and detect issues in Boost code) with ASAN but use Boost containers in ASAN instrumented xrpld code, it generates false positives. - Since we usually don't build Boost (because we don't want to instrument Boost and detect issues in Boost code) with ASAN but use Boost containers in ASAN instrumented rippled code, it generates false positives.
- Building dependencies with ASAN instrumentation reduces false positives. But we don't want to instrument dependencies like Boost with ASAN because it is slow (to compile as well as run tests) and not necessary. - Building dependencies with ASAN instrumentation reduces false positives. But we don't want to instrument dependencies like Boost with ASAN because it is slow (to compile as well as run tests) and not necessary.
- See: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow - See: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow
- More such flags are detailed [here](https://github.com/google/sanitizers/wiki/AddressSanitizerFlags) - More such flags are detailed [here](https://github.com/google/sanitizers/wiki/AddressSanitizerFlags)

View File

@@ -5,9 +5,9 @@
Consensus is the task of reaching agreement within a distributed system in the Consensus is the task of reaching agreement within a distributed system in the
presence of faulty or even malicious participants. This document outlines the presence of faulty or even malicious participants. This document outlines the
[XRP Ledger Consensus Algorithm](https://arxiv.org/abs/1802.07242) [XRP Ledger Consensus Algorithm](https://arxiv.org/abs/1802.07242)
as implemented in [xrpld](https://github.com/XRPLF/rippled), but as implemented in [rippled](https://github.com/ripple/rippled), but
focuses on its utility as a generic consensus algorithm independent of the focuses on its utility as a generic consensus algorithm independent of the
detailed mechanics of the XRPL consensus Ledger. Most notably, the algorithm detailed mechanics of the Ripple Consensus Ledger. Most notably, the algorithm
does not require fully synchronous communication between all nodes in the does not require fully synchronous communication between all nodes in the
network, or even a fixed network topology, but instead achieves consensus via network, or even a fixed network topology, but instead achieves consensus via
collectively trusted subnetworks. collectively trusted subnetworks.
@@ -15,7 +15,7 @@ collectively trusted subnetworks.
## Distributed Agreement ## Distributed Agreement
A challenge for distributed systems is reaching agreement on changes in shared A challenge for distributed systems is reaching agreement on changes in shared
state. For the XRPL network, the shared state is the current ledger--account state. For the Ripple network, the shared state is the current ledger--account
information, account balances, order books and other financial data. We will information, account balances, order books and other financial data. We will
refer to shared distributed state as a /ledger/ throughout the remainder of this refer to shared distributed state as a /ledger/ throughout the remainder of this
document. document.
@@ -23,7 +23,7 @@ document.
![Ledger Chain](images/consensus/ledger_chain.png "Ledger Chain") ![Ledger Chain](images/consensus/ledger_chain.png "Ledger Chain")
As shown above, new ledgers are made by applying a set of transactions to the As shown above, new ledgers are made by applying a set of transactions to the
prior ledger. For the XRPL network, transactions include payments, prior ledger. For the Ripple network, transactions include payments,
modification of account settings, updates to offers and more. modification of account settings, updates to offers and more.
In a centralized system, generating the next ledger is trivial since there is a In a centralized system, generating the next ledger is trivial since there is a
@@ -33,10 +33,10 @@ the set of transactions to include, the order to apply those transactions, and
even the resulting ledger after applying the transactions. This is even more even the resulting ledger after applying the transactions. This is even more
difficult when some participants are faulty or malicious. difficult when some participants are faulty or malicious.
The XRPL network is a decentralized and **trust-full** network. Anyone is free The Ripple network is a decentralized and **trust-full** network. Anyone is free
to join and participants are free to choose a subset of peers that are to join and participants are free to choose a subset of peers that are
collectively trusted to not collude in an attempt to defraud the participant. collectively trusted to not collude in an attempt to defraud the participant.
Leveraging this network of trust, the XRPL algorithm has two main components. Leveraging this network of trust, the Ripple algorithm has two main components.
- _Consensus_ in which network participants agree on the transactions to apply - _Consensus_ in which network participants agree on the transactions to apply
to a prior ledger, based on the positions of their chosen peers. to a prior ledger, based on the positions of their chosen peers.
@@ -54,9 +54,9 @@ and was abandoned.
The remainder of this section describes the Consensus and Validation algorithms The remainder of this section describes the Consensus and Validation algorithms
in more detail and is meant as a companion guide to understanding the generic in more detail and is meant as a companion guide to understanding the generic
implementation in `xrpld`. The document **does not** discuss correctness, implementation in `rippled`. The document **does not** discuss correctness,
fault-tolerance or liveness properties of the algorithms or the full details of fault-tolerance or liveness properties of the algorithms or the full details of
how they integrate within `xrpld` to support the XRPL consensus Ledger. how they integrate within `rippled` to support the Ripple Consensus Ledger.
## Consensus Overview ## Consensus Overview

2
external/README.md vendored
View File

@@ -1,6 +1,6 @@
# External Conan recipes # External Conan recipes
The subdirectories in this directory contain external libraries used by xrpld. The subdirectories in this directory contain external libraries used by rippled.
| Folder | Upstream | Description | | Folder | Upstream | Description |
| :--------------- | :------------------------------------------------------------- | :------------------------------------------------------------------------------------------- | | :--------------- | :------------------------------------------------------------- | :------------------------------------------------------------------------------------------- |

View File

@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.18) cmake_minimum_required(VERSION 3.18)
# Note, version set explicitly by xrpld project # Note, version set explicitly by rippled project
project(antithesis-sdk-cpp VERSION 0.4.4 LANGUAGES CXX) project(antithesis-sdk-cpp VERSION 0.4.4 LANGUAGES CXX)
add_library(antithesis-sdk-cpp INTERFACE antithesis_sdk.h) add_library(antithesis-sdk-cpp INTERFACE antithesis_sdk.h)
# Note, both sections below created by xrpld project # Note, both sections below created by rippled project
target_include_directories(antithesis-sdk-cpp INTERFACE target_include_directories(antithesis-sdk-cpp INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

View File

@@ -311,7 +311,7 @@ template <class T>
bool bool
set(T& target, T const& defaultValue, std::string const& name, Section const& section) set(T& target, T const& defaultValue, std::string const& name, Section const& section)
{ {
bool const found_and_valid = set<T>(target, name, section); bool found_and_valid = set<T>(target, name, section);
if (!found_and_valid) if (!found_and_valid)
target = defaultValue; target = defaultValue;
return found_and_valid; return found_and_valid;

View File

@@ -34,7 +34,7 @@ public:
{ {
// Insert ourselves at the front of the lock-free linked list // Insert ourselves at the front of the lock-free linked list
CountedObjects& instance = CountedObjects::getInstance(); CountedObjects& instance = CountedObjects::getInstance();
Counter* head = nullptr; Counter* head;
do do
{ {
@@ -99,7 +99,7 @@ private:
Derived classes have their instances counted automatically. This is used Derived classes have their instances counted automatically. This is used
for reporting purposes. for reporting purposes.
@ingroup basics @ingroup ripple_basics
*/ */
template <class Object> template <class Object>
class CountedObject class CountedObject

View File

@@ -93,7 +93,7 @@ class DecayWindow
public: public:
using time_point = typename Clock::time_point; using time_point = typename Clock::time_point;
explicit DecayWindow(time_point now) : when_(now) explicit DecayWindow(time_point now) : value_(0), when_(now)
{ {
} }
@@ -125,7 +125,7 @@ private:
when_ = now; when_ = now;
} }
double value_{0}; double value_;
time_point when_; time_point when_;
}; };

View File

@@ -59,7 +59,7 @@ concept CAdoptTag = std::is_same_v<T, SharedIntrusiveAdoptIncrementStrongTag> ||
still retaining the reference counts. For example, for SHAMapInnerNodes the still retaining the reference counts. For example, for SHAMapInnerNodes the
children may be reset in that function. Note that std::shared_pointer WILL children may be reset in that function. Note that std::shared_pointer WILL
run the destructor when the strong count reaches zero, but may not free the run the destructor when the strong count reaches zero, but may not free the
memory used by the object until the weak count reaches zero. In xrpld, we memory used by the object until the weak count reaches zero. In rippled, we
typically allocate shared pointers with the `make_shared` function. When typically allocate shared pointers with the `make_shared` function. When
that is used, the memory is not reclaimed until the weak count reaches zero. that is used, the memory is not reclaimed until the weak count reaches zero.
*/ */
@@ -84,8 +84,7 @@ public:
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> requires std::convertible_to<TT*, T*>
SharedIntrusive( SharedIntrusive(SharedIntrusive<TT>&& rhs);
SharedIntrusive<TT>&& rhs); // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
SharedIntrusive& SharedIntrusive&
operator=(SharedIntrusive const& rhs); operator=(SharedIntrusive const& rhs);
@@ -107,8 +106,7 @@ public:
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> requires std::convertible_to<TT*, T*>
SharedIntrusive& SharedIntrusive&
operator=( operator=(SharedIntrusive<TT>&& rhs);
SharedIntrusive<TT>&& rhs); // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
/** Adopt the raw pointer. The strong reference may or may not be /** Adopt the raw pointer. The strong reference may or may not be
incremented, depending on the TAdoptTag incremented, depending on the TAdoptTag
@@ -316,8 +314,7 @@ public:
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> requires std::convertible_to<TT*, T*>
SharedWeakUnion( SharedWeakUnion(SharedIntrusive<TT>&& rhs);
SharedIntrusive<TT>&& rhs); // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
SharedWeakUnion& SharedWeakUnion&
operator=(SharedWeakUnion const& rhs); operator=(SharedWeakUnion const& rhs);
@@ -330,8 +327,7 @@ public:
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> requires std::convertible_to<TT*, T*>
SharedWeakUnion& SharedWeakUnion&
operator=( operator=(SharedIntrusive<TT>&& rhs);
SharedIntrusive<TT>&& rhs); // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
~SharedWeakUnion(); ~SharedWeakUnion();

View File

@@ -68,7 +68,9 @@ SharedIntrusive<T>::operator=(SharedIntrusive const& rhs)
template <class T> template <class T>
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> // clang-format off
requires std::convertible_to<TT*, T*>
// clang-format on
SharedIntrusive<T>& SharedIntrusive<T>&
SharedIntrusive<T>::operator=(SharedIntrusive<TT> const& rhs) SharedIntrusive<T>::operator=(SharedIntrusive<TT> const& rhs)
{ {
@@ -99,7 +101,9 @@ SharedIntrusive<T>::operator=(SharedIntrusive&& rhs)
template <class T> template <class T>
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> // clang-format off
requires std::convertible_to<TT*, T*>
// clang-format on
SharedIntrusive<T>& SharedIntrusive<T>&
SharedIntrusive<T>::operator=(SharedIntrusive<TT>&& rhs) SharedIntrusive<T>::operator=(SharedIntrusive<TT>&& rhs)
{ {
@@ -303,7 +307,9 @@ WeakIntrusive<T>::WeakIntrusive(SharedIntrusive<T> const& rhs) : ptr_{rhs.unsafe
template <class T> template <class T>
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> // clang-format off
requires std::convertible_to<TT*, T*>
// clang-format on
WeakIntrusive<T>& WeakIntrusive<T>&
WeakIntrusive<T>::operator=(SharedIntrusive<TT> const& rhs) WeakIntrusive<T>::operator=(SharedIntrusive<TT> const& rhs)
{ {
@@ -448,7 +454,9 @@ SharedWeakUnion<T>::operator=(SharedWeakUnion const& rhs)
template <class T> template <class T>
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> // clang-format off
requires std::convertible_to<TT*, T*>
// clang-format on
SharedWeakUnion<T>& SharedWeakUnion<T>&
SharedWeakUnion<T>::operator=(SharedIntrusive<TT> const& rhs) SharedWeakUnion<T>::operator=(SharedIntrusive<TT> const& rhs)
{ {
@@ -462,7 +470,9 @@ SharedWeakUnion<T>::operator=(SharedIntrusive<TT> const& rhs)
template <class T> template <class T>
template <class TT> template <class TT>
requires std::convertible_to<TT*, T*> // clang-format off
requires std::convertible_to<TT*, T*>
// clang-format on
SharedWeakUnion<T>& SharedWeakUnion<T>&
SharedWeakUnion<T>::operator=(SharedIntrusive<TT>&& rhs) SharedWeakUnion<T>::operator=(SharedIntrusive<TT>&& rhs)
{ {

View File

@@ -33,7 +33,7 @@ enum class ReleaseWeakRefAction { noop, destroy };
/** Implement the strong count, weak count, and bit flags for an intrusive /** Implement the strong count, weak count, and bit flags for an intrusive
pointer. pointer.
A class can satisfy the requirements of an xrpl::IntrusivePointer by A class can satisfy the requirements of a xrpl::IntrusivePointer by
inheriting from this class. inheriting from this class.
*/ */
struct IntrusiveRefCounts struct IntrusiveRefCounts
@@ -448,7 +448,7 @@ inline void
partialDestructorFinished(T** o) partialDestructorFinished(T** o)
{ {
T& self = **o; T& self = **o;
IntrusiveRefCounts::RefCountPair const p = IntrusiveRefCounts::RefCountPair p =
self.refCounts.fetch_or(IntrusiveRefCounts::partialDestroyFinishedMask); self.refCounts.fetch_or(IntrusiveRefCounts::partialDestroyFinishedMask);
XRPL_ASSERT( XRPL_ASSERT(
(!p.partialDestroyFinishedBit && p.partialDestroyStartedBit && !p.strong), (!p.partialDestroyFinishedBit && p.partialDestroyStartedBit && !p.strong),

View File

@@ -73,12 +73,12 @@ struct MantissaRange
enum mantissa_scale { small, large }; enum mantissa_scale { small, large };
explicit constexpr MantissaRange(mantissa_scale scale_) explicit constexpr MantissaRange(mantissa_scale scale_)
: min(getMin(scale_)), log(logTen(min).value_or(-1)), scale(scale_) : min(getMin(scale_)), max(min * 10 - 1), log(logTen(min).value_or(-1)), scale(scale_)
{ {
} }
rep min; rep min;
rep max{min * 10 - 1}; rep max;
int log; int log;
mantissa_scale scale; mantissa_scale scale;

View File

@@ -2,9 +2,9 @@
Utility functions and classes. Utility functions and classes.
The module xrpl/basics should contain no dependencies on other modules. ripple/basic should contain no dependencies on other modules.
# Choosing an xrpld container. # Choosing a rippled container.
- `std::vector` - `std::vector`
- For ordered containers with most insertions or erases at the end. - For ordered containers with most insertions or erases at the end.

View File

@@ -91,10 +91,10 @@ class SlabAllocator
std::uint8_t* std::uint8_t*
allocate() noexcept allocate() noexcept
{ {
std::uint8_t* ret = nullptr; // NOLINT(misc-const-correctness) std::uint8_t* ret;
{ {
std::lock_guard const l(m_); std::lock_guard l(m_);
ret = l_; ret = l_;
@@ -123,7 +123,7 @@ class SlabAllocator
{ {
XRPL_ASSERT(own(ptr), "xrpl::SlabAllocator::SlabBlock::deallocate : own input"); XRPL_ASSERT(own(ptr), "xrpl::SlabAllocator::SlabBlock::deallocate : own input");
std::lock_guard const l(m_); std::lock_guard l(m_);
// Use memcpy to avoid unaligned UB // Use memcpy to avoid unaligned UB
// (will optimize to equivalent code) // (will optimize to equivalent code)
@@ -210,13 +210,16 @@ public:
// No slab can satisfy our request, so we attempt to allocate a new // No slab can satisfy our request, so we attempt to allocate a new
// one here: // one here:
std::size_t const size = slabSize_; std::size_t size = slabSize_;
// We want to allocate the memory at a 2 MiB boundary, to make it // We want to allocate the memory at a 2 MiB boundary, to make it
// possible to use hugepage mappings on Linux: // possible to use hugepage mappings on Linux:
auto buf = boost::alignment::aligned_alloc(megabytes(std::size_t(2)), size); auto buf = boost::alignment::aligned_alloc(megabytes(std::size_t(2)), size);
// clang-format off
if (!buf) [[unlikely]] if (!buf) [[unlikely]]
return nullptr; return nullptr;
// clang-format on
#if BOOST_OS_LINUX #if BOOST_OS_LINUX
// When allocating large blocks, attempt to leverage Linux's // When allocating large blocks, attempt to leverage Linux's

View File

@@ -66,12 +66,12 @@ strUnHex(std::size_t strSize, Iterator begin, Iterator end)
while (iter != end) while (iter != end)
{ {
int const cHigh = digitLookupTable[*iter++]; int cHigh = digitLookupTable[*iter++];
if (cHigh < 0) if (cHigh < 0)
return {}; return {};
int const cLow = digitLookupTable[*iter++]; int cLow = digitLookupTable[*iter++];
if (cLow < 0) if (cLow < 0)
return {}; return {};

View File

@@ -182,7 +182,8 @@ private:
: hook(collector->make_hook(handler)) : hook(collector->make_hook(handler))
, size(collector->make_gauge(prefix, "size")) , size(collector->make_gauge(prefix, "size"))
, hit_rate(collector->make_gauge(prefix, "hit_rate")) , hit_rate(collector->make_gauge(prefix, "hit_rate"))
, hits(0)
, misses(0)
{ {
} }
@@ -190,8 +191,8 @@ private:
beast::insight::Gauge size; beast::insight::Gauge size;
beast::insight::Gauge hit_rate; beast::insight::Gauge hit_rate;
std::size_t hits{0}; std::size_t hits;
std::size_t misses{0}; std::size_t misses;
}; };
class KeyOnlyEntry class KeyOnlyEntry
@@ -293,10 +294,10 @@ private:
clock_type::duration const m_target_age; clock_type::duration const m_target_age;
// Number of items cached // Number of items cached
int m_cache_count{0}; int m_cache_count;
cache_type m_cache; // Hold strong reference to recent objects cache_type m_cache; // Hold strong reference to recent objects
std::uint64_t m_hits{0}; std::uint64_t m_hits;
std::uint64_t m_misses{0}; std::uint64_t m_misses;
}; };
} // namespace xrpl } // namespace xrpl

View File

@@ -36,7 +36,9 @@ inline TaggedCache<
, m_name(name) , m_name(name)
, m_target_size(size) , m_target_size(size)
, m_target_age(expiration) , m_target_age(expiration)
, m_cache_count(0)
, m_hits(0)
, m_misses(0)
{ {
} }

View File

@@ -26,7 +26,7 @@ public:
explicit UptimeClock() = default; explicit UptimeClock() = default;
static time_point static time_point
now(); // seconds since xrpld program start now(); // seconds since rippled program start
private: private:
static std::atomic<rep> now_; static std::atomic<rep> now_;

View File

@@ -212,7 +212,7 @@ private:
while (in != sv.end()) while (in != sv.end())
{ {
std::uint32_t accum = {}; std::uint32_t accum = {};
for (std::uint32_t const shift : {4u, 0u, 12u, 8u, 20u, 16u, 28u, 24u}) for (std::uint32_t shift : {4u, 0u, 12u, 8u, 20u, 16u, 28u, 24u})
{ {
if (auto const result = hexCharToUInt(*in++, shift, accum); if (auto const result = hexCharToUInt(*in++, shift, accum);
result != ParseResult::okay) result != ParseResult::okay)
@@ -335,13 +335,11 @@ public:
operator=(std::uint64_t uHost) operator=(std::uint64_t uHost)
{ {
*this = beast::zero; *this = beast::zero;
// NOLINTBEGIN(cppcoreguidelines-pro-type-member-init)
union union
{ {
unsigned u[2]; unsigned u[2];
std::uint64_t ul; std::uint64_t ul;
}; };
// NOLINTEND(cppcoreguidelines-pro-type-member-init)
// Put in least significant bits. // Put in least significant bits.
ul = boost::endian::native_to_big(uHost); ul = boost::endian::native_to_big(uHost);
data_[WIDTH - 2] = u[0]; data_[WIDTH - 2] = u[0];
@@ -446,7 +444,7 @@ public:
for (int i = WIDTH; i--;) for (int i = WIDTH; i--;)
{ {
std::uint64_t const n = carry + boost::endian::big_to_native(data_[i]) + std::uint64_t n = carry + boost::endian::big_to_native(data_[i]) +
boost::endian::big_to_native(b.data_[i]); boost::endian::big_to_native(b.data_[i]);
data_[i] = boost::endian::native_to_big(static_cast<std::uint32_t>(n)); data_[i] = boost::endian::native_to_big(static_cast<std::uint32_t>(n));
@@ -623,7 +621,7 @@ template <>
inline std::size_t inline std::size_t
extract(uint256 const& key) extract(uint256 const& key)
{ {
std::size_t result = 0; std::size_t result;
// Use memcpy to avoid unaligned UB // Use memcpy to avoid unaligned UB
// (will optimize to equivalent code) // (will optimize to equivalent code)
std::memcpy(&result, key.data(), sizeof(std::size_t)); std::memcpy(&result, key.data(), sizeof(std::size_t));

View File

@@ -54,7 +54,7 @@ Throw(Args&&... args)
E e(std::forward<Args>(args)...); E e(std::forward<Args>(args)...);
LogThrow(std::string("Throwing exception of type " + beast::type_name<E>() + ": ") + e.what()); LogThrow(std::string("Throwing exception of type " + beast::type_name<E>() + ": ") + e.what());
throw std::move(e); throw e;
} }
/** Called when faulty logic causes a broken invariant. */ /** Called when faulty logic causes a broken invariant. */

View File

@@ -32,7 +32,7 @@ make_seed_pair() noexcept
// state_t& operator=(state_t const&) = delete; // state_t& operator=(state_t const&) = delete;
}; };
static state_t state; static state_t state;
std::lock_guard const lock(state.mutex); std::lock_guard lock(state.mutex);
return {state.dist(state.gen), state.dist(state.gen)}; return {state.dist(state.gen), state.dist(state.gen)};
} }

View File

@@ -14,16 +14,14 @@ namespace xrpl {
#ifndef __INTELLISENSE__ #ifndef __INTELLISENSE__
static_assert( static_assert(
// NOLINTNEXTLINE(misc-redundant-expression)
std::is_integral<beast::xor_shift_engine::result_type>::value && std::is_integral<beast::xor_shift_engine::result_type>::value &&
std::is_unsigned<beast::xor_shift_engine::result_type>::value, std::is_unsigned<beast::xor_shift_engine::result_type>::value,
"The XRPL default PRNG engine must return an unsigned integral type."); "The Ripple default PRNG engine must return an unsigned integral type.");
static_assert( static_assert(
// NOLINTNEXTLINE(misc-redundant-expression)
std::numeric_limits<beast::xor_shift_engine::result_type>::max() >= std::numeric_limits<beast::xor_shift_engine::result_type>::max() >=
std::numeric_limits<std::uint64_t>::max(), std::numeric_limits<std::uint64_t>::max(),
"The XRPL default PRNG engine return must be at least 64 bits wide."); "The Ripple default PRNG engine return must be at least 64 bits wide.");
#endif #endif
namespace detail { namespace detail {
@@ -58,9 +56,9 @@ default_prng()
// The thread-specific PRNGs: // The thread-specific PRNGs:
thread_local beast::xor_shift_engine engine = [] { thread_local beast::xor_shift_engine engine = [] {
std::uint64_t seed = 0; std::uint64_t seed;
{ {
std::lock_guard const lk(m); std::lock_guard lk(m);
std::uniform_int_distribution<std::uint64_t> distribution{1}; std::uniform_int_distribution<std::uint64_t> distribution{1};
seed = distribution(seeder); seed = distribution(seeder);
} }

View File

@@ -23,15 +23,15 @@ private:
std::recursive_mutex m_mutex; std::recursive_mutex m_mutex;
std::condition_variable_any m_cond; std::condition_variable_any m_cond;
std::size_t m_count{1}; std::size_t m_count;
duration const m_period; duration const m_period;
boost::asio::io_context& m_ios; boost::asio::io_context& m_ios;
boost::asio::basic_waitable_timer<std::chrono::steady_clock> m_timer; boost::asio::basic_waitable_timer<std::chrono::steady_clock> m_timer;
bool m_cancel{false}; bool m_cancel;
public: public:
io_latency_probe(duration const& period, boost::asio::io_context& ios) io_latency_probe(duration const& period, boost::asio::io_context& ios)
: m_period(period), m_ios(ios), m_timer(m_ios) : m_count(1), m_period(period), m_ios(ios), m_timer(m_ios), m_cancel(false)
{ {
} }
@@ -83,7 +83,7 @@ public:
void void
sample_one(Handler&& handler) sample_one(Handler&& handler)
{ {
std::lock_guard const lock(m_mutex); std::lock_guard lock(m_mutex);
if (m_cancel) if (m_cancel)
throw std::logic_error("io_latency_probe is canceled"); throw std::logic_error("io_latency_probe is canceled");
boost::asio::post( boost::asio::post(
@@ -98,7 +98,7 @@ public:
void void
sample(Handler&& handler) sample(Handler&& handler)
{ {
std::lock_guard const lock(m_mutex); std::lock_guard lock(m_mutex);
if (m_cancel) if (m_cancel)
throw std::logic_error("io_latency_probe is canceled"); throw std::logic_error("io_latency_probe is canceled");
boost::asio::post( boost::asio::post(
@@ -122,14 +122,14 @@ private:
void void
addref() addref()
{ {
std::lock_guard const lock(m_mutex); std::lock_guard lock(m_mutex);
++m_count; ++m_count;
} }
void void
release() release()
{ {
std::lock_guard const lock(m_mutex); std::lock_guard lock(m_mutex);
if (--m_count == 0) if (--m_count == 0)
m_cond.notify_all(); m_cond.notify_all();
} }
@@ -192,7 +192,7 @@ private:
m_handler(elapsed); m_handler(elapsed);
{ {
std::lock_guard const lock(m_probe->m_mutex); std::lock_guard lock(m_probe->m_mutex);
if (m_probe->m_cancel) if (m_probe->m_cancel)
return; return;
} }

View File

@@ -16,4 +16,4 @@ template <
class Allocator = std::allocator<std::pair<Key const, T>>> class Allocator = std::allocator<std::pair<Key const, T>>>
using aged_map = detail::aged_ordered_container<false, true, Key, T, Clock, Compare, Allocator>; using aged_map = detail::aged_ordered_container<false, true, Key, T, Clock, Compare, Allocator>;
} // namespace beast }

View File

@@ -16,4 +16,4 @@ template <
class Allocator = std::allocator<std::pair<Key const, T>>> class Allocator = std::allocator<std::pair<Key const, T>>>
using aged_multimap = detail::aged_ordered_container<true, true, Key, T, Clock, Compare, Allocator>; using aged_multimap = detail::aged_ordered_container<true, true, Key, T, Clock, Compare, Allocator>;
} // namespace beast }

View File

@@ -15,4 +15,4 @@ template <
class Allocator = std::allocator<Key>> class Allocator = std::allocator<Key>>
using aged_multiset = using aged_multiset =
detail::aged_ordered_container<true, false, Key, void, Clock, Compare, Allocator>; detail::aged_ordered_container<true, false, Key, void, Clock, Compare, Allocator>;
} // namespace beast }

View File

@@ -15,4 +15,4 @@ template <
class Allocator = std::allocator<Key>> class Allocator = std::allocator<Key>>
using aged_set = detail::aged_ordered_container<false, false, Key, void, Clock, Compare, Allocator>; using aged_set = detail::aged_ordered_container<false, false, Key, void, Clock, Compare, Allocator>;
} // namespace beast }

View File

@@ -17,4 +17,4 @@ template <
class Allocator = std::allocator<std::pair<Key const, T>>> class Allocator = std::allocator<std::pair<Key const, T>>>
using aged_unordered_map = using aged_unordered_map =
detail::aged_unordered_container<false, true, Key, T, Clock, Hash, KeyEqual, Allocator>; detail::aged_unordered_container<false, true, Key, T, Clock, Hash, KeyEqual, Allocator>;
} // namespace beast }

View File

@@ -17,4 +17,4 @@ template <
class Allocator = std::allocator<std::pair<Key const, T>>> class Allocator = std::allocator<std::pair<Key const, T>>>
using aged_unordered_multimap = using aged_unordered_multimap =
detail::aged_unordered_container<true, true, Key, T, Clock, Hash, KeyEqual, Allocator>; detail::aged_unordered_container<true, true, Key, T, Clock, Hash, KeyEqual, Allocator>;
} // namespace beast }

View File

@@ -17,4 +17,4 @@ template <
using aged_unordered_multiset = using aged_unordered_multiset =
detail::aged_unordered_container<true, false, Key, void, Clock, Hash, KeyEqual, Allocator>; detail::aged_unordered_container<true, false, Key, void, Clock, Hash, KeyEqual, Allocator>;
} // namespace beast }

View File

@@ -16,4 +16,4 @@ template <
class Allocator = std::allocator<Key>> class Allocator = std::allocator<Key>>
using aged_unordered_set = using aged_unordered_set =
detail::aged_unordered_container<false, false, Key, void, Clock, Hash, KeyEqual, Allocator>; detail::aged_unordered_container<false, false, Key, void, Clock, Hash, KeyEqual, Allocator>;
} // namespace beast }

View File

@@ -262,9 +262,7 @@ private:
{ {
} }
config_t( config_t(config_t&& other, Allocator const& alloc)
config_t&& other, // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
Allocator const& alloc)
: KeyValueCompare(std::move(other.key_compare())) : KeyValueCompare(std::move(other.key_compare()))
, beast::detail::empty_base_optimization<ElementAllocator>(alloc) , beast::detail::empty_base_optimization<ElementAllocator>(alloc)
, clock(other.clock) , clock(other.clock)
@@ -554,10 +552,7 @@ public:
aged_ordered_container(aged_ordered_container&& other); aged_ordered_container(aged_ordered_container&& other);
aged_ordered_container( aged_ordered_container(aged_ordered_container&& other, Allocator const& alloc);
// NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
aged_ordered_container&& other,
Allocator const& alloc);
aged_ordered_container(std::initializer_list<value_type> init, clock_type& clock); aged_ordered_container(std::initializer_list<value_type> init, clock_type& clock);
@@ -1295,7 +1290,7 @@ aged_ordered_container<IsMulti, IsMap, Key, T, Clock, Compare, Allocator>::aged_
template <bool IsMulti, bool IsMap, class Key, class T, class Clock, class Compare, class Allocator> template <bool IsMulti, bool IsMap, class Key, class T, class Clock, class Compare, class Allocator>
aged_ordered_container<IsMulti, IsMap, Key, T, Clock, Compare, Allocator>::aged_ordered_container( aged_ordered_container<IsMulti, IsMap, Key, T, Clock, Compare, Allocator>::aged_ordered_container(
aged_ordered_container&& other, // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved) aged_ordered_container&& other,
Allocator const& alloc) Allocator const& alloc)
: m_config(std::move(other.m_config), alloc) : m_config(std::move(other.m_config), alloc)
#if BOOST_VERSION >= 108000 #if BOOST_VERSION >= 108000

View File

@@ -318,9 +318,7 @@ private:
{ {
} }
config_t( config_t(config_t&& other, Allocator const& alloc)
config_t&& other, // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
Allocator const& alloc)
: ValueHash(std::move(other.hash_function())) : ValueHash(std::move(other.hash_function()))
, KeyValueEqual(std::move(other.key_eq())) , KeyValueEqual(std::move(other.key_eq()))
, beast::detail::empty_base_optimization<ElementAllocator>(alloc) , beast::detail::empty_base_optimization<ElementAllocator>(alloc)
@@ -776,10 +774,7 @@ public:
aged_unordered_container(aged_unordered_container&& other); aged_unordered_container(aged_unordered_container&& other);
aged_unordered_container( aged_unordered_container(aged_unordered_container&& other, Allocator const& alloc);
// NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
aged_unordered_container&& other,
Allocator const& alloc);
aged_unordered_container(std::initializer_list<value_type> init, clock_type& clock); aged_unordered_container(std::initializer_list<value_type> init, clock_type& clock);
@@ -1843,10 +1838,7 @@ template <
class KeyEqual, class KeyEqual,
class Allocator> class Allocator>
aged_unordered_container<IsMulti, IsMap, Key, T, Clock, Hash, KeyEqual, Allocator>:: aged_unordered_container<IsMulti, IsMap, Key, T, Clock, Hash, KeyEqual, Allocator>::
aged_unordered_container( aged_unordered_container(aged_unordered_container&& other, Allocator const& alloc)
// NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
aged_unordered_container&& other,
Allocator const& alloc)
: m_config(std::move(other.m_config), alloc) : m_config(std::move(other.m_config), alloc)
, m_buck(alloc) , m_buck(alloc)
, m_cont(m_buck, std::cref(m_config.value_hash()), std::cref(m_config.key_value_equal())) , m_cont(m_buck, std::cref(m_config.value_hash()), std::cref(m_config.key_value_equal()))

View File

@@ -449,7 +449,7 @@ public:
iterator iterator
erase(iterator pos) noexcept erase(iterator pos) noexcept
{ {
Node const* node = &*pos; Node* node = &*pos;
++pos; ++pos;
node->m_next->m_prev = node->m_prev; node->m_next->m_prev = node->m_prev;
node->m_prev->m_next = node->m_next; node->m_prev->m_next = node->m_next;

View File

@@ -187,7 +187,7 @@ public:
bool bool
push_front(Node* node) push_front(Node* node)
{ {
bool first = false; bool first;
Node* old_head = m_head.load(std::memory_order_relaxed); Node* old_head = m_head.load(std::memory_order_relaxed);
do do
{ {
@@ -211,7 +211,7 @@ public:
pop_front() pop_front()
{ {
Node* node = m_head.load(); Node* node = m_head.load();
Node* new_head = nullptr; Node* new_head;
do do
{ {
if (node == &m_end) if (node == &m_end)

View File

@@ -23,7 +23,7 @@ private:
// A 64-byte buffer should to be big enough for us // A 64-byte buffer should to be big enough for us
static constexpr std::size_t INTERNAL_BUFFER_SIZE = 64; static constexpr std::size_t INTERNAL_BUFFER_SIZE = 64;
alignas(64) std::array<std::uint8_t, INTERNAL_BUFFER_SIZE> buffer_{}; alignas(64) std::array<std::uint8_t, INTERNAL_BUFFER_SIZE> buffer_;
std::span<std::uint8_t> readBuffer_; std::span<std::uint8_t> readBuffer_;
std::span<std::uint8_t> writeBuffer_; std::span<std::uint8_t> writeBuffer_;

View File

@@ -114,7 +114,7 @@ enable_yield_to::spawn(F0&& f, FN&&... fn)
boost::context::fixedsize_stack(2 * 1024 * 1024), boost::context::fixedsize_stack(2 * 1024 * 1024),
[&](yield_context yield) { [&](yield_context yield) {
f(yield); f(yield);
std::lock_guard const lock{m_}; std::lock_guard lock{m_};
if (--running_ == 0) if (--running_ == 0)
cv_.notify_all(); cv_.notify_all();
}, },

View File

@@ -35,10 +35,10 @@ private:
class tests_t : public detail::const_container<std::vector<test>> class tests_t : public detail::const_container<std::vector<test>>
{ {
private: private:
std::size_t failed_{0}; std::size_t failed_;
public: public:
tests_t() tests_t() : failed_(0)
{ {
} }
@@ -167,12 +167,12 @@ public:
class results : public detail::const_container<std::vector<suite_results>> class results : public detail::const_container<std::vector<suite_results>>
{ {
private: private:
std::size_t m_cases{0}; std::size_t m_cases;
std::size_t total_{0}; std::size_t total_;
std::size_t failed_{0}; std::size_t failed_;
public: public:
results() results() : m_cases(0), total_(0), failed_(0)
{ {
} }

View File

@@ -228,7 +228,7 @@ template <class>
void void
runner::testcase(std::string const& name) runner::testcase(std::string const& name)
{ {
std::lock_guard const lock(mutex_); std::lock_guard lock(mutex_);
// Name may not be empty // Name may not be empty
BOOST_ASSERT(default_ || !name.empty()); BOOST_ASSERT(default_ || !name.empty());
// Forgot to call pass or fail // Forgot to call pass or fail
@@ -244,7 +244,7 @@ template <class>
void void
runner::pass() runner::pass()
{ {
std::lock_guard const lock(mutex_); std::lock_guard lock(mutex_);
if (default_) if (default_)
testcase(""); testcase("");
on_pass(); on_pass();
@@ -255,7 +255,7 @@ template <class>
void void
runner::fail(std::string const& reason) runner::fail(std::string const& reason)
{ {
std::lock_guard const lock(mutex_); std::lock_guard lock(mutex_);
if (default_) if (default_)
testcase(""); testcase("");
on_fail(reason); on_fail(reason);
@@ -267,7 +267,7 @@ template <class>
void void
runner::log(std::string const& s) runner::log(std::string const& s)
{ {
std::lock_guard const lock(mutex_); std::lock_guard lock(mutex_);
if (default_) if (default_)
testcase(""); testcase("");
on_log(s); on_log(s);

View File

@@ -300,7 +300,7 @@ private:
static suite** static suite**
p_this_suite() p_this_suite()
{ {
static suite* pts = nullptr; // NOLINT(misc-const-correctness) static suite* pts = nullptr;
return &pts; return &pts;
} }

View File

@@ -311,7 +311,7 @@ private:
std::string const m_name; std::string const m_name;
std::recursive_mutex lock_; std::recursive_mutex lock_;
Item item_; Item item_;
Source* parent_{nullptr}; Source* parent_;
List<Item> children_; List<Item> children_;
public: public:

View File

@@ -28,7 +28,7 @@ struct Zero
namespace { namespace {
static constexpr Zero zero{}; static constexpr Zero zero{};
} // namespace }
/** Default implementation of signum calls the method on the class. */ /** Default implementation of signum calls the method on the class. */
template <typename T> template <typename T>

View File

@@ -37,7 +37,7 @@ public:
} }
private: private:
result_type s_[2]{}; result_type s_[2];
static result_type static result_type
murmurhash3(result_type x); murmurhash3(result_type x);

View File

@@ -56,7 +56,7 @@ private:
// a lock. This removes a small timing window that occurs if the // a lock. This removes a small timing window that occurs if the
// waiting thread is handling a spurious wakeup when closureCount_ // waiting thread is handling a spurious wakeup when closureCount_
// drops to zero. // drops to zero.
std::lock_guard const lock{mutex_}; std::lock_guard lock{mutex_};
// Update closureCount_. Notify if stopping and closureCount_ == 0. // Update closureCount_. Notify if stopping and closureCount_ == 0.
if ((--closureCount_ == 0) && waitForClosures_) if ((--closureCount_ == 0) && waitForClosures_)
@@ -92,9 +92,7 @@ private:
++counter_; ++counter_;
} }
Substitute( Substitute(ClosureCounter& counter, Closure&& closure)
ClosureCounter& counter,
Closure&& closure) // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
: counter_(counter), closure_(std::forward<Closure>(closure)) : counter_(counter), closure_(std::forward<Closure>(closure))
{ {
++counter_; ++counter_;
@@ -170,7 +168,7 @@ public:
{ {
std::optional<Substitute<Closure>> ret; std::optional<Substitute<Closure>> ret;
std::lock_guard const lock{mutex_}; std::lock_guard lock{mutex_};
if (!waitForClosures_) if (!waitForClosures_)
ret.emplace(*this, std::forward<Closure>(closure)); ret.emplace(*this, std::forward<Closure>(closure));
@@ -193,7 +191,7 @@ public:
bool bool
joined() const joined() const
{ {
std::lock_guard const lock{mutex_}; std::lock_guard lock{mutex_};
return waitForClosures_; return waitForClosures_;
} }
}; };

View File

@@ -7,6 +7,7 @@ JobQueue::Coro::Coro(Coro_create_t, JobQueue& jq, JobType type, std::string cons
: jq_(jq) : jq_(jq)
, type_(type) , type_(type)
, name_(name) , name_(name)
, running_(false)
, coro_( , coro_(
// Stack size of 1MB wasn't sufficient for deep calls. ASAN tests flagged the issue. Hence // Stack size of 1MB wasn't sufficient for deep calls. ASAN tests flagged the issue. Hence
// increasing the size to 1.5MB. // increasing the size to 1.5MB.

View File

@@ -16,7 +16,7 @@ namespace xrpl {
namespace perf { namespace perf {
class PerfLog; class PerfLog;
} // namespace perf }
class Logs; class Logs;
struct Coro_create_t struct Coro_create_t
@@ -45,7 +45,7 @@ public:
JobQueue& jq_; JobQueue& jq_;
JobType type_; JobType type_;
std::string name_; std::string name_;
bool running_{false}; bool running_;
std::mutex mutex_; std::mutex mutex_;
std::mutex mutex_run_; std::mutex mutex_run_;
std::condition_variable cv_; std::condition_variable cv_;
@@ -224,7 +224,7 @@ private:
beast::Journal m_journal; beast::Journal m_journal;
mutable std::mutex m_mutex; mutable std::mutex m_mutex;
std::uint64_t m_lastJob{0}; std::uint64_t m_lastJob;
std::set<Job> m_jobSet; std::set<Job> m_jobSet;
JobCounter jobCounter_; JobCounter jobCounter_;
std::atomic_bool stopping_{false}; std::atomic_bool stopping_{false};
@@ -233,7 +233,7 @@ private:
JobTypeData m_invalidJobData; JobTypeData m_invalidJobData;
// The number of jobs currently in processTask() // The number of jobs currently in processTask()
int m_processCount{0}; int m_processCount;
// The number of suspended coroutines // The number of suspended coroutines
int nSuspend_ = 0; int nSuspend_ = 0;

View File

@@ -19,13 +19,13 @@ public:
JobTypeInfo const& info; JobTypeInfo const& info;
/* The number of jobs waiting */ /* The number of jobs waiting */
int waiting{0}; int waiting;
/* The number presently running */ /* The number presently running */
int running{0}; int running;
/* And the number we deferred executing because of job limits */ /* And the number we deferred executing because of job limits */
int deferred{0}; int deferred;
/* Notification callbacks */ /* Notification callbacks */
beast::insight::Event dequeue; beast::insight::Event dequeue;
@@ -35,8 +35,12 @@ public:
JobTypeInfo const& info_, JobTypeInfo const& info_,
beast::insight::Collector::ptr const& collector, beast::insight::Collector::ptr const& collector,
Logs& logs) noexcept Logs& logs) noexcept
: m_load(logs.journal("LoadMonitor")), m_collector(collector), info(info_) : m_load(logs.journal("LoadMonitor"))
, m_collector(collector)
, info(info_)
, waiting(0)
, running(0)
, deferred(0)
{ {
m_load.setTargetLatency(info.getAverageLatency(), info.getPeakLatency()); m_load.setTargetLatency(info.getAverageLatency(), info.getPeakLatency());

View File

@@ -24,7 +24,7 @@ private:
std::chrono::milliseconds{0}) std::chrono::milliseconds{0})
{ {
using namespace std::chrono_literals; using namespace std::chrono_literals;
int const maxLimit = std::numeric_limits<int>::max(); int maxLimit = std::numeric_limits<int>::max();
auto add = [this]( auto add = [this](
JobType jt, JobType jt,

View File

@@ -36,10 +36,10 @@ public:
{ {
Stats(); Stats();
std::uint64_t count{0}; std::uint64_t count;
std::chrono::milliseconds latencyAvg; std::chrono::milliseconds latencyAvg;
std::chrono::milliseconds latencyPeak; std::chrono::milliseconds latencyPeak;
bool isOverloaded{false}; bool isOverloaded;
}; };
Stats Stats
@@ -54,8 +54,8 @@ private:
std::mutex mutex_; std::mutex mutex_;
std::uint64_t mCounts{0}; std::uint64_t mCounts;
int mLatencyEvents{0}; int mLatencyEvents;
std::chrono::milliseconds mLatencyMSAvg; std::chrono::milliseconds mLatencyMSAvg;
std::chrono::milliseconds mLatencyMSPeak; std::chrono::milliseconds mLatencyMSPeak;
std::chrono::milliseconds mTargetLatencyAvg; std::chrono::milliseconds mTargetLatencyAvg;

View File

@@ -67,7 +67,7 @@ public:
bool bool
contains(PublicKey const& nodeId) contains(PublicKey const& nodeId)
{ {
std::lock_guard const lock(this->mutex_); std::lock_guard lock(this->mutex_);
return table_.find({nodeId}) != table_.end(); return table_.find({nodeId}) != table_.end();
} }
@@ -92,7 +92,7 @@ public:
private: private:
beast::Journal mutable journal_; beast::Journal mutable journal_;
std::mutex mutable mutex_; std::mutex mutable mutex_;
DatabaseCon* connection_{}; DatabaseCon* connection_;
std::unordered_set<PeerReservation, beast::uhash<>, KeyEqual> table_; std::unordered_set<PeerReservation, beast::uhash<>, KeyEqual> table_;
}; };

View File

@@ -14,7 +14,7 @@
namespace beast { namespace beast {
class Journal; class Journal;
} // namespace beast }
namespace xrpl { namespace xrpl {
class Application; class Application;

View File

@@ -11,13 +11,13 @@ namespace xrpl {
// Forward declarations // Forward declarations
namespace NodeStore { namespace NodeStore {
class Database; class Database;
} // namespace NodeStore }
namespace Resource { namespace Resource {
class Manager; class Manager;
} // namespace Resource }
namespace perf { namespace perf {
class PerfLog; class PerfLog;
} // namespace perf }
// This is temporary until we migrate all code to use ServiceRegistry. // This is temporary until we migrate all code to use ServiceRegistry.
class Application; class Application;

View File

@@ -13,7 +13,7 @@ namespace xrpl {
namespace perf { namespace perf {
class PerfLog; class PerfLog;
} // namespace perf }
/** /**
* `Workers` is effectively a thread pool. The constructor takes a "callback" * `Workers` is effectively a thread pool. The constructor takes a "callback"
@@ -183,8 +183,8 @@ private:
std::thread thread_; std::thread thread_;
std::mutex mutex_; std::mutex mutex_;
std::condition_variable wakeup_; std::condition_variable wakeup_;
int wakeCount_{0}; // how many times to un-pause int wakeCount_; // how many times to un-pause
bool shouldExit_{false}; bool shouldExit_;
}; };
private: private:
@@ -197,9 +197,9 @@ private:
std::string m_threadNames; // The name to give each thread std::string m_threadNames; // The name to give each thread
std::condition_variable m_cv; // signaled when all threads paused std::condition_variable m_cv; // signaled when all threads paused
std::mutex m_mut; std::mutex m_mut;
bool m_allPaused{true}; bool m_allPaused;
semaphore m_semaphore; // each pending task is 1 resource semaphore m_semaphore; // each pending task is 1 resource
int m_numberOfThreads{0}; // how many we want active now int m_numberOfThreads; // how many we want active now
std::atomic<int> m_activeCount; // to know when all are paused std::atomic<int> m_activeCount; // to know when all are paused
std::atomic<int> m_pauseCount; // how many threads need to pause now std::atomic<int> m_pauseCount; // how many threads need to pause now
std::atomic<int> m_runningTaskCount; // how many calls to processTask() active std::atomic<int> m_runningTaskCount; // how many calls to processTask() active

View File

@@ -55,7 +55,7 @@ public:
void void
notify() notify()
{ {
std::lock_guard const lock{m_mutex}; std::lock_guard lock{m_mutex};
++m_count; ++m_count;
m_cond.notify_one(); m_cond.notify_one();
} }

View File

@@ -103,9 +103,9 @@ private:
public: public:
explicit ErrorInfo() = default; explicit ErrorInfo() = default;
Token token_{}; Token token_;
std::string message_; std::string message_;
Location extra_{}; Location extra_;
}; };
using Errors = std::deque<ErrorInfo>; using Errors = std::deque<ErrorInfo>;
@@ -173,11 +173,11 @@ private:
Nodes nodes_; Nodes nodes_;
Errors errors_; Errors errors_;
std::string document_; std::string document_;
Location begin_{}; Location begin_;
Location end_{}; Location end_;
Location current_{}; Location current_;
Location lastValueEnd_{}; Location lastValueEnd_;
Value* lastValue_{}; Value* lastValue_;
}; };
template <class BufferSequence> template <class BufferSequence>

Some files were not shown because too many files have changed in this diff Show More