Merge pull request #691 from filecoin-project/@jimmylee/lotus-md-update

documentation: light copy adjustments before major revision
This commit is contained in:
Łukasz Magiera 2019-12-02 01:43:12 +01:00 committed by GitHub
commit 226b5a1cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 56 additions and 46 deletions

View File

@ -1,6 +1,6 @@
# API # API
The systems API is defined in here. The RPC maps directly to the API defined here using the JSON RPC package in `lib/jsonrpc`. The systems API is defined in here. The RPC maps directly to the API defined here using the [JSON RPC package](https://github.com/filecoin-project/lotus/tree/master/lib/jsonrpc).
## Overview ## Overview
@ -10,8 +10,8 @@ By default `127.0.0.1:1234` - daemon stores the api endpoint multiaddr in `~/.lo
- `ws://[api:port]/rpc/v0` - JsonRPC websocket endpoint - `ws://[api:port]/rpc/v0` - JsonRPC websocket endpoint
- `PUT http://[api:port]/rest/v0/import` - import file to the node repo, it requires write permission. - `PUT http://[api:port]/rest/v0/import` - import file to the node repo, it requires write permission.
For JsonRPC interface definition see `api/api.go`. Required permissions are For JsonRPC interface definition see [api/api.go](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go). Required permissions are
defined in `api/struct.go` defined in [api/struct.go](https://github.com/filecoin-project/lotus/blob/master/api/struct.go)
## Auth ## Auth

View File

@ -1,9 +1,18 @@
# Project Lotus - 莲 # Lotus
Lotus is an experimental implementation of the **Filecoin Distributed Storage Network**. For more details about Filecoin, check out the [Filecoin Spec](https://github.com/filecoin-project/specs). Lotus is an experimental implementation of the **Filecoin Distributed Storage Network**. For more details about Filecoin, check out the [Filecoin Spec](https://github.com/filecoin-project/specs).
## Background ## What can I learn here?
Lotus is architected modularly, and aims to keep clean API boundaries between everything, even if they are in the same process. Notably, the 'lotus full node' software, and the 'lotus storage miner' software are two separate programs. - If you want to [store](https://docs.lotu.sh/storing-data) or [retrieve](https://docs.lotu.sh/retrieving-data) data, you can install Lotus on [Arch Linux](https://docs.lotu.sh/install-lotus-arch), [Ubuntu](https://docs.lotu.sh/install-lotus-ubuntu), or [MacOS](https://docs.lotu.sh/install-lotus-macos) and get started.
- Learn how to join the DevNet with the [command line interface](https://docs.lotu.sh/join-devnet-cli).
- Learn how to test Lotus in a seperate local network using a [GUI](https://docs.lotu.sh/testing-with-gui).
- Learn how to mine Filecoin using the `lotus-storage-miner` in the [CLI](https://docs.lotu.sh/mining)
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 full node via the websockets JSON RPC API for all of its chain interaction needs. This way, a mining operation may easily run one or many storage miners, connected to one or many full node instances. ## What makes Lotus different?
Lotus is architected modularly to keep clean API boundaries while using the same process. The **Lotus Full Node** and the **Lotus Storage Miner** are two separate programs.
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 full node via the websockets JSON RPC API for all of its chain interaction needs.
This way, a mining operation may easily run one or many storage miners, connected to one or many full node instances.

View File

@ -1,33 +1,33 @@
# Glossary # Glossary
## Chain/Types **Chain: Types**
Implementation of data structures used by Filecoin and their serializations. Implementation of data structures used by Filecoin and their serializations.
## Chain/Store **Chain: Store**
The chainstore manages all local chain state, including block headers, messages, and state. The chainstore manages all local chain state, including block headers, messages, and state.
## Chain/State **Chain: State**
A package for dealing with the Filecoin state tree. Wraps the [HAMT](https://github.com/ipfs/go-hamt-ipld). A package for dealing with the Filecoin state tree. Wraps the [HAMT](https://github.com/ipfs/go-hamt-ipld).
## Chain/Actors **Chain: Actors**
Implementations of the builtin Filecoin network actors. Implementations of the builtin Filecoin network actors.
## Chain/Vm **Chain: VM**
The Filecoin state machine 'vm'. Implemented here are utilities to invoke Filecoin actor methods. The Filecoin state machine 'vm'. Implemented here are utilities to invoke Filecoin actor methods.
## Miner **Miner**
The block producer logic. This package interfaces with the full node through the API, despite currently being implemented in the same process (very likely to be extracted as its own separate process in the near future). The block producer logic. This package interfaces with the full node through the API, despite currently being implemented in the same process (very likely to be extracted as its own separate process in the near future).
## Storage **Storage**
The storage miner logic. This package also interfaces with the full node through a subset of the api. This code is used to implement the `lotus-storage-miner` process. The storage miner logic. This package also interfaces with the full node through a subset of the api. This code is used to implement the `lotus-storage-miner` process.
## Pond **Pond**
Pond is a graphical testbed for lotus. It can be used to spin up nodes, connect them in a given topology, start them mining, and observe how they function over time. [Pond](https://docs.lotu.sh/testing-with-gui) is a graphical testbed for lotus. It can be used to spin up nodes, connect them in a given topology, start them mining, and observe how they function over time.

View File

@ -1,3 +1,5 @@
# Picking Hardware # Hardware Requirements
Coming soon Lotus can build and run on most [Linux](https://ubuntu.com/) and [MacOS](https://www.apple.com/macos) systems with at least 8GB of RAM.
Windows is not yet supported.

View File

@ -1,6 +1,6 @@
# Installing Lotus on Arch Linux # Installing Lotus on Arch Linux
Install these dependencies: Install these dependencies for Arch Linux.
- go (1.13 or higher) - go (1.13 or higher)
- gcc (7.4.0 or higher) - gcc (7.4.0 or higher)
@ -27,14 +27,14 @@ Arch (build):
sudo pacman -Syu go gcc git bzr jq pkg-config opencl-icd-loader opencl-headers sudo pacman -Syu go gcc git bzr jq pkg-config opencl-icd-loader opencl-headers
``` ```
## Clone Clone
```sh ```sh
$ git clone https://github.com/filecoin-project/lotus.git $ git clone https://github.com/filecoin-project/lotus.git
$ cd lotus/ $ cd lotus/
``` ```
## Install Install
```sh ```sh
$ make clean all $ make clean all

View File

@ -1,6 +1,6 @@
# Installing Lotus on MacOS # Installing Lotus on MacOS
Install these dependencies: Install these dependencies for MacOS Catalina.
- go (1.13 or higher) - go (1.13 or higher)
- gcc (7.4.0 or higher) - gcc (7.4.0 or higher)
@ -15,14 +15,14 @@ Install these dependencies:
- llvm (proofs build) - llvm (proofs build)
- clang (proofs build) - clang (proofs build)
## Clone Clone
```sh ```sh
$ git clone https://github.com/filecoin-project/lotus.git $ git clone https://github.com/filecoin-project/lotus.git
$ cd lotus/ $ cd lotus/
``` ```
## Make & Install Install
```sh ```sh
$ make clean all $ make clean all

View File

@ -1,6 +1,6 @@
# Installing Lotus on Ubuntu # Installing Lotus on Ubuntu
Install these dependencies: Install these dependencies for Ubuntu.
- go (1.13 or higher) - go (1.13 or higher)
- gcc (7.4.0 or higher) - gcc (7.4.0 or higher)
@ -30,14 +30,14 @@ sudo apt update
sudo apt install golang-go gcc git bzr jq pkg-config mesa-opencl-icd ocl-icd-opencl-dev sudo apt install golang-go gcc git bzr jq pkg-config mesa-opencl-icd ocl-icd-opencl-dev
``` ```
## Clone Clone
```sh ```sh
$ git clone https://github.com/filecoin-project/lotus.git $ git clone https://github.com/filecoin-project/lotus.git
$ cd lotus/ $ cd lotus/
``` ```
## Install Install
```sh ```sh
$ make clean all $ make clean all

View File

@ -1,6 +1,6 @@
# Setup Lotus Devnet using the CLI # Join Lotus Devnet
## Node setup ## Node CLI setup
If you have run lotus before and want to remove all previous data: `rm -rf ~/.lotus ~/.lotusstorage` If you have run lotus before and want to remove all previous data: `rm -rf ~/.lotus ~/.lotusstorage`
@ -54,7 +54,6 @@ If you see an error like `actor not found` after executing this command, it mean
It is possible for a Client to make a deal with a Miner on the same lotus Node. It is possible for a Client to make a deal with a Miner on the same lotus Node.
```sh ```sh
# List all miners in the system. Choose one to make a deal with. # List all miners in the system. Choose one to make a deal with.
$ lotus state list-miners $ lotus state list-miners
@ -72,4 +71,4 @@ For example `\$ lotus client deal bafkre...qvtjsi t0111 36000 12` proposes a dea
## Monitoring Dashboard ## Monitoring Dashboard
To see the latest network activity, including chain block height, blocktime, total network power, largest miners, and more, check out the monitoring dashboard at https://lotus-metrics.kittyhawk.wtf. To see the latest network activity, including chain block height, blocktime, total network power, largest miners, and more, check out the [monitoring dashboard](https://lotus-metrics.kittyhawk.wtf).

View File

@ -1,4 +1,4 @@
# Mining # Getting started
Ensure that at least one BLS address (`t3..`) in your wallet exists Ensure that at least one BLS address (`t3..`) in your wallet exists
@ -7,13 +7,15 @@ $ lotus wallet list
t3... t3...
``` ```
With this address, go to https://lotus-faucet.kittyhawk.wtf/miner.html, and With this address, go to [the faucet](https://lotus-faucet.kittyhawk.wtf/miner.html), and
click `Create Miner` click `Create Miner`
Wait for a page telling you the address of the newly created storage miner to Wait for a page telling you the address of the newly created storage miner to
appear - It should be saying: `New storage miners address is: t0..` appear.
Initialize storage miner: The screen should show: `New storage miners address is: t0..`
## Initialize
```sh ```sh
$ lotus-storage-miner init --actor=t01.. --owner=t3.... $ lotus-storage-miner init --actor=t01.. --owner=t3....
@ -21,7 +23,7 @@ $ lotus-storage-miner init --actor=t01.. --owner=t3....
This command should return successfully after miner is setup on-chain (30-60s) This command should return successfully after miner is setup on-chain (30-60s)
Start mining: ## Start mining
```sh ```sh
$ lotus-storage-miner run $ lotus-storage-miner run

View File

@ -11,7 +11,7 @@ RETRIEVAL <miner>@<miner peerId>-<deal funds>-<size>
Retrieve data from a miner Retrieve data from a miner
```sh ```sh
\$ lotus client retrieve <Data CID> <outfile> $ lotus client retrieve <Data CID> <outfile>
``` ```
This will initiate a retrieval deal and write the data to the outfile. This process may take some time. This will initiate a retrieval deal and write the data to the outfile. This process may take some time.

View File

@ -1,26 +1,25 @@
# Setup Lotus Devnet using a GUI # Pond UI
As an alternative to the CLI you can use Pond, a graphical testbed for lotus. It can be used to 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 seperate 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: ## Build
```sh ```sh
$ make pond $ make pond
``` ```
Run: ## Run
```sh ```sh
$ ./pond run $ ./pond run
Listening on http://127.0.0.1:2222
``` ```
Now go to http://127.0.0.1:2222. Now go to http://127.0.0.1:2222.
## Thing to try ## What can I test?
- The `Spawn Node` button starts a new lotus Node in a new draggable window. - The `Spawn Node` button starts a new lotus Node in a new draggable window.
- Click `[Spawn Storage Miner]` to start mining (make sure the Node's wallet has funds). - Click `[Spawn Storage Miner]` to start mining. This require's the node's wallet to have funds.
- Click on `[Client]` to open the 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 on `[Client]` to open the 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 long periods of time (10h+), the web-ui tends to eventually consume all the available RAM. Don't leave Pond unattended for long periods of time (10h+), the web-ui tends to eventually consume all the available RAM.

View File

@ -14,8 +14,7 @@ fairly easy to swap in.
## Running Locally ## Running Locally
To easily run and view tracing locally, first, install jaeger. The easiest way To easily run and view tracing locally, first, install jaeger. The easiest way
to do this is to download the binaries from to do this is to [download the binaries](https://www.jaegertracing.io/download/) and then run the `jaeger-all-in-one`
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 binary. This will start up jaeger, listen for spans on `localhost:6831`, and
expose a web UI for viewing traces on `http://localhost:16686/`. expose a web UI for viewing traces on `http://localhost:16686/`.