Skip to content

Commit dae0a53

Browse files
committed
Merge branch 'mvadari/rearch/account' into mvadari/rearch/token
2 parents 3bc4609 + ea3ca12 commit dae0a53

File tree

975 files changed

+47883
-15793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

975 files changed

+47883
-15793
lines changed

.clang-tidy

Lines changed: 51 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
# This entire group of checks was applied to all cpp files but not all header files.
3+
# ---
24
Checks: "-*,
35
bugprone-argument-comment,
46
bugprone-assert-side-effect,
@@ -8,26 +10,26 @@ Checks: "-*,
810
bugprone-chained-comparison,
911
bugprone-compare-pointer-to-member-virtual-function,
1012
bugprone-copy-constructor-init,
11-
bugprone-crtp-constructor-accessibility,
13+
# bugprone-crtp-constructor-accessibility, # has issues
1214
bugprone-dangling-handle,
1315
bugprone-dynamic-static-initializers,
14-
bugprone-empty-catch,
16+
# bugprone-empty-catch, # has issues
1517
bugprone-fold-init-type,
16-
bugprone-forward-declaration-namespace,
17-
bugprone-inaccurate-erase,
18-
bugprone-inc-dec-in-conditions,
19-
bugprone-incorrect-enable-if,
20-
bugprone-incorrect-roundings,
21-
bugprone-infinite-loop,
22-
bugprone-integer-division,
18+
# bugprone-forward-declaration-namespace, # has issues
19+
# bugprone-inaccurate-erase,
20+
# bugprone-inc-dec-in-conditions,
21+
# bugprone-incorrect-enable-if,
22+
# bugprone-incorrect-roundings,
23+
# bugprone-infinite-loop,
24+
# bugprone-integer-division,
2325
bugprone-lambda-function-name,
24-
bugprone-macro-parentheses,
26+
# bugprone-macro-parentheses, # has issues
2527
bugprone-macro-repeated-side-effects,
2628
bugprone-misplaced-operator-in-strlen-in-alloc,
2729
bugprone-misplaced-pointer-arithmetic-in-alloc,
2830
bugprone-misplaced-widening-cast,
2931
bugprone-move-forwarding-reference,
30-
bugprone-multi-level-implicit-pointer-conversion,
32+
# bugprone-multi-level-implicit-pointer-conversion, # has issues
3133
bugprone-multiple-new-in-one-expression,
3234
bugprone-multiple-statement-macro,
3335
bugprone-no-escape,
@@ -37,13 +39,13 @@ Checks: "-*,
3739
bugprone-pointer-arithmetic-on-polymorphic-object,
3840
bugprone-posix-return,
3941
bugprone-redundant-branch-condition,
40-
bugprone-reserved-identifier,
41-
bugprone-return-const-ref-from-parameter,
42+
# bugprone-reserved-identifier, # has issues
43+
# bugprone-return-const-ref-from-parameter, # has issues
4244
bugprone-shared-ptr-array-mismatch,
4345
bugprone-signal-handler,
4446
bugprone-signed-char-misuse,
4547
bugprone-sizeof-container,
46-
bugprone-sizeof-expression,
48+
# bugprone-sizeof-expression, # has issues
4749
bugprone-spuriously-wake-up-functions,
4850
bugprone-standalone-empty,
4951
bugprone-string-constructor,
@@ -60,7 +62,7 @@ Checks: "-*,
6062
bugprone-suspicious-string-compare,
6163
bugprone-suspicious-stringview-data-usage,
6264
bugprone-swapped-arguments,
63-
bugprone-switch-missing-default-case,
65+
# bugprone-switch-missing-default-case, # has issues
6466
bugprone-terminating-continue,
6567
bugprone-throw-keyword-missing,
6668
bugprone-too-small-loop-variable,
@@ -71,7 +73,7 @@ Checks: "-*,
7173
bugprone-unhandled-self-assignment,
7274
bugprone-unique-ptr-array-mismatch,
7375
bugprone-unsafe-functions,
74-
bugprone-use-after-move,
76+
# bugprone-use-after-move, # has issues
7577
bugprone-unused-raii,
7678
bugprone-unused-return-value,
7779
bugprone-unused-local-non-trivial-variable,
@@ -85,56 +87,61 @@ Checks: "-*,
8587
cppcoreguidelines-use-default-member-init,
8688
cppcoreguidelines-virtual-class-destructor,
8789
hicpp-ignored-remove-result,
90+
misc-const-correctness,
8891
misc-definitions-in-headers,
8992
misc-header-include-cycle,
9093
misc-misplaced-const,
94+
misc-redundant-expression,
9195
misc-static-assert,
9296
misc-throw-by-value-catch-by-reference,
9397
misc-unused-alias-decls,
9498
misc-unused-using-decls,
9599
modernize-deprecated-headers,
96100
modernize-make-shared,
97101
modernize-make-unique,
102+
llvm-namespace-comment,
103+
performance-faster-string-find,
104+
performance-for-range-copy,
98105
performance-implicit-conversion-in-loop,
106+
performance-inefficient-vector-operation,
107+
performance-move-const-arg,
99108
performance-move-constructor-init,
109+
performance-no-automatic-move,
100110
performance-trivially-destructible,
101-
readability-avoid-nested-conditional-operator,
102-
readability-avoid-return-with-void-value,
103-
readability-braces-around-statements,
104-
readability-const-return-type,
105-
readability-container-contains,
106-
readability-container-size-empty,
111+
# readability-avoid-nested-conditional-operator, # has issues
112+
# readability-avoid-return-with-void-value, # has issues
113+
# readability-braces-around-statements, # has issues
114+
# readability-const-return-type, # has issues
115+
# readability-container-contains, # has issues
116+
# readability-container-size-empty, # has issues
117+
# readability-convert-member-functions-to-static, # has issues
107118
readability-duplicate-include,
108-
readability-else-after-return,
109-
readability-enum-initial-value,
110-
readability-make-member-function-const,
119+
# readability-else-after-return, # has issues
120+
# readability-enum-initial-value, # has issues
121+
# readability-implicit-bool-conversion, # has issues
122+
# readability-make-member-function-const, # has issues
123+
# readability-math-missing-parentheses, # has issues
111124
readability-misleading-indentation,
112125
readability-non-const-parameter,
113-
readability-redundant-casting,
114-
readability-redundant-declaration,
115-
readability-redundant-inline-specifier,
116-
readability-redundant-member-init,
126+
# readability-redundant-casting, # has issues
127+
# readability-redundant-declaration, # has issues
128+
# readability-redundant-inline-specifier, # has issues
129+
# readability-redundant-member-init, # has issues
117130
readability-redundant-string-init,
118131
readability-reference-to-constructed-temporary,
119-
readability-static-definition-in-anonymous-namespace,
132+
# readability-simplify-boolean-expr, # has issues
133+
# readability-static-definition-in-anonymous-namespace, # has issues
134+
# readability-suspicious-call-argument, # has issues
120135
readability-use-std-min-max
121136
"
122137
# ---
123-
# checks that have some issues that need to be resolved:
138+
# other checks that have issues that need to be resolved:
124139
#
125-
# llvm-namespace-comment,
126-
# misc-const-correctness,
127140
# misc-include-cleaner,
128-
# misc-redundant-expression,
129141
#
130-
# readability-convert-member-functions-to-static,
131-
# readability-implicit-bool-conversion,
132-
# readability-inconsistent-declaration-parameter-name,
133-
# readability-identifier-naming,
134-
# readability-math-missing-parentheses,
135-
# readability-simplify-boolean-expr,
136-
# readability-suspicious-call-argument,
137-
# readability-static-accessed-through-instance,
142+
# readability-inconsistent-declaration-parameter-name, # in this codebase this check will break a lot of arg names
143+
# readability-static-accessed-through-instance, # this check is probably unnecessary. it makes the code less readable
144+
# readability-identifier-naming, # https://github.com/XRPLF/rippled/pull/6571
138145
#
139146
# modernize-concat-nested-namespaces,
140147
# modernize-pass-by-value,
@@ -148,12 +155,6 @@ Checks: "-*,
148155
# modernize-use-starts-ends-with,
149156
# modernize-use-std-numbers,
150157
# modernize-use-using,
151-
#
152-
# performance-faster-string-find,
153-
# performance-for-range-copy,
154-
# performance-inefficient-vector-operation,
155-
# performance-move-const-arg,
156-
# performance-no-automatic-move,
157158
# ---
158159
#
159160
CheckOptions:
@@ -195,5 +196,6 @@ CheckOptions:
195196
bugprone-unused-return-value.CheckedReturnTypes: ::std::error_code;::std::error_condition;::std::errc
196197
# misc-include-cleaner.IgnoreHeaders: '.*/(detail|impl)/.*;.*(expected|unexpected).*;.*ranges_lower_bound\.h;time.h;stdlib.h;__chrono/.*;fmt/chrono.h;boost/uuid/uuid_hash.hpp'
197198
#
198-
# HeaderFilterRegex: '^.*/(src|tests)/.*\.(h|hpp)$'
199+
HeaderFilterRegex: '^.*/(test|xrpl|xrpld)/.*\.(h|hpp)$'
200+
ExcludeHeaderFilterRegex: '^.*/protocol_autogen/.*\.(h|hpp)$'
199201
WarningsAsErrors: "*"

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Feature Request
3-
about: Suggest a new feature for the rippled project
4-
title: "[Title with short description] (Version: [rippled version])"
3+
about: Suggest a new feature for the xrpld project
4+
title: "[Title with short description] (Version: [xrpld version])"
55
labels: Feature Request
66
assignees: ""
77
---

.github/scripts/levelization/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Levelization
22

3-
Levelization is the term used to describe efforts to prevent rippled from
3+
Levelization is the term used to describe efforts to prevent xrpld from
44
having or creating cyclic dependencies.
55

6-
rippled code is organized into directories under `src/xrpld`, `src/libxrpl` (and
6+
xrpld code is organized into directories under `src/xrpld`, `src/libxrpl` (and
77
`src/test`) representing modules. The modules are intended to be
88
organized into "tiers" or "levels" such that a module from one level can
99
only include code from lower levels. Additionally, a module
1010
in one level should never include code in an `impl` or `detail` folder of any level
11-
other than it's own.
11+
other than its own.
1212

1313
The codebase is split into two main areas:
1414

@@ -22,7 +22,7 @@ levelization violations they find (by moving files or individual
2222
classes). At the very least, don't make things worse.
2323

2424
The table below summarizes the _desired_ division of modules, based on the current
25-
state of the rippled code. The levels are numbered from
25+
state of the xrpld code. The levels are numbered from
2626
the bottom up with the lower level, lower numbered, more independent
2727
modules listed first, and the higher level, higher numbered modules with
2828
more dependencies listed later.
@@ -72,10 +72,10 @@ that `test` code should _never_ be included in `xrpl` or `xrpld` code.)
7272

7373
The [levelization](generate.py) script takes no parameters,
7474
reads no environment variables, and can be run from any directory,
75-
as long as it is in the expected location in the rippled repo.
75+
as long as it is in the expected location in the xrpld repo.
7676
It can be run at any time from within a checked out repo, and will
7777
do an analysis of all the `#include`s in
78-
the rippled source. The only caveat is that it runs much slower
78+
the xrpld source. The only caveat is that it runs much slower
7979
under Windows than in Linux. It hasn't yet been tested under MacOS.
8080
It generates many files of [results](results):
8181

.github/scripts/levelization/results/ordering.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ libxrpl.protocol > xrpl.json
2121
libxrpl.protocol > xrpl.protocol
2222
libxrpl.protocol_autogen > xrpl.protocol_autogen
2323
libxrpl.rdb > xrpl.basics
24+
libxrpl.rdb > xrpl.core
2425
libxrpl.rdb > xrpl.rdb
2526
libxrpl.resource > xrpl.basics
2627
libxrpl.resource > xrpl.json
@@ -90,6 +91,7 @@ test.core > xrpl.server
9091
test.csf > xrpl.basics
9192
test.csf > xrpld.consensus
9293
test.csf > xrpl.json
94+
test.csf > xrpl.ledger
9395
test.csf > xrpl.protocol
9496
test.json > test.jtx
9597
test.json > xrpl.json
@@ -108,7 +110,6 @@ test.jtx > xrpl.tx
108110
test.ledger > test.jtx
109111
test.ledger > test.toplevel
110112
test.ledger > xrpl.basics
111-
test.ledger > xrpld.app
112113
test.ledger > xrpld.core
113114
test.ledger > xrpl.ledger
114115
test.ledger > xrpl.protocol
@@ -125,6 +126,7 @@ test.overlay > xrpl.basics
125126
test.overlay > xrpld.app
126127
test.overlay > xrpld.overlay
127128
test.overlay > xrpld.peerfinder
129+
test.overlay > xrpl.ledger
128130
test.overlay > xrpl.nodestore
129131
test.overlay > xrpl.protocol
130132
test.overlay > xrpl.shamap
@@ -183,7 +185,6 @@ xrpl.conditions > xrpl.basics
183185
xrpl.conditions > xrpl.protocol
184186
xrpl.core > xrpl.basics
185187
xrpl.core > xrpl.json
186-
xrpl.core > xrpl.ledger
187188
xrpl.core > xrpl.protocol
188189
xrpl.json > xrpl.basics
189190
xrpl.ledger > xrpl.basics
@@ -234,6 +235,7 @@ xrpld.app > xrpl.shamap
234235
xrpld.app > xrpl.tx
235236
xrpld.consensus > xrpl.basics
236237
xrpld.consensus > xrpl.json
238+
xrpld.consensus > xrpl.ledger
237239
xrpld.consensus > xrpl.protocol
238240
xrpld.core > xrpl.basics
239241
xrpld.core > xrpl.core

.github/scripts/rename/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ run from the repository root.
3434
6. `.github/scripts/rename/config.sh`: This script will rename the config from
3535
`rippled.cfg` to `xrpld.cfg`, and updating the code accordingly. The old
3636
filename will still be accepted.
37+
7. `.github/scripts/rename/docs.sh`: This script will rename any lingering
38+
references of `ripple(d)` to `xrpl(d)` in code, comments, and documentation.
3739

3840
You can run all these scripts from the repository root as follows:
3941

@@ -44,4 +46,5 @@ You can run all these scripts from the repository root as follows:
4446
./.github/scripts/rename/binary.sh .
4547
./.github/scripts/rename/namespace.sh .
4648
./.github/scripts/rename/config.sh .
49+
./.github/scripts/rename/docs.sh .
4750
```

.github/scripts/rename/binary.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if [ ! -d "${DIRECTORY}" ]; then
2929
echo "Error: Directory '${DIRECTORY}' does not exist."
3030
exit 1
3131
fi
32-
pushd ${DIRECTORY}
32+
pushd "${DIRECTORY}"
3333

3434
# Remove the binary name override added by the cmake.sh script.
3535
${SED_COMMAND} -z -i -E 's@\s+# For the time being.+"rippled"\)@@' cmake/XrplCore.cmake
@@ -49,6 +49,7 @@ ${SED_COMMAND} -i -E 's@ripple/xrpld@XRPLF/rippled@g' BUILD.md
4949
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' BUILD.md
5050
${SED_COMMAND} -i -E 's@xrpld \(`xrpld`\)@xrpld@g' BUILD.md
5151
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' CONTRIBUTING.md
52+
${SED_COMMAND} -i -E 's@XRPLF/xrpld@XRPLF/rippled@g' docs/build/install.md
5253

5354
popd
5455
echo "Processing complete."

.github/scripts/rename/cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [ ! -d "${DIRECTORY}" ]; then
3838
echo "Error: Directory '${DIRECTORY}' does not exist."
3939
exit 1
4040
fi
41-
pushd ${DIRECTORY}
41+
pushd "${DIRECTORY}"
4242

4343
# Rename the files.
4444
find cmake -type f -name 'Rippled*.cmake' -exec bash -c 'mv "${1}" "${1/Rippled/Xrpl}"' - {} \;

.github/scripts/rename/config.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ ! -d "${DIRECTORY}" ]; then
2828
echo "Error: Directory '${DIRECTORY}' does not exist."
2929
exit 1
3030
fi
31-
pushd ${DIRECTORY}
31+
pushd "${DIRECTORY}"
3232

3333
# Add the xrpld.cfg to the .gitignore.
3434
if ! grep -q 'xrpld.cfg' .gitignore; then
@@ -52,16 +52,15 @@ for DIRECTORY in "${DIRECTORIES[@]}"; do
5252
find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" -o -name "*.cmake" -o -name "*.txt" -o -name "*.cfg" -o -name "*.md" \) | while read -r FILE; do
5353
echo "Processing file: ${FILE}"
5454
${SED_COMMAND} -i -E 's/rippled(-example)?[ .]cfg/xrpld\1.cfg/g' "${FILE}"
55+
${SED_COMMAND} -i 's/rippleConfig/xrpldConfig/g' "${FILE}"
5556
done
5657
done
5758
${SED_COMMAND} -i 's/rippled/xrpld/g' cfg/xrpld-example.cfg
5859
${SED_COMMAND} -i 's/rippled/xrpld/g' src/test/core/Config_test.cpp
5960
${SED_COMMAND} -i 's/ripplevalidators/xrplvalidators/g' src/test/core/Config_test.cpp # cspell: disable-line
60-
${SED_COMMAND} -i 's/rippleConfig/xrpldConfig/g' src/test/core/Config_test.cpp
6161
${SED_COMMAND} -i 's@ripple/@xrpld/@g' src/test/core/Config_test.cpp
6262
${SED_COMMAND} -i 's/Rippled/File/g' src/test/core/Config_test.cpp
6363

64-
6564
# Restore the old config file name in the code that maintains support for now.
6665
${SED_COMMAND} -i 's/configLegacyName = "xrpld.cfg"/configLegacyName = "rippled.cfg"/g' src/xrpld/core/detail/Config.cpp
6766

.github/scripts/rename/copyright.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if [ ! -d "${DIRECTORY}" ]; then
3131
echo "Error: Directory '${DIRECTORY}' does not exist."
3232
exit 1
3333
fi
34-
pushd ${DIRECTORY}
34+
pushd "${DIRECTORY}"
3535

3636
# Prevent sed and echo from removing newlines and tabs in string literals by
3737
# temporarily replacing them with placeholders. This only affects one file.
@@ -76,11 +76,11 @@ fi
7676
if ! grep -q 'Dev Null' src/test/rpc/ValidatorInfo_test.cpp; then
7777
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/rpc/ValidatorInfo_test.cpp)" > src/test/rpc/ValidatorInfo_test.cpp
7878
fi
79-
if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/DoManifest.cpp; then
80-
echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/DoManifest.cpp)" > src/xrpld/rpc/handlers/DoManifest.cpp
79+
if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/server_info/Manifest.cpp; then
80+
echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/server_info/Manifest.cpp)" > src/xrpld/rpc/handlers/server_info/Manifest.cpp
8181
fi
82-
if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/ValidatorInfo.cpp; then
83-
echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/ValidatorInfo.cpp)" > src/xrpld/rpc/handlers/ValidatorInfo.cpp
82+
if ! grep -q 'Dev Null' src/xrpld/rpc/handlers/admin/status/ValidatorInfo.cpp; then
83+
echo -e "// Copyright (c) 2019 Dev Null Productions\n\n$(cat src/xrpld/rpc/handlers/admin/status/ValidatorInfo.cpp)" > src/xrpld/rpc/handlers/admin/status/ValidatorInfo.cpp
8484
fi
8585
if ! grep -q 'Bougalis' include/xrpl/basics/SlabAllocator.h; then
8686
echo -e "// Copyright (c) 2022, Nikolaos D. Bougalis <nikb@bougalis.net>\n\n$(cat include/xrpl/basics/SlabAllocator.h)" > include/xrpl/basics/SlabAllocator.h # cspell: ignore Nikolaos Bougalis nikb

0 commit comments

Comments
 (0)