Skip to content

Commit

Permalink
Merge pull request #366 from Chia-Network/bladebit_docs
Browse files Browse the repository at this point in the history
revamp plotting docs
  • Loading branch information
danieljperry authored Aug 22, 2023
2 parents 13d7a41 + c44143f commit 798aa52
Show file tree
Hide file tree
Showing 73 changed files with 1,961 additions and 296 deletions.
200 changes: 200 additions & 0 deletions docs/cli-reference/plotters.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/farming/checking-farm-health.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ slug: /checking-farm-health
A lot of smaller farmers are concerned about the health of their farm when they can't find any proofs for days at a time.
This document was created to provide metrics to smaller farmers so they can ensure their farm is working, even without finding any proofs.

## Check if your farm thinks its farming
## Check if your farm thinks it's farming

Before going further, please make sure wether your farm actually considers itself to be farming. Theres a good chance that you might not since you are still syncing blocks.
Before going further, please make sure whether your farm actually considers itself to be farming. There's a good chance that you might not since you are still syncing blocks.

To check the status of your farm, `../activate` as usual and then type `chia farm summary`. If the first line of the output looks like like this:

Expand Down Expand Up @@ -95,7 +95,7 @@ A possible result may look like this:

If you do this for all your logfiles and get a result, **great!** This means your farm is 100% working as expected. You might not have won a block yet, but you already came very close once, or a few times!

## Can a Double NAT scenario impact my farms ability to send valid proofs to the network?
## Can a Double NAT scenario impact my farm's ability to send valid proofs to the network?

Yes and no. Double NAT, while quirky, should work due to Chias uPnP support. You likely won't be able to seed blocks to other nodes this way though. A "Double NAT" scenario occurs, when a client (harvester or node) is inside a network that is NAT'ed two times.
It usually involves a client being behind two routers, instead of one and looks like this:
Expand Down
42 changes: 23 additions & 19 deletions docs/farming/farming-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,46 @@ title: Farming Basics
slug: /farming-basics
---

Farming is the next step after [plotting](/plotting-basics). Once a plot is created, you have a chance of winning Chia as long as the file is maintained and the Chia farming software is running.
Farming is the next step after [plotting](/plotting-basics). Once a plot has been created, you have a chance of winning Chia as long as the file is being stored and the Chia farming software is running.

When farming, you give up a certain amount of storage space for a chance at winning Chia. The more plots you have, the higher the chance of winning Chia.
When farming, you allocate a certain amount of storage space in order to have a chance at winning Chia. The more plots you have, the higher your chances of winning.

Maintaining plots acts as a lottery. Each plot acts as a chance to win each new block. With an average of 4608 blocks a day, you'll have many chances to win Chia.
Farming is similar to a lottery. Each plot acts like a lottery ticket, where a new drawing is performed every 9 seconds or so. If you win the lottery, you earn the right to create a new block, and you will be rewarded with Chia. With an average of 4608 blocks a day, you'll have many chances to win.

Our [consensus](/consensus-intro) section has the technical details of how this "lottery" system works.

## Estimated Time to Win

You can find your win time estimation from the **Farming** tab in the Chia software. It's important to note that this is **just an estimation**. The real time could realistically be 2-3x this amount if you're unlucky or .5 if you're lucky.
You can find your win time estimation from the **Farming** tab in the Chia software. It's important to note that this is **just an estimation**. The real time could be 2-5x greater than -- or less than -- this estimation, depending on luck.

:::info
Prior wins (or lack of) do not determine new wins. If your estimated time to win is one week but it has been three months, you are no closer to winning than when you started.
Prior wins (or lack thereof) do not determine new wins. If your estimated time to win is one week but it has been three months, you are no closer to winning than when you started.
:::

## Pooling to the Rescue

To combat the infrequency / inconsistency of winning, you can [join a pool](/pool-farming). This will reduce your block reward, but will give you consistent payouts of smaller amounts. In the longrun, pooling and solo-farming (aka **self-pooling**) should give the same result (minus any pool fee), but pooling is much more predictable and ideal for the average farmer.
To combat the infrequency and inconsistency of winning, you can [join a pool](/pool-farming). It works similar to a lottery pool. Instead of occasionally earning a large reward, you will frequently earn a small payment. In the long run, pooling and solo-farming (aka **self-pooling**) will yield the same result (minus any pool fee), but pooling is much more predictable, and recommended for most farmers.

An additional benefit of pooling is instant feedback as to whether your farm is running properly or not. With solo-farming you may be left wondering if you really can win a block.
An additional benefit of pooling is instant feedback as to whether your farm is running properly. With solo-farming you may be left wondering if you really can win a block.

Chia has designed an official pooling protocol that introduces pooling in a way never done by by other cryptocurrencies. This allows for officially-supported predictability without compromising decentralization.
Chia has designed an official pooling protocol that introduces pooling in a way never done by by other cryptocurrencies. This allows for officially-supported predictability without compromising on decentralization.

## Block Reward

With each new block, a certain amount of Chia is rewarded to the farmer. Chia launched with a block reward of two Chia every single block. This comes out to 64 Chia distributed every 10 minutes.
With each new block, a certain amount of Chia is rewarded to the farmer that created it. Chia launched with a block reward of 2 XCH per block. This comes out to 64 XCH distributed every 10 minutes.

Every three years, there is a scheduled halving of the block reward. This means that three years after mainnet launch, the block reward is cut in half, to 1 XCH.

The block reward has a halving every three years starting from mainnet launch. This means that three years after mainnet launch, the block reward is cut in half to just one Chia. Three more years later and the reward is half a Chia, etc. Here is the complete block reward schedule:
Here is the complete block reward schedule:

| Year | Block Reward | Chia / 10 mins |
| ----- | ------------ | -------------- |
| 1-3 | 2.0 XCH | 64 |
| 4-6 | 1.0 XCH | 32 |
| 7-9 | 0.5 XCH | 16 |
| 10-12 | 0.25 XCH | 8 |
| 13+ | 0.125 XCH | 4 |
| Year | Block Reward | XCH / 10 mins |
| ----- | ------------ | ------------- |
| 1-3 | 2.0 XCH | 64 |
| 4-6 | 1.0 XCH | 32 |
| 7-9 | 0.5 XCH | 16 |
| 10-12 | 0.25 XCH | 8 |
| 13+ | 0.125 XCH | 4 |

By the 13th year, block rewards are forever locked in at an average of 4 XCH every 10 minutes.
Starting with year 13, block rewards are forever locked in at an average of 4 XCH every 10 minutes.

As time goes on, the ratio of new XCH to existing XCH goes down. As a result, the inflation rate of Chia will continually decline. Chia's inflation falls through the 0.50% rate 22 years after mainnet launch.
As time goes on, the ratio of new XCH to existing XCH goes down. As a result, the inflation rate of Chia will continually decline. Chia's inflation falls through 0.5% 22 years after mainnet launch.
96 changes: 96 additions & 0 deletions docs/farming/farming-compressed-plots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
sidebar_label: Compressed Plots
title: Compressed Plot Farming
slug: /farming-compressed-plots
---

```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```

As detailed in the [plotting](/plotting-basics) section, compressed plots are supported for both plotting and harvesting as of Chia version 2.0. Before you can harvest compressed plots, you need to inform your harvesters of the fact that they exist.

:::info

As of Chia version 2.0, decompression must be performed at the harvester level. You therefore will need to apply the settings listed on this page to each of your harvesters individually. This also means that each individual harvester will need to be capable of decompressing the plots that have been installed locally.

In the future, we plan to enable decompression at the farmer level. This means that only one computer on your network will need to be equipped with a fast CPU or GPU for decompressing plots.

:::

## Enable compressed plot support

### GUI

1. Navigate to the `Settings` panel in the lower-left corner of the GUI.
2. Click the `HARVESTER` tab at the top of the panel. The following screen will appear:

<div style={{ textAlign: 'left' }}>
<img src="/img/compressed-farming/01.png" alt="Enable compressed farming" />
</div>

3. Slide the `Enable compressed plot support` slider to the right, as shown in the above image.
4. The default value for `Parallel Decompressor Count` is `1`. This means that on a harvester with more than one CPU, only one of the CPUs will be used for decompressing plots. This setting is fine for most machines, and is the recommended value for GPU harvesting. However, feel free to increase it if you want to use CPU decompression and you want to dedicate multiple CPUs to compressed harvesting.
4. The default value for `Decompressor Thread Count` is `0`. This is the number of threads that will participate in decompressing plots. This number, multiplied by `Parallel Decompressor Count`, needs to less than or equal to the total number of harvester cores.

For example, if your harvester has one CPU with eight cores, you might use the following settings:
* `Parallel Decompressor Count`: `1`
* `Decompressor Thread Count`: `6`

This would instruct the harvester process to use six of the eight cores for decompressing plots, and to use the remaining cores to run the OS, etc.
5. If you want to use a GPU for harvesting, slide the `Enable GPU Harvesting` slider to the right, as shown in the above image. Note that in order to use this setting, your harvester must have an NVIDIA GPU with CUDA capability 5.2 and up, with at least 8GB of vRAM.
6. If your harvester has multiple GPUs, you can use `GPU Device Index` to choose which one to use. If your harvester only has one GPU, then leave this set to `0`.

After all of these settings have been properly set, click the red `RESTART LOCAL HARVESTER TO APPLY CHANGES` button. After your harvester restarts, it will use the updated settings.

### CLI

All of the new harvester settings live inside `~/.chia/mainnet/config/config.yaml`.

If you have never installed Chia on this harvester, `config.yaml` won't exist. In this case, run the following command to generate a new copy:

```bash
chia init
```

If you have previously installed Chia on this computer, then `config.yaml` likely already exists. In this case, you will need to add several new settings. However,

* If you run `chia init` when the config file already exists, Chia won't make any modifications.
* If you delete `config.yaml` and run `chia init`, the new settings will be added, but you will lose any custom changes you previously made.

In the case where `config.yaml` already exists, you therefore are recommended to do the following:

1. Edit `config.yaml`
2. Search for `harvester:`
3. From inside this section, add the following parameters, which include the default settings:

```bash
parallel_decompressor_count: 0
decompressor_thread_count: 0
use_gpu_harvesting: false
enforce_gpu_index: false
gpu_index: 0
decompressor_timeout: 20
disable_cpu_affinity: false
max_compression_level_allowed: 7
```

At this point, regardless of whether you are upgrading or running a new build of Chia on this harvester, your copy of `config.yaml` contains all of the latest settings. Their definitions and recommended values are as follows:

* `parallel_decompressor_count`: The number of CPUs to be used for decompressing plots. If this is set to `0`, then harvesting of compressed plots will be disabled. For GPU harvesting, set this value to `1`. For CPU harvesting, set it to the number of CPUs you want to use for decompression (typically `1`).
* `decompressor_thread_count`: The number of CPU threads that will participate in decompressing plots. This number multiplied by `Parallel Decompressor Count` needs to less than or equal to the total number of CPU cores.
* `use_gpu_harvesting`: Set to `true` to enable harvesting with a GPU. Note that in order to use this setting, your harvester must have an NVIDIA GPU with CUDA capability 5.2 and up, with at least 8GB of vRAM.
* `gpu_index`: If your harvester has multiple GPUs, use this setting to choose which one to use. If your harvester only has one GPU, then leave this set to `0`.
* `enforce_gpu_index`: Set to `true` if your harvester has more than one GPU and you want to use one other than the default of `0`.
* `decompressor_timeout`: The number of seconds for your decompressor to time out. The default value of `20` is typically fine.
* `disable_cpu_affinity`: This should typically be `false`. When it is `false`, when using multiple CPU decompressors, each with multiple threads, the threads for each decompressor will be assigned to different physical CPUs. This prevents them for competing over compute time. If it is set to `true`, the threads for each decompressor will be assigned to the same CPU.
* `max_compression_level_allowed`: The highest level of compression your harvester will support. In Chia version 2.0, the maximum level is `7`. This will likely be increased in the future, but for now, you cannot increase it beyond the default. You can, however, set it to a lower number if desired.

After you have finished making these updates, save `config.yaml` and restart your harvester by running the following command:

```bash
chia start harvester -r
```

Your new settings will be applied.
Loading

0 comments on commit 798aa52

Please sign in to comment.