mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
refactor: Rename rippled.cfg to xrpld.cfg
This commit is contained in:
4
.github/scripts/rename/README.md
vendored
4
.github/scripts/rename/README.md
vendored
@@ -29,6 +29,9 @@ run from the repository root.
|
|||||||
4. `.github/scripts/rename/binary.sh`: This script will rename the binary from
|
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
|
`rippled` to `xrpld`, and create a symlink named `rippled` that points to the
|
||||||
`xrpld` binary.
|
`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:
|
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/copyright.sh .
|
||||||
./.github/scripts/rename/cmake.sh .
|
./.github/scripts/rename/cmake.sh .
|
||||||
./.github/scripts/rename/binary.sh .
|
./.github/scripts/rename/binary.sh .
|
||||||
|
./.github/scripts/rename/config.sh .
|
||||||
```
|
```
|
||||||
|
|||||||
62
.github/scripts/rename/config.sh
vendored
Executable file
62
.github/scripts/rename/config.sh
vendored
Executable 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."
|
||||||
2
.github/workflows/reusable-check-rename.yml
vendored
2
.github/workflows/reusable-check-rename.yml
vendored
@@ -27,6 +27,8 @@ jobs:
|
|||||||
run: .github/scripts/rename/cmake.sh .
|
run: .github/scripts/rename/cmake.sh .
|
||||||
- name: Check binary name
|
- name: Check binary name
|
||||||
run: .github/scripts/rename/binary.sh .
|
run: .github/scripts/rename/binary.sh .
|
||||||
|
- name: Check config name
|
||||||
|
run: .github/scripts/rename/config.sh .
|
||||||
- name: Check for differences
|
- name: Check for differences
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -54,6 +54,7 @@ debug_log.txt
|
|||||||
|
|
||||||
# Ignore customized configs
|
# Ignore customized configs
|
||||||
rippled.cfg
|
rippled.cfg
|
||||||
|
xrpld.cfg
|
||||||
validators.txt
|
validators.txt
|
||||||
|
|
||||||
# Doxygen generated documentation output
|
# Doxygen generated documentation output
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Default validators.txt
|
# 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.
|
# and defines which validators your server trusts not to collude.
|
||||||
#
|
#
|
||||||
# This file is UTF-8 with DOS, UNIX, or Mac style line endings.
|
# This file is UTF-8 with DOS, UNIX, or Mac style line endings.
|
||||||
|
|||||||
@@ -33,14 +33,14 @@
|
|||||||
# configuration options. When the rippled server instance is launched, it
|
# configuration options. When the rippled server instance is launched, it
|
||||||
# looks for a file with the following name:
|
# looks for a file with the following name:
|
||||||
#
|
#
|
||||||
# rippled.cfg
|
# xrpld.cfg
|
||||||
#
|
#
|
||||||
# For more information on where the rippled server instance searches for the
|
# For more information on where the rippled server instance searches for the
|
||||||
# file, visit:
|
# file, visit:
|
||||||
#
|
#
|
||||||
# https://xrpl.org/commandline-usage.html#generic-options
|
# 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
|
# or Mac style end of lines. Blank lines and lines beginning with '#' are
|
||||||
# ignored. Undefined sections are reserved. No escapes are currently defined.
|
# ignored. Undefined sections are reserved. No escapes are currently defined.
|
||||||
#
|
#
|
||||||
@@ -745,7 +745,7 @@
|
|||||||
#
|
#
|
||||||
# Specify the file by its name or path.
|
# Specify the file by its name or path.
|
||||||
# Unless an absolute path is specified, it will be considered relative to
|
# 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:
|
# Examples:
|
||||||
# /home/ripple/validators.txt
|
# /home/ripple/validators.txt
|
||||||
@@ -902,7 +902,7 @@
|
|||||||
# the performance of the server.
|
# the performance of the server.
|
||||||
#
|
#
|
||||||
# Partial pathnames will be considered relative to the location of
|
# 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)
|
# [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 server creates and maintains 4 to 5 bookkeeping SQLite databases in
|
||||||
# the 'database_path' location. If you omit this configuration setting,
|
# the 'database_path' location. If you omit this configuration setting,
|
||||||
# the server creates a directory called "db" located in the same place as
|
# 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.
|
# Partial pathnames are relative to the location of the rippled executable.
|
||||||
#
|
#
|
||||||
# [sqlite] Tuning settings for the SQLite databases (optional)
|
# [sqlite] Tuning settings for the SQLite databases (optional)
|
||||||
@@ -1533,7 +1533,7 @@ advisory_delete=0
|
|||||||
|
|
||||||
# File containing trusted validator keys or validator list publishers.
|
# File containing trusted validator keys or validator list publishers.
|
||||||
# Unless an absolute path is specified, it will be considered relative to the
|
# 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_file]
|
||||||
validators.txt
|
validators.txt
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ if (is_root_project AND TARGET xrpld)
|
|||||||
message (\"-- Skipping : \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\")
|
message (\"-- Skipping : \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\")
|
||||||
endif ()
|
endif ()
|
||||||
endmacro()
|
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)
|
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/validators-example.txt\" etc validators.txt)
|
||||||
")
|
")
|
||||||
install(CODE "
|
install(CODE "
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ newer versions of RocksDB (TBD).
|
|||||||
## Discussion
|
## Discussion
|
||||||
|
|
||||||
RocksDBQuickFactory is intended to provide a testbed for comparing potential
|
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.
|
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
|
- If the write ahead log is enabled, insert speed soon clogs up under load. The
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ void
|
|||||||
ManagerImp::missing_backend()
|
ManagerImp::missing_backend()
|
||||||
{
|
{
|
||||||
Throw<std::runtime_error>(
|
Throw<std::runtime_error>(
|
||||||
"Your rippled.cfg is missing a [node_db] entry, "
|
"Your xrpld.cfg is missing a [node_db] entry, "
|
||||||
"please see the rippled-example.cfg file!");
|
"please see the xrpld-example.cfg file!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// We shouldn't rely on global variables for lifetime management because their
|
// We shouldn't rely on global variables for lifetime management because their
|
||||||
|
|||||||
@@ -861,7 +861,7 @@ trustthesevalidators.gov
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
// load should throw if [validator_list_threshold] is present both
|
// 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(
|
boost::format cc(R"rippleConfig(
|
||||||
[validators_file]
|
[validators_file]
|
||||||
%1%
|
%1%
|
||||||
@@ -890,7 +890,7 @@ trustthesevalidators.gov
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
// load should throw if [validators], [validator_keys] and
|
// 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
|
// validators file
|
||||||
Config c;
|
Config c;
|
||||||
boost::format cc("[validators_file]\n%1%\n");
|
boost::format cc("[validators_file]\n%1%\n");
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ private:
|
|||||||
/// If the node is out of sync during an online_delete healthWait()
|
/// If the node is out of sync during an online_delete healthWait()
|
||||||
/// call, sleep the thread for this time, and continue checking until
|
/// call, sleep the thread for this time, and continue checking until
|
||||||
/// recovery.
|
/// recovery.
|
||||||
/// See also: "recovery_wait_seconds" in rippled-example.cfg
|
/// See also: "recovery_wait_seconds" in xrpld-example.cfg
|
||||||
std::chrono::seconds recoveryWaitTime_{5};
|
std::chrono::seconds recoveryWaitTime_{5};
|
||||||
|
|
||||||
// these do not exist upon SHAMapStore creation, but do exist
|
// these do not exist upon SHAMapStore creation, but do exist
|
||||||
|
|||||||
@@ -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::databaseDirName = "db";
|
||||||
char const* const Config::validatorsFileName = "validators.txt";
|
char const* const Config::validatorsFileName = "validators.txt";
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
beginning with the letter `n`. The key is maintained across runs in a
|
||||||
database.
|
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
|
`[cluster_nodes]`. Each member should be configured on a line beginning
|
||||||
with the node public key, followed optionally by a space and a friendly
|
with the node public key, followed optionally by a space and a friendly
|
||||||
name.
|
name.
|
||||||
|
|||||||
@@ -515,7 +515,7 @@ OverlayImpl::start()
|
|||||||
m_peerFinder->addFallbackStrings(base + name, ips);
|
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())
|
if (!app_.config().standalone() && !app_.config().IPS_FIXED.empty())
|
||||||
{
|
{
|
||||||
m_resolver.resolve(
|
m_resolver.resolve(
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
using microseconds = std::chrono::microseconds;
|
using microseconds = std::chrono::microseconds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration from [perf] section of rippled.cfg.
|
* Configuration from [perf] section of xrpld.cfg.
|
||||||
*/
|
*/
|
||||||
struct Setup
|
struct Setup
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user