Chia command line parameters

Chia command line parameters

Abstract: Chia was created by Bram Cohen, the best network protocol engineer and inventor of BitTorrent. Chialisp is Chia's new smart transaction programming language, which is powerful, easy to audit and safe. Currently available smart transactions include: atomic swap, authorized payee, recoverable wallet, multi-signature wallet and price limit wallet.

Chia Database

Chia mining tutorial http://www.wabi.com/news/31337.html

Chia FAQs http://www.wabi.com/news/31338.html

Chia command line parameters http://www.wabi.com/news/31341.html

Chia plot file size and specifications http://www.wabi.com/news/31342.html

Chia halving schedule http://www.wabi.com/news/31343.html

Chia multi-machine cluster tutorial http://www.wabi.com/news/31344.html

start up

Command: chia init

First, init will check if there is an old version of chia installed in your ~/.chia directory.

If so, init will migrate these old files to the new version

include:

  • config (contains old SSL certificates)

  • db

  • wallet

  • Load the config.yaml configuration file, update the wallet key and ensure that the coinbase reward goes to the correct wallet

If no old version exists, init can create a default chia configuration and initialize a new SSL key and certificate (for secure communication with the GUI).

Start the service

Command: chia start {service}

For example

chia start node will only start a full node.

chia start farmer will start the farmer, harvester, full node and wallet.

The optional parameters of service are {all,node,harvester,farmer,farmer-no-wlet,farmer-only,timelord,timelord-launcher-only,wallet,wallet-only,introducer,simulator}.

P disk

Command: chia plots create [add parameters or assign values].

parameter

-k [size]. Defines the size of the drawing. For a list of k sizes and creation times on different systems, see: P disk file specifications corresponding to k sizes

-n [number of plots]. Number of plots to proceed in sequence. Once a plot is completed it is moved to the final position -d before the next plot sequence is started.

-b [memory buffer size in MiB]. Defines the amount of memory/RAM to use. The default value is 2048 (2GiB). More memory will slightly increase the speed of plotting. Keep in mind that this is only the memory allocated for the plotting algorithm. Running wallets etc will require additional memory from your system.

-f [farmer public key]: This is your "farmer public key". You can use this key when you want to create P-disk files on other machines if you don't want to give the chia account full access. To find your Chia farmer public key, use the following command: chia keys show

-p [pool public key]. This is your "pool public key". You can use it when you want to create P disk files on other machines, if you don't want to give the chia account full access. To find your Chia Pool public key, use the following command: chia keys show

-a [fingerprint]. This is the fingerprint used to select farmer and pool public keys. Use this command when you want to select one from multiple keys in your keychain. To find your Chia key fingerprint, use the following command: chia keys show

-t [tmp dir]. Defines the temporary directory for P disk. This is used by the first and second stages of P disk. The -t path requires the largest working space: usually about 4 times the size of the final plot file.

-2 [tmp dir 2]: Defines a secondary temporary directory for temporary files on the P drive. This is where drawing phases 3 (compression) and 4 (checking) occur. Depending on your operating system, -2 may default to the same path as -t or -d. Therefore, if -t or -d does not have enough space, it is recommended to manually set -2. The -2 path needs to have working space equal to the final size of the drawing.

-d [final dir]: defines the final location where plot files are stored. Of course, -d should have enough free space as the final size of the plot files. This directory is automatically added to the ~/.chia/VERSION/config/config.yaml file. You can remove a final directory from the configuration using chia plots remove -d.

-r [number of threads]: 2 threads is usually optimal. Multithreading is currently only used in the first stage of the P disk.

-u [buckets number]. More buckets reduce memory requirements but require more random disk seeks. For mechanical disks, you need to set fewer buckets, while for NVMe SSDs, you can set more buckets. Generally, you can set 32, 64, or 128 (default)

-s [stripe size]. This is the amount of data to hand off to each thread during the first phase of parallelizing the workload. The default of 64K seems to be the best choice overall. 32K is often a small loss, and 128K is also a small loss.

-e [bitfield plotting]. Using the -e flag will disable the bitfield P-drive algorithm and revert to the old b17 P-drive format. It reduces memory requirements but also writes 12% more data to the P-drive. It is generally considered a faster option and is suitable for faster drives such as SSDs.

Example

The following example will create a disk file with k=32 and use 4GB (note - not GiB) of memory.

chia plots create -k 32 -b 4000 -t /path/to/temporary/directory -d /path/to/final/directory

The following example will create a k=34 graph and use 8GB of memory, 2 threads and 64 buckets.

chia plots create -k 34 -e -b 8000 -r 2 -u 64 -t /path/to/temporary/directory -d /path/to/final/directory

Additional Notes

During the plotting process, phase 1 (forward propagation) and phase 3 (compression) tend to take the most time. Therefore, to maximize plotting speed, -t and -2 should be placed on the fastest hard drive, while -d can be placed on a slower hard drive.

Currently, drawing only uses 1 CPU thread. Therefore, most Chia users believe that running multiple P disk programs at the same time can significantly improve efficiency.

It is true that Plugging on an SSD is faster than on a hard drive. However, SSDs obviously have a limited lifespan, and early Chia testing seems to indicate that Plugging on an SSD will wear them out quickly. Therefore, many Chia users decide that it is more "green" to Plugin on multiple hard drives in parallel.

The P-disk mode is designed to maximize work efficiency. However, to prevent endless hashing attacks, farmers should not be able to P a P-disk file within the average block interval. This is why the minimum k-size on the mainnet is k32.

P disk file availability check

Command: chia plots check -n [num checks] -l -g [substring]

First it will look in all plot directories set in your config.yaml configuration file. You can check these directories with chia plots show.

-g Only check P-disk files with case-sensitive names or directory names in [substring]. If -g is not specified, all graphs in each directory in config.yaml will be checked.

Examples of using -g

  • To check plots within a long directory name, such as /mnt/chia/DriveA, you can use chia plots check -g DriveA

  • Check that only k33 plots are available using chia plots check -g k33

  • Check plots created on October 31, 2020 can be plotted using chia plots check -g 2020-10-31

-l allows you to find duplicate P-disk files by ID. It checks all P-disk file save directories listed in config.yaml and lists all plot file names ending with the same file name; *-[64 char plot ID].plot. If you only want to check for duplicate files, you should use -l -n 0.

-n represents the number of challenges to give. If you do not include the -n integer, it defaults to 30. For example, if -n is set to 30, then each P-disk file will be tested against 30 challenges. The number of challenges ranges from 5 (minimum) to -n, and is not random.

Each P-disk file will accept each challenge:

  • Get the quality of the challenges (are there spatial proofs? You should expect 1 proof per challenge, but it's possible to have 0 or more than 1 proofs.)

  • If proven, obtain full proof for that challenge.

  • Verify that the number of full proofs matches the number of expected quality proofs.

At the end, you will see a report that compares the final actual proof with the expected proof.

So if -n is 20, you would expect 20 proofs, depending on how many plot files you have.

Running the command with -n 10 or -n 20 is fine for a very small check, but doesn't really give you a lot of information about whether the plots are truly high quality.

Consider using -n 30 to get better statistics.

For more details, you can read the DiskProver command in chiapos https://github.com/Chia-Network/chiapos/blob/master/src/prover_disk.hpp.

What does the ratio of full proofs to expected proofs mean?

  • If the ratio > 1, it means that your P disk file is lucky in this disk scan.

  • If the ratio is <1, your P-disk file has a relatively low luck value.

  • Unless your ratio is < 0.70, you shouldn't really care about this.

In theory, blocks with ratios > 1 are more likely to win challenges on the blockchain. Similarly, P-disk files with ratios < 1 are less likely to win. However, in practice, this doesn't really have a noticeable effect. "Number of P-disk files" and "k-size" are much bigger factors in winning blocks than "proofs generated per challenge". So don't worry if your P-disk file check ratios are less than 1, unless they are significantly less than 1.


<<:  RHY platform buys cloud computing power at a low price, and a group of four people can get a full cash back

>>:  Chia plot file size

Recommend

Coinbase CEO: Digital currency changes economic freedom and changes the world

Digital currency may be the most effective way to...

Is it a good thing if the fortune line on your hand is forked?

When judging their fortune, many people will obser...

Judging from a woman's palmistry whether she is a lucky charm for her husband

When it comes to women who can bring good luck to...

Mining black technology, Biostar TB350BTC 6-card mining guide!

For novice miners, they do not have the ability t...

Men who are not likely to cheat

Men who are not likely to cheat Men cheating is o...

Your eyes can tell your emotional outlook

Mencius once said: Look at his eyes, how can a ma...

Look at those mean and stingy women.

Compared with men, women are more calculative and...

Facial features of men and women

Look at the facial features, look at the facial f...

A man with a marriage line can meet the best marriage.

Is a man with a marriage line good? The marriage ...

The appearance of a person with more eyes

Although there are still more good people in life...

What are the characteristics of a woman who is unlucky in marriage?

In ancient times, if a woman had a face that woul...

What are the characteristics of women who are difficult to marry?

A woman's marriage destiny can often be seen f...

Very stubborn facial features

Nowadays, some people are easier to communicate w...