DEVELOPERS / CLI REFERENCE
Every flag,
source first.
Flags and subcommands of the xone binary from docs/cli/flags.md at xOneRS commit 5af188d. A default shown as Not documented is not stated in that file.
60 of 60
| Flag | Default | Aliases and deprecation | Meaning | Source |
|---|---|---|---|---|
| --datadir <path> | xone-data | None | Data directory for the databases and the chain marker. | flags.go:93 ; geth,xone |
| --networkid <n> | chain id of the profile or genesis | None | Network id. Must equal the chain id of the genesis in use. | flags.go:141 ; geth,xone |
| --syncmode full|snap|fast | full | None | Blockchain sync mode. full executes from genesis. snap, on an empty datadir, downloads the state at a pivot over snap/1 with every range proven, from any snap/1 peer (geth-XDC included; the store is keyed by hash, no preimages are needed), installs it as an anchored datadir and executes from pivot+1 (spec/snap/pivot.md); on a datadir that holds a chain it continues that chain. fast is an alias of snap, as in geth-XDC. | flags.go:299 ; geth,xone |
| --snap.pins <path> | unset | None | Pins file for --syncmode snap (`<number> <0x hash>` per line): the pivot's epoch-switch header (or the pivot) must be in it. Unset: two peers must serve the same switch header. Recommended beyond test networks. | not in geth-XDC at the pin; XB-17 |
| --snap.gap-rpc <path> | unset | None | For --syncmode snap from geth-XDC peers: any archive RPC that serves eth_getProof. The 0x88 state of the gap blocks below the pivot is read from it (geth serves snap/1 only for recent state); every account and slot proof is verified against the header's state root, so the RPC is not trusted. Unset and no xOne peer: the start fails with a typed error naming both. | xone; spec/snap/pivot.md |
| --state.disk | false | None | Read the head state and its Merkle tries from the MDBX tables (behind bounded caches, trie nodes by position) instead of holding them in memory; checkpoints and the snap install carry no state rows. A memory-state datadir starts with it; one written with it must be started with it. A node on disk state serves no snap/1 or snapshot export (docs/ops/disk-state.md). | xone; issue #145 |
| --gcmode full | full | None | State garbage collection mode. Only full is implemented: archive is refused with a typed error (state is pruned to the state window). | flags.go:338 |
| --syncfromblock <n> | unset | None | First block to import; unset means from genesis. xone-defined. | not in geth-XDC at the pin; task list |
| --minimal | false | None | Start from the anchor of an imported snapshot (`xone snapshot import`), keep only the retention window, never sync from genesis or read an archive. | not in geth-XDC at the pin; issue #38 |
| --cache <n> | 4096 | None | Megabytes of memory for internal caches. | flags.go:556 |
| --history.transactions <n> | 2350000 | -txlookuplimit is deprecated; use --history.transactions | Recent blocks whose transactions stay indexed; 0 is the whole chain. | flags.go:379 |
| --port <n> | 30303 | None | P2P listening port (TCP). | flags.go:969 ; geth,xone |
| --discovery.port <n> | same as port | None | P2P discovery port (UDP). | flags.go:1026 ; xone |
| --maxpeers <n> | 50 | None | Maximum peers; 0 disables networking. | flags.go:957 ; geth,xone |
| --nodiscover | false | None | Disable peer discovery. | flags.go:997 |
| --nat <string> | unset | None | NAT port mapping: any, none, upnp, pmp, extip:<IP>. | flags.go:991 ; geth,xone |
| --bootnodes <a,b,..> | built-in for the profile | None | Comma-separated enode URLs for discovery bootstrap. | flags.go:975 ; geth,xone |
| --identity <string> | unset | None | Node name shown to peers and ethstats. | flags.go:199 ; geth |
| --http | false | None | Enable the HTTP-RPC server. | flags.go:829 ; geth,xone |
| --http.addr <string> | localhost | None | HTTP-RPC listen address. | flags.go:834 ; geth,xone |
| --http.port <n> | 8545 | None | HTTP-RPC listen port. | flags.go:840 ; geth,xone |
| --http.api <a,b,..> | eth,net,web3 | None | APIs offered over HTTP-RPC. | flags.go:858 ; geth,xone |
| --http.corsdomain <a,b,..> | none | None | Allowed CORS origins for HTTP-RPC. | flags.go:846 ; geth |
| --http.vhosts <a,b,..> | localhost | None | Allowed virtual hosts for HTTP-RPC. | flags.go:852 ; geth,xone |
| --ws | false | None | Enable the WebSocket-RPC server. | flags.go:887 ; geth |
| --ws.addr <string> | localhost | None | WebSocket-RPC listen address. | flags.go:892 ; geth |
| --ws.port <n> | 8546 | None | WebSocket-RPC listen port. | flags.go:898 ; geth |
| --ws.api <a,b,..> | eth,net,web3 | None | APIs offered over WebSocket-RPC. | flags.go:904 ; geth |
| --ws.origins <a,b,..> | none | None | Allowed origins for WebSocket-RPC. | flags.go:910 ; geth |
| --rpc.jwtsecret <path> | unset | None | JWT secret file (32 bytes hex): HTTP and WebSocket RPC then require an HS256 bearer token. IPC is not affected. | reth --rpc.jwtsecret; geth node/jwt_handler.go |
| --authrpc.addr <string> | localhost | None | Authenticated RPC listen address. | flags.go:761 |
| --authrpc.port <n> | 8551 | None | Authenticated RPC listen port. | flags.go:767 ; geth,xone |
| --authrpc.vhosts <a,b,..> | localhost | None | Allowed virtual hosts for authenticated RPC. | flags.go:773 |
| --authrpc.jwtsecret <path> | unset | None | Path of the JWT secret file for authenticated RPC. | flags.go:779 |
| --ipcdisable | false | None | Disable the IPC server. | flags.go:819 |
| --ipcpath <path> | <datadir>/xone.ipc | None | IPC socket path. | flags.go:824 |
| --mine | false | deprecated; the source names no replacement | Enable block production (deprecated spelling kept for XDC tooling). | flags_legacy.go:125 |
| --miner.etherbase <string> | unset | None | Address that receives block rewards. | flags_legacy.go:119 |
| --unlock <a,b,..> | none | None | Accounts to unlock, comma-separated. | flags_legacy.go:144 |
| --password <path> | unset | None | File with the account password; the password is never a flag. | flags.go:672 |
| --keystore <path> | unset | None | Keystore file of the validator key. Block production (--mine) needs it with --password, and is refused on chain id 50 in this build. | flags.go:124 ; xone |
| --ethstats <string> | unset | None | Stats server as name:secret@host:port. | flags.go:786 ; geth,xone |
| --verbosity <n> | 3 | None | Log level: 0 silent, 1 error, 2 warn, 3 info, 4 debug, 5 detail. | internal/debug/flags.go:42 |
| --log.format text|json | text | None | Log line format. json writes one object per line (t, lvl, target, msg, then the fields); the byte budgets and redaction are the same as text. | internal/debug/flags.go:59 |
| --log.vmodule <string> | unset | -vmodule is deprecated; use --log.vmodule | Per-target verbosity as target=level pairs; a target is a crate or module path (xone_net, xone_sync::snap), longest match wins. geth matches file patterns instead. | internal/debug/flags.go:47 |
| --override.genesis <path> | unset | None | Genesis file; the datadir is initialised from it on first start. | flags.go:294 ; xone |
| --chainspec <path> | unset | None | Fork table of a private chain (one network, the format of generated/forks.json); refused for chain ids 50 and 51. | not in geth-XDC; xone-defined |
| --xdcmainnet | false | None | XDC mainnet profile (chain 50). | flags.go:166 |
| --apothem | false | None | XDC Apothem profile (chain 51). | flags.go:171 |
| --xdcdevnet | false | None | XDC devnet profile (chain 5551). | flags.go:176 |
| --net2040 | false | None | XDC net2040 end-to-end devnet profile (chain 2040). | chainspec genesis/net2040.json ; xone |
| --network <string> | unset | None | Built-in network by name: mainnet, apothem, devnet or net2040; same as the profile flags. | xone |
| --config <path> | unset | None | TOML config file; flags override it. Not a config key. | cmd/geth/config.go:65 |
| --metrics | false | None | Enable the metrics endpoint. | flags.go:1074 |
| --metrics.addr <string> | 127.0.0.1 | None | Metrics listen address. | flags.go:1083 |
| --metrics.port <n> | 6060 | None | Metrics listen port. | flags.go:1088 |
| --pprof | false | None | Enable the profiling endpoint. | internal/debug/flags.go:106 |
| --pprof.addr <string> | 127.0.0.1 | None | Profiling listen address. | internal/debug/flags.go:117 |
| --pprof.port <n> | 6060 | None | Profiling listen port. | internal/debug/flags.go:111 |
| --version | false | alias -V | Print the version stamp and exit; never opens the datadir. Short form -V. | join.sh:481 (xOneGo lesson) |
Subcommands
The subcommands below are listed in the same file. Run the binary with the subcommand for its own help.
init <genesis.json>
version
dumpconfig
genesis-hash --network <name>
import <file>
export <file> [from] [to] --input <blockfile>
snapshot export --datadir <dir> --out <file> [--at <block>]
snapshot import --datadir <dir> --in <file> --pins <file>Precedence
A flag wins over the --config file. An environment variable XONE_<NAME> sits between them. An unknown flag exits with code 2. The source file gives the full rules.
FOLLOW THE SOURCE
Reviewed 14 November 2026. Repository guides hold the current implementation details.
KEEP THE CURIOSITY GOING
Another way in.
Edit this page on GitHub opens the data definition (data/site-pages.js). GitHub may ask you to sign in. Report a correction opens a prefilled GitHub issue for this page.