Skip to content

Commit 2e83952

Browse files
authored
Merge pull request #256 from filecoin-project/feat/migrate-lotus-mining-docs
Migrate Lotus mining docs.
2 parents 3449d1c + 179c902 commit 2e83952

File tree

6 files changed

+374
-28
lines changed

6 files changed

+374
-28
lines changed

docs/.vuepress/config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,14 @@ module.exports = {
106106
{
107107
title: 'Mine',
108108
path: '/mine/',
109-
children: ['/mine/connectivity', '/mine/spacerace']
109+
children: [
110+
'/mine/storage-mining',
111+
'/mine/lotus-seal-worker',
112+
'/mine/setting-a-static-port',
113+
'/mine/connectivity',
114+
'/mine/spacerace',
115+
'/mine/mining-troubleshooting'
116+
]
110117
},
111118
{
112119
title: 'Build',

docs/mine/connectivity.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ description: Tips and tricks for improving a miner's connectivity to the Filecoi
77

88
Filecoin miners, like participants in all peer-to-peer protocols, require a steady and quality pool of peers to communicate with in order to perform their various functions. For other participants on the network to establish incoming P2P connections with a miner, a few conditions must be met:
99

10-
* The miner's public IP address must be known
11-
* The protocol (TCP/UDP) and port number (0-65535) on which the miner is listening must be known
12-
* All routers & firewalls must be configured to allow incoming traffic on that protocol/port combination
10+
- The miner's public IP address must be known
11+
- The protocol (TCP/UDP) and port number (0-65535) on which the miner is listening must be known
12+
- All routers & firewalls must be configured to allow incoming traffic on that protocol/port combination
1313

1414
The following steps are highly recommended for all miners who wish to successfully accept storage and retrieval deals.
1515

@@ -19,20 +19,20 @@ The following steps are highly recommended for all miners who wish to successful
1919

2020
## Setting multiaddresses
2121

22-
You can set the multiaddresses that your miner listens on in a miner's `config.toml` file (by default located at `~/.lotusminer/config.toml`).
22+
You can set the multiaddresses that your miner listens on in a miner's `config.toml` file (by default located at `~/.lotusminer/config.toml`).
2323

2424
Once you've done so, you can set the on-chain record of your miner's listen addresses with the command:
25-
26-
```
27-
lotus-miner actor set-addrs <multiaddr_1> <multiaddr_2> ... <multiaddr_n>
25+
26+
```
27+
lotus-storage-miner actor set-addrs <multiaddr_1> <multiaddr_2> ... <multiaddr_n>
2828
```
2929

3030
This updates the `MinerInfo` object in your miner's actor, which will be looked up when a client attempts to make a deal with you. You can provide any number of addresses.
3131

3232
As an example, you could run:
3333

3434
```
35-
lotus-miner actor set-addrs /ip4/123.123.73.123/tcp/12345 /ip4/223.223.83.223/tcp/23456
35+
lotus-storage-miner actor set-addrs /ip4/123.123.73.123/tcp/12345 /ip4/223.223.83.223/tcp/23456
3636
```
3737

3838
This step is the best way to ensure your miner is dial-able for storage and retrieval deals!
@@ -42,29 +42,29 @@ This step is the best way to ensure your miner is dial-able for storage and retr
4242
To ensure storage and retrieval deals operate smoothly, it is recommended to check how many peers a miner is connected to after each start-up. In the Lotus client, a manual peer check can be performed with the command:
4343

4444
```
45-
lotus-miner net peers
46-
```
45+
lotus-storage-miner net peers
46+
```
4747

4848
If a very low peer count is present (1-5), it is possible to manually connect the miner to the DHT by utilising one of the bootstrap peers listed in the branch's `./build/bootstrap/bootstrappers.pi` file with the commmand:
4949

5050
```
51-
lotus-miner net connect <address1> <address2>…
51+
lotus-storage-miner net connect <address1> <address2>…
5252
```
5353

5454
## Port forwarding
5555

56-
In order to ensure that Filecoin packets are able to pass freely and unfiltered through a local firewall, it is highly recommended to set up port forwarding for a miner's `libp2p` address. By default, this port is randomised; for optimal connectivity, make sure that it is set to a static IP.
56+
In order to ensure that Filecoin packets are able to pass freely and unfiltered through a local firewall, it is highly recommended to set up port forwarding for a miner's `libp2p` address. By default, this port is randomised; for optimal connectivity, make sure that it is set to a static IP.
5757

5858
To enable port forwarding on your local router:
5959

6060
1. Browse to the management website for your home router (typically http://192.168.1.1)
6161
2. Log in as admin / root
6262
3. Find the section to configure port forwarding
6363
4. Choose a port, and configure a port forwarding rule with the following values:
64-
* External port: [CHOSEN PORT]
65-
* Internal port: [CHOSEN PORT]
66-
* Protocol: TCP
67-
* IP Address: Private IP address of the host system running the miner
64+
- External port: [CHOSEN PORT]
65+
- Internal port: [CHOSEN PORT]
66+
- Protocol: TCP
67+
- IP Address: Private IP address of the host system running the miner
6868

6969
## Establishing a public IP address
7070

@@ -81,11 +81,13 @@ Below is an example `~/.lotusminer/config.toml` configuration file in which the
8181
ListenAddresses = ["/ip4/0.0.0.0/tcp/5472"]
8282
AnnounceAddresses = ["/ip4/1.2.3.4/tcp/10240"]
8383
```
84+
8485
In the above example, port `10240` is forwarded to `<internal-miner-host-ip>:5472`.
8586

8687
Verify that the port is listening by using telnet (eg: `telnet 1.2.3.4 10240`. `nc` is also sufficient.) If successful, a plaintext `/multistream/1.0.0` line will be within the response.
8788

8889
As an additional litmus test, you should be able to:
90+
8991
- Ping your Public IP address using https://ping.eu/ping
9092
- Establish a TCP socket to your Public IP address and port using https://ping.eu/port-chk/
9193

@@ -110,7 +112,7 @@ _Note: Remember that libp2p (the underlying network stack of the Filecoin miner)
110112
- 5. Wait to receive the Wireguard configuration from Ungleich, then set it up on your machine
111113
- 6. Follow the [Setting multiaddresses](#setting-multiaddresses) steps to add this multiaddr to your miner and announce it on-chain.
112114

113-
Voilà, now you have a new network interface with an IPv6 address. All traffic using that interface will be routed through Ungleich IPv6 VPN, which means that your machine, no matter where it is, will be publicly dialable through that IPv6 address.
115+
Voilà, now you have a new network interface with an IPv6 address. All traffic using that interface will be routed through Ungleich IPv6 VPN, which means that your machine, no matter where it is, will be publicly dialable through that IPv6 address.
114116

115117
You can test your IPv6 connectivity using the service https://www.ultratools.com/tools/ping6
116118

@@ -145,6 +147,7 @@ With this approach, you link a local port in your local address to a public port
145147
## Troubleshooting
146148

147149
Connectivity issues? Please run the following steps:
150+
148151
1. Go to [https://ping.eu/ping/](https://ping.eu/ping/) and check if the service can ping your public IP address
149152
1. Go to [https://ping.eu/port-chk/](https://ping.eu/port-chk/) and check if the port that leads to your miner is accessible
150153
1. From another network (another computer in another house, datacenter, etc), do telnet or netcat to the ip+port and a `/multistream/1.0.0` should come out
@@ -153,15 +156,14 @@ Connectivity issues? Please run the following steps:
153156

154157
## Common Errors
155158

156-
| Error | What it means | How to fix |
157-
|---|---|---|
158-
| N/A | If you see "N/A" for deal success rate, this may be why. Once your miner seals its first sector, the dealbot will start attempting storage deals. From the moment a miner seals its first sector, you should have a storage deal result in max 48 hours (current timeout value for storage deals). For retrieval deals you should see a result in maxim 12 hours after the storage deal is reported successful (current timeout for retrieval deals ). The dashboard currently logs deal **results** only. If you have a storage or retrieval deal in progress you’ll still see “N/A” until it propagates to the chain. | No miner action needed. |
159-
| ClientQueryAsk failed : failed to open stream to miner: dial backoff | The connection to the remote host was attempted, but failed. | This may be due to issues with porting, IPs set within the config file, or simply no internet connectivity. To fix, [establish a public IP address](https://docs.filecoin.io/mine/connectivity/#establishing-a-public-ip-address).|
160-
| ClientQueryAsk failed : failed to open stream to miner: failed to dial | The deal-bot was unable to open a network socket to the miner. | This is likely because the miner's IP is not publicly dialable, or a port issue. To fix, [establish a public IP address](https://docs.filecoin.io/mine/connectivity/#establishing-a-public-ip-address).|
161-
| ClientQueryAsk failed : failed to open stream to miner: routing: not found | The deal-bot was unable to locate the miners IP and/or port. | Follow the instructions under the [setting multiaddresses section](#setting-multiaddresses) on this page. |
162-
| ClientQueryAsk failed : failed to read ask response: stream reset | Connectivity loss, either due to a high packet loss rate or libp2p too aggressively dropping/failing connections. | [Fix underway.] Lotus team is currently working on a change to use libp2p's connection tagging feature, which will retry connections if dropped. ([go-fil-markets/#361](https://github.com/filecoin-project/go-fil-markets/issues/361)). No action needed from miners. |
163-
| StorageDealError PublishStorageDeals: found message with equal nonce as the one we are looking for | [Under investigation.] We suspect a chain validation error | No action needed from miners. |
164-
| ClientMinerQueryOffer - Retrieval query offer errored: get cid info: No state for /bafk2bz... | [Under investigation.] | No action needed from miners. |
165-
159+
| Error | What it means | How to fix |
160+
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
161+
| N/A | If you see "N/A" for deal success rate, this may be why. Once your miner seals its first sector, the dealbot will start attempting storage deals. From the moment a miner seals its first sector, you should have a storage deal result in max 48 hours (current timeout value for storage deals). For retrieval deals you should see a result in maxim 12 hours after the storage deal is reported successful (current timeout for retrieval deals ). The dashboard currently logs deal **results** only. If you have a storage or retrieval deal in progress you’ll still see “N/A” until it propagates to the chain. | No miner action needed. |
162+
| ClientQueryAsk failed : failed to open stream to miner: dial backoff | The connection to the remote host was attempted, but failed. | This may be due to issues with porting, IPs set within the config file, or simply no internet connectivity. To fix, [establish a public IP address](https://docs.filecoin.io/mine/connectivity/#establishing-a-public-ip-address). |
163+
| ClientQueryAsk failed : failed to open stream to miner: failed to dial | The deal-bot was unable to open a network socket to the miner. | This is likely because the miner's IP is not publicly dialable, or a port issue. To fix, [establish a public IP address](https://docs.filecoin.io/mine/connectivity/#establishing-a-public-ip-address). |
164+
| ClientQueryAsk failed : failed to open stream to miner: routing: not found | The deal-bot was unable to locate the miners IP and/or port. | Follow the instructions under the [setting multiaddresses section](#setting-multiaddresses) on this page. |
165+
| ClientQueryAsk failed : failed to read ask response: stream reset | Connectivity loss, either due to a high packet loss rate or libp2p too aggressively dropping/failing connections. | [Fix underway.] Lotus team is currently working on a change to use libp2p's connection tagging feature, which will retry connections if dropped. ([go-fil-markets/#361](https://github.com/filecoin-project/go-fil-markets/issues/361)). No action needed from miners. |
166+
| StorageDealError PublishStorageDeals: found message with equal nonce as the one we are looking for | [Under investigation.] We suspect a chain validation error | No action needed from miners. |
167+
| ClientMinerQueryOffer - Retrieval query offer errored: get cid info: No state for /bafk2bz... | [Under investigation.] | No action needed from miners. |
166168

167169
If you fail to succeed in any of these steps, please start a thread on #fil-net-calibration in the [Filecoin Slack](http://filecoin.io/slack). Please include all of the steps you have tried, their output, and your miner ID.

0 commit comments

Comments
 (0)