Zcash-cli won't start (new at this)

zcash-cli in command line produces this (“too few parameters”):

Zcash RPC client version v2.0.0

In order to ensure you are adequately protecting your privacy when using Zcash,
please see https://z.cash/support/security/.

Usage:
zcash-cli [options] [params] Send command to Zcash
zcash-cli [options] help List commands
zcash-cli [options] help Get help for a command

Options:

-?
This help message

-conf=
Specify configuration file (default: zcash.conf)

-datadir=
Specify data directory

-testnet
Use the test network

-regtest
Enter regression test mode, which uses a special chain in which blocks
can be solved instantly. This is intended for regression testing tools
and app development.

-rpcconnect=
Send commands to node running on (default: 127.0.0.1)

-rpcport=
Connect to JSON-RPC on (default: 8232 or testnet: 18232)

-rpcwait
Wait for RPC server to start

-rpcuser=
Username for JSON-RPC connections

-rpcpassword=
Password for JSON-RPC connections

-rpcclienttimeout=
Timeout in seconds during HTTP requests, or 0 for no timeout. (default:
900)

-stdin
Read extra arguments from standard input, one per line until EOF/Ctrl-D
(recommended for sensitive information such as passphrases)

Error: too few parameters


I don’t have mining enabled yet. My conf file is:

rpcuser=username
rpcpassword=redacted=
mainnet=1
addnode=mainnet.z.cash

Can you paste the exact command line you are starting the node with?

sure:

stoned_turtle@twitterbox:~$ zcash-cli

Ok,

To start the Node you need to be in the Zcash folder so:

cd zcash

Then your command line should look like

stoned_turtle@twitterbox:~ /zcash$

enter ./src/zcashd and it will start the Node with the parameters you have set in your config file.

Wait awhile for it to sync 100%, the Blockchain is around 20GB and may take awhile to download.

Once fully synced, open another terminal and you can begin using the Node.

Then you can begin using the zcash command line interface (CLI)

Some example commands to try:

./src/zcash-cli getinfo
./src/zcash-cli z_gettotalbalance

Here’s user guide with all the commands to use: Zcash Payment API — Zcash Documentation 5.2.0 documentation

Do I need to have zcashd open in one terminal and then in a separate terminal run zcash-cli?
I got this message:

stoned_turtle@twitterbox:~$ cd zcash
bash: cd: zcash: No such file or directory

Should i create this directory? Or should it already exist and have stuff in there? I followed the directions on Download Zcash | Zcash to install.

Have you done all the steps?

https://zcash.readthedocs.io/en/latest/rtd_pages/user_guide.html#user-guide

The git step: git clone https://github.com/zcash/zcash.git should have cloned the zcash repository to your PC and made the zcash folder. Only after you have the files and parameters can you finish building and start the Node.

1 Like

It appears I did not have everything installed. I was able to run zcashd and download the Blockchain. Only after completing the instructions on from the link you sent was I able to execute commands for the zcash-cli.

Thank you very much.

1 Like