Skip to content

Commit

Permalink
Remove legacy PoW docs.
Browse files Browse the repository at this point in the history
Add a brief intro to BLAKE3 and CPU mining. Could use a lot more
work, but for now this is an improvement over having out-dated docs
about ASICs.

Remove PoW FAQ because it contained too little information to warrant
its own page. Redirect to PoW Overview.
  • Loading branch information
jholdstock committed Aug 30, 2023
1 parent 2a00c7f commit 640f768
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 126 deletions.
1 change: 1 addition & 0 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ server {
rewrite ^/getting-started/using-testnet/?$ $scheme://$http_host/advanced/using-testnet permanent;
rewrite ^/getting-started/reading-list/?$ $scheme://$http_host/getting-started/articles-and-media permanent;
rewrite ^/faq/proof-of-stake/stake-pools/?$ $scheme://$http_host/faq/proof-of-stake/voting-service-providers permanent;
rewrite ^/faq/proof-of-work-mining/?$ $scheme://$http_host/mining/overview permanent;
rewrite ^/advanced/contributing/?$ $scheme://$http_host/contributing/source-code-contributions permanent;
rewrite ^/advanced/inflation/?$ $scheme://$http_host/advanced/issuance permanent;
rewrite ^/advanced/using-github/?$ $scheme://$http_host/contributing/using-github permanent;
Expand Down
18 changes: 0 additions & 18 deletions docs/faq/proof-of-work-mining.md

This file was deleted.

Binary file removed docs/img/pow-mining-guide/monitoring-dashboard.png
Binary file not shown.
Binary file removed docs/img/pow-mining-guide/rig_config.png
Binary file not shown.
154 changes: 47 additions & 107 deletions docs/mining/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,110 +21,50 @@ This power may be used if the miner has constructed a block contrary to the best
interests of the network. For example, an empty block when there are
transactions waiting to be processed in the mempool.

Decred uses the [BLAKE-256](../research/blake-256-hash-function.md) hashing function. PoW mining can be done using GPUs. However, ASICs that mine DCR are now available, and since their introduction the PoW difficulty has become high enough to make GPU
mining unlikely to be profitable.

---

## Purchasing Specialized Hardware (ASIC)

ASIC are the machines used to mine the most popular cryptocurrencies and can only be used for mining a single algorithm.

Here is a selection of the Decred ASIC miners which are available on the market today:

| Miner | Hashrate |Power Consumption (Watts)| Unit Power (W/Th)|
| ------------------|:-----------:|:-----------------------:|:----------------:|
| StrongU STU-U1++ | 52 TH/s | 2,100 W |40 W/Th |
| Whatsminer D1 | 48 TH/s | 2,200 W |46 W/Th |
| Antminer DR5 | 35 TH/s | 1,610 W |46 W/Th |


You can either buy direct from the manufacturers on their official website:

* [Whatsminer](https://www.whatsminer.com/?locale=en)
* [Bitmain](https://www.bitmain.com/)
* [StrongU](https://strongu.com.cn/?lang=en-us)

Or you can also go through ASIC resellers such as:

* [Blockware Mining](https://www.blockwaresolutions.com/)
* [Kaboom Racks](http://kaboomracks.com)

---

## Hosting Your ASIC

When mining first started on CPU and GPU’s mining at home was very feasible. But as mining has become more competitive and industrialized, ASICs have taken over the network. For most people hosting an ASIC at home is not an option given the noise & power draw. That is why many miners choose to send their ASICs to a mining colocation. The hosting company charges a “hosting fee” in return for providing the ASIC electricity and an environment to run. Different models such as profit-sharing are available for larger miners.

Over the past few years many hosting companies have become available in North America and can be found in this [database](https://hashrateindex.com/farms). This database contains some of the top facilities like Blockware, Compute North, Core Scientific, Frontier, Box Miner, and many more.

Please make sure to do your own research before making any decision on engaging a colocation business.

---

## Setting up your ASIC

**Powering up the Miner**

Connect your machine to the power outlet via the built-in PSU. Then connect your miner to your internet-connected router or switch using a standard network cable. You are now ready to power up your miner.

**Scanning for Devices**

To get started, use a scanning tool like [AngryIP](https://angryip.org/) or [Locator](https://minerstat.com/software/locator) to scan every device on your local network and see its IP address. After you have identified your miner’s IP address, you are ready to proceed with Configuration.

**Configuration**

Enter the local network IP address of your miner in the URL bar of any web browser. A dashboard similar to the one shown below will pop up. We are setting up a Whatsminer D1, but the process is similar for other ASICs.


![Rig Configuration Detail](../img/pow-mining-guide/rig_config.png)

---

## Solo Mining or Pool Mining

##### ![](../img/dcr-icons/Solo.svg){ .dcr-icon } Solo Mining

**Solo mining is not recommended and is not covered by this documentation!** The Decred network regularly sees a network hash rate of up to 422Ph/s. Solo mining is generally only done by advanced individuals or organized groups with a large cluster of GPUs so it is not addressed here.


#### Pool Mining

When you mine in a pool, your hashrate is combined with all the other pool miners’ hashrates to look for the correct solution for a block. You will receive a reward based on the amount of work your miner performs in the pool. Most mining pools pay on a pay-per-share method meaning that miners earn a steady amount of Decred rather than the “all or none” of solo mining.

---

## Choosing and Configuring a Mining Pool

To finish the configuration, you will need to choose a mining pool. You can consider payout method ([PPS vs PPLNS](https://www.hashrateindex.com/blog/pps-fpps-pplns-pps_plus)), pool fee, geographic location of the pool, ping time to the server, user interface, statistics/data, customer support, community channels and more. Mining pools all work more or less the same but you may wish to sign up at multiple pools and see which one suits you the best.

You may wish to consider selecting a smaller pool to distribute the hashrate more widely and better decentralize the networks mining power.

These mining pools are known to support Decred:

* **[Luxor](https://mining.luxor.tech/coins/decred)** (USA)
* **[F2Pool](https://www.f2pool.com/)** (China)
* **[Poolin](https://www.poolin.com/)** (China)
* **[UUpool](https://uupool.cn/dcr)** (China)
* **[Antpool](https://antpool.com/)** (China)
* **[BTC.com](https://pool.btc.com/)** (China)
* **[CoinMine](https://www2.coinmine.pl/)** (Poland)

In this guide, we will set up an ASIC with [Luxor](https://mining.luxor.tech/), a US-based mining pool that operates based on the pay-per-share (PPS) payment method.

**Completing Configuration**

Once you have created a [user account](https://mining.luxor.tech/account/signup) with the mining pool, you will have all the information you need to complete the setup process.

* URL: `stratum+tcp://dcr.luxor.tech:700`
* Worker: `[LuxorUsername].WorkerName` Workername can be anything, but avoid using symbols or special characters as it may be invalid.
* Password: `123`

Once you have filled out the details, click Save & Apply. Setup is now complete.

**Monitoring Results**

It will take about 5 minutes for your workers to appear on the stats page. To find your user, simply go to Luxor, login to your account and navigate to the Workers tab. You should see something like this:


![Monitoring mining results with Luxor pool](../img/pow-mining-guide/monitoring-dashboard.png)
Decred uses the [BLAKE3](https://github.com/BLAKE3-team/BLAKE3-specs/blob/ac78a717924dd9e6f16f547baa916c6f71470b1a/blake3.pdf) hashing function.

At time of writing (August 2023) there are no known BLAKE3 ASICs in production,
and there is no GPU mining software available to mine Decred.

To solo mine with a CPU, start dcrd and provide an address for mining rewards to
be paid to:

```no-highlight
$ dcrd --miningaddr <address>
```

Mining can then be initiated using the `setgenerate` RPC:

```no-highlight
$ dcrctl setgenerate true <num_threads>
```

The hashrate and other mining statistics can be monitored using the
`getmininginfo` RPC:

```no-highlight
$ dcrctl getmininginfo
{
"blocks": 789713,
"currentblocksize": 29006,
"currentblocktx": 39,
"difficulty": 3132289666.7448616,
"stakedifficulty": 23898311433,
"errors": "",
"generate": true,
"genproclimit": 1,
"hashespersec": 648796,
"networkhashps": 39285830859642476,
"pooledtx": 8,
"testnet": false
}
```

A successfully mined block will be indicated in the dcrd log file with a line similar to the following:

```no-highlight
Accepted block 000... via getwork.
```

The coinbase maturity is [256 blocks](https://github.com/decred/dcrd/blob/b6d8ccdedf78536e1d085b725388def2ba76f6b8/chaincfg/mainnetparams.go#L331),
which means that mining rewards will not show up as spendable for that many blocks.
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ nav:
- 'Configuration FAQs': 'faq/configuration.md'
- 'Wallets and Seed FAQs': 'faq/wallets-and-seeds.md'
- 'Block FAQs': 'faq/blocks.md'
- 'PoW FAQs': 'faq/proof-of-work-mining.md'
- 'Common Errors and Solutions': 'faq/errors.md'
- PoS:
- 'General PoS FAQs': 'faq/proof-of-stake/general.md'
Expand Down

0 comments on commit 640f768

Please sign in to comment.