docs: Document additional config settings - #8148
Open
xrpl365 wants to merge 1 commit into
Open
Conversation
Add commented examples for supported settings that were missing from the example config.
Contributor
There was a problem hiding this comment.
🟡 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 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The server reads a number of configuration settings that the shipped example
config (
cfg/xrpld-example.cfg) andcfg/validators-example.txtnever 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/xrpldandsrc/libxrpl(section(...),valueOr/value_or,exists,get/getIfExists/get<T>,set(...),getSingleSection,legacy, andoperator[], resolving the section and keyconstants in
include/xrpl/config/Constants.h) and diffing that set againsteverything documented in the two shipped files. Read-sites in
src/testwereexcluded, 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.cfgPeer Protocol:
[peers_in_max]/[peers_out_max]: inbound/outbound peer connectionlimits. 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). Theolder
vp_enableis documented as a deprecated alias.[hashrouter]:hold_time(default 300s, min 12) andrelay_time(default 30s, min 8, must not exceed
hold_time) for duplicate-messagesuppression/relay.
Database:
[ledger_tx_tables]use_tx_tables: default1;0disables the SQLitetransaction index tables, after which
tx,account_tx, andtx_historyreturn
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; onlysqliteis supported (and is the default).
Voting / amendments:
[amendments]/[veto_amendments]: amendments this server votes for oragainst. Each line is a 64-char hex amendment ID followed by its name.
[amendment_majority_time]: how long an amendment must hold majority beforeactivation (default 2 weeks, min 15 minutes).
[features]: force-enables features in locally-built ledgers. Documentedwith 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]: default0; gatesserverOkay()load-balancer healthreporting.
cfg/validators-example.txt[validator_keys]: an additional list of validator public keys, merged with[validators]at startup (kept for backward compatibility). Documentedalongside its sibling validator sections.
How to verify
peers_in_max/peers_out_maxsrc/xrpld/core/detail/Config.cpp:547-577network_quorumsrc/xrpld/core/detail/Config.cpp:676reduce_relaykeyssrc/xrpld/core/detail/Config.cpp:794-861vp_enabledeprecatedvp_base_squelch_enablesrc/xrpld/core/detail/Config.cpp:801-813hashrouterhold/relaysrc/xrpld/app/misc/detail/setup_HashRouter.cpp:26-48; defaultsinclude/xrpl/core/HashRouter.h:112,117use_tx_tablessrc/xrpld/core/detail/Config.cpp:413-414; gated insrc/xrpld/app/rdb/backend/detail/SQLiteDatabase.cppnode_dbRocksDB keyssrc/libxrpl/nodestore/backend/RocksDBFactory.cpp:117-170sqdbbackendsqlite; onlysqliteacceptedsrc/libxrpl/rdb/SociDB.cpp:55-59amendments/veto_amendmentssrc/xrpld/app/main/Application.cpp:1245-1247; parsesrc/xrpld/app/misc/detail/AmendmentTable.cpp:50-80amendment_majority_timesrc/xrpld/core/detail/Config.cpp:959-993; defaultinclude/xrpl/protocol/SystemParameters.h:81featuressrc/xrpld/core/detail/Config.cpp:1164-1176sweep_intervalsrc/xrpld/core/detail/Config.cpp:740-747; usesrc/xrpld/app/main/Application.cpp:929-931elb_supportsrc/xrpld/app/main/Application.cpp:2106validator_keys[validators]src/xrpld/core/detail/Config.cpp:1080-1153Notes for reviewers
operators (the raw
options/bbt_optionsstrings,filter_bits,filter_full,block_size,universal_compaction, andrq_bundle) wereintentionally left undocumented to keep the example file focused. They can be
added on request.
Type of change
docs:documentation only, no functional change.