Summary
A code-first audit of the configuration system found a few config items that are
either defined in code but never read, or documented in cfg/xrpld-example.cfg
but never parsed. None of them have any runtime effect today. This issue asks for
a decision on each: remove as dead, or implement the intended behavior.
These were deliberately left out of the accompanying documentation PRs because
removing code is a maintainer judgement call, not a documentation fix.
Findings (all verified against develop)
1. kSntp ("sntp_servers"): unused constant
- Defined at
include/xrpl/config/Constants.h:59 as
static constexpr auto kSntp = "sntp_servers";
- No reader anywhere in
src/ (only the definition exists). There is no
SNTP/NTP client in the codebase; TimeKeeper only references SNTP in a comment.
- A sample config in
src/test/core/Config_test.cpp:94 contains a literal
[sntp_servers] block, but it is never asserted against and does not use the
constant.
Question: Was [sntp_servers] an intended (never-finished) feature, or is it
safe to remove the constant?
2. kRelationalDb ("relational_db"): unused constant, superseded by [sqdb]
- Defined at
include/xrpl/config/Constants.h:52 as
static constexpr auto kRelationalDb = "relational_db";
- No reader anywhere in
src/. The relational backend selector is actually read
from the [sqdb] section at src/libxrpl/rdb/SociDB.cpp:55
(config.section(Sections::kSqdb)).
- The related README inaccuracy (rdb/README.md referencing
[relational_db]) is
being corrected separately as a documentation fix, independent of this
issue, since the code reads [sqdb] today regardless of this decision.
Question: Remove the unused relational_db constant, or is a future
[relational_db] backend selector planned?
3. [websocket_ping_frequency]: documented, never read
- Documented at
cfg/xrpld-example.cfg:360 (a [websocket_ping_frequency]
section with a description of WebSocket ping interval).
- No code reads this section. Setting it has no effect.
Question: Implement the WebSocket ping interval, or remove the documentation?
4. transaction_queue.zero_basefee_transaction_feelevel: documented, never read
- Documented at
cfg/xrpld-example.cfg:681 (under [transaction_queue], default
256000).
- Not present in
TxQ::Setup and not parsed in setup_TxQ. Setting it has no
effect.
Question: Implement the zero-base-fee fee-level override, or remove the
documentation?
Suggested action
If confirmed dead, a single small PR can:
- Remove
kSntp and kRelationalDb from include/xrpl/config/Constants.h.
- Remove the
[websocket_ping_frequency] and zero_basefee_transaction_feelevel
blocks from cfg/xrpld-example.cfg.
If any are intended features, this issue can be repurposed to track their
implementation instead.
Notes
- Verified no source references the two constants (only their definitions exist).
- This issue intentionally excludes documentation corrections and the addition of
undocumented-but-functional settings, which are handled as separate
documentation PRs.
Summary
A code-first audit of the configuration system found a few config items that are
either defined in code but never read, or documented in
cfg/xrpld-example.cfgbut never parsed. None of them have any runtime effect today. This issue asks for
a decision on each: remove as dead, or implement the intended behavior.
These were deliberately left out of the accompanying documentation PRs because
removing code is a maintainer judgement call, not a documentation fix.
Findings (all verified against
develop)1.
kSntp("sntp_servers"): unused constantinclude/xrpl/config/Constants.h:59asstatic constexpr auto kSntp = "sntp_servers";src/(only the definition exists). There is noSNTP/NTP client in the codebase;
TimeKeeperonly references SNTP in a comment.src/test/core/Config_test.cpp:94contains a literal[sntp_servers]block, but it is never asserted against and does not use theconstant.
Question: Was
[sntp_servers]an intended (never-finished) feature, or is itsafe to remove the constant?
2.
kRelationalDb("relational_db"): unused constant, superseded by[sqdb]include/xrpl/config/Constants.h:52asstatic constexpr auto kRelationalDb = "relational_db";src/. The relational backend selector is actually readfrom the
[sqdb]section atsrc/libxrpl/rdb/SociDB.cpp:55(
config.section(Sections::kSqdb)).[relational_db]) isbeing corrected separately as a documentation fix, independent of this
issue, since the code reads
[sqdb]today regardless of this decision.Question: Remove the unused
relational_dbconstant, or is a future[relational_db]backend selector planned?3.
[websocket_ping_frequency]: documented, never readcfg/xrpld-example.cfg:360(a[websocket_ping_frequency]section with a description of WebSocket ping interval).
Question: Implement the WebSocket ping interval, or remove the documentation?
4.
transaction_queue.zero_basefee_transaction_feelevel: documented, never readcfg/xrpld-example.cfg:681(under[transaction_queue], default256000).TxQ::Setupand not parsed insetup_TxQ. Setting it has noeffect.
Question: Implement the zero-base-fee fee-level override, or remove the
documentation?
Suggested action
If confirmed dead, a single small PR can:
kSntpandkRelationalDbfrominclude/xrpl/config/Constants.h.[websocket_ping_frequency]andzero_basefee_transaction_feelevelblocks from
cfg/xrpld-example.cfg.If any are intended features, this issue can be repurposed to track their
implementation instead.
Notes
undocumented-but-functional settings, which are handled as separate
documentation PRs.