Skip to content

docs: Document additional config settings - #8148

Open
xrpl365 wants to merge 1 commit into
XRPLF:developfrom
xrpl365:xrpl365/document-config-settings
Open

docs: Document additional config settings#8148
xrpl365 wants to merge 1 commit into
XRPLF:developfrom
xrpl365:xrpl365/document-config-settings

Conversation

@xrpl365

@xrpl365 xrpl365 commented Aug 31, 2026

Copy link
Copy Markdown

Summary

The server reads a number of configuration settings that the shipped example
config (cfg/xrpld-example.cfg) and cfg/validators-example.txt never mention,
so operators can only discover them by reading the source. This PR adds
commented-out documentation for the operator-facing ones, with every value,
default, and constraint verified against the parsing code.

Everything added is commented out, so there is no behavior change.

How these were found

Rather than work from the existing docs, each setting was found by enumerating
every config read-site in src/xrpld and src/libxrpl (section(...),
valueOr/value_or, exists, get/getIfExists/get<T>, set(...),
getSingleSection, legacy, and operator[], resolving the section and key
constants in include/xrpl/config/Constants.h) and diffing that set against
everything documented in the two shipped files. Read-sites in src/test were
excluded, so every setting below is read by production code. Defaults and
constraints were then read directly from the source lines cited in the table.

Changes

cfg/xrpld-example.cfg

Peer Protocol:

  • [peers_in_max] / [peers_out_max]: inbound/outbound peer connection
    limits. Must be set together; ignored if the legacy [peers_max] is set.
  • [network_quorum]: minimum connected peers before joining consensus
    (default 1; not the UNL/validation quorum).
  • [reduce_relay]: bandwidth-reduction options: vp_base_squelch_enable
    (default off), vp_base_squelch_max_selected_peers (5), tx_enable (off),
    tx_min_peers (20), tx_relay_percentage (25), tx_metrics (off). The
    older vp_enable is documented as a deprecated alias.
  • [hashrouter]: hold_time (default 300s, min 12) and relay_time
    (default 30s, min 8, must not exceed hold_time) for duplicate-message
    suppression/relay.

Database:

  • [ledger_tx_tables] use_tx_tables: default 1; 0 disables the SQLite
    transaction index tables, after which tx, account_tx, and tx_history
    return notEnabled. Does not stop transactions being stored in ledgers.
  • [node_db] RocksDB-only tuning keys: cache_mb, open_files,
    file_size_mb, file_size_mult, bg_threads, high_threads, hard_set
    (documented as optional; the server otherwise sizes them from [node_size]).
  • [sqdb] backend: selects the relational-database backend; only sqlite
    is supported (and is the default).

Voting / amendments:

  • [amendments] / [veto_amendments]: amendments this server votes for or
    against. Each line is a 64-char hex amendment ID followed by its name.
  • [amendment_majority_time]: how long an amendment must hold majority before
    activation (default 2 weeks, min 15 minutes).
  • [features]: force-enables features in locally-built ledgers. Documented
    with a clear note that it is for standalone/testing only and can cause a
    networked server to lose sync or stop processing (downtime).

Misc:

  • [sweep_interval]: cache sweep interval in seconds (10 to 600; derived from
    [node_size] when unset).
  • [elb_support]: default 0; gates serverOkay() load-balancer health
    reporting.

cfg/validators-example.txt

  • [validator_keys]: an additional list of validator public keys, merged with
    [validators] at startup (kept for backward compatibility). Documented
    alongside its sibling validator sections.

How to verify

Setting Default / constraint Source of truth
peers_in_max / peers_out_max max 1000 / 10 to 1000; must pair src/xrpld/core/detail/Config.cpp:547-577
network_quorum default 1 src/xrpld/core/detail/Config.cpp:676
reduce_relay keys off / 5 / off / 20 / 25 / off src/xrpld/core/detail/Config.cpp:794-861
vp_enable deprecated error if set with vp_base_squelch_enable src/xrpld/core/detail/Config.cpp:801-813
hashrouter hold/relay 300s (min 12) / 30s (min 8, at most hold_time) src/xrpld/app/misc/detail/setup_HashRouter.cpp:26-48; defaults include/xrpl/core/HashRouter.h:112,117
use_tx_tables default true src/xrpld/core/detail/Config.cpp:413-414; gated in src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp
node_db RocksDB keys optional; node-size derived if unset src/libxrpl/nodestore/backend/RocksDBFactory.cpp:117-170
sqdb backend default sqlite; only sqlite accepted src/libxrpl/rdb/SociDB.cpp:55-59
amendments / veto_amendments hex ID + name per line src/xrpld/app/main/Application.cpp:1245-1247; parse src/xrpld/app/misc/detail/AmendmentTable.cpp:50-80
amendment_majority_time default 2 weeks, min 15 min src/xrpld/core/detail/Config.cpp:959-993; default include/xrpl/protocol/SystemParameters.h:81
features feature names; standalone/test src/xrpld/core/detail/Config.cpp:1164-1176
sweep_interval 10 to 600s; node-size derived src/xrpld/core/detail/Config.cpp:740-747; use src/xrpld/app/main/Application.cpp:929-931
elb_support default 0 src/xrpld/app/main/Application.cpp:2106
validator_keys merged into [validators] src/xrpld/core/detail/Config.cpp:1080-1153

Notes for reviewers

  • Some advanced RocksDB configs that are read but unlikely to be useful to most
    operators (the raw options/bbt_options strings, filter_bits,
    filter_full, block_size, universal_compaction, and rq_bundle) were
    intentionally left undocumented to keep the example file focused. They can be
    added on request.

Type of change

docs: documentation only, no functional change.

Add commented examples for supported settings that were missing from
the example config.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new [elb_support] documentation omits an availability condition actually enforced by serverOkay() (“Too much load”), so the operator-facing description is incomplete.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the shipped example configuration files to document additional operator-facing settings that are already parsed/used by the server but previously undocumented in cfg/xrpld-example.cfg and cfg/validators-example.txt, with no behavioral changes (all additions are commented).

Changes:

  • Documents peer/overlay-related settings including [peers_in_max], [peers_out_max], [network_quorum], [reduce_relay], and [hashrouter].
  • Documents additional database-related settings including [ledger_tx_tables] / use_tx_tables, RocksDB tuning keys under [node_db], and [sqdb] backend.
  • Documents amendment/feature-related settings and adds [validator_keys] documentation in the validators example file.
File summaries
File Description
cfg/xrpld-example.cfg Adds commented documentation for several previously-undocumented config sections/keys (peering, relay/hashrouter tuning, DB toggles/tuning, amendments/features, misc).
cfg/validators-example.txt Adds commented documentation for the [validator_keys] section and how it is merged/used at startup.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cfg/xrpld-example.cfg
Comment on lines +1644 to +1648
# (such as an AWS Elastic Load Balancer). When enabled, the server reports
# itself as unavailable while it is shutting down, not yet synchronized with
# the network, amendment-blocked, or without a valid validator list, so the
# load balancer can route traffic away from it. When disabled, these health
# checks always report the server as available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants