Skip to content

Remove (or implement) unused config section constants and non-functional documented config keys #8146

Description

@xrpl365

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions