Skip to main content
Quantum Chain is configured through three layers: the genesis file (chain rules), geth command-line flags (runtime), and JSON-RPC API admin calls (live).

Genesis file

A complete mainnet genesis lives at configs/mainnet/genesis.json. The fields specific to Quantum Chain are:
FieldTypeRequiredNotes
config.chainIdintyes20803 for mainnet
config.quantumVerificationBlockintyesBlock height at which post-quantum signature verification activates
config.clique.periodintyesBlock time in seconds (mainnet: 15)
config.clique.epochintyesValidator change epoch (mainnet: 30000)
publicKeyhex stringyesPost-quantum public key bound to the genesis block
extraDatahex stringyesEncoded list of initial sealers
allocmapnoPre-funded balances
Standard Ethereum hard-fork toggles (homesteadBlock, byzantiumBlock, … londonBlock) work as in upstream geth.

Geth flags

The most common production flags are listed below. Run geth --help for the full list.

Networking

FlagDefaultPurpose
--networkid <int>1Set to 20803 for Quantum Chain mainnet
--datadir <path>~/.ethereumStorage location
--syncmode snap|full|lightsnapSnap sync recommended for full nodes
--port <int>30303P2P listen port
--bootnodes <enode,...>Override default bootnodes
--maxpeers <int>50Peer cap

JSON-RPC

FlagDefaultPurpose
--httpoffEnable HTTP RPC
--http.addr <ip>127.0.0.1Bind address (use 0.0.0.0 only behind a proxy)
--http.port <int>8545HTTP port
--http.api <list>eth,net,web3API namespaces
--http.corsdomain <list>Allowed CORS origins
--wsoffEnable WebSocket RPC
--ws.addr, --ws.port, --ws.apiWebSocket binding
--rpc.gascap <int>50000000Gas cap on eth_call and gas estimation
--rpc.txfeecap <float>1.0Cap on transaction fees in QRC

Mining (Clique sealer)

FlagDefaultPurpose
--mineoffRun as a Clique sealer
--miner.etherbase <addr>Sealer address
--miner.gaslimit <int>30000000Block gas target
--miner.gasprice <int>1000000000Minimum gas price (wei)

Account unlocking

FlagNotes
--unlock <addr>Unlock a keystore account at startup
--password <file>Path to a passphrase file
--allow-insecure-unlockRequired when HTTP RPC is enabled and accounts are unlocked. Do not use in production.

Storage and pruning

FlagDefaultPurpose
--gcmode archive|fullfullarchive keeps every state trie node forever
--cache <MB>1024LRU cache size; raise for archive nodes
--state.scheme path|hashhashPath-based pruning is faster but newer

TxPool

FlagDefault
--txpool.pricelimit <wei>1000000000
--txpool.accountslots <int>16
--txpool.accountqueue <int>64
--txpool.globalslots <int>5120

Runtime configuration via JSON-RPC

Some parameters are runtime-tunable through the admin_*, miner_*, and debug_* namespaces:
// Add a peer
admin.addPeer("enode://abc...@1.2.3.4:30303")

// Adjust mining gas price
miner.setGasPrice(2000000000)

// Adjust mining gas limit
miner.setGasLimit(60000000)
These namespaces must be enabled with --http.api admin,miner,debug and should never be exposed publicly.

Validator (Clique sealer)

geth \
  --datadir /var/lib/geth \
  --networkid 20803 \
  --syncmode full \
  --gcmode full \
  --port 30303 \
  --maxpeers 50 \
  --mine \
  --miner.etherbase 0x... \
  --unlock 0x... \
  --password /etc/geth/password \
  --http --http.addr 127.0.0.1 --http.api eth,net,web3 \
  --metrics --metrics.addr 0.0.0.0 --metrics.port 6060
Always run validators without --http.addr 0.0.0.0. Expose only on localhost.

Public RPC node

geth \
  --datadir /var/lib/geth \
  --networkid 20803 \
  --syncmode snap \
  --http --http.addr 0.0.0.0 --http.port 8545 \
  --http.api eth,net,web3 \
  --http.corsdomain "*" \
  --http.vhosts "*" \
  --ws --ws.addr 0.0.0.0 --ws.api eth,net,web3 \
  --rpc.gascap 50000000 \
  --rpc.txfeecap 5
Place behind a TLS reverse proxy (nginx, Caddy) and a rate limiter.

Archive node

geth \
  --datadir /var/lib/geth-archive \
  --networkid 20803 \
  --syncmode full \
  --gcmode archive \
  --cache 8192 \
  --http --http.api eth,net,web3,debug,trace

Where to go next