Legacy and hidden flags
This document gives a full list of legacy and hidden flags at harmony CLI interface. There are briefly two types of legacy flags:
- Flag is only for developer usage, thus is hidden from user to have a simple interface.
- Flag is a legacy from previous versions and exist for backward compatibility.
1. Hidden flags
--port
Harmony binary used to have one port settings and all other port is a magic math from this base port:
- P2P port use exactly this port val
- HTTP port use val + 500
- Websocket port use val + 800
- DNS port use val - 3000
Port is also persisted in each log message and exist in log file name.
--ip
Harmony used to have IP as the public IP of a node only for logging message display, but does not effect the address the service is listening on. In latest implementation, the IP field is defined as the address listen on. 0.0.0.0 for public endpoint.
IP is also persisted in each log message and exist in log file name.
--public_rpc
If set to true, open public HTTP and WS endpoints. Equivalent to --http.ip=0.0.0.0 --ws.ip=0.0.0.0
.
--log.ctx.ip
& --log.ctx.port
IP and port used for log message and log file name. legacy of --ip
and --port
fields. Will remove in the future if no service interruption.
1.2 Dev Only (Hidden)
--consensus.min-peers
--min_peers
Dev only. Start consensus only after this number of peers are discovered. Default: 6.
--devnet.num-shard
& --dn_num_shards
/ --devnet.shard-size
& --dn_shard_size
/ --devnet.hmy-node-size
& --dn_hmy_size
If network is of type devnet, apply these fields in shard schedule.
--revert.to
--revert.do-before
--revert.beacon
/ --revert_beacon
--do_revert_before
--revert_to
Revert the blockchain in given condition.
--block_period
No longer available. Hard coded 5s finality according to ChainConfig
.
--delay_commit
No longer available. Default to 0.
--max_bls_keys_per_node
No longer available. Now number of BLS keys per node is hard coded as 10.
--pprof
Used to use as --pprof.addr
, now use two flags: --pprof
and --pprof.addr
.
--node_type
Legacy, equivalent to --run
--staking
Legacy. Staking mode is now enabled by default. Equivalent to --run.legacy=false
--shard_id
Legacy, equivalent to --run.shard
.
--db_dir
Legacy, equivalent to --datadir
--dns_zone
Legacy, equivalent to --dns.zone
--dns_port
Legacy, equivalent to --dns.port
--dns
Legacy. Now dns is enabled by default. Use --dns=false
to use legacy syncing.
--network_type
Legacy, equivalent to --network
.
--key
Legacy, equivalent to --p2p.keyfile
--blskey_file
Legacy, equivalent to bls.keys
.
--blsfolder
Legacy, equivalent to --bls.dir
--blspass
Legacy. Use --bls.pass
, --bls.pass.src
, --bls.pass.file
. Used to have argument --blspass=file:mykey.pass
blspass=stdin
.
--save-passphrase
Legacy, equivalent to --bls.pass.save
.
--aws-config-source
Legacy. Use --bls.kms
, --bls.kms.src
, --bls.kms.config
.
--blacklist
Legacy, equivalent to --txpool.blacklist
--log_folder
Legacy, equivalent to --log.path
--log_max_size
Legacy, equivalent to --log.max-size
--verbosity
Legacy, equivalent to --log.verbosity
2. Full config with hidden fields
Following is the full config file:
Version = "1.0.0"
[BLSKeys]
KMSConfigFile = ""
KMSConfigSrcType = "shared"
KMSEnabled = true
KeyDir = "./.hmy/blskeys"
KeyFiles = []
MaxKeys = 10
PassEnabled = true
PassFile = ""
PassSrcType = "auto"
SavePassphrase = false
[Consensus]
MinPeers = 6
[Devnet]
HmyNodeSize = 10
NumShards = 2
ShardSize = 10
[General]
DataDir = "./"
IsArchival = false
NoStaking = false
NodeType = "validator"
ShardID = -1
[HTTP]
Enabled = true
IP = "127.0.0.1"
Port = 9500
[Legacy]
TPBroadcastInvalidTxn = true
WebHookConfig = "web hook"
[Log]
FileName = "validator-127.0.0.1-9000.log"
Folder = "./latest"
RotateSize = 100
Verbosity = 3
[Log.Context]
IP = "127.0.0.1"
Port = 9000
[Network]
BootNodes = ["/ip4/100.26.90.187/tcp/9874/p2p/Qmdfjtk6hPoyrH1zVD9PEH4zfWLo38dP2mDvvKXfh3tnEv","/ip4/54.213.43.194/tcp/9874/p2p/QmZJJx6AdaoEkGLrYG4JeLCKeCKDjnFz2wfHNHxAqFSGA9","/ip4/13.113.101.219/tcp/12019/p2p/QmQayinFSgMMw5cSpDUiD9pQ2WeP6WNmGxpZ6ou3mdVFJX","/ip4/99.81.170.167/tcp/12019/p2p/QmRVbTpEYup8dSaURZfF6ByrMTSKa4UyUzJhSjahFzRqNj"]
DNSPort = 9000
DNSZone = "t.hmny.io"
LegacySyncing = false
NetworkType = "mainnet"
[P2P]
KeyFile = "./.hmykey"
Port = 9000
[Pprof]
Enabled = false
ListenAddr = "127.0.0.1:6060"
[Revert]
RevertBeacon = false
RevertBefore = 0
RevertTo = 0
[TxPool]
BlacklistFile = "./.hmy/blacklist.txt"
[WS]
Enabled = true
IP = "127.0.0.1"
Port = 9800