NEXUS

Configuration

To run the EN (Execution Node), you can use either a configuration file or command-line flags. CROSS Chain supports the configuration files and flags provided by go-ethereum.


Example Configuration File

[Eth]
SyncMode = "full"

[Node]
DataDir = "./node"
HTTPHost = "0.0.0.0"
HTTPPort = 22001
HTTPCors = ["*"]
HTTPVirtualHosts = ["*"]
HTTPModules = ["eth", "net", "txpool"]
WSHost = "0.0.0.0"
WSPort = 32001
WSOrigins = ["*"]
WSModules = ["eth", "net", "txpool"]

[Eth.TxPool]
NoLocals = true
Journal = ""

[Node.P2P]
ListenAddr = ":30303"
NoDiscovery = false
DiscoveryV4 = true

Example Command Using Flags

geth --datadir=./node --config=./node/config.toml --nodekey=./nodekey \
     --cross --syncmode=full --port=30303 \
     --metrics --metrics.addr 0.0.0.0 --metrics.expensive

Key Parameter Descriptions

  • --syncmode full: Fully synchronizes all blockchain data including block headers, transactions, and receipts.
  • --datadir {data_folder}: Specifies the directory where blockchain data will be stored. A chaindata folder will be created inside.
  • --http: Enables the HTTP-RPC server, allowing interaction with the node via JSON-RPC APIs.
  • --http.addr 0.0.0.0: Allows access from all interfaces. For production, limit access using a firewall.
  • --cross: Connects to the CROSS mainnet.
  • --crosstest: Connects to the CROSS testnet for development and testing purposes.

Additional Configuration Options

Network:
--cross: Connect to the CROSS mainnet
--crosstest: Connect to the CROSS testnet
--crossdev, --crossdev3: Development test networks

Data & Storage:
--datadir: Directory for database and keystore
--remotedb: Remote database URL

Accounts:
--keystore: Keystore directory
--usb: Enable monitoring and management of USB hardware wallets
--pcscdpath: Path to smartcard daemon socket file

HTTP RPC:
--http: Enable HTTP-RPC server
--http.addr: Listening interface for HTTP-RPC server
--http.port: Listening port for HTTP-RPC (default: 8545)
--http.api: APIs to expose via HTTP-RPC
--http.corsdomain: Allowed domains for browser-based dapps
--http.vhosts: List of virtual hostnames

WebSocket RPC:
--ws: Enable WebSocket RPC server
--ws.addr: Listening interface for WebSocket
--ws.port: Listening port for WebSocket (default: 8546)
--ws.api: APIs to expose via WebSocket
--ws.origins: Allowed origins for WebSocket RPC

GraphQL:
--graphql: Enable GraphQL server
--graphql.corsdomain: Allowed domains for GraphQL
--graphql.vhosts: List of virtual hostnames for GraphQL

P2P Networking:
--port: Listening port for network (default: 30303)
--maxpeers: Maximum number of network peers
--maxpendpeers: Max pending connection requests
--nat: NAT mapping method ("any", "none", "upnp", "pmp", "extip:<IP>")
--nodiscover: Disable peer discovery
--v5disc: Enable experimental RLPx V5 (topic discovery)
--netrestrict: Restrict connections to specified IP ranges
--nodekey: P2P node private key file
--nodekeyhex: P2P node key in hex format
--bootnodes: List of bootstrap node URLs
--identity: Custom node name

Sync & Snapshot:
--syncmode: Blockchain sync mode (default: "snap")
--snapshot: Enable snapshot DB mode
--exitwhensynced: Exit after syncing
--txlookuplimit: Transaction lookup limit (default: 0 = unlimited)

Mining & Gas:
--mine: Enable mining

Transaction Pool:
--txpool.locals: List of accounts for local transactions
--txpool.nolocals: Disable price exceptions for local accounts
--txpool.journal: File to persist local txs between restarts
--txpool.rejournal: Time to regenerate journal
--txpool.pricelimit: Minimum gas price for txpool
--txpool.pricebump: Price bump percentage for replacement txs

Miscellaneous:
--metrics: Enable metrics collection
--metrics.addr: Metrics HTTP server IP
--metrics.port: Metrics HTTP server port
--verbosity: Log level (0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail)
--config: TOML config file
--ipcdisable: Disable IPC-RPC server
--ipcpath: Path to IPC socket/pipe

Sync Mode Descriptions

When syncing the CROSS blockchain, the following options are available:

  • --syncmode full: Syncs all blocks and states from genesis. Requires significant disk space.
  • --syncmode snap: Uses snapshot sync for faster performance.

Node Execution Examples

Standard Full Node

geth --syncmode full --datadir /data/crosschain --http \
     --http.addr 0.0.0.0 --http.port 8545 --http.api eth,net,web3 --cross

Background Execution with Log Output

nohup geth --syncmode full --datadir /data/crosschain --http \
     --http.addr 0.0.0.0 --cross > /var/log/geth.log 2>&1 &

Notes

  • Using --http.addr 0.0.0.0 on mainnet exposes the RPC interface. Protect with firewall rules.
  • Ensure sufficient disk space and network bandwidth for large data loads.
  • For production, use a server with adequate CPU, memory, and disk I/O capabilities.

© 2025 NEXUS Co., Ltd. All Rights Reserved.