mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 02:25:52 +00:00
Compare commits
122 Commits
ximinez/le
...
pratik/Add
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2610e653d6 | ||
|
|
b6c313bb94 | ||
|
|
a3e42a0d11 | ||
|
|
92a6c986b3 | ||
|
|
dd0408ac53 | ||
|
|
0fcfcd059e | ||
|
|
4c0f7a337a | ||
|
|
640f9ff5e2 | ||
|
|
42cab6c826 | ||
|
|
9267756944 | ||
|
|
3b1e82b412 | ||
|
|
7d7c659822 | ||
|
|
a58df41a4d | ||
|
|
d01b1da80e | ||
|
|
3fb6acd29e | ||
|
|
77b7cef5a7 | ||
|
|
216ecf67e1 | ||
|
|
d8c8900fbb | ||
|
|
e2c75f5d60 | ||
|
|
2428c5c196 | ||
|
|
d8ff72b342 | ||
|
|
4fc5c00c24 | ||
|
|
2c187461cc | ||
|
|
5a9014912c | ||
|
|
8006a1e967 | ||
|
|
6610f469df | ||
|
|
9f026929cf | ||
|
|
a9d134af85 | ||
|
|
18b9b9da19 | ||
|
|
6a89a544fe | ||
|
|
427771775e | ||
|
|
67946f4993 | ||
|
|
8d8a0cb970 | ||
|
|
89f9ede1f5 | ||
|
|
aac1076d83 | ||
|
|
c0da02814b | ||
|
|
013ff18fce | ||
|
|
e1403d56ef | ||
|
|
58b248d9a4 | ||
|
|
f1561c5b48 | ||
|
|
73ab466029 | ||
|
|
4cf4802971 | ||
|
|
8d6d2ec455 | ||
|
|
4248a1fbb6 | ||
|
|
7edba0a856 | ||
|
|
b38ef53c44 | ||
|
|
baee65bd28 | ||
|
|
2e53c5ab80 | ||
|
|
09a6e46c39 | ||
|
|
a93052e765 | ||
|
|
1cc00cddd8 | ||
|
|
5f2a351e3f | ||
|
|
5e89bce8d9 | ||
|
|
9b793cd429 | ||
|
|
b650852fa7 | ||
|
|
1d76de83f6 | ||
|
|
ea4d062e68 | ||
|
|
dcd0553050 | ||
|
|
6355eba88e | ||
|
|
2e5afa7556 | ||
|
|
7d05090d68 | ||
|
|
916f00039c | ||
|
|
e687ab8653 | ||
|
|
b182b6abf7 | ||
|
|
509d388f97 | ||
|
|
fd712770e1 | ||
|
|
695f4a2cc9 | ||
|
|
5ea3b4327d | ||
|
|
a9444d3a42 | ||
|
|
20326a785b | ||
|
|
5ef2ced584 | ||
|
|
a011d29fcb | ||
|
|
9abec17536 | ||
|
|
2bc089a962 | ||
|
|
14f605b2f9 | ||
|
|
f2365543fb | ||
|
|
d9c26bd7a9 | ||
|
|
937dc8740e | ||
|
|
9b92aafe6d | ||
|
|
124b6ca4bd | ||
|
|
28885a4638 | ||
|
|
5478e4fee6 | ||
|
|
72b3a03538 | ||
|
|
18b65fd129 | ||
|
|
ebf917ab15 | ||
|
|
2178fb919f | ||
|
|
e156ed40ba | ||
|
|
db5aa2d277 | ||
|
|
e347da9fac | ||
|
|
6b8d5b57e1 | ||
|
|
0029210926 | ||
|
|
832c32d15c | ||
|
|
39adc5a82b | ||
|
|
1f88697f54 | ||
|
|
4a0fc0f686 | ||
|
|
f5b473ccd1 | ||
|
|
71212677c0 | ||
|
|
abfaac5c64 | ||
|
|
cb5a76589e | ||
|
|
d077141d75 | ||
|
|
1eb3cc4ec7 | ||
|
|
34b10b87e6 | ||
|
|
c0ecb9a0cd | ||
|
|
c15d6399fb | ||
|
|
0b1bd42cc0 | ||
|
|
30f7ef7676 | ||
|
|
e7da05e44c | ||
|
|
1cdd0bf63e | ||
|
|
48a3e5ea31 | ||
|
|
10a422dd69 | ||
|
|
b150feaab6 | ||
|
|
ada523071f | ||
|
|
ff0284e984 | ||
|
|
0be98ac610 | ||
|
|
83eb93f5d7 | ||
|
|
db74cebc8b | ||
|
|
3b32210ef4 | ||
|
|
21b9f6d1af | ||
|
|
977a087bb3 | ||
|
|
e95299dac5 | ||
|
|
7ae3a85f21 | ||
|
|
c38b5aa2d4 |
1
.github/actions/build-deps/action.yml
vendored
1
.github/actions/build-deps/action.yml
vendored
@@ -38,6 +38,7 @@ 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/default -tf $(conan config home)/profiles/
|
||||
conan config install conan/profiles/ -tf $(conan config home)/profiles/
|
||||
|
||||
echo 'Conan profile:'
|
||||
conan profile show
|
||||
|
||||
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,10 +117,9 @@ 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'
|
||||
@@ -130,14 +129,16 @@ 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 1.86 build error
|
||||
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and architecture['platform'] == 'linux/arm64':
|
||||
# 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':
|
||||
continue
|
||||
|
||||
# Enable code coverage for Debian Bookworm using GCC 15 in Debug and no
|
||||
cxx_flags = '-g'
|
||||
# Enable code coverage for Debian Bookworm using GCC 14 in Debug and no
|
||||
# Unity on 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':
|
||||
cmake_args = f'-Dcoverage=ON -Dcoverage_format=xml -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_C_FLAGS=-O0 -DCMAKE_CXX_FLAGS=-O0 {cmake_args}'
|
||||
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}'
|
||||
|
||||
# Generate a unique name for the configuration, e.g. macos-arm64-debug
|
||||
# or debian-bookworm-gcc-12-amd64-release-unity.
|
||||
@@ -148,7 +149,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'
|
||||
@@ -156,15 +157,104 @@ 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.
|
||||
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,
|
||||
})
|
||||
# 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
|
||||
})
|
||||
|
||||
return configurations
|
||||
|
||||
|
||||
46
.github/scripts/strategy-matrix/linux.json
vendored
46
.github/scripts/strategy-matrix/linux.json
vendored
@@ -15,63 +15,91 @@
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "12",
|
||||
"image_sha": "e1782cd"
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "13",
|
||||
"image_sha": "e1782cd"
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "14",
|
||||
"image_sha": "e1782cd"
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "15",
|
||||
"image_sha": "e1782cd"
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "16",
|
||||
"image_sha": "e1782cd"
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "17",
|
||||
"image_sha": "e1782cd"
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "18",
|
||||
"image_sha": "e1782cd"
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "19",
|
||||
"image_sha": "e1782cd"
|
||||
"image_sha": "0525eae"
|
||||
},
|
||||
{
|
||||
"distro_name": "debian",
|
||||
"distro_version": "bookworm",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "20",
|
||||
"image_sha": "e1782cd"
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
|
||||
17
.github/workflows/reusable-build-test-config.yml
vendored
17
.github/workflows/reusable-build-test-config.yml
vendored
@@ -68,6 +68,7 @@ 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' }}
|
||||
@@ -107,14 +108,12 @@ 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}" \
|
||||
${CMAKE_ARGS} \
|
||||
..
|
||||
${{ inputs.cmake_args }}
|
||||
|
||||
- name: Build the binary
|
||||
working-directory: ${{ inputs.build_dir }}
|
||||
@@ -141,7 +140,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Check linking (Linux)
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
if: ${{ runner.os == 'Linux' && env.ENABLED_SANITIZERS == 'false' }}
|
||||
working-directory: ${{ inputs.build_dir }}
|
||||
run: |
|
||||
ldd ./rippled
|
||||
@@ -166,6 +165,10 @@ 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}" \
|
||||
@@ -177,6 +180,10 @@ 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}"
|
||||
|
||||
- name: Debug failure (Linux)
|
||||
|
||||
10
BUILD.md
10
BUILD.md
@@ -360,6 +360,16 @@ 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`,
|
||||
|
||||
1
conan/profiles/ci
Normal file
1
conan/profiles/ci
Normal file
@@ -0,0 +1 @@
|
||||
include(./sanitizers)
|
||||
50
conan/profiles/sanitizers
Normal file
50
conan/profiles/sanitizers
Normal file
@@ -0,0 +1,50 @@
|
||||
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
Normal file
16
external/asan.supp
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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
Normal file
12
external/lsan.supp
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
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
Normal file
5
external/sanitizer-blacklist.txt
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
[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
Normal file
67
external/tsan.supp
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
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
Normal file
161
external/ubsan.supp
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
# 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
|
||||
@@ -66,7 +66,6 @@ XRPL_FEATURE(XRPFees, Supported::yes, VoteBehavior::DefaultNo
|
||||
XRPL_FEATURE(DisallowIncoming, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FIX (RemoveNFTokenAutoTrustLine, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(FlowSortStrands, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(NegativeUNL, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(RequireFullyCanonicalSig, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(DeletableAccounts, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(Checks, Supported::yes, VoteBehavior::DefaultYes)
|
||||
@@ -130,6 +129,7 @@ XRPL_RETIRE_FEATURE(HardenedValidations)
|
||||
XRPL_RETIRE_FEATURE(ImmediateOfferKilled)
|
||||
XRPL_RETIRE_FEATURE(MultiSign)
|
||||
XRPL_RETIRE_FEATURE(MultiSignReserve)
|
||||
XRPL_RETIRE_FEATURE(NegativeUNL)
|
||||
XRPL_RETIRE_FEATURE(NonFungibleTokensV1_1)
|
||||
XRPL_RETIRE_FEATURE(PayChan)
|
||||
XRPL_RETIRE_FEATURE(SortedDirectories)
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace test {
|
||||
/*
|
||||
* This file implements the following negative UNL related tests:
|
||||
* -- test filling and applying ttUNL_MODIFY Tx and ledger update
|
||||
* -- test ttUNL_MODIFY Tx failure without featureNegativeUNL amendment
|
||||
* -- test the NegativeUNLVote class. The test cases are split to multiple
|
||||
* test classes to allow parallel execution.
|
||||
* -- test the negativeUNLFilter function
|
||||
@@ -208,7 +207,7 @@ class NegativeUNL_test : public beast::unit_test::suite
|
||||
|
||||
testcase("Create UNLModify Tx and apply to ledgers");
|
||||
|
||||
jtx::Env env(*this, jtx::testable_amendments() | featureNegativeUNL);
|
||||
jtx::Env env(*this, jtx::testable_amendments());
|
||||
std::vector<PublicKey> publicKeys = createPublicKeys(3);
|
||||
// genesis ledger
|
||||
auto l = std::make_shared<Ledger>(
|
||||
@@ -216,7 +215,6 @@ class NegativeUNL_test : public beast::unit_test::suite
|
||||
env.app().config(),
|
||||
std::vector<uint256>{},
|
||||
env.app().getNodeFamily());
|
||||
BEAST_EXPECT(l->rules().enabled(featureNegativeUNL));
|
||||
|
||||
// Record the public keys and ledger sequences of expected negative UNL
|
||||
// validators when we build the ledger history
|
||||
@@ -500,44 +498,6 @@ class NegativeUNL_test : public beast::unit_test::suite
|
||||
}
|
||||
};
|
||||
|
||||
class NegativeUNLNoAmendment_test : public beast::unit_test::suite
|
||||
{
|
||||
void
|
||||
testNegativeUNLNoAmendment()
|
||||
{
|
||||
testcase("No negative UNL amendment");
|
||||
|
||||
jtx::Env env(*this, jtx::testable_amendments() - featureNegativeUNL);
|
||||
std::vector<PublicKey> publicKeys = createPublicKeys(1);
|
||||
// genesis ledger
|
||||
auto l = std::make_shared<Ledger>(
|
||||
create_genesis,
|
||||
env.app().config(),
|
||||
std::vector<uint256>{},
|
||||
env.app().getNodeFamily());
|
||||
BEAST_EXPECT(!l->rules().enabled(featureNegativeUNL));
|
||||
|
||||
// generate more ledgers
|
||||
for (auto i = 0; i < 256 - 1; ++i)
|
||||
{
|
||||
l = std::make_shared<Ledger>(
|
||||
*l, env.app().timeKeeper().closeTime());
|
||||
}
|
||||
BEAST_EXPECT(l->seq() == 256);
|
||||
auto txDisable_0 = createTx(true, l->seq(), publicKeys[0]);
|
||||
OpenView accum(&*l);
|
||||
BEAST_EXPECT(applyAndTestResult(env, accum, txDisable_0, false));
|
||||
accum.apply(*l);
|
||||
BEAST_EXPECT(negUnlSizeTest(l, 0, false, false));
|
||||
}
|
||||
|
||||
void
|
||||
run() override
|
||||
{
|
||||
testNegativeUNLNoAmendment();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Utility class for creating validators and ledger history
|
||||
*/
|
||||
@@ -563,7 +523,7 @@ struct NetworkHistory
|
||||
};
|
||||
|
||||
NetworkHistory(beast::unit_test::suite& suite, Parameter const& p)
|
||||
: env(suite, jtx::testable_amendments() | featureNegativeUNL)
|
||||
: env(suite, jtx::testable_amendments())
|
||||
, param(p)
|
||||
, validations(env.app().getValidations())
|
||||
{
|
||||
@@ -1867,7 +1827,6 @@ class NegativeUNLVoteFilterValidations_test : public beast::unit_test::suite
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(NegativeUNL, consensus, ripple);
|
||||
BEAST_DEFINE_TESTSUITE(NegativeUNLNoAmendment, consensus, ripple);
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(NegativeUNLVoteInternal, consensus, ripple);
|
||||
BEAST_DEFINE_TESTSUITE_MANUAL(NegativeUNLVoteScoreTable, consensus, ripple);
|
||||
|
||||
@@ -124,7 +124,8 @@ class Feature_test : public beast::unit_test::suite
|
||||
featureToName(fixRemoveNFTokenAutoTrustLine) ==
|
||||
"fixRemoveNFTokenAutoTrustLine");
|
||||
BEAST_EXPECT(featureToName(featureFlow) == "Flow");
|
||||
BEAST_EXPECT(featureToName(featureNegativeUNL) == "NegativeUNL");
|
||||
BEAST_EXPECT(
|
||||
featureToName(featureDeletableAccounts) == "DeletableAccounts");
|
||||
BEAST_EXPECT(
|
||||
featureToName(fixIncludeKeyletFields) == "fixIncludeKeyletFields");
|
||||
BEAST_EXPECT(featureToName(featureTokenEscrow) == "TokenEscrow");
|
||||
|
||||
@@ -346,9 +346,7 @@ RCLConsensus::Adaptor::onClose(
|
||||
prevLedger, validations, initialSet, j_);
|
||||
}
|
||||
}
|
||||
else if (
|
||||
prevLedger->isVotingLedger() &&
|
||||
prevLedger->rules().enabled(featureNegativeUNL))
|
||||
else if (prevLedger->isVotingLedger())
|
||||
{
|
||||
// previous ledger was a voting ledger,
|
||||
// so the current consensus session is for a flag ledger,
|
||||
@@ -1015,8 +1013,7 @@ RCLConsensus::Adaptor::preStartRound(
|
||||
inboundTransactions_.newRound(prevLgr.seq());
|
||||
|
||||
// Notify NegativeUNLVote that new validators are added
|
||||
if (prevLgr.ledger_->rules().enabled(featureNegativeUNL) &&
|
||||
!nowTrusted.empty())
|
||||
if (!nowTrusted.empty())
|
||||
nUnlVote_.newValidators(prevLgr.seq() + 1, nowTrusted);
|
||||
|
||||
// propose only if we're in sync with the network (and validating)
|
||||
|
||||
@@ -28,7 +28,7 @@ buildLedgerImpl(
|
||||
{
|
||||
auto built = std::make_shared<Ledger>(*parent, closeTime);
|
||||
|
||||
if (built->isFlagLedger() && built->rules().enabled(featureNegativeUNL))
|
||||
if (built->isFlagLedger())
|
||||
{
|
||||
built->updateNegativeUNL();
|
||||
}
|
||||
|
||||
@@ -2063,8 +2063,7 @@ NetworkOPsImp::beginConsensus(
|
||||
"ripple::NetworkOPsImp::beginConsensus : closedLedger parent matches "
|
||||
"hash");
|
||||
|
||||
if (prevLedger->rules().enabled(featureNegativeUNL))
|
||||
app_.validators().setNegativeUNL(prevLedger->negativeUNL());
|
||||
app_.validators().setNegativeUNL(prevLedger->negativeUNL());
|
||||
TrustChanges const changes = app_.validators().updateTrusted(
|
||||
app_.getValidations().getCurrentNodeIDs(),
|
||||
closingInfo.parentCloseTime,
|
||||
|
||||
@@ -51,13 +51,6 @@ Transactor::invokePreflight<Change>(PreflightContext const& ctx)
|
||||
return temBAD_SEQUENCE;
|
||||
}
|
||||
|
||||
if (ctx.tx.getTxnType() == ttUNL_MODIFY &&
|
||||
!ctx.rules.enabled(featureNegativeUNL))
|
||||
{
|
||||
JLOG(ctx.j.warn()) << "Change: NegativeUNL not enabled";
|
||||
return temDISABLED;
|
||||
}
|
||||
|
||||
return tesSUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user