documentation: adds prettier formatting to markdown files (en)
This commit is contained in:
parent
ac535f3b63
commit
35cbcd5e9e
@ -1,6 +1,8 @@
|
||||
# API Scripting Support
|
||||
|
||||
You may want to delegate the work **Lotus Storage Miner** or **Lotus Node** perform to other machines. Here is how to setup the necessary authorization and environment variables.
|
||||
You may want to delegate the work **Lotus Storage Miner** or **Lotus Node**
|
||||
perform to other machines. Here is how to setup the necessary authorization and
|
||||
environment variables.
|
||||
|
||||
## Generate a JWT
|
||||
|
||||
@ -13,9 +15,12 @@ lotus-storage-miner auth create-token --perm admin
|
||||
|
||||
## Environment variables
|
||||
|
||||
Environmental variables are variables that are defined for the current shell and are inherited by any child shells or processes. Environmental variables are used to pass information into processes that are spawned from the shell.
|
||||
Environmental variables are variables that are defined for the current shell and
|
||||
are inherited by any child shells or processes. Environmental variables are used
|
||||
to pass information into processes that are spawned from the shell.
|
||||
|
||||
Using the JWT you generated, you can assign it and the **multiaddr** to the appropriate environment variable.
|
||||
Using the JWT you generated, you can assign it and the **multiaddr** to the
|
||||
appropriate environment variable.
|
||||
|
||||
```sh
|
||||
# Lotus Node
|
||||
@ -25,7 +30,7 @@ FULLNODE_API_INFO="JWT_TOKEN:/ip4/127.0.0.1/tcp/1234/http"
|
||||
STORAGE_API_INFO="JWT_TOKEN:/ip4/127.0.0.1/tcp/2345/http"
|
||||
```
|
||||
|
||||
* The **Lotus Node**'s `mutliaddr` is in `~/.lotus/api`.
|
||||
* The default token is in `~/.lotus/token`.
|
||||
* The **Lotus Storage Miner**'s `multiaddr` is in `~/.lotusstorage/config`.
|
||||
* The default token is in `~/.lotusstorage/token`.
|
||||
- The **Lotus Node**'s `mutliaddr` is in `~/.lotus/api`.
|
||||
- The default token is in `~/.lotus/token`.
|
||||
- The **Lotus Storage Miner**'s `multiaddr` is in `~/.lotusstorage/config`.
|
||||
- The default token is in `~/.lotusstorage/token`.
|
||||
|
@ -2,14 +2,17 @@
|
||||
|
||||
## params
|
||||
|
||||
`params` must be an array. If there are no `params` you should still pass an empty array.
|
||||
`params` must be an array. If there are no `params` you should still pass an
|
||||
empty array.
|
||||
|
||||
## TipSet
|
||||
|
||||
For methods such as `Filecoin.StateMinerPower`, where the method accepts the argument of the type `TipSet`, you can pass `null` to use the current chain head.
|
||||
For methods such as `Filecoin.StateMinerPower`, where the method accepts the
|
||||
argument of the type `TipSet`, you can pass `null` to use the current chain
|
||||
head.
|
||||
|
||||
```sh
|
||||
curl -X POST \
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
--data '{ "jsonrpc": "2.0", "method": "Filecoin.StateMinerPower", "params": ["t0101", null], "id": 3 }' \
|
||||
'http://127.0.0.1:1234/rpc/v0'
|
||||
@ -17,7 +20,9 @@ curl -X POST \
|
||||
|
||||
## Sending a CID
|
||||
|
||||
If you do not serialize the CID as a [JSON IPLD link](https://did-ipid.github.io/ipid-did-method/#txref), you will receive an error. Here is an example of a broken CURL request:
|
||||
If you do not serialize the CID as a
|
||||
[JSON IPLD link](https://did-ipid.github.io/ipid-did-method/#txref), you will
|
||||
receive an error. Here is an example of a broken CURL request:
|
||||
|
||||
```sh
|
||||
curl -X POST \
|
||||
|
@ -2,37 +2,44 @@
|
||||
|
||||
Here is an early overview of how to make API calls.
|
||||
|
||||
Implementation details for the **JSON-RPC** package are [here](https://github.com/filecoin-project/lotus/tree/master/lib/jsonrpc).
|
||||
Implementation details for the **JSON-RPC** package are
|
||||
[here](https://github.com/filecoin-project/lotus/tree/master/lib/jsonrpc).
|
||||
|
||||
## Overview: How do you modify the config.toml to change the API endpoint?
|
||||
|
||||
API requests are made against `127.0.0.1:1234` unless you modify `.lotus/config.toml`.
|
||||
API requests are made against `127.0.0.1:1234` unless you modify
|
||||
`.lotus/config.toml`.
|
||||
|
||||
Options:
|
||||
|
||||
- `http://[api:port]/rpc/v0` - HTTP endpoint
|
||||
- `ws://[api:port]/rpc/v0` - Websocket endpoint
|
||||
- `PUT http://[api:port]/rest/v0/import` - File import, it requires write permissions.
|
||||
- `ws://[api:port]/rpc/v0` - Websocket endpoint
|
||||
- `PUT http://[api:port]/rest/v0/import` - File import, it requires write
|
||||
permissions.
|
||||
|
||||
## What methods can I use?
|
||||
|
||||
For now, you can look into different files to find methods available to you based on your needs:
|
||||
For now, you can look into different files to find methods available to you
|
||||
based on your needs:
|
||||
|
||||
* [Both Lotus node + storage miner APIs](https://github.com/filecoin-project/lotus/blob/master/api/api_common.go)
|
||||
* [Lotus node API](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go)
|
||||
* [Storage miner API](https://github.com/filecoin-project/lotus/blob/master/api/api_storage.go)
|
||||
- [Both Lotus node + storage miner APIs](https://github.com/filecoin-project/lotus/blob/master/api/api_common.go)
|
||||
- [Lotus node API](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go)
|
||||
- [Storage miner API](https://github.com/filecoin-project/lotus/blob/master/api/api_storage.go)
|
||||
|
||||
The necessary permissions for each are in [api/struct.go](https://github.com/filecoin-project/lotus/blob/master/api/struct.go).
|
||||
The necessary permissions for each are in
|
||||
[api/struct.go](https://github.com/filecoin-project/lotus/blob/master/api/struct.go).
|
||||
|
||||
## How do I make an API request?
|
||||
|
||||
To demonstrate making an API request, we will take the method `ChainHead` from [api/api.go](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go).
|
||||
To demonstrate making an API request, we will take the method `ChainHead` from
|
||||
[api/api.go](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go).
|
||||
|
||||
```go
|
||||
ChainHead(context.Context) (*types.TipSet, error)
|
||||
```
|
||||
|
||||
And create a CURL command. In this command, `ChainHead` is included as `{ "method": "Filecoin.ChainHead" }`:
|
||||
And create a CURL command. In this command, `ChainHead` is included as
|
||||
`{ "method": "Filecoin.ChainHead" }`:
|
||||
|
||||
```sh
|
||||
curl -X POST \
|
||||
@ -51,17 +58,20 @@ curl -X POST \
|
||||
'http://127.0.0.1:1234/rpc/v0'
|
||||
```
|
||||
|
||||
> In the future we will add a playground to make it easier to build and experiment with API requests.
|
||||
> In the future we will add a playground to make it easier to build and
|
||||
> experiment with API requests.
|
||||
|
||||
## CURL authorization
|
||||
|
||||
To authorize your request, you will need to include the **JWT** in a HTTP header, for example:
|
||||
To authorize your request, you will need to include the **JWT** in a HTTP
|
||||
header, for example:
|
||||
|
||||
```sh
|
||||
-H "Authorization: Bearer $(cat ~/.lotusstorage/token)"
|
||||
```
|
||||
|
||||
Admin token is stored in `~/.lotus/token` for the **Lotus Node** or `~/.lotusstorage/token` for the **Lotus Storage Miner**.
|
||||
Admin token is stored in `~/.lotus/token` for the **Lotus Node** or
|
||||
`~/.lotusstorage/token` for the **Lotus Storage Miner**.
|
||||
|
||||
## How do I generate a token?
|
||||
|
||||
@ -77,9 +87,12 @@ lotus-storage-miner auth create-token --perm admin
|
||||
|
||||
## What authorization level should I use?
|
||||
|
||||
When viewing [api/struct.go](https://github.com/filecoin-project/lotus/blob/master/api/struct.go), you will encounter these types:
|
||||
When viewing
|
||||
[api/struct.go](https://github.com/filecoin-project/lotus/blob/master/api/struct.go),
|
||||
you will encounter these types:
|
||||
|
||||
- `read` - Read node state, no private data.
|
||||
- `write` - Write to local store / chain, and `read` permissions.
|
||||
- `sign` - Use private keys stored in wallet for signing, `read` and `write` permissions.
|
||||
- `sign` - Use private keys stored in wallet for signing, `read` and `write`
|
||||
permissions.
|
||||
- `admin` - Manage permissions, `read`, `write`, and `sign` permissions.
|
||||
|
@ -1,12 +1,14 @@
|
||||
# Jaeger Tracing
|
||||
|
||||
Lotus has tracing built into many of its internals. To view the traces, first download [Jaeger](https://www.jaegertracing.io/download/) (Choose the 'all-in-one' binary). Then run it somewhere, start up the lotus daemon, and open up localhost:16686 in your browser.
|
||||
Lotus has tracing built into many of its internals. To view the traces, first
|
||||
download [Jaeger](https://www.jaegertracing.io/download/) (Choose the
|
||||
'all-in-one' binary). Then run it somewhere, start up the lotus daemon, and open
|
||||
up localhost:16686 in your browser.
|
||||
|
||||
## Open Census
|
||||
|
||||
Lotus uses [OpenCensus](https://opencensus.io/) for tracing application flow.
|
||||
This generates spans
|
||||
through the execution of annotated code paths.
|
||||
This generates spans through the execution of annotated code paths.
|
||||
|
||||
Currently it is set up to use Jaeger, though other tracing backends should be
|
||||
fairly easy to swap in.
|
||||
@ -14,9 +16,10 @@ fairly easy to swap in.
|
||||
## Running Locally
|
||||
|
||||
To easily run and view tracing locally, first, install jaeger. The easiest way
|
||||
to do this is to [download the binaries](https://www.jaegertracing.io/download/) and then run the `jaeger-all-in-one`
|
||||
binary. This will start up jaeger, listen for spans on `localhost:6831`, and
|
||||
expose a web UI for viewing traces on `http://localhost:16686/`.
|
||||
to do this is to [download the binaries](https://www.jaegertracing.io/download/)
|
||||
and then run the `jaeger-all-in-one` binary. This will start up jaeger, listen
|
||||
for spans on `localhost:6831`, and expose a web UI for viewing traces on
|
||||
`http://localhost:16686/`.
|
||||
|
||||
Now, to start sending traces from Lotus to Jaeger, set the environment variable
|
||||
`LOTUS_JAEGER` to `localhost:6831`, and start the `lotus daemon`.
|
||||
@ -26,7 +29,8 @@ browser.
|
||||
|
||||
## Adding Spans
|
||||
|
||||
To annotate a new codepath with spans, add the following lines to the top of the function you wish to trace:
|
||||
To annotate a new codepath with spans, add the following lines to the top of the
|
||||
function you wish to trace:
|
||||
|
||||
```go
|
||||
ctx, span := trace.StartSpan(ctx, "put function name here")
|
||||
|
@ -1,6 +1,9 @@
|
||||
# Pond UI
|
||||
|
||||
Pond is a graphical testbed for [Lotus](https://docs.lotu.sh). Using it will setup a separate local network which is helpful for debugging. Pond will spin up nodes, connect them in a given topology, start them mining, and observe how they function over time.
|
||||
Pond is a graphical testbed for [Lotus](https://docs.lotu.sh). Using it will
|
||||
setup a separate local network which is helpful for debugging. Pond will spin up
|
||||
nodes, connect them in a given topology, start them mining, and observe how they
|
||||
function over time.
|
||||
|
||||
## Build
|
||||
|
||||
@ -19,14 +22,19 @@ Now go to `http://127.0.0.1:2222`.
|
||||
## What can I test?
|
||||
|
||||
- The `Spawn Node` button starts a new **Lotus Node** in a new draggable window.
|
||||
- Click `[Spawn Storage Miner]` to start a **Lotus Storage Miner**. This require's the node's wallet to have funds.
|
||||
- Click on `[Client]` to open the **Lotus Node**'s client interface and propose a deal with an existing Miner. If successful you'll see a payment channel open up with that Miner.
|
||||
- Click `[Spawn Storage Miner]` to start a **Lotus Storage Miner**. This
|
||||
require's the node's wallet to have funds.
|
||||
- Click on `[Client]` to open the **Lotus Node**'s client interface and propose
|
||||
a deal with an existing Miner. If successful you'll see a payment channel open
|
||||
up with that Miner.
|
||||
|
||||
Don't leave Pond unattended for more than 10 hours, the web client will eventually consume all available RAM.
|
||||
Don't leave Pond unattended for more than 10 hours, the web client will
|
||||
eventually consume all available RAM.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- Turn it off and on - Start at the top
|
||||
- `rm -rf ~/.lotus ~/.lotusstorage/`, this command will delete chain sync data, stored wallets, and other configurations so be careful.
|
||||
- `rm -rf ~/.lotus ~/.lotusstorage/`, this command will delete chain sync data,
|
||||
stored wallets, and other configurations so be careful.
|
||||
- Verify you have the correct versions of dependencies
|
||||
- If stuck on a bad fork, try `lotus chain sethead --genesis`
|
||||
- If stuck on a bad fork, try `lotus chain sethead --genesis`
|
||||
|
@ -1,3 +1,3 @@
|
||||
# Development Tools
|
||||
|
||||
> This page is a work in progress
|
||||
> This page is a work in progress
|
||||
|
@ -1,23 +1,36 @@
|
||||
# Lotus
|
||||
|
||||
Lotus is an implementation of the **Filecoin Distributed Storage Network**. You can run the Lotus software client to join the **Filecoin TestNet** (when it launches).
|
||||
Lotus is an implementation of the **Filecoin Distributed Storage Network**. You
|
||||
can run the Lotus software client to join the **Filecoin TestNet** (when it
|
||||
launches).
|
||||
|
||||
For more details about Filecoin, check out the [Filecoin Spec](https://github.com/filecoin-project/specs).
|
||||
For more details about Filecoin, check out the
|
||||
[Filecoin Spec](https://github.com/filecoin-project/specs).
|
||||
|
||||
## What can I learn here?
|
||||
|
||||
- How to install Lotus on [Arch Linux](https://docs.lotu.sh/en+install-lotus-arch), [Ubuntu](https://docs.lotu.sh/en+install-lotus-ubuntu), or [MacOS](https://docs.lotu.sh/en+install-lotus-macos).
|
||||
- How to install Lotus on
|
||||
[Arch Linux](https://docs.lotu.sh/en+install-lotus-arch),
|
||||
[Ubuntu](https://docs.lotu.sh/en+install-lotus-ubuntu), or
|
||||
[MacOS](https://docs.lotu.sh/en+install-lotus-macos).
|
||||
- Joining the [Lotus TestNet](https://docs.lotu.sh/en+join-testnet).
|
||||
- [Storing](https://docs.lotu.sh/en+storing-data) or [retrieving](https://docs.lotu.sh/en+retrieving-data) data.
|
||||
- Mining Filecoin using the **Lotus Storage Miner** in your [CLI](https://docs.lotu.sh/en+mining).
|
||||
- [Storing](https://docs.lotu.sh/en+storing-data) or
|
||||
[retrieving](https://docs.lotu.sh/en+retrieving-data) data.
|
||||
- Mining Filecoin using the **Lotus Storage Miner** in your
|
||||
[CLI](https://docs.lotu.sh/en+mining).
|
||||
|
||||
## What makes Lotus different?
|
||||
|
||||
Lotus is architected modularly to keep clean API boundaries while using the same process. Installing Lotus will include two separate programs:
|
||||
Lotus is architected modularly to keep clean API boundaries while using the same
|
||||
process. Installing Lotus will include two separate programs:
|
||||
|
||||
- The **Lotus Node**
|
||||
- The **Lotus Node**
|
||||
- The **Lotus Storage Miner**
|
||||
|
||||
The **Lotus Storage Miner** is intended to be run on the machine that manages a single storage miner instance, and is meant to communicate with the **Lotus Node** via the websocket **JSON-RPC** API for all of the chain interaction needs.
|
||||
The **Lotus Storage Miner** is intended to be run on the machine that manages a
|
||||
single storage miner instance, and is meant to communicate with the **Lotus
|
||||
Node** via the websocket **JSON-RPC** API for all of the chain interaction
|
||||
needs.
|
||||
|
||||
This way, a mining operation may easily run a **Lotus Storage Miner** or many of them, connected to one or many **Lotus Node** instances.
|
||||
This way, a mining operation may easily run a **Lotus Storage Miner** or many of
|
||||
them, connected to one or many **Lotus Node** instances.
|
||||
|
@ -1,40 +1,53 @@
|
||||
# Protocol Labs Standard Testing Configuration
|
||||
|
||||
> This documentation page describes the standard testing configuration the Protocol Labs team has used to test **Lotus Storage Miner**s on Lotus. There is no guarantee this testing configuration will be suitable for Filecoin storage mining at MainNet launch. If you need to buy new hardware to join the Filecoin TestNet, we recommend to buy no more hardware than you require for testing. To learn more please read this [Protocol Labs Standard Testing Configuration post](https://filecoin.io/blog/filecoin-testnet-mining/).
|
||||
> This documentation page describes the standard testing configuration the
|
||||
> Protocol Labs team has used to test **Lotus Storage Miner**s on Lotus. There
|
||||
> is no guarantee this testing configuration will be suitable for Filecoin
|
||||
> storage mining at MainNet launch. If you need to buy new hardware to join the
|
||||
> Filecoin TestNet, we recommend to buy no more hardware than you require for
|
||||
> testing. To learn more please read this
|
||||
> [Protocol Labs Standard Testing Configuration post](https://filecoin.io/blog/filecoin-testnet-mining/).
|
||||
|
||||
**Sector sizes** and **minimum pledged storage** required to mine blocks are two very important Filecoin TestNet parameters that impact hardware decisions. We will continue to refine all parameters during TestNet.
|
||||
**Sector sizes** and **minimum pledged storage** required to mine blocks are two
|
||||
very important Filecoin TestNet parameters that impact hardware decisions. We
|
||||
will continue to refine all parameters during TestNet.
|
||||
|
||||
BECAUSE OF THIS, OUR STANDARD TESTING CONFIGURATION FOR FILECOIN MAINNET CAN AND WILL CHANGE. YOU HAVE BEEN WARNED.
|
||||
BECAUSE OF THIS, OUR STANDARD TESTING CONFIGURATION FOR FILECOIN MAINNET CAN AND
|
||||
WILL CHANGE. YOU HAVE BEEN WARNED.
|
||||
|
||||
## Example configuration
|
||||
|
||||
The setup below is a minimal example for sealing 32 GiB sectors on Lotus:
|
||||
|
||||
* 2 TB of hard drive space.
|
||||
* 8 core CPU
|
||||
* 128 GiB of RAM
|
||||
- 2 TB of hard drive space.
|
||||
- 8 core CPU
|
||||
- 128 GiB of RAM
|
||||
|
||||
Note that 1GB sectors don't require as high of specs, but are likely to be removed
|
||||
as we improve the performance of 32GB sector sealing.
|
||||
Note that 1GB sectors don't require as high of specs, but are likely to be
|
||||
removed as we improve the performance of 32GB sector sealing.
|
||||
|
||||
## TestNet discoveries
|
||||
|
||||
* If you only have 128GiB of ram, enabling 256GB of **NVMe** swap on an SSD will help you avoid out-of-memory issues while mining.
|
||||
- If you only have 128GiB of ram, enabling 256GB of **NVMe** swap on an SSD will
|
||||
help you avoid out-of-memory issues while mining.
|
||||
|
||||
## Benchmarked GPUs
|
||||
|
||||
GPUs are a must for getting **block rewards**. Here are a few that have been confirmed to generate **SNARKs** quickly enough to successfully mine blocks on the Lotus TestNet.
|
||||
GPUs are a must for getting **block rewards**. Here are a few that have been
|
||||
confirmed to generate **SNARKs** quickly enough to successfully mine blocks on
|
||||
the Lotus TestNet.
|
||||
|
||||
* GeForce RTX 2080 Ti
|
||||
* GeForce RTX 2080 SUPER
|
||||
* GeForce RTX 2080
|
||||
* GeForce GTX 1080 Ti
|
||||
* GeForce GTX 1080
|
||||
* GeForce GTX 1060
|
||||
- GeForce RTX 2080 Ti
|
||||
- GeForce RTX 2080 SUPER
|
||||
- GeForce RTX 2080
|
||||
- GeForce GTX 1080 Ti
|
||||
- GeForce GTX 1080
|
||||
- GeForce GTX 1060
|
||||
|
||||
## Testing other GPUs
|
||||
|
||||
If you want to test a GPU that is not explicitly supported, you can use the following configuration flag:
|
||||
If you want to test a GPU that is not explicitly supported, you can use the
|
||||
following configuration flag:
|
||||
|
||||
```sh
|
||||
BELLMAN_CUSTOM_GPU="<NAME>:<NUMBER_OF_CORES>"
|
||||
@ -46,8 +59,14 @@ Here is an example of trying a GeForce GTX 1660 ti with 1536 cores.
|
||||
BELLMAN_CUSTOM_GPU="GeForce GTX 1660 Ti:1536"
|
||||
```
|
||||
|
||||
To get the number of cores for your GPU, you will need to check your card’s specifications.
|
||||
To get the number of cores for your GPU, you will need to check your card’s
|
||||
specifications.
|
||||
|
||||
## Benchmarking
|
||||
|
||||
Here is a [benchmarking tool](https://github.com/filecoin-project/lotus/tree/testnet-staging/cmd/lotus-bench) and a [GitHub issue thread](https://github.com/filecoin-project/lotus/issues/694) for those who wish to experiment with and contribute hardware setups for the **Filecoin TestNet**.
|
||||
Here is a
|
||||
[benchmarking tool](https://github.com/filecoin-project/lotus/tree/testnet-staging/cmd/lotus-bench)
|
||||
and a
|
||||
[GitHub issue thread](https://github.com/filecoin-project/lotus/issues/694) for
|
||||
those who wish to experiment with and contribute hardware setups for the
|
||||
**Filecoin TestNet**.
|
||||
|
@ -1,7 +1,9 @@
|
||||
# Hardware
|
||||
|
||||
> This page is a work in progress. Exact mining requirements are still in the works.
|
||||
> This page is a work in progress. Exact mining requirements are still in the
|
||||
> works.
|
||||
|
||||
Lotus can build and run on most [Linux](https://ubuntu.com/) and [MacOS](https://www.apple.com/macos) systems with at least 8GiB of RAM.
|
||||
Lotus can build and run on most [Linux](https://ubuntu.com/) and
|
||||
[MacOS](https://www.apple.com/macos) systems with at least 8GiB of RAM.
|
||||
|
||||
Windows is not yet supported.
|
||||
|
@ -41,4 +41,6 @@ make clean && make all
|
||||
sudo make install
|
||||
```
|
||||
|
||||
After installing Lotus, you can run the `lotus` command directly from your CLI to see usage documentation. Next, you can join the [Lotus TestNet](https://docs.lotu.sh/en+join-testnet).
|
||||
After installing Lotus, you can run the `lotus` command directly from your CLI
|
||||
to see usage documentation. Next, you can join the
|
||||
[Lotus TestNet](https://docs.lotu.sh/en+join-testnet).
|
||||
|
@ -2,13 +2,15 @@
|
||||
|
||||
## Get XCode Command Line Tools
|
||||
|
||||
To check if you already have the XCode Command Line Tools installed via the CLI, run:
|
||||
To check if you already have the XCode Command Line Tools installed via the CLI,
|
||||
run:
|
||||
|
||||
```sh
|
||||
xcode-select -p
|
||||
```
|
||||
|
||||
If this command returns a path, you can move on to the next step. Otherwise, to install via the CLI, run:
|
||||
If this command returns a path, you can move on to the next step. Otherwise, to
|
||||
install via the CLI, run:
|
||||
|
||||
```sh
|
||||
xcode-select --install
|
||||
@ -23,7 +25,8 @@ xcode-select --install
|
||||
|
||||
## Get HomeBrew
|
||||
|
||||
We recommend that MacOS users use [HomeBrew](https://brew.sh) to install each the necessary packages.
|
||||
We recommend that MacOS users use [HomeBrew](https://brew.sh) to install each
|
||||
the necessary packages.
|
||||
|
||||
Check if you have HomeBrew:
|
||||
|
||||
@ -31,7 +34,8 @@ Check if you have HomeBrew:
|
||||
brew -v
|
||||
```
|
||||
|
||||
This command returns a version number if you have HomeBrew installed and nothing otherwise.
|
||||
This command returns a version number if you have HomeBrew installed and nothing
|
||||
otherwise.
|
||||
|
||||
In your terminal, enter this command to install Homebrew:
|
||||
|
||||
@ -59,4 +63,6 @@ make clean && make all
|
||||
sudo make install
|
||||
```
|
||||
|
||||
After installing Lotus, you can run the `lotus` command directly from your CLI to see usage documentation. Next, you can join the [Lotus TestNet](https://docs.lotu.sh/en+join-testnet).
|
||||
After installing Lotus, you can run the `lotus` command directly from your CLI
|
||||
to see usage documentation. Next, you can join the
|
||||
[Lotus TestNet](https://docs.lotu.sh/en+join-testnet).
|
||||
|
@ -44,4 +44,6 @@ make clean && make all
|
||||
sudo make install
|
||||
```
|
||||
|
||||
After installing Lotus, you can run the `lotus` command directly from your CLI to see usage documentation. Next, you can join the [Lotus TestNet](https://docs.lotu.sh/en+join-testnet).
|
||||
After installing Lotus, you can run the `lotus` command directly from your CLI
|
||||
to see usage documentation. Next, you can join the
|
||||
[Lotus TestNet](https://docs.lotu.sh/en+join-testnet).
|
||||
|
@ -2,9 +2,12 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
Anyone can set up a **Lotus Node** and connect to the **Lotus TestNet**. This is the best way to explore the current CLI and the **Filecoin Decentralized Storage Market**.
|
||||
Anyone can set up a **Lotus Node** and connect to the **Lotus TestNet**. This is
|
||||
the best way to explore the current CLI and the **Filecoin Decentralized Storage
|
||||
Market**.
|
||||
|
||||
If you have installed older versions, you may need to clear existing chain data, stored wallets and miners if you run into any errors. You can use this command:
|
||||
If you have installed older versions, you may need to clear existing chain data,
|
||||
stored wallets and miners if you run into any errors. You can use this command:
|
||||
|
||||
```sh
|
||||
rm -rf ~/.lotus ~/.lotusstorage
|
||||
@ -24,18 +27,22 @@ In another terminal window, check your connection with peers:
|
||||
lotus net peers | wc -l
|
||||
```
|
||||
|
||||
In order to connect to the network, you need to be connected to at least 1 peer. If you’re seeing 0 peers, read our [troubleshooting notes](https://docs.lotu.sh/en+setup-troubleshooting).
|
||||
In order to connect to the network, you need to be connected to at least 1 peer.
|
||||
If you’re seeing 0 peers, read our
|
||||
[troubleshooting notes](https://docs.lotu.sh/en+setup-troubleshooting).
|
||||
|
||||
## Chain sync
|
||||
|
||||
While the daemon is running, the next requirement is to sync the chain. Run the command below to start the chain sync progress. To see current chain height, visit the [network stats page](http://stats.testnet.filecoin.io/).
|
||||
While the daemon is running, the next requirement is to sync the chain. Run the
|
||||
command below to start the chain sync progress. To see current chain height,
|
||||
visit the [network stats page](http://stats.testnet.filecoin.io/).
|
||||
|
||||
```sh
|
||||
lotus sync wait
|
||||
```
|
||||
|
||||
* This step will take anywhere between 30 minutes to a few hours.
|
||||
* You will be able to perform **Lotus TestNet** operations after it is finished.
|
||||
- This step will take anywhere between 30 minutes to a few hours.
|
||||
- You will be able to perform **Lotus TestNet** operations after it is finished.
|
||||
|
||||
## Create your first address
|
||||
|
||||
@ -51,19 +58,22 @@ Here is an example of the response:
|
||||
t3vhfme4qfvegqaz7m7q6o6afjcs67n6kpzv7t2eozio4chwpafwa2y4l7zhwd5eom7jmihzdg4s52dpvnclza
|
||||
```
|
||||
|
||||
- Visit the [faucet](https://lotus-faucet.kittyhawk.wtf/funds.html) to add funds.
|
||||
- Visit the [faucet](https://lotus-faucet.kittyhawk.wtf/funds.html) to add
|
||||
funds.
|
||||
- Paste the address you created.
|
||||
- Press the send button.
|
||||
|
||||
## Check wallet address balance
|
||||
|
||||
Wallet balances in the Lotus TestNet are in **FIL**, the smallest denomination of FIL is an **attoFil**, where 1 attoFil = 10^-18 FIL.
|
||||
Wallet balances in the Lotus TestNet are in **FIL**, the smallest denomination
|
||||
of FIL is an **attoFil**, where 1 attoFil = 10^-18 FIL.
|
||||
|
||||
```sh
|
||||
lotus wallet balance <YOUR_NEW_ADDRESS>
|
||||
```
|
||||
|
||||
You will not see any attoFIL in your wallet if your **chain** is not fully synced.
|
||||
You will not see any attoFIL in your wallet if your **chain** is not fully
|
||||
synced.
|
||||
|
||||
## Send FIL to another wallet
|
||||
|
||||
@ -75,4 +85,7 @@ lotus send <target> <amount>
|
||||
|
||||
## Monitor the dashboard
|
||||
|
||||
To see the latest network activity, including **chain block height**, **block height**, **blocktime**, **total network power**, largest **block producer miner**, check out the [monitoring dashboard](https://stats.testnet.filecoin.io).
|
||||
To see the latest network activity, including **chain block height**, **block
|
||||
height**, **blocktime**, **total network power**, largest **block producer
|
||||
miner**, check out the
|
||||
[monitoring dashboard](https://stats.testnet.filecoin.io).
|
||||
|
@ -1,29 +1,35 @@
|
||||
# Running a local developer network
|
||||
|
||||
Build the lotus binaries in debug mode, This enables the use of 1024 byte sectors.
|
||||
Build the lotus binaries in debug mode, This enables the use of 1024 byte
|
||||
sectors.
|
||||
|
||||
```
|
||||
make debug
|
||||
```
|
||||
|
||||
Pre-seal some sectors:
|
||||
|
||||
```
|
||||
./lotus-seed pre-seal --sector-size 1024 --num-sectors 2
|
||||
```
|
||||
|
||||
Create the genesis block and start up the first node:
|
||||
|
||||
```
|
||||
./lotus daemon --lotus-make-random-genesis=dev.gen --genesis-presealed-sectors
|
||||
=~/.genesis-sectors/pre-seal-t0101.json --bootstrap=false
|
||||
```
|
||||
|
||||
Set up the genesis miner:
|
||||
|
||||
```
|
||||
./lotus-storage-miner init --genesis-miner --actor=t0101 --sector-size=1024 --pre-sealed-sectors=~/.genesis-sectors --nosync
|
||||
```
|
||||
|
||||
Now, finally, start up the miner:
|
||||
|
||||
```
|
||||
./lotus-storage-miner run --nosync
|
||||
```
|
||||
|
||||
If all went well, you will have your own local lotus network running!
|
||||
If all went well, you will have your own local lotus network running!
|
||||
|
@ -2,13 +2,15 @@
|
||||
|
||||
## Bellman Lockfile
|
||||
|
||||
The **Bellman** lockfile is created to lock a GPU for a process. This bug can occur when this file isn't properly cleaned up:
|
||||
The **Bellman** lockfile is created to lock a GPU for a process. This bug can
|
||||
occur when this file isn't properly cleaned up:
|
||||
|
||||
```sh
|
||||
mining block failed: computing election proof: github.com/filecoin-project/lotus/miner.(*Miner).mineOne
|
||||
```
|
||||
|
||||
This bug occurs when the storage miner can't acquire the `bellman.lock`. To fix it you need to stop the `lotus-storage-miner` and remove `/tmp/bellman.lock`.
|
||||
This bug occurs when the storage miner can't acquire the `bellman.lock`. To fix
|
||||
it you need to stop the `lotus-storage-miner` and remove `/tmp/bellman.lock`.
|
||||
|
||||
## Your miner is not ready
|
||||
|
||||
@ -17,7 +19,8 @@ lotus-storage-miner info
|
||||
# WARN main lotus-storage-miner/main.go:73 failed to get api endpoint: (/Users/myrmidon/.lotusstorage) %!w(*errors.errorString=&{API not running (no endpoint)}):
|
||||
```
|
||||
|
||||
If you see this, that means your **Lotus Storage Miner** isn't ready yet. You need to finish [syncing the chain](https://docs.lotu.sh/en+join-testnet).
|
||||
If you see this, that means your **Lotus Storage Miner** isn't ready yet. You
|
||||
need to finish [syncing the chain](https://docs.lotu.sh/en+join-testnet).
|
||||
|
||||
## Your computer is too slow
|
||||
|
||||
@ -25,7 +28,8 @@ If you see this, that means your **Lotus Storage Miner** isn't ready yet. You ne
|
||||
CAUTION: block production took longer than the block delay. Your computer may not be fast enough to keep up
|
||||
```
|
||||
|
||||
If you see this, that means your computer is too slow and your blocks are not included in the chain, and you will not receive any rewards.
|
||||
If you see this, that means your computer is too slow and your blocks are not
|
||||
included in the chain, and you will not receive any rewards.
|
||||
|
||||
## Running out of storage
|
||||
|
||||
@ -34,11 +38,18 @@ lotus-storage-miner pledge-sector
|
||||
# No space left on device (os error 28)
|
||||
```
|
||||
|
||||
If you see this, that means `pledge-sector` wrote too much data to `$TMPDIR` which by default is the root partition (This is common for Linux setups). Usually your root partition does not get the largest partition of storage so you will need to change the environment variable to something else.
|
||||
If you see this, that means `pledge-sector` wrote too much data to `$TMPDIR`
|
||||
which by default is the root partition (This is common for Linux setups).
|
||||
Usually your root partition does not get the largest partition of storage so you
|
||||
will need to change the environment variable to something else.
|
||||
|
||||
## GPU not being used
|
||||
|
||||
If you suspect that your GPU is not being used, first make sure it is properly configured as described in the [testing configuration page](hardware-mining.md). Once you've done that (and set the `BELLMAN_CUSTOM_GPU` as appropriate if necessary) you can verify your GPU is being used by running a quick lotus-bench benchmark.
|
||||
If you suspect that your GPU is not being used, first make sure it is properly
|
||||
configured as described in the [testing configuration page](hardware-mining.md).
|
||||
Once you've done that (and set the `BELLMAN_CUSTOM_GPU` as appropriate if
|
||||
necessary) you can verify your GPU is being used by running a quick lotus-bench
|
||||
benchmark.
|
||||
|
||||
First, to watch GPU utilization run `nvtop` in one terminal, then in a separate
|
||||
terminal, run:
|
||||
@ -49,5 +60,4 @@ lotus-bench --sector-size=1024
|
||||
|
||||
This process uses a fair amount of GPU, and generally takes ~4 minutes to
|
||||
complete. If you do not see any activity in nvtop from lotus during the entire
|
||||
process, it is likely something is misconfigured with your GPU.
|
||||
|
||||
process, it is likely something is misconfigured with your GPU.
|
||||
|
@ -1,8 +1,12 @@
|
||||
# Lotus Seal Worker
|
||||
|
||||
The `lotus-seal-worker` is an extra process that can offload heavy processing tasks from your `lotus-storage-miner`. It can be run on the same machine as your `lotus-storage-miner`, or on a different machine communicating over a fast network.
|
||||
The `lotus-seal-worker` is an extra process that can offload heavy processing
|
||||
tasks from your `lotus-storage-miner`. It can be run on the same machine as your
|
||||
`lotus-storage-miner`, or on a different machine communicating over a fast
|
||||
network.
|
||||
|
||||
## Get Started
|
||||
|
||||
Make sure that the `lotus-seal-worker` is installed by running:
|
||||
|
||||
```sh
|
||||
@ -10,11 +14,17 @@ make lotus-seal-worker
|
||||
```
|
||||
|
||||
## Running Alongside Storage Miner
|
||||
You may wish to run the lotus seal worker on the same computer as the storage miner. This allows you to easily set the process priority of the sealing tasks to be lower than the priority of your more important storage miner process.
|
||||
|
||||
To do this, simply run `lotus-seal-worker run`, and the seal worker will automatically pick up the correct authentication tokens from the `LOTUS_STORAGE_PATH` miner repository.
|
||||
You may wish to run the lotus seal worker on the same computer as the storage
|
||||
miner. This allows you to easily set the process priority of the sealing tasks
|
||||
to be lower than the priority of your more important storage miner process.
|
||||
|
||||
To check that the seal worker is properly connected to your storage miner, run `lotus-storage-miner info` and check that the remote worker count has increased.
|
||||
To do this, simply run `lotus-seal-worker run`, and the seal worker will
|
||||
automatically pick up the correct authentication tokens from the
|
||||
`LOTUS_STORAGE_PATH` miner repository.
|
||||
|
||||
To check that the seal worker is properly connected to your storage miner, run
|
||||
`lotus-storage-miner info` and check that the remote worker count has increased.
|
||||
|
||||
```
|
||||
why@computer ~/lotus> lotus-storage-miner info
|
||||
@ -29,47 +39,71 @@ Sectors: map[Committing:0 Proving:0 Total:0]
|
||||
```
|
||||
|
||||
## Running Over the Network
|
||||
To use an entirely separate computer for sealing tasks, you will want to run the `lotus-seal-worker` on a separate machine, connected to your storage miner via the local area network.
|
||||
|
||||
To use an entirely separate computer for sealing tasks, you will want to run the
|
||||
`lotus-seal-worker` on a separate machine, connected to your storage miner via
|
||||
the local area network.
|
||||
|
||||
This setup is a little more complex than running it locally.
|
||||
|
||||
First, you will need to ensure your `lotus-storage-miner`'s API is accessible over the network.
|
||||
First, you will need to ensure your `lotus-storage-miner`'s API is accessible
|
||||
over the network.
|
||||
|
||||
To do this, open up `~/.lotusstorage/config.toml` (Or if you manually set `LOTUS_STORAGE_PATH`, look under that directory) and look for the API field.
|
||||
To do this, open up `~/.lotusstorage/config.toml` (Or if you manually set
|
||||
`LOTUS_STORAGE_PATH`, look under that directory) and look for the API field.
|
||||
|
||||
By default it should look something like:
|
||||
|
||||
```toml
|
||||
[API]
|
||||
ListenAddress = "/ip4/127.0.0.1/tcp/2345/http"
|
||||
```
|
||||
|
||||
To make your node accessible over the local area network, you will need to determine your machines IP on the LAN, and change the `127.0.0.1` in the file to that address. A less secure, but more permissive option is to change it to `0.0.0.0`. This will allow anyone who can connect to your computer on that port to access the API (though they will still need an auth token, as we will discuss next).
|
||||
To make your node accessible over the local area network, you will need to
|
||||
determine your machines IP on the LAN, and change the `127.0.0.1` in the file to
|
||||
that address. A less secure, but more permissive option is to change it to
|
||||
`0.0.0.0`. This will allow anyone who can connect to your computer on that port
|
||||
to access the API (though they will still need an auth token, as we will discuss
|
||||
next).
|
||||
|
||||
Next, you will need to get an authentication token for the seal worker. All lotus APIs require authentication tokens to ensure your processes are as secure against attackers attempting to make unauthenticated requests to them. To create a token, run `lotus-storage-miner auth create-token --perm admin`. This will create a token with `admin` permissions. Note: This is an admin token, it can access any of the api endpoints of your node, take care not to leak it. See the [scripting support doc](api-scripting-support.md) for more details.
|
||||
Next, you will need to get an authentication token for the seal worker. All
|
||||
lotus APIs require authentication tokens to ensure your processes are as secure
|
||||
against attackers attempting to make unauthenticated requests to them. To create
|
||||
a token, run `lotus-storage-miner auth create-token --perm admin`. This will
|
||||
create a token with `admin` permissions. Note: This is an admin token, it can
|
||||
access any of the api endpoints of your node, take care not to leak it. See the
|
||||
[scripting support doc](api-scripting-support.md) for more details.
|
||||
|
||||
This token will look something like this:
|
||||
|
||||
```sh
|
||||
why@computer ~> lotus-storage-miner auth create-token --perm admin
|
||||
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.KWWdh1jOVP_5YMAp8x5wNomFGgKS75ucOtj1ah5iP7k
|
||||
```
|
||||
|
||||
Now that you have allowed the storage miner to be connected to, and have created an auth token, its time to connect up the seal worker.
|
||||
Now that you have allowed the storage miner to be connected to, and have created
|
||||
an auth token, its time to connect up the seal worker.
|
||||
|
||||
On the machine that you will be running the `lotus-seal-worker` on, you will need to set the `STORAGE_API_INFO` environment variable to `TOKEN:STORAGE_NODE_MULTIADDR`. Where `TOKEN` is the token we created above, and `STORAGE_NODE_MULTIADDR` is the multiaddr of the storage miners api that we set in the config file.
|
||||
On the machine that you will be running the `lotus-seal-worker` on, you will
|
||||
need to set the `STORAGE_API_INFO` environment variable to
|
||||
`TOKEN:STORAGE_NODE_MULTIADDR`. Where `TOKEN` is the token we created above, and
|
||||
`STORAGE_NODE_MULTIADDR` is the multiaddr of the storage miners api that we set
|
||||
in the config file.
|
||||
|
||||
Once this is set, you should be able to just run `lotus-seal-worker run`.
|
||||
|
||||
To check that the seal worker is properly connected to your storage miner, run `lotus-storage-miner info` and check that the remote worker count has increased.
|
||||
To check that the seal worker is properly connected to your storage miner, run
|
||||
`lotus-storage-miner info` and check that the remote worker count has increased.
|
||||
|
||||
```
|
||||
why@computer ~/lotus> lotus-storage-miner info
|
||||
Miner: t05749
|
||||
Sector Size: 1 GiB
|
||||
Power: 0 B / 136 TiB (0.0000%)
|
||||
Committed: 1 GiB
|
||||
Proving: 1 GiB
|
||||
Committed: 1 GiB
|
||||
Proving: 1 GiB
|
||||
Worker use:
|
||||
Local: 0 / 1 (+1 reserved)
|
||||
**Remote: 0 / 1**
|
||||
Local: 0 / 1 (+1 reserved)
|
||||
**Remote: 0 / 1**
|
||||
Sectors: map[Proving:1 Total:1]
|
||||
```
|
||||
|
@ -1,14 +1,17 @@
|
||||
# Storage Mining
|
||||
|
||||
Here are instructions to learn how to perform storage mining. For hardware specifications please read [this](https://docs.lotu.sh/en+hardware-mining).
|
||||
Here are instructions to learn how to perform storage mining. For hardware
|
||||
specifications please read [this](https://docs.lotu.sh/en+hardware-mining).
|
||||
|
||||
It is useful to [join the TestNet](https://docs.lotu.sh/en+join-testnet) prior to attempting storage mining for the first time.
|
||||
It is useful to [join the TestNet](https://docs.lotu.sh/en+join-testnet) prior
|
||||
to attempting storage mining for the first time.
|
||||
|
||||
NOTE: While a miner is running, there will be many `WARN` and `ERROR` logs.
|
||||
|
||||
## Get started
|
||||
|
||||
Please ensure that at least one **BLS address** in your wallet exists with the following command:
|
||||
Please ensure that at least one **BLS address** in your wallet exists with the
|
||||
following command:
|
||||
|
||||
```sh
|
||||
lotus wallet list
|
||||
@ -50,7 +53,8 @@ To mine:
|
||||
lotus-storage-miner run
|
||||
```
|
||||
|
||||
If you are downloading **Filecoin Proof Parameters**, the download can take some time.
|
||||
If you are downloading **Filecoin Proof Parameters**, the download can take some
|
||||
time.
|
||||
|
||||
Get information about your miner:
|
||||
|
||||
@ -65,7 +69,9 @@ lotus-storage-miner info
|
||||
lotus-storage-miner pledge-sector
|
||||
```
|
||||
|
||||
* Warning: On Linux configurations, this command will write data to `$TMPDIR` which is not usually the largest partition. You should point the value to a larger partition if possible.
|
||||
- Warning: On Linux configurations, this command will write data to `$TMPDIR`
|
||||
which is not usually the largest partition. You should point the value to a
|
||||
larger partition if possible.
|
||||
|
||||
Get **miner power** and **sector usage**:
|
||||
|
||||
@ -82,7 +88,6 @@ lotus-storage-miner state sectors <miner>
|
||||
|
||||
Update `~/.lotus/config.toml` with:
|
||||
|
||||
|
||||
```sh
|
||||
[Metrics]
|
||||
Nickname="fun"
|
||||
|
@ -1,10 +1,15 @@
|
||||
# Retrieving Data
|
||||
|
||||
> There are recent bug reports with these instructions. If you happen to encounter any problems, please create a [GitHub issue](https://github.com/filecoin-project/lotus/issues/new) and a maintainer will address the problem as soon as they can.
|
||||
> There are recent bug reports with these instructions. If you happen to
|
||||
> encounter any problems, please create a
|
||||
> [GitHub issue](https://github.com/filecoin-project/lotus/issues/new) and a
|
||||
> maintainer will address the problem as soon as they can.
|
||||
|
||||
Here are the operations you can perform after you have stored and sealed a **Data CID** with the **Lotus Storage Miner** in the network.
|
||||
Here are the operations you can perform after you have stored and sealed a
|
||||
**Data CID** with the **Lotus Storage Miner** in the network.
|
||||
|
||||
If you would like to learn how to store a **Data CID** on a miner, read the instructions [here](https://docs.lotu.sh/en+storing-data).
|
||||
If you would like to learn how to store a **Data CID** on a miner, read the
|
||||
instructions [here](https://docs.lotu.sh/en+storing-data).
|
||||
|
||||
## Find by Data CID
|
||||
|
||||
@ -22,6 +27,8 @@ All fields are required.
|
||||
lotus client retrieve <Data CID> <outfile>
|
||||
```
|
||||
|
||||
If the outfile does not exist it will be created in the Lotus repository directory.
|
||||
If the outfile does not exist it will be created in the Lotus repository
|
||||
directory.
|
||||
|
||||
This command will initiate a **retrieval deal** and write the data to your computer. This process may take 2 to 10 minutes.
|
||||
This command will initiate a **retrieval deal** and write the data to your
|
||||
computer. This process may take 2 to 10 minutes.
|
||||
|
@ -1,10 +1,14 @@
|
||||
# Static Ports
|
||||
|
||||
Depending on how your network is set up, you may need to set a static port to successfully connect to peers to perform storage deals with your **Lotus Storage Miner**.
|
||||
Depending on how your network is set up, you may need to set a static port to
|
||||
successfully connect to peers to perform storage deals with your **Lotus Storage
|
||||
Miner**.
|
||||
|
||||
## Setup
|
||||
|
||||
To change the random **swarm port**, you may edit the `config.toml` file located under `$LOTUS_STORAGE_PATH`. The default location of this file is `$HOME/.lotusstorage`.
|
||||
To change the random **swarm port**, you may edit the `config.toml` file located
|
||||
under `$LOTUS_STORAGE_PATH`. The default location of this file is
|
||||
`$HOME/.lotusstorage`.
|
||||
|
||||
To change the port to `1347`:
|
||||
|
||||
@ -23,7 +27,8 @@ Open firewall manually:
|
||||
ufw allow 1347/tcp
|
||||
```
|
||||
|
||||
Or open and modify the profile located at `/etc/ufw/applications.d/lotus-daemon`:
|
||||
Or open and modify the profile located at
|
||||
`/etc/ufw/applications.d/lotus-daemon`:
|
||||
|
||||
```sh
|
||||
[Lotus Daemon]
|
||||
@ -37,4 +42,4 @@ Then run these commands:
|
||||
```sh
|
||||
ufw update lotus-daemon
|
||||
ufw allow lotus-daemon
|
||||
```
|
||||
```
|
||||
|
@ -1,12 +1,15 @@
|
||||
# Setup Troubleshooting
|
||||
|
||||
Here is a command that will delete your chain data, stored wallets, stored data and any miners you have set up:
|
||||
Here is a command that will delete your chain data, stored wallets, stored data
|
||||
and any miners you have set up:
|
||||
|
||||
```sh
|
||||
rm -rf ~/.lotus ~/.lotusstorage
|
||||
```
|
||||
|
||||
This command usually resolves any issues with running `lotus` but it is not always required for updates. We will share information about when resetting your chain data and miners is required for an update in the future.
|
||||
This command usually resolves any issues with running `lotus` but it is not
|
||||
always required for updates. We will share information about when resetting your
|
||||
chain data and miners is required for an update in the future.
|
||||
|
||||
## Lotus daemon problems
|
||||
|
||||
@ -15,19 +18,21 @@ WARN peermgr peermgr/peermgr.go:131 failed to connect to bootstrap peer: faile
|
||||
* [/ip4/147.75.80.17/tcp/1347] failed to negotiate security protocol: connected to wrong peer
|
||||
```
|
||||
|
||||
* Try running the build steps again and make sure that you have the latest code from GitHub.
|
||||
- Try running the build steps again and make sure that you have the latest code
|
||||
from GitHub.
|
||||
|
||||
```sh
|
||||
ERROR hello hello/hello.go:81 other peer has different genesis!
|
||||
```
|
||||
|
||||
* Try deleting your file system's `~/.lotus` directory. Check that it exists with `ls ~/.lotus`.
|
||||
- Try deleting your file system's `~/.lotus` directory. Check that it exists
|
||||
with `ls ~/.lotus`.
|
||||
|
||||
```sh
|
||||
- repo is already locked
|
||||
```
|
||||
|
||||
* You already have another lotus deamon running.
|
||||
- You already have another lotus deamon running.
|
||||
|
||||
## Failed messages
|
||||
|
||||
@ -38,4 +43,4 @@ ERROR chainstore store/store.go:564 get message get failed: <Data CID>: blocks
|
||||
|
||||
```
|
||||
|
||||
* Someone is requesting a **Data CID** from you that you don't have.
|
||||
- Someone is requesting a **Data CID** from you that you don't have.
|
||||
|
@ -4,13 +4,13 @@
|
||||
WARN main lotus/main.go:72 routing: not found
|
||||
```
|
||||
|
||||
* This miner is offline.
|
||||
- This miner is offline.
|
||||
|
||||
```sh
|
||||
WARN main lotus/main.go:72 failed to start deal: computing commP failed: generating CommP: Piece must be at least 127 bytes
|
||||
```
|
||||
|
||||
* There is a minimum file size of 127 bytes.
|
||||
- There is a minimum file size of 127 bytes.
|
||||
|
||||
## Troubleshooting Sealing
|
||||
|
||||
@ -20,4 +20,6 @@ Miners can check sealing progress with this command:
|
||||
lotus-storage-miner sectors list
|
||||
```
|
||||
|
||||
When sealing is complete, `pSet: NO` will become `pSet: YES`. From now on the **Data CID** is [retrievable](https://docs.lotu.sh/en+retrieving-data) from the **Lotus Storage Miner**.
|
||||
When sealing is complete, `pSet: NO` will become `pSet: YES`. From now on the
|
||||
**Data CID** is [retrievable](https://docs.lotu.sh/en+retrieving-data) from the
|
||||
**Lotus Storage Miner**.
|
||||
|
@ -1,6 +1,9 @@
|
||||
# Storing Data
|
||||
|
||||
> There are recent bug reports with these instructions. If you happen to encounter any problems, please create a [GitHub issue](https://github.com/filecoin-project/lotus/issues/new) and a maintainer will address the problem as soon as they can.
|
||||
> There are recent bug reports with these instructions. If you happen to
|
||||
> encounter any problems, please create a
|
||||
> [GitHub issue](https://github.com/filecoin-project/lotus/issues/new) and a
|
||||
> maintainer will address the problem as soon as they can.
|
||||
|
||||
Here are instructions for how to store data on the **Lotus TestNet**.
|
||||
|
||||
@ -16,7 +19,8 @@ Upon success, this command will return a **Data CID**.
|
||||
|
||||
## List your local files
|
||||
|
||||
The command to see a list of files by `CID`, `name`, `size` in bytes, and `status`:
|
||||
The command to see a list of files by `CID`, `name`, `size` in bytes, and
|
||||
`status`:
|
||||
|
||||
```sh
|
||||
lotus client local
|
||||
@ -49,9 +53,12 @@ Store a **Data CID** with a miner:
|
||||
lotus client deal <Data CID> <miner> <price> <duration>
|
||||
```
|
||||
|
||||
* Price is in attoFIL.
|
||||
* The `duration`, which represents how long the miner will keep your file hosted, is represented in blocks. Each block represents 45 seconds.
|
||||
- Price is in attoFIL.
|
||||
- The `duration`, which represents how long the miner will keep your file
|
||||
hosted, is represented in blocks. Each block represents 45 seconds.
|
||||
|
||||
Upon success, this command will return a **Deal CID**.
|
||||
Upon success, this command will return a **Deal CID**.
|
||||
|
||||
The storage miner will need to **seal** the file before it can be retrieved. If the **Lotus Storage Miner** is not running on a machine designed for sealing, the process will take a very long time.
|
||||
The storage miner will need to **seal** the file before it can be retrieved. If
|
||||
the **Lotus Storage Miner** is not running on a machine designed for sealing,
|
||||
the process will take a very long time.
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Updating Lotus
|
||||
|
||||
If you installed Lotus on your machine, you can upgrade to the latest version by doing the following:
|
||||
If you installed Lotus on your machine, you can upgrade to the latest version by
|
||||
doing the following:
|
||||
|
||||
```sh
|
||||
# get the latest
|
||||
@ -10,12 +11,16 @@ git pull origin master
|
||||
make clean && make build
|
||||
```
|
||||
|
||||
Sometimes when you run Lotus after a pull, certain commands such as `lotus daemon` may break.
|
||||
Sometimes when you run Lotus after a pull, certain commands such as
|
||||
`lotus daemon` may break.
|
||||
|
||||
Here is a command that will delete your chain data, stored wallets and any miners you have set up:
|
||||
Here is a command that will delete your chain data, stored wallets and any
|
||||
miners you have set up:
|
||||
|
||||
```sh
|
||||
rm -rf ~/.lotus ~/.lotusstorage
|
||||
```
|
||||
|
||||
This command usually resolves any issues with running `lotus` commands but it is not always required for updates. We will share information about when resetting your chain data and miners is required for an update in the future.
|
||||
This command usually resolves any issues with running `lotus` commands but it is
|
||||
not always required for updates. We will share information about when resetting
|
||||
your chain data and miners is required for an update in the future.
|
||||
|
Loading…
Reference in New Issue
Block a user