refactor: Rename rippled.cfg to xrpld.cfg

This commit is contained in:
Bart Thomee
2025-11-02 15:28:52 +00:00
parent 80b1c7114c
commit b8e676898e
15 changed files with 87 additions and 18 deletions

View File

@@ -29,6 +29,9 @@ run from the repository root.
4. `.github/scripts/rename/binary.sh`: This script will rename the binary from
`rippled` to `xrpld`, and create a symlink named `rippled` that points to the
`xrpld` binary.
5. `.github/scripts/rename/config.sh`: This script will rename the config from
`rippled.cfg` to `xrpld.cfg`, and updating the code accordingly. The old
filename will still be accepted.
You can run all these scripts from the repository root as follows:
@@ -37,4 +40,5 @@ You can run all these scripts from the repository root as follows:
./.github/scripts/rename/copyright.sh .
./.github/scripts/rename/cmake.sh .
./.github/scripts/rename/binary.sh .
./.github/scripts/rename/config.sh .
```

62
.github/scripts/rename/config.sh vendored Executable file
View File

@@ -0,0 +1,62 @@
#!/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 config from `rippled.cfg` to `xrpld.cfg`, and updates
# the code accordingly. The old filename will still be accepted.
# Usage: .github/scripts/rename/config.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
# Add the xrpld.cfg to the .gitignore.
if ! grep -q 'xrpld.cfg' ${DIRECTORY}/.gitignore; then
${SED_COMMAND} -i '/rippled.cfg/a\
xrpld.cfg' ${DIRECTORY}/.gitignore
fi
# Rename the files.
if [ -e "${DIRECTORY}/rippled.cfg" ]; then
mv "${DIRECTORY}/rippled.cfg" "${DIRECTORY}/xrpld.cfg"
fi
if [ -e "${DIRECTORY}/cfg/rippled-example.cfg" ]; then
mv "${DIRECTORY}/cfg/rippled-example.cfg" "${DIRECTORY}/cfg/xrpld-example.cfg"
fi
# Rename inside the files.
DIRECTORIES=("cfg" "cmake" "include" "src")
for DIRECTORY in "${DIRECTORIES[@]}"; do
DIRECTORY=$1/${DIRECTORY}
echo "Processing directory: ${DIRECTORY}"
if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1
fi
find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" -o -name "*.cmake" -o -name "*.txt" -o -name "*.cfg" -o -name "*.md" \) | while read -r FILE; do
echo "Processing file: ${FILE}"
${SED_COMMAND} -i -E 's/rippled(-example)?[ .]cfg/xrpld\1.cfg/g' "${FILE}"
done
done
echo "Renaming complete."

View File

@@ -27,6 +27,8 @@ jobs:
run: .github/scripts/rename/cmake.sh .
- name: Check binary name
run: .github/scripts/rename/binary.sh .
- name: Check config name
run: .github/scripts/rename/config.sh .
- name: Check for differences
env:
MESSAGE: |

1
.gitignore vendored
View File

@@ -54,6 +54,7 @@ debug_log.txt
# Ignore customized configs
rippled.cfg
xrpld.cfg
validators.txt
# Doxygen generated documentation output

View File

@@ -1,7 +1,7 @@
#
# Default validators.txt
#
# This file is located in the same folder as your rippled.cfg file
# This file is located in the same folder as your xrpld.cfg file
# and defines which validators your server trusts not to collude.
#
# This file is UTF-8 with DOS, UNIX, or Mac style line endings.

View File

@@ -33,14 +33,14 @@
# configuration options. When the rippled server instance is launched, it
# looks for a file with the following name:
#
# rippled.cfg
# xrpld.cfg
#
# For more information on where the rippled server instance searches for the
# file, visit:
#
# https://xrpl.org/commandline-usage.html#generic-options
#
# This file should be named rippled.cfg. This file is UTF-8 with DOS, UNIX,
# This file should be named xrpld.cfg. This file is UTF-8 with DOS, UNIX,
# or Mac style end of lines. Blank lines and lines beginning with '#' are
# ignored. Undefined sections are reserved. No escapes are currently defined.
#
@@ -745,7 +745,7 @@
#
# Specify the file by its name or path.
# Unless an absolute path is specified, it will be considered relative to
# the folder in which the rippled.cfg file is located.
# the folder in which the xrpld.cfg file is located.
#
# Examples:
# /home/ripple/validators.txt
@@ -902,7 +902,7 @@
# the performance of the server.
#
# Partial pathnames will be considered relative to the location of
# the rippled.cfg file.
# the xrpld.cfg file.
#
# [node_db] Settings for the Node Database (required)
#
@@ -1069,7 +1069,7 @@
# The server creates and maintains 4 to 5 bookkeeping SQLite databases in
# the 'database_path' location. If you omit this configuration setting,
# the server creates a directory called "db" located in the same place as
# your rippled.cfg file.
# your xrpld.cfg file.
# Partial pathnames are relative to the location of the rippled executable.
#
# [sqlite] Tuning settings for the SQLite databases (optional)
@@ -1533,7 +1533,7 @@ advisory_delete=0
# File containing trusted validator keys or validator list publishers.
# Unless an absolute path is specified, it will be considered relative to the
# folder in which the rippled.cfg file is located.
# folder in which the xrpld.cfg file is located.
[validators_file]
validators.txt

View File

@@ -68,7 +68,7 @@ if (is_root_project AND TARGET xrpld)
message (\"-- Skipping : \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\")
endif ()
endmacro()
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/rippled-example.cfg\" etc rippled.cfg)
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/xrpld-example.cfg\" etc xrpld.cfg)
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/validators-example.txt\" etc validators.txt)
")
install(CODE "

View File

@@ -130,7 +130,7 @@ newer versions of RocksDB (TBD).
## Discussion
RocksDBQuickFactory is intended to provide a testbed for comparing potential
rocksdb performance with the existing recommended configuration in rippled.cfg.
rocksdb performance with the existing recommended configuration in xrpld.cfg.
Through various executions and profiling some conclusions are presented below.
- If the write ahead log is enabled, insert speed soon clogs up under load. The

View File

@@ -18,8 +18,8 @@ void
ManagerImp::missing_backend()
{
Throw<std::runtime_error>(
"Your rippled.cfg is missing a [node_db] entry, "
"please see the rippled-example.cfg file!");
"Your xrpld.cfg is missing a [node_db] entry, "
"please see the xrpld-example.cfg file!");
}
// We shouldn't rely on global variables for lifetime management because their

View File

@@ -861,7 +861,7 @@ trustthesevalidators.gov
}
{
// load should throw if [validator_list_threshold] is present both
// in rippled cfg and validators file
// in xrpld.cfg and validators file
boost::format cc(R"rippleConfig(
[validators_file]
%1%
@@ -890,7 +890,7 @@ trustthesevalidators.gov
}
{
// load should throw if [validators], [validator_keys] and
// [validator_list_keys] are missing from rippled cfg and
// [validator_list_keys] are missing from xrpld.cfg and
// validators file
Config c;
boost::format cc("[validators_file]\n%1%\n");

View File

@@ -87,7 +87,7 @@ private:
/// If the node is out of sync during an online_delete healthWait()
/// call, sleep the thread for this time, and continue checking until
/// recovery.
/// See also: "recovery_wait_seconds" in rippled-example.cfg
/// See also: "recovery_wait_seconds" in xrpld-example.cfg
std::chrono::seconds recoveryWaitTime_{5};
// these do not exist upon SHAMapStore creation, but do exist

View File

@@ -225,7 +225,7 @@ getSingleSection(
//
//------------------------------------------------------------------------------
char const* const Config::configFileName = "rippled.cfg";
char const* const Config::configFileName = "xrpld.cfg";
char const* const Config::databaseDirName = "db";
char const* const Config::validatorsFileName = "validators.txt";

View File

@@ -373,7 +373,7 @@ command. The key is in the `pubkey_node` value, and is a text string
beginning with the letter `n`. The key is maintained across runs in a
database.
Cluster members are configured in the `rippled.cfg` file under
Cluster members are configured in the `xrpld.cfg` file under
`[cluster_nodes]`. Each member should be configured on a line beginning
with the node public key, followed optionally by a space and a friendly
name.

View File

@@ -515,7 +515,7 @@ OverlayImpl::start()
m_peerFinder->addFallbackStrings(base + name, ips);
});
// Add the ips_fixed from the rippled.cfg file
// Add the ips_fixed from the xrpld.cfg file
if (!app_.config().standalone() && !app_.config().IPS_FIXED.empty())
{
m_resolver.resolve(

View File

@@ -41,7 +41,7 @@ public:
using microseconds = std::chrono::microseconds;
/**
* Configuration from [perf] section of rippled.cfg.
* Configuration from [perf] section of xrpld.cfg.
*/
struct Setup
{