Libra Cli Documentation mismatch

In:

I’m trying to connect a local cli to a remote host, while doing so I noticed that the documentation states:

cargo run -p client --bin client -- [OPTIONS] --host <host> --validator_set_file <validator_set_file>

but when I run libra-swarm It suggest me

cargo run --bin cli -- -u http://localhost:37037 -m "/tmp/c66c91408641b536db6b30ae7bdc1680/mint.key"

to connect to the cli to the validators.

Furthermore the options in the documentation are:

* `-m | --faucet_key_file_path`  — Path to the generated key-pair for the faucet account. The faucet account can be used to mint coins. If not passed, a new key-pair will be generated for you and placed in a temporary directory. To manually generate a keypair, use generate_keypair:  `cargo run -p generate_keypair -- -o <output_file_path>` .
* `-f | --faucet_server`  — The host that operates a faucet service. If not passed, this will be derived from the host parameter.
* `-a | —-host`  — The destination host for CLI to connect to.
* `-p | -—port`  — The public port of the destination Libra Blockchain for the client to connect with, the default value is 30307.
* `-n | --mnemonic_file`  — The file location from which to load the mnemonic word for user account address/key generation. If not passed, a new mnemonic file is generated in the current directory by libra_wallet.
* `-s | --validator_set_file`  — File location from which to load config of trusted validators. It is used to verify validator signatures in validator query response. The file should at least include public key of all validators trusted by the client — which should typically be all validators on the network. To connect to testnet, use 'libra/scripts/cli/trusted_peers.config.toml'. Can be generated by libra-config for local testing:  `cargo run --bin libra-config`  but the preferred method is to simply use libra-swarm to run local networks.

but if I run
cargo run --bin cli -- --help

The options are a bit different:

OPTIONS:

-m, --faucet-key-file-path
Path to the generated keypair for the faucet account. The faucet account can be used to mint coins. If not
passed, a new keypair will be generated for you and placed in a temporary directory. To manually generate a
keypair, use generate-keypair: cargo run -p generate-keypair -- -o <output_file_path>
-f, --faucet-server
Host that operates a faucet service If not passed, will be derived from host parameter

-n, --mnemonic-file
File location from which to load mnemonic word for user account address/key generation. If not passed, a new
mnemonic file will be generated by libra-wallet in the current directory
-u, --url
Full URL address to connect to - should include port number, if applicable

--waypoint <waypoint>                           Explicitly specify the waypoint to use
--waypoint_url <waypoint_url>                   URL for a file with the waypoint to use

ex. --url instead of --host and --port

I am missing something or the documentation is not updated?

1 Like

Hey, @dino
Thanks for your question!
Yes, parameter has changed. Please use url option, as suggested in cli help
Official docs should be updated soon

1 Like

@phoenix perfect thanks! Is what I’m using atm.

Peraphs do you have the updated version of the commands that you have posted some time ago ?

  • generate keypair for genesis account: `cargo run --bin generate_keypair – -o <path_to_output_file>
  • generate configs for nodes for your future network. You can do it via cargo run --bin libra-config . Here you’ll need to specify number of nodes in cluster, path to genesis account, base template(example of such is available in config/data/configs/node.config.toml)
  • distribute configs for each node to your friends
  • finally run separate node locally via `cargo run --bin libra_node – -f <path_to_config> -p <peer_id>

I’m trying to do exactly this

1 Like