Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node runner UX: --help default values are missing #2164

Open
AlexSSD7 opened this issue May 7, 2021 · 1 comment
Open

Node runner UX: --help default values are missing #2164

AlexSSD7 opened this issue May 7, 2021 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@AlexSSD7
Copy link

AlexSSD7 commented May 7, 2021

OPTIONS:
        --account-provider-refresh-time-ms <MS>     Sets the time after which accounts are re-read from disk.
        --block-db-dir <DIR>                        Sets the root path of db.
        --bootnodes <NODES>                         Sets a custom list of bootnodes.
    -c, --config <FILE>                             Sets a custom config file.
    -d, --db-cache-size <SIZE>                      Sets the db cache size.
        --db-compact-profile <ENUM>                 Sets the compaction profile of RocksDB.
        --egress-max-throttle <MB>                  Sets maximum throttling queue size of egress.
        --egress-min-throttle <MB>                  Sets minimum throttling queue size of egress.
        --egress-queue-capacity <MB>                Sets egress queue capacity of P2P network.
        --enable-discovery <BOOL>                   Enable discovery protocol.
        --get-logs-epoch-batch-size <SIZE>          Sets the size of the epoch batches used during log filtering.
        --get-logs-filter-max-epoch-range <SIZE>    Sets the maximum number of allowed epochs during log filtering.
        --jsonrpc-cors <URL>                        Specify CORS header for HTTP JSON-RPC API responses.
        --jsonrpc-http-keep-alive <BOOL>
            Enable HTTP/1.1 keep alive header. Enabling keep alive will re-use the same TCP connection to fire multiple
            requests.
        --jsonrpc-http-port <PORT>                  Specify the port for the HTTP JSON-RPC API server.
        --jsonrpc-tcp-port <PORT>                   Specify the port for the TCP JSON-RPC API server.
        --jsonrpc-ws-port <PORT>                    Specify the port for the WebSocket JSON-RPC API server.
    -l, --ledger-cache-size <SIZE>                  Sets the ledger cache size.
        --load-test-chain <FILE>                    Sets the test chain json file.
        --log-conf <FILE>                           Sets a custom log config file.
        --log-file <FILE>
            Specify the filename for the log. Stdout will be used by default if omitted.

        --log-level <LEVEL>                         Can be error/warn/info/debug/trace. Default is the info level.
        --mining-author <ADDRESS>                   Set the address to receive mining rewards.
        --mode <MODE>                               Use the preset testing configurations. [possible values: dev, test]
        --net-key <KEY>                             Sets a custom secret key to generate unique node ID.
        --netconf-dir <DIR>                         Sets a custom directory for network configurations.
        --node-table-promotion-timeout-s <SEC>
            How long Conflux waits for promoting a peer to trustworthy (default 3 * 24 * 3600).

        --node-table-timeout-s <SEC>                How often Conflux updates its peer table (default 300).
    -p, --port <PORT>                               Specify the port for P2P connections.
        --public-address <IP ADDRESS>               Sets a custom public address to be connected by others.
        --start-mining <BOOL>                       Start mining if set to true. Ensure that mining-author is set.
        --test-mode <BOOL>                          Sets test mode for adding latency
        --udp-port <PORT>                           Specify the UDP port for peer discovery.

For example, I wonder where does CFX store the chain database. With geth, I can do geth --help and see

  --datadir value                     Data directory for the databases and keystore (default: "/home/USER/.ethereum")

This is really handy; otherwise, I need to look in the logs which database path is used.

The same applies to the port, but this time finding that info out is much harder. The port is specified neither in logs nor in the port. Hence, I needed to use netstat -lp | grep conflux to see

tcp        0      0 localhost:12539         0.0.0.0:*               LISTEN      PID/conflux      
tcp        0      0 0.0.0.0:32323           0.0.0.0:*               LISTEN      PID/conflux      
udp        0      0 0.0.0.0:32323           0.0.0.0:*                           PID/conflux 

Obviously, the UX of the node runner is terrible here. With Geth it is enough to do geth --help | grep port and see

  --port value                        Network listening port (default: 30303)

It would be nice to have datadirs/ports and defaults in general documented in the command --help helpsheet.

@Thegaram
Copy link
Contributor

Thegaram commented May 7, 2021

Hi @AlexSSD7, thanks for your feedback.

Generally, we recommend using the config file (testnet.toml or tethys.toml), it has all the frequently used parameters with detailed explanations and defaults. Please refer to our developer docs for more details on running a node.

The CLI version is not fully up-to-date, and I agree it would be nice if it contained more info. We welcome contributions to improve this in src/cli.yaml.

@Thegaram Thegaram added good first issue Good for newcomers help wanted Extra attention is needed labels May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants