mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 10:35:50 +00:00
Compare commits
10 Commits
pratik/Add
...
bthomee/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b00f1d600 | ||
|
|
690dced2c8 | ||
|
|
b0556e1ee1 | ||
|
|
3faff9f7a6 | ||
|
|
09c61d6fc4 | ||
|
|
7141781db4 | ||
|
|
802ac5629f | ||
|
|
2f15909ffa | ||
|
|
9184b7274c | ||
|
|
54a19a0e8d |
1
.github/actions/build-deps/action.yml
vendored
1
.github/actions/build-deps/action.yml
vendored
@@ -38,7 +38,6 @@ runs:
|
||||
mkdir -p "${BUILD_DIR}"
|
||||
cd "${BUILD_DIR}"
|
||||
conan install \
|
||||
--profile ci \
|
||||
--output-folder . \
|
||||
--build="${BUILD_OPTION}" \
|
||||
--options:host='&:tests=True' \
|
||||
|
||||
2
.github/actions/setup-conan/action.yml
vendored
2
.github/actions/setup-conan/action.yml
vendored
@@ -28,7 +28,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'Installing profile.'
|
||||
conan config install conan/profiles/ -tf $(conan config home)/profiles/
|
||||
conan config install conan/profiles/default -tf $(conan config home)/profiles/
|
||||
|
||||
echo 'Conan profile:'
|
||||
conan profile show
|
||||
|
||||
7
.github/scripts/rename/README.md
vendored
7
.github/scripts/rename/README.md
vendored
@@ -26,6 +26,11 @@ run from the repository root.
|
||||
references to `ripple` and `rippled` (with or without capital letters) to
|
||||
`xrpl` and `xrpld`, respectively. The name of the binary will remain as-is,
|
||||
and will only be renamed to `xrpld` by a later script.
|
||||
4. `.github/scripts/rename/binary.sh`: This script will rename the binary from
|
||||
`rippled` to `xrpld`, and reverses the symlink so that `rippled` points to
|
||||
the `xrpld` binary.
|
||||
5. `.github/scripts/rename/namespace.sh`: This script will rename the C++
|
||||
namespaces from `ripple` to `xrpl`.
|
||||
|
||||
You can run all these scripts from the repository root as follows:
|
||||
|
||||
@@ -33,4 +38,6 @@ You can run all these scripts from the repository root as follows:
|
||||
./.github/scripts/rename/definitions.sh .
|
||||
./.github/scripts/rename/copyright.sh .
|
||||
./.github/scripts/rename/cmake.sh .
|
||||
./.github/scripts/rename/binary.sh .
|
||||
./.github/scripts/rename/namespace.sh .
|
||||
```
|
||||
|
||||
42
.github/scripts/rename/binary.sh
vendored
Executable file
42
.github/scripts/rename/binary.sh
vendored
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/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 changes the binary name from `rippled` to `xrpld`, and reverses
|
||||
# the symlink that currently points from `xrpld` to `rippled` so that it points
|
||||
# from `rippled` to `xrpld` instead.
|
||||
# Usage: .github/scripts/rename/binary.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}
|
||||
|
||||
# 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
|
||||
|
||||
# Reverse the symlink.
|
||||
${SED_COMMAND} -i -E 's@create_symbolic_link\(rippled@create_symbolic_link(xrpld@' cmake/XrplInstall.cmake
|
||||
${SED_COMMAND} -i -E 's@/xrpld\$\{suffix\}@/rippled${suffix}@' cmake/XrplInstall.cmake
|
||||
|
||||
popd
|
||||
echo "Processing complete."
|
||||
54
.github/scripts/rename/namespace.sh
vendored
Executable file
54
.github/scripts/rename/namespace.sh
vendored
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/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 the `ripple` namespace to `xrpl` in this project.
|
||||
# Specifically, it renames all occurrences of `namespace ripple` and `ripple::`
|
||||
# to `namespace xrpl` and `xrpl::`, respectively, by scanning all header and
|
||||
# source files in the specified directory and its subdirectories, as well as any
|
||||
# occurrences in the documentation.
|
||||
# Usage: .github/scripts/rename/namespace.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}
|
||||
|
||||
DIRECTORIES=("include" "src" "tests")
|
||||
for DIRECTORY in "${DIRECTORIES[@]}"; do
|
||||
echo "Processing directory: ${DIRECTORY}"
|
||||
|
||||
find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" \) | while read -r FILE; do
|
||||
echo "Processing file: ${FILE}"
|
||||
${SED_COMMAND} -i 's/namespace ripple/namespace xrpl/g' "${FILE}"
|
||||
${SED_COMMAND} -i 's/ripple::/xrpl::/g' "${FILE}"
|
||||
done
|
||||
done
|
||||
|
||||
DIRECTORY=$1
|
||||
find "${DIRECTORY}" -type f -name "*.md" | while read -r FILE; do
|
||||
echo "Processing file: ${FILE}"
|
||||
${SED_COMMAND} -i 's/ripple::/xrpl::/g' "${FILE}"
|
||||
done
|
||||
|
||||
popd
|
||||
echo "Renaming complete."
|
||||
146
.github/scripts/strategy-matrix/generate.py
vendored
146
.github/scripts/strategy-matrix/generate.py
vendored
@@ -57,18 +57,18 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||
if os['distro_name'] == 'debian':
|
||||
skip = True
|
||||
if os['distro_version'] == 'bookworm':
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'gcc-13' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-13' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
cmake_args = f'-DUNIT_TEST_REFERENCE_FEE=500 {cmake_args}'
|
||||
skip = False
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'gcc-15' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-15' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
skip = False
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'clang-16' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-16' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||
cmake_args = f'-Dvoidstar=ON {cmake_args}'
|
||||
skip = False
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'clang-17' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-17' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
cmake_args = f'-DUNIT_TEST_REFERENCE_FEE=1000 {cmake_args}'
|
||||
skip = False
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'clang-20' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
skip = False
|
||||
if skip:
|
||||
continue
|
||||
@@ -79,10 +79,10 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||
if os['distro_name'] == 'rhel':
|
||||
skip = True
|
||||
if os['distro_version'] == '9':
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'gcc-12' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-12' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
skip = False
|
||||
elif os['distro_version'] == '10':
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'clang-any' and build_type == 'Release' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-any' and build_type == 'Release' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
skip = False
|
||||
if skip:
|
||||
continue
|
||||
@@ -95,14 +95,14 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||
if os['distro_name'] == 'ubuntu':
|
||||
skip = True
|
||||
if os['distro_version'] == 'jammy':
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'gcc-12' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-12' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||
skip = False
|
||||
elif os['distro_version'] == 'noble':
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'gcc-14' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-14' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
skip = False
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'clang-18' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-18' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
skip = False
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'clang-19' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-19' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/arm64':
|
||||
skip = False
|
||||
if skip:
|
||||
continue
|
||||
@@ -117,9 +117,10 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||
if os['distro_name'] == 'windows' and not (build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'windows/amd64'):
|
||||
continue
|
||||
|
||||
|
||||
# Additional CMake arguments.
|
||||
cmake_args = f'{cmake_args} -Dtests=ON -Dwerr=ON -Dxrpld=ON'
|
||||
if not f'{os["compiler_name"]}-{os["compiler_version"]}' in ['gcc-12', 'clang-16']:
|
||||
if not f'{os['compiler_name']}-{os['compiler_version']}' in ['gcc-12', 'clang-16']:
|
||||
cmake_args = f'{cmake_args} -Dwextra=ON'
|
||||
if build_type == 'Release':
|
||||
cmake_args = f'{cmake_args} -Dassert=ON'
|
||||
@@ -129,16 +130,14 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||
if os['distro_name'] == 'rhel' and architecture['platform'] == 'linux/arm64':
|
||||
continue
|
||||
|
||||
# We skip all clang 20+ on arm64 due to Boost build error.
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' in ['clang-20', 'clang-21'] and architecture['platform'] == 'linux/arm64':
|
||||
# We skip all clang-20 on arm64 due to boost 1.86 build error
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and architecture['platform'] == 'linux/arm64':
|
||||
continue
|
||||
|
||||
cxx_flags = '-g'
|
||||
# Enable code coverage for Debian Bookworm using GCC 14 in Debug and no
|
||||
# Enable code coverage for Debian Bookworm using GCC 15 in Debug and no
|
||||
# Unity on linux/amd64
|
||||
if f'{os["compiler_name"]}-{os["compiler_version"]}' == 'gcc-14' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
cmake_args = f'-Dcoverage=ON -Dcoverage_format=xml -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_C_FLAGS=-O0 {cmake_args}'
|
||||
cxx_flags = f'-O0 {cxx_flags}'
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-15' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
|
||||
cmake_args = f'-Dcoverage=ON -Dcoverage_format=xml -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_C_FLAGS=-O0 -DCMAKE_CXX_FLAGS=-O0 {cmake_args}'
|
||||
|
||||
# Generate a unique name for the configuration, e.g. macos-arm64-debug
|
||||
# or debian-bookworm-gcc-12-amd64-release-unity.
|
||||
@@ -149,7 +148,7 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||
config_name += f'-{n}'
|
||||
if (n := os['compiler_version']) != '':
|
||||
config_name += f'-{n}'
|
||||
config_name += f'-{architecture["platform"][architecture["platform"].find("/")+1:]}'
|
||||
config_name += f'-{architecture['platform'][architecture['platform'].find('/')+1:]}'
|
||||
config_name += f'-{build_type.lower()}'
|
||||
if '-Dunity=ON' in cmake_args:
|
||||
config_name += '-unity'
|
||||
@@ -157,104 +156,15 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||
# Add the configuration to the list, with the most unique fields first,
|
||||
# so that they are easier to identify in the GitHub Actions UI, as long
|
||||
# names get truncated.
|
||||
# Add Address and Thread (both coupled with UB) sanitizers when the distro is bookworm.
|
||||
if os['distro_version'] == 'bookworm' and f'{os["compiler_name"]}-{os["compiler_version"]}' in {'gcc-15', 'clang-20'}:
|
||||
extra_warning_flags = ''
|
||||
linker_relocation_flags = ''
|
||||
linker_flags = ''
|
||||
|
||||
# Use large code model to avoid relocation errors with large binaries
|
||||
# Only for x86-64 (amd64) - ARM64 doesn't support -mcmodel=large
|
||||
if architecture['platform'] == 'linux/amd64' and os['compiler_name'] == 'gcc':
|
||||
# Add -mcmodel=large and -fPIC to both compiler AND linker flags
|
||||
# This is needed because sanitizers create very large binaries
|
||||
# -fPIC enables position independent code to avoid relocation range issues
|
||||
# large model removes the 2GB limitation that medium model has
|
||||
cxx_flags += ' -mcmodel=large -fPIC'
|
||||
linker_relocation_flags+=' -mcmodel=large -fPIC'
|
||||
|
||||
# Create default sanitizer flags
|
||||
sanitizers_flags = 'undefined,float-divide-by-zero'
|
||||
|
||||
if os['compiler_name'] == 'gcc':
|
||||
sanitizers_flags = f'{sanitizers_flags},signed-integer-overflow'
|
||||
# Suppress false positive warnings in GCC with stringop-overflow
|
||||
extra_warning_flags += ' -Wno-stringop-overflow'
|
||||
# Disable mold, gold and lld linkers.
|
||||
# Use default linker (bfd/ld) which is more lenient with mixed code models
|
||||
cmake_args += ' -Duse_mold=OFF -Duse_gold=OFF -Duse_lld=OFF'
|
||||
# Add linker flags for Sanitizers
|
||||
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="{linker_relocation_flags} -fsanitize=address,{sanitizers_flags}"'
|
||||
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="{linker_relocation_flags} -fsanitize=address,{sanitizers_flags}"'
|
||||
elif os['compiler_name'] == 'clang':
|
||||
sanitizers_flags = f'{sanitizers_flags},signed-integer-overflow,unsigned-integer-overflow'
|
||||
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,{sanitizers_flags}"'
|
||||
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address,{sanitizers_flags}"'
|
||||
|
||||
# Sanitizers recommend minimum of -O1 for reasonable performance
|
||||
if "-O0" in cxx_flags:
|
||||
cxx_flags = cxx_flags.replace("-O0", "-O1")
|
||||
else:
|
||||
cxx_flags += " -O1"
|
||||
|
||||
# First create config for asan
|
||||
cmake_args_flags = f'{cmake_args} -DCMAKE_CXX_FLAGS="-fsanitize=address,{sanitizers_flags} -fno-omit-frame-pointer {cxx_flags} {extra_warning_flags}" {linker_flags}'
|
||||
|
||||
# Add config with asan
|
||||
configurations.append({
|
||||
'config_name': config_name + "_asan",
|
||||
'cmake_args': cmake_args_flags,
|
||||
'cmake_target': cmake_target,
|
||||
'build_only': build_only,
|
||||
'build_type': build_type,
|
||||
'os': os,
|
||||
'architecture': architecture
|
||||
})
|
||||
|
||||
linker_flags = ''
|
||||
# Update configs for tsan
|
||||
# gcc doesn't supports atomic_thread_fence with tsan. Suppress warnings.
|
||||
# Also tsan doesn't work well with mcmode=large and bfd linker
|
||||
if os['compiler_name'] == 'gcc':
|
||||
extra_warning_flags += ' -Wno-tsan'
|
||||
cxx_flags = cxx_flags.replace('-mcmodel=large', '-mcmodel=medium')
|
||||
linker_relocation_flags = linker_relocation_flags.replace('-mcmodel=large', '-mcmodel=medium')
|
||||
# Add linker flags for Sanitizers
|
||||
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="{linker_relocation_flags} -fsanitize=thread,{sanitizers_flags}"'
|
||||
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="{linker_relocation_flags} -fsanitize=thread,{sanitizers_flags}"'
|
||||
elif os['compiler_name'] == 'clang':
|
||||
cxx_flags += ' -fsanitize-blacklist=$GITHUB_WORKSPACE/external/sanitizer-blacklist.txt'
|
||||
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=thread,{sanitizers_flags}"'
|
||||
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=thread,{sanitizers_flags}"'
|
||||
|
||||
# Note: We use $GITHUB_WORKSPACE environment variable which will be expanded by the shell
|
||||
# before CMake processes it. This ensures the compiler receives an absolute path.
|
||||
# CMAKE_SOURCE_DIR won't work here because it's inside CMAKE_CXX_FLAGS string.
|
||||
cmake_args_flags = f'{cmake_args} -DCMAKE_CXX_FLAGS="-fsanitize=thread,{sanitizers_flags} -fno-omit-frame-pointer {cxx_flags} {extra_warning_flags}" {linker_flags}'
|
||||
|
||||
configurations.append({
|
||||
'config_name': config_name+ "_tsan",
|
||||
'cmake_args': cmake_args_flags,
|
||||
'cmake_target': cmake_target,
|
||||
'build_only': build_only,
|
||||
'build_type': build_type,
|
||||
'os': os,
|
||||
'architecture': architecture
|
||||
})
|
||||
else:
|
||||
if cxx_flags:
|
||||
cmake_args_flags = f'{cmake_args} -DCMAKE_CXX_FLAGS={cxx_flags}'
|
||||
else:
|
||||
cmake_args_flags = f'{cmake_args}'
|
||||
configurations.append({
|
||||
'config_name': config_name,
|
||||
'cmake_args': cmake_args_flags,
|
||||
'cmake_target': cmake_target,
|
||||
'build_only': build_only,
|
||||
'build_type': build_type,
|
||||
'os': os,
|
||||
'architecture': architecture
|
||||
})
|
||||
configurations.append({
|
||||
'config_name': config_name,
|
||||
'cmake_args': cmake_args,
|
||||
'cmake_target': cmake_target,
|
||||
'build_only': build_only,
|
||||
'build_type': build_type,
|
||||
'os': os,
|
||||
'architecture': architecture,
|
||||
})
|
||||
|
||||
return configurations
|
||||
|
||||
|
||||
46
.github/scripts/strategy-matrix/linux.json
vendored
46
.github/scripts/strategy-matrix/linux.json
vendored
@@ -15,91 +15,63 @@
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "12",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "13",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "14",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "15",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "16",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "17",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "18",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "19",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "20",
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "trixie",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "14",
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "trixie",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "15",
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "trixie",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "20",
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "trixie",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "21",
|
||||
"image_sha": "0525eae"
|
||||
"image_sha": "e1782cd"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
|
||||
31
.github/workflows/reusable-build-test-config.yml
vendored
31
.github/workflows/reusable-build-test-config.yml
vendored
@@ -68,7 +68,6 @@ jobs:
|
||||
env:
|
||||
ENABLED_VOIDSTAR: ${{ contains(inputs.cmake_args, '-Dvoidstar=ON') }}
|
||||
ENABLED_COVERAGE: ${{ contains(inputs.cmake_args, '-Dcoverage=ON') }}
|
||||
ENABLED_SANITIZERS: ${{ contains(inputs.cmake_args, '-fsanitize') }}
|
||||
steps:
|
||||
- name: Cleanup workspace (macOS and Windows)
|
||||
if: ${{ runner.os == 'macOS' || runner.os == 'Windows' }}
|
||||
@@ -108,12 +107,14 @@ jobs:
|
||||
working-directory: ${{ inputs.build_dir }}
|
||||
env:
|
||||
BUILD_TYPE: ${{ inputs.build_type }}
|
||||
CMAKE_ARGS: ${{ inputs.cmake_args }}
|
||||
run: |
|
||||
cmake .. \
|
||||
cmake \
|
||||
-G '${{ runner.os == 'Windows' && 'Visual Studio 17 2022' || 'Ninja' }}' \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||
${{ inputs.cmake_args }}
|
||||
${CMAKE_ARGS} \
|
||||
..
|
||||
|
||||
- name: Build the binary
|
||||
working-directory: ${{ inputs.build_dir }}
|
||||
@@ -128,23 +129,23 @@ jobs:
|
||||
--parallel "${BUILD_NPROC}" \
|
||||
--target "${CMAKE_TARGET}"
|
||||
|
||||
- name: Upload rippled artifact (Linux)
|
||||
- name: Upload the binary (Linux)
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
env:
|
||||
BUILD_DIR: ${{ inputs.build_dir }}
|
||||
with:
|
||||
name: rippled-${{ inputs.config_name }}
|
||||
path: ${{ env.BUILD_DIR }}/rippled
|
||||
name: xrpld-${{ inputs.config_name }}
|
||||
path: ${{ env.BUILD_DIR }}/xrpld
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Check linking (Linux)
|
||||
if: ${{ runner.os == 'Linux' && env.ENABLED_SANITIZERS == 'false' }}
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
working-directory: ${{ inputs.build_dir }}
|
||||
run: |
|
||||
ldd ./rippled
|
||||
if [ "$(ldd ./rippled | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then
|
||||
ldd ./xrpld
|
||||
if [ "$(ldd ./xrpld | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then
|
||||
echo 'The binary is statically linked.'
|
||||
else
|
||||
echo 'The binary is dynamically linked.'
|
||||
@@ -155,7 +156,7 @@ jobs:
|
||||
if: ${{ runner.os == 'Linux' && env.ENABLED_VOIDSTAR == 'true' }}
|
||||
working-directory: ${{ inputs.build_dir }}
|
||||
run: |
|
||||
./rippled --version | grep libvoidstar
|
||||
./xrpld --version | grep libvoidstar
|
||||
|
||||
- name: Run the separate tests
|
||||
if: ${{ !inputs.build_only }}
|
||||
@@ -165,10 +166,6 @@ jobs:
|
||||
BUILD_TYPE: ${{ inputs.build_type }}
|
||||
PARALLELISM: ${{ runner.os == 'Windows' && '1' || steps.nproc.outputs.nproc }}
|
||||
run: |
|
||||
export ASAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/external/asan.supp"
|
||||
export TSAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/external/tsan.supp"
|
||||
export UBSAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/external/ubsan.supp"
|
||||
export LSAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/external/lsan.supp"
|
||||
ctest \
|
||||
--output-on-failure \
|
||||
-C "${BUILD_TYPE}" \
|
||||
@@ -180,11 +177,7 @@ jobs:
|
||||
env:
|
||||
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
|
||||
run: |
|
||||
export ASAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/external/asan.supp"
|
||||
export TSAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/external/tsan.supp"
|
||||
export UBSAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/external/ubsan.supp"
|
||||
export LSAN_OPTIONS="suppressions=$GITHUB_WORKSPACE/external/lsan.supp"
|
||||
./rippled --unittest --unittest-jobs "${BUILD_NPROC}"
|
||||
./xrpld --unittest --unittest-jobs "${BUILD_NPROC}"
|
||||
|
||||
- name: Debug failure (Linux)
|
||||
if: ${{ failure() && runner.os == 'Linux' && !inputs.build_only }}
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
env:
|
||||
MESSAGE: |
|
||||
|
||||
The dependency relationships between the modules in rippled have
|
||||
The dependency relationships between the modules in xrpld have
|
||||
changed, which may be an improvement or a regression.
|
||||
|
||||
A rule of thumb is that if your changes caused something to be
|
||||
|
||||
4
.github/workflows/reusable-check-rename.yml
vendored
4
.github/workflows/reusable-check-rename.yml
vendored
@@ -25,6 +25,10 @@ jobs:
|
||||
run: .github/scripts/rename/copyright.sh .
|
||||
- name: Check CMake configs
|
||||
run: .github/scripts/rename/cmake.sh .
|
||||
- name: Check binary name
|
||||
run: .github/scripts/rename/binary.sh .
|
||||
- name: Check namespaces
|
||||
run: .github/scripts/rename/namespace.sh .
|
||||
- name: Check for differences
|
||||
env:
|
||||
MESSAGE: |
|
||||
|
||||
10
BUILD.md
10
BUILD.md
@@ -360,16 +360,6 @@ tools.build:cxxflags=['-DBOOST_ASIO_DISABLE_CONCEPTS']
|
||||
conan install .. --output-folder . --build missing --settings build_type=Debug
|
||||
```
|
||||
|
||||
If you would like to activate `asan+ubsan`(`Address`) or `tsan+ubsan`(`Thread`) for the build,
|
||||
declare an env. variable as follows and simply use the `sanitizers`
|
||||
profile in the `conan install` command.
|
||||
|
||||
```
|
||||
SANITIZERS=Address conan install .. --output-folder . --profile sanitizers --build missing --settings build_type=Debug
|
||||
```
|
||||
|
||||
Available options for SANITIZERS: `Address` and `Thread`
|
||||
|
||||
To build Debug, in the next step, be sure to set `-DCMAKE_BUILD_TYPE=Debug`
|
||||
|
||||
For a single-configuration generator, e.g. `Unix Makefiles` or `Ninja`,
|
||||
|
||||
@@ -299,7 +299,7 @@ For this reason:
|
||||
- Example **bad** name
|
||||
`"RFC1751::insert(char* s, int x, int start, int length) : length is greater than or equal zero"`
|
||||
(missing namespace, unnecessary full function signature, description too verbose).
|
||||
Good name: `"ripple::RFC1751::insert : minimum length"`.
|
||||
Good name: `"xrpl::RFC1751::insert : minimum length"`.
|
||||
- In **few** well-justified cases a non-standard name can be used, in which case a
|
||||
comment should be placed to explain the rationale (example in `contract.cpp`)
|
||||
- Do **not** rename a contract without a good reason (e.g. the name no longer
|
||||
|
||||
@@ -223,6 +223,4 @@ if(xrpld)
|
||||
src/test/ledger/Invariants_test.cpp
|
||||
PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
|
||||
endif()
|
||||
# For the time being, we will keep the name of the binary as it was.
|
||||
set_target_properties(xrpld PROPERTIES OUTPUT_NAME "rippled")
|
||||
endif()
|
||||
|
||||
@@ -67,8 +67,8 @@ if (is_root_project AND TARGET xrpld)
|
||||
install(CODE "
|
||||
set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")
|
||||
include(create_symbolic_link)
|
||||
create_symbolic_link(rippled${suffix} \
|
||||
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/xrpld${suffix})
|
||||
create_symbolic_link(xrpld${suffix} \
|
||||
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/rippled${suffix})
|
||||
")
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
include(./sanitizers)
|
||||
@@ -1,50 +0,0 @@
|
||||
include(./default)
|
||||
{% set compiler, version, compiler_exe = detect_api.detect_default_compiler() %}
|
||||
|
||||
{% set default_sanitizer_flags = "undefined,float-divide-by-zero,signed-integer-overflow" %}
|
||||
{% set sanitizers = os.getenv("SANITIZERS") %}
|
||||
|
||||
[settings]
|
||||
{% if sanitizers == "Address" or sanitizers == "Thread" %}
|
||||
user.package:sanitizers={{ sanitizers }}
|
||||
tools.info.package_ids:confs+=["user.package:sanitizers"]
|
||||
{% endif %}
|
||||
|
||||
[conf]
|
||||
|
||||
{% if compiler == "gcc" %}
|
||||
|
||||
{% set asan_sanitizer_flags = "-fsanitize=address,"~default_sanitizer_flags~" -mcmodel=large -fPIC" %}
|
||||
{% set tsan_sanitizer_flags = "-fsanitize=thread,"~default_sanitizer_flags~" -mcmodel=medium -fPIC" %}
|
||||
|
||||
{% if sanitizers == "Address" %}
|
||||
tools.build:cxxflags+=['{{asan_sanitizer_flags}} -fno-omit-frame-pointer -O1 -Wno-stringop-overflow']
|
||||
tools.build:sharedlinkflags+=['{{asan_sanitizer_flags}}']
|
||||
tools.build:exelinkflags+=['{{asan_sanitizer_flags}}']
|
||||
tools.cmake.cmaketoolchain:extra_variables={"use_mold": "OFF", "use_gold": "OFF", "use_lld": "OFF"}
|
||||
|
||||
{% elif sanitizers == "Thread" %}
|
||||
tools.build:cxxflags+=['{{tsan_sanitizer_flags}} -fno-omit-frame-pointer -O1 -Wno-stringop-overflow -Wno-tsan']
|
||||
tools.build:sharedlinkflags+=['{{tsan_sanitizer_flags}}']
|
||||
tools.build:exelinkflags+=['{{tsan_sanitizer_flags}}']
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elif compiler == "apple-clang" or compiler == "clang" %}
|
||||
|
||||
{% set asan_sanitizer_flags = "-fsanitize=address,"~default_sanitizer_flags~",unsigned-integer-overflow -fPIC" %}
|
||||
{% set tsan_sanitizer_flags = "-fsanitize=thread,"~default_sanitizer_flags~",unsigned-integer-overflow -fPIC" %}
|
||||
{% if sanitizers == "Address" %}
|
||||
tools.build:cxxflags+=['{{asan_sanitizer_flags}} -fno-omit-frame-pointer -O1']
|
||||
tools.build:sharedlinkflags+=['{{asan_sanitizer_flags}}']
|
||||
tools.build:exelinkflags+=['{{asan_sanitizer_flags}}']
|
||||
|
||||
{% elif sanitizers == "Thread" %}
|
||||
tools.build:cxxflags+=['{{tsan_sanitizer_flags}} -fno-omit-frame-pointer -O1']
|
||||
tools.build:sharedlinkflags+=['{{tsan_sanitizer_flags}}']
|
||||
tools.build:exelinkflags+=['{{tsan_sanitizer_flags}}']
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
16
external/asan.supp
vendored
16
external/asan.supp
vendored
@@ -1,16 +0,0 @@
|
||||
# Suppress voilations in Boost libraries
|
||||
interceptor_via_lib:^libboost_.*
|
||||
# Suprpress voilations in external code
|
||||
interceptor_name:^external/.*
|
||||
|
||||
# Boost
|
||||
interceptor_name:.*/boost/asio/.*
|
||||
|
||||
# Leaks in Doctests
|
||||
interceptor_name:.*/src/libxrpl/net/HTTPClient.cpp
|
||||
interceptor_name:.*/src/libxrpl/net/RegisterSSLCerts.cpp
|
||||
interceptor_name:.*/src/tests/libxrpl/net/HTTPClient.cpp
|
||||
interceptor_name:.*/xrpl/net/AutoSocket.h
|
||||
interceptor_name:.*/xrpl/net/HTTPClient.h
|
||||
interceptor_name:.*/xrpl/net/HTTPClientSSLContext.h
|
||||
interceptor_name:.*/xrpl/net/RegisterSSLCerts.h
|
||||
12
external/lsan.supp
vendored
12
external/lsan.supp
vendored
@@ -1,12 +0,0 @@
|
||||
leak:.*/src/libxrpl/net/HTTPClient.cpp
|
||||
leak:.*/src/libxrpl/net/RegisterSSLCerts.cpp
|
||||
leak:.*/src/tests/libxrpl/net/HTTPClient.cpp
|
||||
leak:.*/xrpl/net/AutoSocket.h
|
||||
leak:.*/xrpl/net/HTTPClient.h
|
||||
leak:.*/xrpl/net/HTTPClientSSLContext.h
|
||||
leak:.*/xrpl/net/RegisterSSLCerts.h
|
||||
leak:ripple::HTTPClient
|
||||
leak:ripple::HTTPClientImp
|
||||
|
||||
leak:.*boost::asio::.*
|
||||
leak:.*/boost/asio/.*
|
||||
5
external/sanitizer-blacklist.txt
vendored
5
external/sanitizer-blacklist.txt
vendored
@@ -1,5 +0,0 @@
|
||||
[thread]
|
||||
src:.*/src/libxrpl/beast/utility/beast_Journal.cpp
|
||||
src:.*/src/libxrpl/beast/utility/beast_PropertyStream.cpp
|
||||
src:.*/src/test/beast/beast_PropertyStream_test.cpp
|
||||
src:.*/src/xrpld/core/detail/Workers.cpp
|
||||
67
external/tsan.supp
vendored
67
external/tsan.supp
vendored
@@ -1,67 +0,0 @@
|
||||
called_from_lib:^libboost_.*
|
||||
# Suppress race in Boost ASIO scheduler detected by GCC-15
|
||||
# This is a false positive in Boost's internal pipe() synchronization
|
||||
race:.*/boost/asio/.*
|
||||
race:.*/boost/context/.*
|
||||
race:.*/boost/asio/executor.hpp
|
||||
race:.*boost::asio::.*
|
||||
|
||||
race:.*/src/libxrpl/basics/make_SSLContext.cpp
|
||||
race:.*/src/libxrpl/basics/Number.cpp
|
||||
race:.*/src/libxrpl/json/json_value.cpp
|
||||
race:.*/src/libxrpl/json/to_string.cpp
|
||||
race:.*/src/libxrpl/ledger/OpenView.cpp
|
||||
race:.*/src/libxrpl/net/HTTPClient.cpp
|
||||
race:.*/src/libxrpl/nodestore/backend/NuDBFactory.cpp
|
||||
race:.*/src/libxrpl/protocol/InnerObjectFormats.cpp
|
||||
race:.*/src/libxrpl/protocol/STParsedJSON.cpp
|
||||
race:.*/src/libxrpl/resource/ResourceManager.cpp
|
||||
race:.*/src/test/app/Flow_test.cpp
|
||||
race:.*/src/test/app/LedgerReplay_test.cpp
|
||||
race:.*/src/test/app/NFToken_test.cpp
|
||||
race:.*/src/test/app/Offer_test.cpp
|
||||
race:.*/src/test/app/ValidatorSite_test.cpp
|
||||
race:.*/src/test/consensus/NegativeUNL_test.cpp
|
||||
race:.*/src/test/jtx/impl/Env.cpp
|
||||
race:.*/src/test/jtx/impl/JSONRPCClient.cpp
|
||||
race:.*/src/test/jtx/impl/pay.cpp
|
||||
race:.*/src/test/jtx/impl/token.cpp
|
||||
race:.*/src/test/rpc/Book_test.cpp
|
||||
race:.*/src/xrpld/app/ledger/detail/InboundTransactions.cpp
|
||||
race:.*/src/xrpld/app/main/Application.cpp
|
||||
race:.*/src/xrpld/app/main/BasicApp.cpp
|
||||
race:.*/src/xrpld/app/main/GRPCServer.cpp
|
||||
race:.*/src/xrpld/app/misc/detail/AmendmentTable.cpp
|
||||
race:.*/src/xrpld/app/misc/FeeVoteImpl.cpp
|
||||
race:.*/src/xrpld/app/rdb/detail/Wallet.cpp
|
||||
race:.*/src/xrpld/overlay/detail/OverlayImpl.cpp
|
||||
race:.*/src/xrpld/peerfinder/detail/PeerfinderManager.cpp
|
||||
race:.*/src/xrpld/peerfinder/detail/SourceStrings.cpp
|
||||
race:.*/src/xrpld/rpc/detail/ServerHandler.cpp
|
||||
race:.*/xrpl/server/detail/Door.h
|
||||
race:.*/xrpl/server/detail/Spawn.h
|
||||
race:.*/xrpl/server/detail/ServerImpl.h
|
||||
race:.*/xrpl/nodestore/detail/DatabaseNodeImp.h
|
||||
race:.*/src/libxrpl/beast/utility/beast_Journal.cpp
|
||||
race:.*/src/test/beast/LexicalCast_test.cpp
|
||||
|
||||
race:crtstuff.c
|
||||
race:pipe
|
||||
race:ripple::ServerHandler
|
||||
|
||||
# Deadlock / lock-order-inversion suppressions
|
||||
# Note: GCC's TSAN may not fully support all deadlock suppression patterns
|
||||
deadlock:.*/src/libxrpl/beast/utility/beast_Journal.cpp
|
||||
deadlock:.*/src/libxrpl/beast/utility/beast_PropertyStream.cpp
|
||||
deadlock:.*/src/test/beast/beast_PropertyStream_test.cpp
|
||||
deadlock:.*/src/xrpld/core/detail/Workers.cpp
|
||||
|
||||
# Suppress lock-order-inversion in recursive_mutex operations
|
||||
deadlock:std::recursive_mutex::lock
|
||||
deadlock:__gthread_recursive_mutex_lock
|
||||
deadlock:pthread_mutex_lock
|
||||
|
||||
# Suppress by function names involved in the lock-order-inversion
|
||||
deadlock:*PropertyStream*
|
||||
deadlock:*find_one*
|
||||
deadlock:*find_one_deep*
|
||||
161
external/ubsan.supp
vendored
161
external/ubsan.supp
vendored
@@ -1,161 +0,0 @@
|
||||
# Suppress UBSan errors in external code by source file path
|
||||
# This matches any source file under the external/ directory
|
||||
|
||||
alignment:external/*
|
||||
bool:external/*
|
||||
bounds:external/*
|
||||
cfi:external/*
|
||||
enum:external/*
|
||||
float-cast-overflow:external/*
|
||||
float-divide-by-zero:external/*
|
||||
function:external/*
|
||||
implicit-integer-sign-change:external/*
|
||||
implicit-signed-integer-truncation::external/*
|
||||
implicit-signed-integer-truncation:external/*
|
||||
implicit-unsigned-integer-truncation:external/*
|
||||
integer-divide-by-zero:external/*
|
||||
invalid-builtin-use:external/*
|
||||
invalid-objc-cast:external/*
|
||||
nonnull-attribute:external/*
|
||||
null:external/*
|
||||
nullability-arg:external/*
|
||||
nullability-assign:external/*
|
||||
nullability-return:external/*
|
||||
object-size:external/*
|
||||
pointer-overflow:external/*
|
||||
return:external/*
|
||||
returns-nonnull-attribute:external/*
|
||||
shift-base:external/*
|
||||
shift-exponent:external/*
|
||||
signed-integer-overflow:external/*
|
||||
undefined:external/*
|
||||
unreachable:external/*
|
||||
unsigned-integer-overflow:external/*
|
||||
vla-bound:external/*
|
||||
vptr_check:external/*
|
||||
vptr:external/*
|
||||
|
||||
# Suppress all UBSan errors in Boost libraries
|
||||
# This matches any files containing "boost" in its path or name
|
||||
alignment:.*/boost/*
|
||||
bool:.*/boost/*
|
||||
bounds:.*/boost/*
|
||||
cfi:.*/boost/*
|
||||
enum:.*/boost/*
|
||||
float-cast-overflow:.*/boost/*
|
||||
float-divide-by-zero:.*/boost/*
|
||||
function:.*/boost/*
|
||||
implicit-integer-sign-change:.*/boost/*
|
||||
implicit-signed-integer-truncation:.*/boost/*
|
||||
implicit-unsigned-integer-truncation:.*/boost/*
|
||||
integer-divide-by-zero:.*/boost/*
|
||||
invalid-builtin-use:.*/boost/*
|
||||
invalid-objc-cast:.*/boost/*
|
||||
nonnull-attribute:.*/boost/*
|
||||
null:.*/boost/*
|
||||
nullability-arg:.*/boost/*
|
||||
nullability-assign:.*/boost/*
|
||||
nullability-return:.*/boost/*
|
||||
object-size:.*/boost/*
|
||||
pointer-overflow:.*/boost/*
|
||||
return:.*/boost/*
|
||||
returns-nonnull-attribute:.*/boost/*
|
||||
shift-base:.*/boost/*
|
||||
shift-exponent:.*/boost/*
|
||||
signed-integer-overflow:.*/boost/*
|
||||
undefined:.*/boost/*
|
||||
unreachable:.*/boost/*
|
||||
unsigned-integer-overflow:.*/boost/*
|
||||
vla-bound:.*/boost/*
|
||||
vptr_check:.*/boost/*
|
||||
vptr:.*/boost/*
|
||||
|
||||
# basic_string.h:483:51: runtime error: unsigned integer overflow
|
||||
unsigned-integer-overflow:.*/basic_string.h
|
||||
unsigned-integer-overflow:.*/bits/chrono.h
|
||||
unsigned-integer-overflow:.*/bits/random.h
|
||||
unsigned-integer-overflow:.*/bits/random.tcc
|
||||
unsigned-integer-overflow:.*/bits/stl_algobase.h
|
||||
unsigned-integer-overflow:.*/bits/uniform_int_dist.h
|
||||
unsigned-integer-overflow:.*/string_view
|
||||
|
||||
# runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'std::size_t' (aka 'unsigned long')
|
||||
unsigned-integer-overflow:.*/src/libxrpl/basics/base64.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/basics/Number.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/crypto/RFC1751.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/json/json_value.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/ledger/ApplyView.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/ledger/View.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/protocol/Permissions.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/protocol/STAmount.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/protocol/STPathSet.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/protocol/tokens.cpp
|
||||
unsigned-integer-overflow:.*/src/libxrpl/shamap/SHAMap.cpp
|
||||
unsigned-integer-overflow:.*/src/test/app/Batch_test.cpp
|
||||
unsigned-integer-overflow:.*/src/test/app/Invariants_test.cpp
|
||||
unsigned-integer-overflow:.*/src/test/app/NFToken_test.cpp
|
||||
unsigned-integer-overflow:.*/src/test/app/Offer_test.cpp
|
||||
unsigned-integer-overflow:.*/src/test/app/Path_test.cpp
|
||||
unsigned-integer-overflow:.*/src/test/basics/XRPAmount_test.cpp
|
||||
unsigned-integer-overflow:.*/src/test/beast/LexicalCast_test.cpp
|
||||
unsigned-integer-overflow:.*/src/test/jtx/impl/acctdelete.cpp
|
||||
unsigned-integer-overflow:.*/src/test/ledger/SkipList_test.cpp
|
||||
unsigned-integer-overflow:.*/src/test/rpc/Subscribe_test.cpp
|
||||
unsigned-integer-overflow:.*/src/tests/libxrpl/basics/RangeSet.cpp
|
||||
unsigned-integer-overflow:.*/src/xrpld/app/main/BasicApp.cpp
|
||||
unsigned-integer-overflow:.*/src/xrpld/app/misc/detail/AmendmentTable.cpp
|
||||
unsigned-integer-overflow:.*/src/xrpld/app/misc/NetworkOPs.cpp
|
||||
unsigned-integer-overflow:.*/src/xrpld/app/paths/detail/StrandFlow.h
|
||||
unsigned-integer-overflow:.*/src/xrpld/app/tx/detail/NFTokenMint.cpp
|
||||
unsigned-integer-overflow:.*/src/xrpld/app/tx/detail/SetOracle.cpp
|
||||
unsigned-integer-overflow:.*/src/xrpld/rpc/detail/Role.cpp
|
||||
unsigned-integer-overflow:.*/src/xrpld/rpc/handlers/GetAggregatePrice.cpp
|
||||
unsigned-integer-overflow:.*/xrpl/basics/base_uint.h
|
||||
unsigned-integer-overflow:.*/xrpl/basics/DecayingSample.h
|
||||
unsigned-integer-overflow:.*/xrpl/beast/test/yield_to.h
|
||||
unsigned-integer-overflow:.*/xrpl/beast/xor_shift_engine.h
|
||||
unsigned-integer-overflow:.*/xrpl/nodestore/detail/varint.h
|
||||
unsigned-integer-overflow:.*/xrpl/peerfinder/detail/Counts.h
|
||||
unsigned-integer-overflow:.*/xrpl/protocol/nft.h
|
||||
|
||||
# Signed integer overflow suppressions
|
||||
signed-integer-overflow:.*/src/test/beast/LexicalCast_test.cpp
|
||||
|
||||
# External library suppressions
|
||||
unsigned-integer-overflow:.*/nudb/detail/xxhash.hpp
|
||||
|
||||
undefined:.*/src/libxrpl/basics/base64.cpp
|
||||
undefined:.*/src/libxrpl/basics/Number.cpp
|
||||
undefined:.*/src/libxrpl/crypto/RFC1751.cpp
|
||||
undefined:.*/src/libxrpl/ledger/ApplyView.cpp
|
||||
undefined:.*/src/libxrpl/ledger/View.cpp
|
||||
undefined:.*/src/libxrpl/protocol/Permissions.cpp
|
||||
undefined:.*/src/libxrpl/protocol/STAmount.cpp
|
||||
undefined:.*/src/libxrpl/protocol/STPathSet.cpp
|
||||
undefined:.*/src/libxrpl/protocol/tokens.cpp
|
||||
undefined:.*/src/libxrpl/shamap/SHAMap.cpp
|
||||
undefined:.*/src/test/app/Batch_test.cpp
|
||||
undefined:.*/src/test/app/Invariants_test.cpp
|
||||
undefined:.*/src/test/app/NFToken_test.cpp
|
||||
undefined:.*/src/test/app/Offer_test.cpp
|
||||
undefined:.*/src/test/app/Path_test.cpp
|
||||
undefined:.*/src/test/basics/XRPAmount_test.cpp
|
||||
undefined:.*/src/test/beast/LexicalCast_test.cpp
|
||||
undefined:.*/src/test/jtx/impl/acctdelete.cpp
|
||||
undefined:.*/src/test/ledger/SkipList_test.cpp
|
||||
undefined:.*/src/test/rpc/Subscribe_test.cpp
|
||||
undefined:.*/src/xrpld/app/main/BasicApp.cpp
|
||||
undefined:.*/src/xrpld/app/misc/detail/AmendmentTable.cpp
|
||||
undefined:.*/src/xrpld/app/misc/NetworkOPs.cpp
|
||||
undefined:.*/src/xrpld/app/paths/detail/StrandFlow.h
|
||||
undefined:.*/src/xrpld/app/tx/detail/NFTokenMint.cpp
|
||||
undefined:.*/src/xrpld/app/tx/detail/SetOracle.cpp
|
||||
undefined:.*/src/xrpld/rpc/detail/Role.cpp
|
||||
undefined:.*/src/xrpld/rpc/handlers/GetAggregatePrice.cpp
|
||||
undefined:.*/xrpl/basics/base_uint.h
|
||||
undefined:.*/xrpl/basics/DecayingSample.h
|
||||
undefined:.*/xrpl/beast/test/yield_to.h
|
||||
undefined:.*/xrpl/beast/xor_shift_engine.h
|
||||
undefined:.*/xrpl/nodestore/detail/varint.h
|
||||
undefined:.*/xrpl/peerfinder/detail/Counts.h
|
||||
undefined:.*/xrpl/protocol/nft.h
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Extract a tar archive compressed with lz4
|
||||
|
||||
@@ -17,6 +17,6 @@ extractTarLz4(
|
||||
boost::filesystem::path const& src,
|
||||
boost::filesystem::path const& dst);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
using IniFileSections =
|
||||
std::unordered_map<std::string, std::vector<std::string>>;
|
||||
@@ -380,6 +380,6 @@ get_if_exists<bool>(Section const& section, std::string const& name, bool& v)
|
||||
return stat;
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Storage for linear binary data.
|
||||
Blocks of binary data appear often in various idioms and structures.
|
||||
*/
|
||||
using Blob = std::vector<unsigned char>;
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Like std::vector<char> but better.
|
||||
Meets the requirements of BufferFactory.
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
XRPL_ASSERT(
|
||||
s.size() == 0 || size_ == 0 || s.data() < p_.get() ||
|
||||
s.data() >= p_.get() + size_,
|
||||
"ripple::Buffer::operator=(Slice) : input not a subset");
|
||||
"xrpl::Buffer::operator=(Slice) : input not a subset");
|
||||
|
||||
if (auto p = alloc(s.size()))
|
||||
std::memcpy(p, s.data(), s.size());
|
||||
@@ -215,6 +215,6 @@ operator!=(Buffer const& lhs, Buffer const& rhs) noexcept
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef XRPL_BASICS_BYTEUTILITIES_H_INCLUDED
|
||||
#define XRPL_BASICS_BYTEUTILITIES_H_INCLUDED
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
template <class T>
|
||||
constexpr auto
|
||||
@@ -19,6 +19,6 @@ megabytes(T value) noexcept
|
||||
|
||||
static_assert(kilobytes(2) == 2048, "kilobytes(2) == 2048");
|
||||
static_assert(megabytes(3) == 3145728, "megabytes(3) == 3145728");
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace compression_algorithms {
|
||||
|
||||
@@ -144,6 +144,6 @@ lz4Decompress(
|
||||
|
||||
} // namespace compression_algorithms
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif // XRPL_COMPRESSIONALGORITHMS_H_INCLUDED
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Manages all counted object types. */
|
||||
class CountedObjects
|
||||
@@ -133,6 +133,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Sampling function using exponential decay to provide a continuous value.
|
||||
@tparam The number of seconds in the decay window.
|
||||
@@ -131,6 +131,6 @@ private:
|
||||
time_point when_;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Expected is an approximation of std::expected (hoped for in C++23)
|
||||
|
||||
@@ -232,6 +232,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif // XRPL_BASICS_EXPECTED_H_INCLUDED
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
std::string
|
||||
getFileContents(
|
||||
@@ -20,6 +20,6 @@ writeFileContents(
|
||||
boost::filesystem::path const& destPath,
|
||||
std::string const& contents);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -492,5 +492,5 @@ dynamic_pointer_cast(TT const& v)
|
||||
return SharedPtr<T>(DynamicCastTagSharedIntrusive{}, v);
|
||||
}
|
||||
} // namespace intr_ptr
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
template <class T>
|
||||
template <CAdoptTag TAdoptTag>
|
||||
@@ -608,7 +608,7 @@ SharedWeakUnion<T>::convertToStrong()
|
||||
[[maybe_unused]] auto action = p->releaseWeakRef();
|
||||
XRPL_ASSERT(
|
||||
(action == ReleaseWeakRefAction::noop),
|
||||
"ripple::SharedWeakUnion::convertToStrong : "
|
||||
"xrpl::SharedWeakUnion::convertToStrong : "
|
||||
"action is noop");
|
||||
unsafeSetRawPtr(p, RefStrength::strong);
|
||||
return true;
|
||||
@@ -637,7 +637,7 @@ SharedWeakUnion<T>::convertToWeak()
|
||||
// We just added a weak ref. How could we destroy?
|
||||
// LCOV_EXCL_START
|
||||
UNREACHABLE(
|
||||
"ripple::SharedWeakUnion::convertToWeak : destroying freshly "
|
||||
"xrpl::SharedWeakUnion::convertToWeak : destroying freshly "
|
||||
"added ref");
|
||||
delete p;
|
||||
unsafeSetRawPtr(nullptr);
|
||||
@@ -719,5 +719,5 @@ SharedWeakUnion<T>::unsafeReleaseNoStore()
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Action to perform when releasing a strong pointer.
|
||||
|
||||
@@ -34,7 +34,7 @@ enum class ReleaseWeakRefAction { noop, destroy };
|
||||
/** Implement the strong count, weak count, and bit flags for an intrusive
|
||||
pointer.
|
||||
|
||||
A class can satisfy the requirements of a ripple::IntrusivePointer by
|
||||
A class can satisfy the requirements of a xrpl::IntrusivePointer by
|
||||
inheriting from this class.
|
||||
*/
|
||||
struct IntrusiveRefCounts
|
||||
@@ -257,7 +257,7 @@ IntrusiveRefCounts::releaseStrongRef() const
|
||||
RefCountPair const prevVal{prevIntVal};
|
||||
XRPL_ASSERT(
|
||||
(prevVal.strong >= strongDelta),
|
||||
"ripple::IntrusiveRefCounts::releaseStrongRef : previous ref "
|
||||
"xrpl::IntrusiveRefCounts::releaseStrongRef : previous ref "
|
||||
"higher than new");
|
||||
auto nextIntVal = prevIntVal - strongDelta;
|
||||
ReleaseStrongRefAction action = noop;
|
||||
@@ -282,7 +282,7 @@ IntrusiveRefCounts::releaseStrongRef() const
|
||||
// twice.
|
||||
XRPL_ASSERT(
|
||||
(action == noop) || !(prevIntVal & partialDestroyStartedMask),
|
||||
"ripple::IntrusiveRefCounts::releaseStrongRef : not in partial "
|
||||
"xrpl::IntrusiveRefCounts::releaseStrongRef : not in partial "
|
||||
"destroy");
|
||||
return action;
|
||||
}
|
||||
@@ -314,7 +314,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const
|
||||
// can't happen twice.
|
||||
XRPL_ASSERT(
|
||||
(!prevVal.partialDestroyStartedBit),
|
||||
"ripple::IntrusiveRefCounts::addWeakReleaseStrongRef : not in "
|
||||
"xrpl::IntrusiveRefCounts::addWeakReleaseStrongRef : not in "
|
||||
"partial destroy");
|
||||
|
||||
auto nextIntVal = prevIntVal + delta;
|
||||
@@ -336,7 +336,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
(!(prevIntVal & partialDestroyStartedMask)),
|
||||
"ripple::IntrusiveRefCounts::addWeakReleaseStrongRef : not "
|
||||
"xrpl::IntrusiveRefCounts::addWeakReleaseStrongRef : not "
|
||||
"started partial destroy");
|
||||
return action;
|
||||
}
|
||||
@@ -408,11 +408,11 @@ inline IntrusiveRefCounts::~IntrusiveRefCounts() noexcept
|
||||
auto v = refCounts.load(std::memory_order_acquire);
|
||||
XRPL_ASSERT(
|
||||
(!(v & valueMask)),
|
||||
"ripple::IntrusiveRefCounts::~IntrusiveRefCounts : count must be zero");
|
||||
"xrpl::IntrusiveRefCounts::~IntrusiveRefCounts : count must be zero");
|
||||
auto t = v & tagMask;
|
||||
XRPL_ASSERT(
|
||||
(!t || t == tagMask),
|
||||
"ripple::IntrusiveRefCounts::~IntrusiveRefCounts : valid tag");
|
||||
"xrpl::IntrusiveRefCounts::~IntrusiveRefCounts : valid tag");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ inline IntrusiveRefCounts::RefCountPair::RefCountPair(
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
(strong < checkStrongMaxValue && weak < checkWeakMaxValue),
|
||||
"ripple::IntrusiveRefCounts::RefCountPair(FieldType) : inputs inside "
|
||||
"xrpl::IntrusiveRefCounts::RefCountPair(FieldType) : inputs inside "
|
||||
"range");
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ inline IntrusiveRefCounts::RefCountPair::RefCountPair(
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
(strong < checkStrongMaxValue && weak < checkWeakMaxValue),
|
||||
"ripple::IntrusiveRefCounts::RefCountPair(CountType, CountType) : "
|
||||
"xrpl::IntrusiveRefCounts::RefCountPair(CountType, CountType) : "
|
||||
"inputs inside range");
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ IntrusiveRefCounts::RefCountPair::combinedValue() const noexcept
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
(strong < checkStrongMaxValue && weak < checkWeakMaxValue),
|
||||
"ripple::IntrusiveRefCounts::RefCountPair::combinedValue : inputs "
|
||||
"xrpl::IntrusiveRefCounts::RefCountPair::combinedValue : inputs "
|
||||
"inside range");
|
||||
return (static_cast<IntrusiveRefCounts::FieldType>(weak)
|
||||
<< IntrusiveRefCounts::StrongCountNumBits) |
|
||||
@@ -465,7 +465,7 @@ partialDestructorFinished(T** o)
|
||||
XRPL_ASSERT(
|
||||
(!p.partialDestroyFinishedBit && p.partialDestroyStartedBit &&
|
||||
!p.strong),
|
||||
"ripple::partialDestructorFinished : not a weak ref");
|
||||
"xrpl::partialDestructorFinished : not a weak ref");
|
||||
if (!p.weak)
|
||||
{
|
||||
// There was a weak count before the partial destructor ran (or we would
|
||||
@@ -479,5 +479,5 @@ partialDestructorFinished(T** o)
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
#endif
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#include <xrpl/basics/TaggedCache.h>
|
||||
#include <xrpl/basics/base_uint.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
using KeyCache = TaggedCache<uint256, int, true>;
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif // XRPL_BASICS_KEYCACHE_H
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -109,6 +109,6 @@ LocalValue<T>::operator*()
|
||||
.emplace(this, std::make_unique<detail::LocalValues::Value<T>>(t_))
|
||||
.first->second->get());
|
||||
}
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <mutex>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
// DEPRECATED use beast::severities::Severity instead
|
||||
enum LogSeverity {
|
||||
@@ -271,6 +271,6 @@ setDebugLogSink(std::unique_ptr<beast::Journal::Sink> sink);
|
||||
beast::Journal
|
||||
debugLog();
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Calculate one number divided by another number in percentage.
|
||||
* The result is rounded up to the next integer, and capped in the range [0,100]
|
||||
@@ -44,6 +44,6 @@ static_assert(calculatePercent(50'000'000, 100'000'000) == 50);
|
||||
static_assert(calculatePercent(50'000'001, 100'000'000) == 51);
|
||||
static_assert(calculatePercent(99'999'999, 100'000'000) == 100);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
class Number;
|
||||
|
||||
@@ -404,6 +404,6 @@ public:
|
||||
operator=(NumberRoundModeGuard const&) = delete;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif // XRPL_BASICS_NUMBER_H_INCLUDED
|
||||
|
||||
@@ -21,11 +21,11 @@ ripple/basic should contain no dependencies on other modules.
|
||||
- `std::set`
|
||||
- For sorted containers.
|
||||
|
||||
- `ripple::hash_set`
|
||||
- `xrpl::hash_set`
|
||||
- Where inserts and contains need to be O(1).
|
||||
- For "small" sets, `std::set` might be faster and smaller.
|
||||
|
||||
- `ripple::hardened_hash_set`
|
||||
- `xrpl::hardened_hash_set`
|
||||
- For data sets where the key could be manipulated by an attacker
|
||||
in an attempt to mount an algorithmic complexity attack: see
|
||||
http://en.wikipedia.org/wiki/Algorithmic_complexity_attack
|
||||
@@ -33,5 +33,5 @@ ripple/basic should contain no dependencies on other modules.
|
||||
The following container is deprecated
|
||||
|
||||
- `std::unordered_set`
|
||||
- Use `ripple::hash_set` instead, which uses a better hashing algorithm.
|
||||
- Or use `ripple::hardened_hash_set` to prevent algorithmic complexity attacks.
|
||||
- Use `xrpl::hash_set` instead, which uses a better hashing algorithm.
|
||||
- Or use `xrpl::hardened_hash_set` to prevent algorithmic complexity attacks.
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** A closed interval over the domain T.
|
||||
|
||||
@@ -85,7 +85,7 @@ to_string(RangeSet<T> const& rs)
|
||||
|
||||
std::string s;
|
||||
for (auto const& interval : rs)
|
||||
s += ripple::to_string(interval) + ",";
|
||||
s += xrpl::to_string(interval) + ",";
|
||||
s.pop_back();
|
||||
|
||||
return s;
|
||||
@@ -172,6 +172,6 @@ prevMissing(RangeSet<T> const& rs, T t, T minVal = 0)
|
||||
return boost::icl::last(tgt);
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
class Resolver
|
||||
{
|
||||
@@ -47,6 +47,6 @@ public:
|
||||
/** @} */
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
class ResolverAsio : public Resolver
|
||||
{
|
||||
@@ -17,6 +17,6 @@ public:
|
||||
New(boost::asio::io_context&, beast::Journal);
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
// A SHAMapHash is the hash of a node in a SHAMap, and also the
|
||||
// type of the hash of the entire SHAMap.
|
||||
@@ -97,6 +97,6 @@ extract(SHAMapHash const& key)
|
||||
return *reinterpret_cast<std::size_t const*>(key.as_uint256().data());
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif // XRPL_BASICS_SHAMAP_HASH_H_INCLUDED
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <memory>
|
||||
#include <variant>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** A combination of a std::shared_ptr and a std::weak_pointer.
|
||||
|
||||
@@ -112,5 +112,5 @@ public:
|
||||
private:
|
||||
std::variant<std::shared_ptr<T>, std::weak_ptr<T>> combo_;
|
||||
};
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <xrpl/basics/SharedWeakCachePointer.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
template <class T>
|
||||
SharedWeakCachePointer<T>::SharedWeakCachePointer(
|
||||
SharedWeakCachePointer const& rhs) = default;
|
||||
@@ -169,5 +169,5 @@ SharedWeakCachePointer<T>::convertToWeak()
|
||||
|
||||
return false;
|
||||
}
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
template <typename Type>
|
||||
class SlabAllocator
|
||||
@@ -128,7 +128,7 @@ class SlabAllocator
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
own(ptr),
|
||||
"ripple::SlabAllocator::SlabBlock::deallocate : own input");
|
||||
"xrpl::SlabAllocator::SlabBlock::deallocate : own input");
|
||||
|
||||
std::lock_guard l(m_);
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
(itemAlignment_ & (itemAlignment_ - 1)) == 0,
|
||||
"ripple::SlabAllocator::SlabAllocator : valid alignment");
|
||||
"xrpl::SlabAllocator::SlabAllocator : valid alignment");
|
||||
}
|
||||
|
||||
SlabAllocator(SlabAllocator const& other) = delete;
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
ptr,
|
||||
"ripple::SlabAllocator::SlabAllocator::deallocate : non-null "
|
||||
"xrpl::SlabAllocator::SlabAllocator::deallocate : non-null "
|
||||
"input");
|
||||
|
||||
for (auto slab = slabs_.load(); slab != nullptr; slab = slab->next_)
|
||||
@@ -419,6 +419,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif // XRPL_BASICS_SLABALLOCATOR_H_INCLUDED
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** An immutable linear range of bytes.
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
i < size_,
|
||||
"ripple::Slice::operator[](std::size_t) const : valid input");
|
||||
"xrpl::Slice::operator[](std::size_t) const : valid input");
|
||||
return data_[i];
|
||||
}
|
||||
|
||||
@@ -243,6 +243,6 @@ makeSlice(std::basic_string<char, Traits, Alloc> const& s)
|
||||
return Slice(s.data(), s.size());
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Format arbitrary binary data as an SQLite "blob literal".
|
||||
|
||||
@@ -132,6 +132,6 @@ to_uint64(std::string const& s);
|
||||
bool
|
||||
isProperlyFormedTomlDomain(std::string_view domain);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Map/cache combination.
|
||||
This class implements a cache and a map. The cache keeps objects alive
|
||||
@@ -315,6 +315,6 @@ private:
|
||||
std::uint64_t m_misses;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <xrpl/basics/IntrusivePointer.ipp>
|
||||
#include <xrpl/basics/TaggedCache.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
@@ -1005,6 +1005,6 @@ TaggedCache<
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** to_string() generalizes std::to_string to handle bools, chars, and strings.
|
||||
|
||||
@@ -43,6 +43,6 @@ to_string(char const* s)
|
||||
return s;
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* what container it is.
|
||||
*/
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
// hash containers
|
||||
|
||||
@@ -102,6 +102,6 @@ template <
|
||||
using hardened_hash_multiset =
|
||||
std::unordered_multiset<Value, Hash, Pred, Allocator>;
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <ratio>
|
||||
#include <thread>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Tracks program uptime to seconds precision.
|
||||
|
||||
@@ -45,6 +45,6 @@ private:
|
||||
start_clock();
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
// Requires: [first1, last1) and [first2, last2) are ordered ranges according to
|
||||
// comp.
|
||||
@@ -95,6 +95,6 @@ remove_if_intersect_or_match(
|
||||
return first1;
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
std::string
|
||||
base64_encode(std::uint8_t const* data, std::size_t len);
|
||||
@@ -53,6 +53,6 @@ base64_encode(std::string const& s)
|
||||
std::string
|
||||
base64_decode(std::string_view data);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <cstring>
|
||||
#include <type_traits>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
c.size() * sizeof(typename Container::value_type) == size(),
|
||||
"ripple::base_uint::base_uint(Container auto) : input size match");
|
||||
"xrpl::base_uint::base_uint(Container auto) : input size match");
|
||||
std::memcpy(data_.data(), c.data(), size());
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
c.size() * sizeof(typename Container::value_type) == size(),
|
||||
"ripple::base_uint::operator=(Container auto) : input size match");
|
||||
"xrpl::base_uint::operator=(Container auto) : input size match");
|
||||
std::memcpy(data_.data(), c.data(), size());
|
||||
return *this;
|
||||
}
|
||||
@@ -648,12 +648,12 @@ static_assert(sizeof(uint192) == 192 / 8, "There should be no padding bytes");
|
||||
static_assert(sizeof(uint256) == 256 / 8, "There should be no padding bytes");
|
||||
#endif
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <std::size_t Bits, class Tag>
|
||||
struct is_uniquely_represented<ripple::base_uint<Bits, Tag>>
|
||||
struct is_uniquely_represented<xrpl::base_uint<Bits, Tag>>
|
||||
: public std::true_type
|
||||
{
|
||||
explicit is_uniquely_represented() = default;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <ratio>
|
||||
#include <string>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
// A few handy aliases
|
||||
|
||||
@@ -104,6 +104,6 @@ stopwatch()
|
||||
return beast::get_abstract_clock<Facade, Clock>();
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
@@ -52,6 +52,6 @@ using equal_to = std::equal_to<T>;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/* Programming By Contract
|
||||
|
||||
@@ -52,6 +52,6 @@ Throw(Args&&... args)
|
||||
[[noreturn]] void
|
||||
LogicError(std::string const& how) noexcept;
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <random>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -92,6 +92,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
template <class Stream, class Iter>
|
||||
Stream&
|
||||
@@ -85,6 +85,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Create a self-signed SSL context that allows anonymous Diffie Hellman. */
|
||||
std::shared_ptr<boost::asio::ssl::context>
|
||||
@@ -19,6 +19,6 @@ make_SSLContextAuthed(
|
||||
std::string const& chainFile,
|
||||
std::string const& cipherList);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <limits>
|
||||
#include <optional>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
auto constexpr muldiv_max = std::numeric_limits<std::uint64_t>::max();
|
||||
|
||||
/** Return value*mul/div accurately.
|
||||
@@ -21,6 +21,6 @@ auto constexpr muldiv_max = std::numeric_limits<std::uint64_t>::max();
|
||||
std::optional<std::uint64_t>
|
||||
mulDiv(std::uint64_t value, std::uint64_t mul, std::uint64_t div);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
template <typename Key>
|
||||
static std::size_t
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
map_.resize(partitions_);
|
||||
XRPL_ASSERT(
|
||||
partitions_,
|
||||
"ripple::partitioned_unordered_map::partitioned_unordered_map : "
|
||||
"xrpl::partitioned_unordered_map::partitioned_unordered_map : "
|
||||
"nonzero partitions");
|
||||
}
|
||||
|
||||
@@ -401,6 +401,6 @@ private:
|
||||
mutable partition_map_type map_{};
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif // XRPL_BASICS_PARTITIONED_UNORDERED_MAP_H
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <random>
|
||||
#include <type_traits>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
#ifndef __INTELLISENSE__
|
||||
static_assert(
|
||||
@@ -95,7 +95,7 @@ std::enable_if_t<
|
||||
Integral>
|
||||
rand_int(Engine& engine, Integral min, Integral max)
|
||||
{
|
||||
XRPL_ASSERT(max > min, "ripple::rand_int : max over min inputs");
|
||||
XRPL_ASSERT(max > min, "xrpl::rand_int : max over min inputs");
|
||||
|
||||
// This should have no state and constructing it should
|
||||
// be very cheap. If that turns out not to be the case
|
||||
@@ -186,6 +186,6 @@ rand_bool()
|
||||
}
|
||||
/** @} */
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif // XRPL_BASICS_RANDOM_H_INCLUDED
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
// safe_cast adds compile-time checks to a static_cast to ensure that
|
||||
// the destination can hold all values of the source. This is particularly
|
||||
@@ -80,6 +80,6 @@ inline constexpr std::
|
||||
return unsafe_cast<Dest>(static_cast<std::underlying_type_t<Src>>(s));
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
// RAII scope helpers. As specified in Library Fundamental, Version 3
|
||||
// Basic design of idea: https://www.youtube.com/watch?v=WjTrfoiB0MQ
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
plock->owns_lock(),
|
||||
"ripple::scope_unlock::scope_unlock : mutex must be locked");
|
||||
"xrpl::scope_unlock::scope_unlock : mutex must be locked");
|
||||
plock->unlock();
|
||||
}
|
||||
|
||||
@@ -236,6 +236,6 @@ public:
|
||||
template <class Mutex>
|
||||
scope_unlock(std::unique_lock<Mutex>&) -> scope_unlock<Mutex>;
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace detail {
|
||||
/** Inform the processor that we are in a tight spin-wait loop.
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
index >= 0 && (mask_ != 0),
|
||||
"ripple::packed_spinlock::packed_spinlock : valid index and mask");
|
||||
"xrpl::packed_spinlock::packed_spinlock : valid index and mask");
|
||||
}
|
||||
|
||||
[[nodiscard]] bool
|
||||
@@ -206,6 +206,6 @@ public:
|
||||
};
|
||||
/** @} */
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <boost/algorithm/hex.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
template <class FwdIt>
|
||||
std::string
|
||||
@@ -28,6 +28,6 @@ strHex(T const& from)
|
||||
return strHex(from.begin(), from.end());
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <iostream>
|
||||
#include <type_traits>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** A type-safe wrap around standard integral types
|
||||
|
||||
@@ -197,11 +197,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
namespace beast {
|
||||
template <class Int, class Tag, class HashAlgorithm>
|
||||
struct is_contiguously_hashable<ripple::tagged_integer<Int, Tag>, HashAlgorithm>
|
||||
struct is_contiguously_hashable<xrpl::tagged_integer<Int, Tag>, HashAlgorithm>
|
||||
: public is_contiguously_hashable<Int, HashAlgorithm>
|
||||
{
|
||||
explicit is_contiguously_hashable() = default;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
class RFC1751
|
||||
{
|
||||
@@ -42,6 +42,6 @@ private:
|
||||
static char const* s_dictionary[];
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** A cryptographically secure random number engine
|
||||
|
||||
@@ -70,6 +70,6 @@ public:
|
||||
csprng_engine&
|
||||
crypto_prng();
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Attempts to clear the given blob of memory.
|
||||
|
||||
@@ -22,6 +22,6 @@ namespace ripple {
|
||||
void
|
||||
secure_erase(void* dest, std::size_t bytes);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <xrpl/beast/utility/PropertyStream.h>
|
||||
#include <xrpl/json/json_value.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** A PropertyStream::Sink which produces a Json::Value of type objectValue. */
|
||||
class JsonPropertyStream : public beast::PropertyStream
|
||||
@@ -66,6 +66,6 @@ protected:
|
||||
add(std::string const& v) override;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -234,7 +234,7 @@ inline void
|
||||
check(bool condition, std::string const& message)
|
||||
{
|
||||
if (!condition)
|
||||
ripple::Throw<std::logic_error>(message);
|
||||
xrpl::Throw<std::logic_error>(message);
|
||||
}
|
||||
|
||||
} // namespace Json
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
|
||||
#define JSON_ASSERT_MESSAGE(condition, message) \
|
||||
if (!(condition)) \
|
||||
ripple::Throw<Json::error>(message);
|
||||
xrpl::Throw<Json::error>(message);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
Value(UInt value);
|
||||
Value(double value);
|
||||
Value(char const* value);
|
||||
Value(ripple::Number const& value);
|
||||
Value(xrpl::Number const& value);
|
||||
/** \brief Constructs a value from a static string.
|
||||
|
||||
* Like other value string constructor but do not duplicate the string for
|
||||
@@ -427,7 +427,7 @@ private:
|
||||
};
|
||||
|
||||
inline Value
|
||||
to_json(ripple::Number const& number)
|
||||
to_json(xrpl::Number const& number)
|
||||
{
|
||||
return to_string(number);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <xrpl/ledger/RawView.h>
|
||||
#include <xrpl/ledger/ReadView.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
enum ApplyFlags : std::uint32_t {
|
||||
tapNONE = 0x00,
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
{
|
||||
// LCOV_EXCL_START
|
||||
UNREACHABLE(
|
||||
"ripple::ApplyView::dirAppend : only Offers are appended to "
|
||||
"xrpl::ApplyView::dirAppend : only Offers are appended to "
|
||||
"book directories");
|
||||
// Only Offers are appended to book directories. Call dirInsert()
|
||||
// instead
|
||||
@@ -368,6 +368,6 @@ public:
|
||||
emptyDirDelete(Keylet const& directory);
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <xrpl/protocol/STAmount.h>
|
||||
#include <xrpl/protocol/TER.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Editable, discardable view that can build metadata for one tx.
|
||||
|
||||
@@ -75,6 +75,6 @@ private:
|
||||
std::optional<STAmount> deliver_;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <xrpl/beast/utility/Journal.h>
|
||||
#include <xrpl/ledger/ReadView.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
class BookDirs
|
||||
{
|
||||
@@ -89,6 +89,6 @@ private:
|
||||
static beast::Journal j_;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <xrpl/basics/base_uint.h>
|
||||
#include <xrpl/protocol/STLedgerEntry.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
using CachedSLEs = TaggedCache<uint256, SLE const>;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <mutex>
|
||||
#include <type_traits>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -164,6 +164,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <xrpl/protocol/STTx.h>
|
||||
#include <xrpl/protocol/TER.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
namespace credentials {
|
||||
|
||||
// These function will be used by the code that use DepositPreauth / Credentials
|
||||
@@ -93,6 +93,6 @@ verifyDepositPreauth(
|
||||
std::shared_ptr<SLE> const& sleDst,
|
||||
beast::Journal j);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <xrpl/ledger/ReadView.h>
|
||||
#include <xrpl/protocol/Indexes.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** A class that simplifies iterating ledger directory pages
|
||||
|
||||
@@ -108,6 +108,6 @@ private:
|
||||
std::vector<uint256>::const_iterator it_;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Open ledger construction tag.
|
||||
|
||||
@@ -252,6 +252,6 @@ public:
|
||||
std::shared_ptr<Serializer const> const& metaData) override;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -188,6 +188,6 @@ private:
|
||||
PaymentSandbox const* ps_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <xrpl/protocol/STLedgerEntry.h>
|
||||
#include <xrpl/protocol/Serializer.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Interface for ledger entry changes.
|
||||
|
||||
@@ -87,6 +87,6 @@ public:
|
||||
std::shared_ptr<Serializer const> const& metaData) = 0;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <optional>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -258,7 +258,7 @@ makeRulesGivenLedger(
|
||||
DigestAwareReadView const& ledger,
|
||||
std::unordered_set<uint256, beast::uhash<>> const& presets);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#include <xrpl/ledger/detail/ReadViewFwdRange.ipp>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <xrpl/ledger/RawView.h>
|
||||
#include <xrpl/ledger/detail/ApplyViewBase.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Discardable, editable view to a ledger.
|
||||
|
||||
@@ -39,6 +39,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
enum class WaiveTransferFee : bool { No = false, Yes };
|
||||
enum class SkipEntry : bool { No = false, Yes };
|
||||
@@ -958,6 +958,6 @@ sharesToAssetsWithdraw(
|
||||
bool
|
||||
after(NetClock::time_point now, std::uint32_t mark);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
namespace detail {
|
||||
|
||||
// Helper class that buffers modifications
|
||||
@@ -139,6 +139,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <xrpl/ledger/detail/ApplyStateTable.h>
|
||||
#include <xrpl/protocol/XRPAmount.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
namespace detail {
|
||||
|
||||
class ApplyViewBase : public ApplyView, public RawView
|
||||
@@ -106,6 +106,6 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
namespace detail {
|
||||
|
||||
// Helper class that buffers raw modifications
|
||||
@@ -118,6 +118,6 @@ private:
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
class ReadView;
|
||||
|
||||
@@ -130,6 +130,6 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef XRPL_LEDGER_READVIEWFWDRANGEINL_H_INCLUDED
|
||||
#define XRPL_LEDGER_READVIEWFWDRANGEINL_H_INCLUDED
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
namespace detail {
|
||||
|
||||
template <class ValueType>
|
||||
@@ -63,7 +63,7 @@ ReadViewFwdRange<ValueType>::iterator::operator==(iterator const& other) const
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
view_ == other.view_,
|
||||
"ripple::detail::ReadViewFwdRange::iterator::operator==(iterator) "
|
||||
"xrpl::detail::ReadViewFwdRange::iterator::operator==(iterator) "
|
||||
"const : input view match");
|
||||
|
||||
if (impl_ != nullptr && other.impl_ != nullptr)
|
||||
@@ -115,6 +115,6 @@ ReadViewFwdRange<ValueType>::iterator::operator++(int) -> iterator
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -269,7 +269,7 @@ protected:
|
||||
error_code const& ec,
|
||||
size_t bytesTransferred)
|
||||
{
|
||||
using namespace ripple;
|
||||
using namespace xrpl;
|
||||
|
||||
if (ec)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
/** Provides an asynchronous HTTP client implementation with optional SSL.
|
||||
*/
|
||||
@@ -75,6 +75,6 @@ public:
|
||||
beast::Journal& j);
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <boost/asio/ssl.hpp>
|
||||
#include <boost/format.hpp>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
class HTTPClientSSLContext
|
||||
{
|
||||
@@ -176,6 +176,6 @@ private:
|
||||
bool const verify_;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <boost/asio/ssl/context.hpp>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
/** Register default SSL certificates.
|
||||
|
||||
Register the system default SSL root certificates. On linux/mac,
|
||||
@@ -19,6 +19,6 @@ registerSSLCerts(
|
||||
boost::system::error_code&,
|
||||
beast::Journal j);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user