github.com/bigzoro/my_simplechain@v0.0.0-20240315012955-8ad0a2a29bb9/cmd/utils/flags_define.go (about)

     1  package utils
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/bigzoro/my_simplechain/core"
     7  	"github.com/bigzoro/my_simplechain/eth"
     8  	"github.com/bigzoro/my_simplechain/node"
     9  	whisper "github.com/bigzoro/my_simplechain/whisper/whisperv6"
    10  	pcsclite "github.com/gballet/go-libpcsclite"
    11  	"gopkg.in/urfave/cli.v1"
    12  )
    13  
    14  var (
    15  	// General settings
    16  	DataDirFlag = DirectoryFlag{
    17  		Name:  "data.dir",
    18  		Usage: "Data directory for the databases and keystore",
    19  		Value: DirectoryString(node.DefaultDataDir()),
    20  	}
    21  	AncientFlag = DirectoryFlag{
    22  		Name:  "data.dir.ancient",
    23  		Usage: "Data directory for ancient chain segments (default = inside chaindata)",
    24  	}
    25  	KeyStoreDirFlag = DirectoryFlag{
    26  		Name:  "keystore",
    27  		Usage: "Directory for the keystore (default = inside the datadir)",
    28  	}
    29  	NoUSBFlag = cli.BoolFlag{
    30  		Name:  "no.usb",
    31  		Usage: "Disables monitoring for and managing USB hardware wallets",
    32  	}
    33  	SmartCardDaemonPathFlag = cli.StringFlag{
    34  		Name:  "pcscdpath",
    35  		Usage: "Path to the smartcard daemon (pcscd) socket file",
    36  		Value: pcsclite.PCSCDSockName,
    37  	}
    38  	NetworkIdFlag = cli.Uint64Flag{
    39  		Name:  "network.id",
    40  		Usage: "Network identifier (integer, 1=Mainnet, 3=Testnet",
    41  		Value: eth.DefaultConfig.NetworkId,
    42  	}
    43  	TestnetFlag = cli.BoolFlag{
    44  		Name:  "testnet",
    45  		Usage: "Ropsten network: pre-configured proof-of-work test network",
    46  	}
    47  	DeveloperFlag = cli.BoolFlag{
    48  		Name:  "dev",
    49  		Usage: "Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled",
    50  	}
    51  	DeveloperPeriodFlag = cli.IntFlag{
    52  		Name:  "dev.period",
    53  		Usage: "Block period to use in developer mode (0 = mine only if transaction pending)",
    54  	}
    55  	IdentityFlag = cli.StringFlag{
    56  		Name:  "identity",
    57  		Usage: "Custom node name",
    58  	}
    59  	DocRootFlag = DirectoryFlag{
    60  		Name:  "doc.root",
    61  		Usage: "Document Root for HTTPClient file scheme",
    62  		Value: DirectoryString(homeDir()),
    63  	}
    64  	ExitWhenSyncedFlag = cli.BoolFlag{
    65  		Name:  "exit.when.synced",
    66  		Usage: "Exits after block synchronisation completes",
    67  	}
    68  	IterativeOutputFlag = cli.BoolFlag{
    69  		Name:  "iterative",
    70  		Usage: "Print streaming JSON iteratively, delimited by newlines",
    71  	}
    72  	ExcludeStorageFlag = cli.BoolFlag{
    73  		Name:  "no.storage",
    74  		Usage: "Exclude storage entries (save db lookups)",
    75  	}
    76  	IncludeIncompletesFlag = cli.BoolFlag{
    77  		Name:  "in.completes",
    78  		Usage: "Include accounts for which we don't have the address (missing preimage)",
    79  	}
    80  	ExcludeCodeFlag = cli.BoolFlag{
    81  		Name:  "no.code",
    82  		Usage: "Exclude contract code (save db lookups)",
    83  	}
    84  	defaultSyncMode = eth.DefaultConfig.SyncMode
    85  	SyncModeFlag    = TextMarshalerFlag{
    86  		Name:  "sync.mode",
    87  		Usage: `Blockchain sync mode ("fast", "full", or "light")`,
    88  		Value: &defaultSyncMode,
    89  	}
    90  	GCModeFlag = cli.StringFlag{
    91  		Name:  "gc.mode",
    92  		Usage: `Blockchain garbage collection mode ("full", "archive")`,
    93  		Value: "full",
    94  	}
    95  	LightKDFFlag = cli.BoolFlag{
    96  		Name:  "lightkdf",
    97  		Usage: "Reduce key-derivation RAM & CPU usage at some expense of KDF strength",
    98  	}
    99  	WhitelistFlag = cli.StringFlag{
   100  		Name:  "whitelist",
   101  		Usage: "Comma separated block number-to-hash mappings to enforce (<number>=<hash>)",
   102  	}
   103  	OverrideSingularityFlag = cli.Uint64Flag{
   104  		Name:  "override.singularity",
   105  		Usage: "Manually specify singularity fork-block, overriding the bundled setting",
   106  	}
   107  	LightServeFlag = cli.IntFlag{
   108  		Name:  "light.serve",
   109  		Usage: "Maximum percentage of time allowed for serving LES requests (multi-threaded processing allows values over 100)",
   110  		Value: eth.DefaultConfig.LightServ,
   111  	}
   112  	LightIngressFlag = cli.IntFlag{
   113  		Name:  "light.ingress",
   114  		Usage: "Incoming bandwidth limit for serving light clients (kilobytes/sec, 0 = unlimited)",
   115  		Value: eth.DefaultConfig.LightIngress,
   116  	}
   117  	LightEgressFlag = cli.IntFlag{
   118  		Name:  "light.egress",
   119  		Usage: "Outgoing bandwidth limit for serving light clients (kilobytes/sec, 0 = unlimited)",
   120  		Value: eth.DefaultConfig.LightEgress,
   121  	}
   122  	LightMaxPeersFlag = cli.IntFlag{
   123  		Name:  "light.max.peers",
   124  		Usage: "Maximum number of light clients to serve, or light servers to attach to",
   125  		Value: eth.DefaultConfig.LightPeers,
   126  	}
   127  	UltraLightServersFlag = cli.StringFlag{
   128  		Name:  "ulc.servers",
   129  		Usage: "List of trusted ultra-light servers",
   130  		Value: strings.Join(eth.DefaultConfig.UltraLightServers, ","),
   131  	}
   132  	UltraLightFractionFlag = cli.IntFlag{
   133  		Name:  "ulc.fraction",
   134  		Usage: "Minimum % of trusted ultra-light servers required to announce a new head",
   135  		Value: eth.DefaultConfig.UltraLightFraction,
   136  	}
   137  	UltraLightOnlyAnnounceFlag = cli.BoolFlag{
   138  		Name:  "ulc.only.announce",
   139  		Usage: "Ultra light server sends announcements only",
   140  	}
   141  	// Ethash settings
   142  	EthashCacheDirFlag = DirectoryFlag{
   143  		Name:  "ethash.cachedir",
   144  		Usage: "Directory to store the ethash verification caches (default = inside the datadir)",
   145  	}
   146  	EthashCachesInMemoryFlag = cli.IntFlag{
   147  		Name:  "ethash.cachesinmem",
   148  		Usage: "Number of recent ethash caches to keep in memory (16MB each)",
   149  		Value: eth.DefaultConfig.Ethash.CachesInMem,
   150  	}
   151  	EthashCachesOnDiskFlag = cli.IntFlag{
   152  		Name:  "ethash.cachesondisk",
   153  		Usage: "Number of recent ethash caches to keep on disk (16MB each)",
   154  		Value: eth.DefaultConfig.Ethash.CachesOnDisk,
   155  	}
   156  	EthashDatasetDirFlag = DirectoryFlag{
   157  		Name:  "ethash.dagdir",
   158  		Usage: "Directory to store the ethash mining DAGs",
   159  		Value: DirectoryString(eth.DefaultConfig.Ethash.DatasetDir),
   160  	}
   161  	EthashDatasetsInMemoryFlag = cli.IntFlag{
   162  		Name:  "ethash.dagsinmem",
   163  		Usage: "Number of recent ethash mining DAGs to keep in memory (1+GB each)",
   164  		Value: eth.DefaultConfig.Ethash.DatasetsInMem,
   165  	}
   166  	EthashDatasetsOnDiskFlag = cli.IntFlag{
   167  		Name:  "ethash.dagsondisk",
   168  		Usage: "Number of recent ethash mining DAGs to keep on disk (1+GB each)",
   169  		Value: eth.DefaultConfig.Ethash.DatasetsOnDisk,
   170  	}
   171  	// Transaction pool settings
   172  	TxPoolLocalsFlag = cli.StringFlag{
   173  		Name:  "tx.pool.locals",
   174  		Usage: "Comma separated accounts to treat as locals (no flush, priority inclusion)",
   175  	}
   176  	TxPoolNoLocalsFlag = cli.BoolFlag{
   177  		Name:  "tx.pool.nolocals",
   178  		Usage: "Disables price exemptions for locally submitted transactions",
   179  	}
   180  	TxPoolJournalFlag = cli.StringFlag{
   181  		Name:  "tx.pool.journal",
   182  		Usage: "Disk journal for local transaction to survive node restarts",
   183  		Value: core.DefaultTxPoolConfig.Journal,
   184  	}
   185  	TxPoolRejournalFlag = cli.DurationFlag{
   186  		Name:  "tx.pool.re.journal",
   187  		Usage: "Time interval to regenerate the local transaction journal",
   188  		Value: core.DefaultTxPoolConfig.Rejournal,
   189  	}
   190  	TxPoolPriceLimitFlag = cli.Uint64Flag{
   191  		Name:  "tx.pool.price.limit",
   192  		Usage: "Minimum gas price limit to enforce for acceptance into the pool",
   193  		Value: eth.DefaultConfig.TxPool.PriceLimit,
   194  	}
   195  	TxPoolPriceBumpFlag = cli.Uint64Flag{
   196  		Name:  "tx.pool.price.bump",
   197  		Usage: "Price bump percentage to replace an already existing transaction",
   198  		Value: eth.DefaultConfig.TxPool.PriceBump,
   199  	}
   200  	TxPoolAccountSlotsFlag = cli.Uint64Flag{
   201  		Name:  "tx.pool.account.slots",
   202  		Usage: "Minimum number of executable transaction slots guaranteed per account",
   203  		Value: eth.DefaultConfig.TxPool.AccountSlots,
   204  	}
   205  	TxPoolGlobalSlotsFlag = cli.Uint64Flag{
   206  		Name:  "tx.pool.global.slots",
   207  		Usage: "Maximum number of executable transaction slots for all accounts",
   208  		Value: eth.DefaultConfig.TxPool.GlobalSlots,
   209  	}
   210  	TxPoolAccountQueueFlag = cli.Uint64Flag{
   211  		Name:  "tx.pool.account.queue",
   212  		Usage: "Maximum number of non-executable transaction slots permitted per account",
   213  		Value: eth.DefaultConfig.TxPool.AccountQueue,
   214  	}
   215  	TxPoolGlobalQueueFlag = cli.Uint64Flag{
   216  		Name:  "tx.pool.global.queue",
   217  		Usage: "Maximum number of non-executable transaction slots for all accounts",
   218  		Value: eth.DefaultConfig.TxPool.GlobalQueue,
   219  	}
   220  	TxPoolLifetimeFlag = cli.DurationFlag{
   221  		Name:  "tx.pool.lifetime",
   222  		Usage: "Maximum amount of time non-executable transaction are queued",
   223  		Value: eth.DefaultConfig.TxPool.Lifetime,
   224  	}
   225  	// Performance tuning settings
   226  	CacheFlag = cli.IntFlag{
   227  		Name:  "cache",
   228  		Usage: "Megabytes of memory allocated to internal caching (default = 4096 mainnet full node, 128 light mode)",
   229  		Value: 1024,
   230  	}
   231  	CacheDatabaseFlag = cli.IntFlag{
   232  		Name:  "cache.database",
   233  		Usage: "Percentage of cache memory allowance to use for database io",
   234  		Value: 50,
   235  	}
   236  	CacheTrieFlag = cli.IntFlag{
   237  		Name:  "cache.trie",
   238  		Usage: "Percentage of cache memory allowance to use for trie caching (default = 25% full mode, 50% archive mode)",
   239  		Value: 25,
   240  	}
   241  	CacheGCFlag = cli.IntFlag{
   242  		Name:  "cache.gc",
   243  		Usage: "Percentage of cache memory allowance to use for trie pruning (default = 25% full mode, 0% archive mode)",
   244  		Value: 25,
   245  	}
   246  	CacheNoPrefetchFlag = cli.BoolFlag{
   247  		Name:  "cache.noprefetch",
   248  		Usage: "Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data)",
   249  	}
   250  	// Miner settings
   251  	MiningEnabledFlag = cli.BoolFlag{
   252  		Name:  "mine",
   253  		Usage: "Enable mining",
   254  	}
   255  	MinerThreadsFlag = cli.IntFlag{
   256  		Name:  "miner.threads",
   257  		Usage: "Number of CPU threads to use for mining",
   258  		Value: 0,
   259  	}
   260  	MinerNotifyFlag = cli.StringFlag{
   261  		Name:  "miner.notify",
   262  		Usage: "Comma separated HTTP URL list to notify of new work packages",
   263  	}
   264  	MinerGasTargetFlag = cli.Uint64Flag{
   265  		Name:  "miner.gas.target",
   266  		Usage: "Target gas floor for mined blocks",
   267  		Value: eth.DefaultConfig.Miner.GasFloor,
   268  	}
   269  	MinerGasLimitFlag = cli.Uint64Flag{
   270  		Name:  "miner.gas.limit",
   271  		Usage: "Target gas ceiling for mined blocks",
   272  		Value: eth.DefaultConfig.Miner.GasCeil,
   273  	}
   274  	MinerGasPriceFlag = BigFlag{
   275  		Name:  "miner.gas.price",
   276  		Usage: "Minimum gas price for mining a transaction",
   277  		Value: eth.DefaultConfig.Miner.GasPrice,
   278  	}
   279  	MinerEtherbaseFlag = cli.StringFlag{
   280  		Name:  "miner.ether.base",
   281  		Usage: "Public address for block mining rewards (default = first account)",
   282  		Value: "0",
   283  	}
   284  	MinerExtraDataFlag = cli.StringFlag{
   285  		Name:  "miner.extra.data",
   286  		Usage: "Block extra data set by the miner (default = client version)",
   287  	}
   288  	MinerRecommitIntervalFlag = cli.DurationFlag{
   289  		Name:  "miner.recommit",
   290  		Usage: "Time interval to recreate the block being mined",
   291  		Value: eth.DefaultConfig.Miner.Recommit,
   292  	}
   293  	MinerNoVerifyFlag = cli.BoolFlag{
   294  		Name:  "miner.no.verify",
   295  		Usage: "Disable remote sealing verification",
   296  	}
   297  	MinerNoEmptyBlockFlag = cli.BoolFlag{
   298  		Name:  "miner.no.empty",
   299  		Usage: "do not generate empty block",
   300  	}
   301  	MinerTxLimitFlag = cli.IntFlag{
   302  		Name:  "miner.txlimit",
   303  		Usage: "Target tx for mined blocks",
   304  		Value: eth.DefaultConfig.Miner.TxLimit,
   305  	}
   306  	EnableNodePermissionFlag = cli.BoolFlag{
   307  		Name:  "permission",
   308  		Usage: "If enabled, the node will allow only a defined list of nodes to connect",
   309  	}
   310  	// UnlockedAccountFlag Account settings
   311  	UnlockedAccountFlag = cli.StringFlag{
   312  		Name:  "unlock",
   313  		Usage: "Comma separated list of accounts to unlock",
   314  		Value: "",
   315  	}
   316  	PasswordFileFlag = cli.StringFlag{
   317  		Name:  "password",
   318  		Usage: "Password file to use for non-interactive password input",
   319  		Value: "",
   320  	}
   321  	ExternalSignerFlag = cli.StringFlag{
   322  		Name:  "signer",
   323  		Usage: "External signer (url or path to ipc file)",
   324  		Value: "",
   325  	}
   326  	VMEnableDebugFlag = cli.BoolFlag{
   327  		Name:  "vmdebug",
   328  		Usage: "Record information useful for VM and contract debugging",
   329  	}
   330  	InsecureUnlockAllowedFlag = cli.BoolFlag{
   331  		Name:  "allow-insecure-unlock",
   332  		Usage: "Allow insecure account unlocking when account-related RPCs are exposed by http",
   333  	}
   334  	RPCGlobalGasCap = cli.Uint64Flag{
   335  		Name:  "rpc.gascap",
   336  		Usage: "Sets a cap on gas that can be used in eth_call/estimateGas",
   337  	}
   338  	// Logging and debug settings
   339  	EthStatsURLFlag = cli.StringFlag{
   340  		Name:  "ethstats",
   341  		Usage: "Reporting URL of a ethstats service (nodename:secret@host:port)",
   342  	}
   343  	FakePoWFlag = cli.BoolFlag{
   344  		Name:  "fakepow",
   345  		Usage: "Disables proof-of-work verification",
   346  	}
   347  	NoCompactionFlag = cli.BoolFlag{
   348  		Name:  "nocompaction",
   349  		Usage: "Disables db compaction after import",
   350  	}
   351  	PeerTLSEnabledFlag = cli.BoolFlag{
   352  		Name:  "peer.tls.enable",
   353  		Usage: "enable tls",
   354  	}
   355  	PeerTLSDirFlag = cli.StringFlag{
   356  		Name:  "peer.tls.dir",
   357  		Usage: "peer tls dir",
   358  		Value: "./tls",
   359  	}
   360  	APITLSEnabledFlag = cli.BoolFlag{
   361  		Name:  "api.tls.enable",
   362  		Usage: "enable api tls(for http and websocket)",
   363  	}
   364  	IPCDisabledFlag = cli.BoolFlag{
   365  		Name:  "ipcdisable",
   366  		Usage: "Disable the IPC-RPC server",
   367  	}
   368  	IPCPathFlag = DirectoryFlag{
   369  		Name:  "ipcpath",
   370  		Usage: "Filename for IPC socket/pipe within the datadir (explicit paths escape it)",
   371  	}
   372  	RPCEnabledFlag = cli.BoolFlag{
   373  		Name:  "http",
   374  		Usage: "Enable the HTTP-RPC server",
   375  	}
   376  	RPCListenAddrFlag = cli.StringFlag{
   377  		Name:  "http.addr",
   378  		Usage: "HTTP-RPC server listening interface",
   379  		Value: node.DefaultHTTPHost,
   380  	}
   381  	RPCPortFlag = cli.IntFlag{
   382  		Name:  "http.port",
   383  		Usage: "HTTP-RPC server listening port",
   384  		Value: node.DefaultHTTPPort,
   385  	}
   386  	RPCCORSDomainFlag = cli.StringFlag{
   387  		Name:  "http.cors.domain",
   388  		Usage: "Comma separated list of domains from which to accept cross origin requests (browser enforced)",
   389  		Value: "",
   390  	}
   391  	RPCVirtualHostsFlag = cli.StringFlag{
   392  		Name:  "http.vhosts",
   393  		Usage: "Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard.",
   394  		Value: strings.Join(node.DefaultConfig.HTTPVirtualHosts, ","),
   395  	}
   396  	RPCApiFlag = cli.StringFlag{
   397  		Name:  "http.api",
   398  		Usage: "API's offered over the HTTP-RPC interface",
   399  		Value: "",
   400  	}
   401  	WSEnabledFlag = cli.BoolFlag{
   402  		Name:  "ws",
   403  		Usage: "Enable the WS-RPC server",
   404  	}
   405  	WSListenAddrFlag = cli.StringFlag{
   406  		Name:  "ws.addr",
   407  		Usage: "WS-RPC server listening interface",
   408  		Value: node.DefaultWSHost,
   409  	}
   410  	WSPortFlag = cli.IntFlag{
   411  		Name:  "ws.port",
   412  		Usage: "WS-RPC server listening port",
   413  		Value: node.DefaultWSPort,
   414  	}
   415  	WSApiFlag = cli.StringFlag{
   416  		Name:  "ws.api",
   417  		Usage: "API's offered over the WS-RPC interface",
   418  		Value: "",
   419  	}
   420  	WSAllowedOriginsFlag = cli.StringFlag{
   421  		Name:  "ws.origins",
   422  		Usage: "Origins from which to accept websockets requests",
   423  		Value: "",
   424  	}
   425  	GraphQLEnabledFlag = cli.BoolFlag{
   426  		Name:  "graphql",
   427  		Usage: "Enable the GraphQL server",
   428  	}
   429  	GraphQLListenAddrFlag = cli.StringFlag{
   430  		Name:  "graphql.addr",
   431  		Usage: "GraphQL server listening interface",
   432  		Value: node.DefaultGraphQLHost,
   433  	}
   434  	GraphQLPortFlag = cli.IntFlag{
   435  		Name:  "graphql.port",
   436  		Usage: "GraphQL server listening port",
   437  		Value: node.DefaultGraphQLPort,
   438  	}
   439  	GraphQLCORSDomainFlag = cli.StringFlag{
   440  		Name:  "graphql.cors.domain",
   441  		Usage: "Comma separated list of domains from which to accept cross origin requests (browser enforced)",
   442  		Value: "",
   443  	}
   444  	GraphQLVirtualHostsFlag = cli.StringFlag{
   445  		Name:  "graphql.vhosts",
   446  		Usage: "Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard.",
   447  		Value: strings.Join(node.DefaultConfig.GraphQLVirtualHosts, ","),
   448  	}
   449  	ExecFlag = cli.StringFlag{
   450  		Name:  "exec",
   451  		Usage: "Execute JavaScript statement",
   452  	}
   453  	PreloadJSFlag = cli.StringFlag{
   454  		Name:  "preload",
   455  		Usage: "Comma separated list of JavaScript files to preload into the console",
   456  	}
   457  
   458  	// MaxPeersFlag Network Settings
   459  	MaxPeersFlag = cli.IntFlag{
   460  		Name:  "max.peers",
   461  		Usage: "Maximum number of network peers (network disabled if set to 0)",
   462  		Value: node.DefaultConfig.P2P.MaxPeers,
   463  	}
   464  	MaxPendingPeersFlag = cli.IntFlag{
   465  		Name:  "max.pending.peers",
   466  		Usage: "Maximum number of pending connection attempts (defaults used if set to 0)",
   467  		Value: node.DefaultConfig.P2P.MaxPendingPeers,
   468  	}
   469  	ListenPortFlag = cli.IntFlag{
   470  		Name:  "port",
   471  		Usage: "Network listening port",
   472  		Value: 30303,
   473  	}
   474  	BootnodesFlag = cli.StringFlag{
   475  		Name:  "boot.nodes",
   476  		Usage: "Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)",
   477  		Value: "",
   478  	}
   479  	BootnodesV4Flag = cli.StringFlag{
   480  		Name:  "boot.nodes.v4",
   481  		Usage: "Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)",
   482  		Value: "",
   483  	}
   484  	BootnodesV5Flag = cli.StringFlag{
   485  		Name:  "boot.nodes.v5",
   486  		Usage: "Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)",
   487  		Value: "",
   488  	}
   489  	NodeKeyFileFlag = cli.StringFlag{
   490  		Name:  "node.key",
   491  		Usage: "P2P node key file",
   492  	}
   493  	NodeKeyHexFlag = cli.StringFlag{
   494  		Name:  "node.key.hex",
   495  		Usage: "P2P node key as hex (for testing)",
   496  	}
   497  	NATFlag = cli.StringFlag{
   498  		Name:  "nat",
   499  		Usage: "NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>)",
   500  		Value: "any",
   501  	}
   502  	NoDiscoverFlag = cli.BoolFlag{
   503  		Name:  "no.discover",
   504  		Usage: "Disables the peer discovery mechanism (manual peer addition)",
   505  	}
   506  	DiscoveryV5Flag = cli.BoolFlag{
   507  		Name:  "v5disc",
   508  		Usage: "Enables the experimental RLPx V5 (Topic Discovery) mechanism",
   509  	}
   510  	NetrestrictFlag = cli.StringFlag{
   511  		Name:  "netrestrict",
   512  		Usage: "Restricts network communication to the given IP networks (CIDR masks)",
   513  	}
   514  
   515  	// ATM the url is left to the user and deployment to
   516  	JSpathFlag = cli.StringFlag{
   517  		Name:  "js.path",
   518  		Usage: "JavaScript root path for `loadScript`",
   519  		Value: ".",
   520  	}
   521  
   522  	// Gas price oracle settings
   523  	GpoBlocksFlag = cli.IntFlag{
   524  		Name:  "gpoblocks",
   525  		Usage: "Number of recent blocks to check for gas prices",
   526  		Value: eth.DefaultConfig.GPO.Blocks,
   527  	}
   528  	GpoPercentileFlag = cli.IntFlag{
   529  		Name:  "gpopercentile",
   530  		Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices",
   531  		Value: eth.DefaultConfig.GPO.Percentile,
   532  	}
   533  	WhisperEnabledFlag = cli.BoolFlag{
   534  		Name:  "shh",
   535  		Usage: "Enable Whisper",
   536  	}
   537  	WhisperMaxMessageSizeFlag = cli.IntFlag{
   538  		Name:  "shh.maxmessagesize",
   539  		Usage: "Max message size accepted",
   540  		Value: int(whisper.DefaultMaxMessageSize),
   541  	}
   542  	WhisperMinPOWFlag = cli.Float64Flag{
   543  		Name:  "shh.pow",
   544  		Usage: "Minimum POW accepted",
   545  		Value: whisper.DefaultMinimumPoW,
   546  	}
   547  	WhisperRestrictConnectionBetweenLightClientsFlag = cli.BoolFlag{
   548  		Name:  "shh.restrict-light",
   549  		Usage: "Restrict connection between two whisper light clients",
   550  	}
   551  
   552  	// Metrics flags
   553  	MetricsEnabledFlag = cli.BoolFlag{
   554  		Name:  "metrics",
   555  		Usage: "Enable metrics collection and reporting",
   556  	}
   557  	MetricsEnabledExpensiveFlag = cli.BoolFlag{
   558  		Name:  "metrics.expensive",
   559  		Usage: "Enable expensive metrics collection and reporting",
   560  	}
   561  	MetricsEnableInfluxDBFlag = cli.BoolFlag{
   562  		Name:  "metrics.influxdb",
   563  		Usage: "Enable metrics export/push to an external InfluxDB database",
   564  	}
   565  	MetricsInfluxDBEndpointFlag = cli.StringFlag{
   566  		Name:  "metrics.influxdb.endpoint",
   567  		Usage: "InfluxDB API endpoint to report metrics to",
   568  		Value: "http://localhost:8086",
   569  	}
   570  	MetricsInfluxDBDatabaseFlag = cli.StringFlag{
   571  		Name:  "metrics.influxdb.database",
   572  		Usage: "InfluxDB database name to push reported metrics to",
   573  		Value: "geth",
   574  	}
   575  	MetricsInfluxDBUsernameFlag = cli.StringFlag{
   576  		Name:  "metrics.influxdb.username",
   577  		Usage: "Username to authorize access to the database",
   578  		Value: "test",
   579  	}
   580  	MetricsInfluxDBPasswordFlag = cli.StringFlag{
   581  		Name:  "metrics.influxdb.password",
   582  		Usage: "Password to authorize access to the database",
   583  		Value: "test",
   584  	}
   585  	// Tags are part of every measurement sent to InfluxDB. Queries on tags are faster in InfluxDB.
   586  	// For example `host` tag could be used so that we can group all nodes and average a measurement
   587  	// across all of them, but also so that we can select a specific node and inspect its measurements.
   588  	// https://docs.influxdata.com/influxdb/v1.4/concepts/key_concepts/#tag-key
   589  	MetricsInfluxDBTagsFlag = cli.StringFlag{
   590  		Name:  "metrics.influxdb.tags",
   591  		Usage: "Comma-separated InfluxDB tags (key/values) attached to all measurements",
   592  		Value: "host=localhost",
   593  	}
   594  
   595  	EWASMInterpreterFlag = cli.StringFlag{
   596  		Name:  "vm.ewasm",
   597  		Usage: "External ewasm configuration (default = built-in interpreter)",
   598  		Value: "",
   599  	}
   600  	EVMInterpreterFlag = cli.StringFlag{
   601  		Name:  "vm.evm",
   602  		Usage: "External EVM configuration (default = built-in interpreter)",
   603  		Value: "",
   604  	}
   605  	// Raft flags
   606  	RaftModeFlag = cli.BoolFlag{
   607  		Name:  "raft",
   608  		Usage: "If enabled, uses Raft consensus",
   609  	}
   610  	FirstRaftNodeFlag = cli.BoolFlag{
   611  		Name:  "firstRaftNodeFlag",
   612  		Usage: "The first raft flag to assume when joining an pre-existing cluster",
   613  	}
   614  	RaftPortFlag = cli.IntFlag{
   615  		Name:  "raftport",
   616  		Usage: "The port to bind for the raft transport",
   617  		Value: 50400,
   618  	}
   619  	// Pbft settings
   620  	PbftRequestTimeoutFlag = cli.Uint64Flag{
   621  		Name:  "pbft.requesttimeout",
   622  		Usage: "Timeout for each pbft round in milliseconds",
   623  		//Value: eth.DefaultConfig.Pbft.RequestTimeout,
   624  		Value: 3000,
   625  	}
   626  	PbftBlockPeriodFlag = cli.Uint64Flag{
   627  		Name:  "pbft.blockperiod",
   628  		Usage: "Default minimum difference between two consecutive block's timestamps in seconds",
   629  		Value: eth.DefaultConfig.Pbft.BlockPeriod,
   630  	}
   631  	PbftEnableLightFlag = cli.BoolFlag{
   632  		Name:  "pbft.light",
   633  		Usage: "Enable send and receive light block",
   634  	}
   635  	PbftMaxBlockTxsSealFlag = cli.Uint64Flag{
   636  		Name:  "pbft.maxblocktxs",
   637  		Usage: "Default max txs one block can seal",
   638  	}
   639  	// monitor
   640  	MonitorModeFlag = cli.BoolFlag{
   641  		Name:  "monitor",
   642  		Usage: "If enabled, uses monitor service",
   643  	}
   644  	MonitorPortFlag = cli.IntFlag{
   645  		Name:  "monitorport",
   646  		Usage: "The port to bind for the monitor transport",
   647  		Value: 8549,
   648  	}
   649  
   650  	// hotstuff config
   651  	HotstuffModeFlag = cli.BoolFlag{
   652  		Name:  "hotstuff",
   653  		Usage: "If enabled, uses Hotstuff consensus",
   654  	}
   655  	HotstuffIDFlag = cli.UintFlag{
   656  		Name:  "hotstuff.id",
   657  		Usage: "hotstuff id config",
   658  	}
   659  	HotstuffSecretFlag = cli.StringFlag{
   660  		Name:  "hotstuff.key",
   661  		Usage: "hotstuff secret key file path",
   662  	}
   663  )