From 88337750057dc1b3180baa02bc0fe413bbc8e0dd Mon Sep 17 00:00:00 2001 From: Pooja <5668171+pooja@users.noreply.github.com> Date: Mon, 14 Oct 2019 23:13:30 +0900 Subject: [PATCH] Add ./ before lotus commands, move list-miners to deal section --- README.md | 59 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 5e3566ed2..643157099 100644 --- a/README.md +++ b/README.md @@ -31,17 +31,19 @@ If you have run lotus before and want to remove all previous data: `rm -rf ~/.lo [You can copy `lotus` and `lotus-storage-miner` to your `$GOPATH/bin` or `$PATH`, or reference all lotus commands below from your local build directory with `./lotus`] -The following sections describe how to use the lotus CLI. Alternately you can run lotus nodes and miners using the [Pond GUI](#pond). +The following sections describe how to use the lotus CLI. All these commands should be run from within the directory containing lotus source files. Alternately you can run lotus nodes and miners using the [Pond GUI](#pond). ### Start Daemon +From within the lotus source directory: + ```sh -$ lotus daemon +$ ./lotus daemon ``` In another window check that you are connected to the network: ```sh -$ lotus net peers | wc -l +$ ./lotus net peers | wc -l 2 # number of peers ``` @@ -49,15 +51,17 @@ $ lotus net peers | wc -l You can follow sync status with: ```sh -$ watch lotus sync status +$ watch ./lotus sync status ``` +[It may take a few minutes for the chain to finish syncing. You will see `Height: 0` until the full chain is synced and validated.] + ### Basics Create a new address: ```sh -$ lotus wallet new bls +$ ./lotus wallet new bls t3... ``` @@ -69,39 +73,38 @@ BLS signatures use less space so will have lower fees.) Check the wallet balance: ```sh -$ lotus wallet balance [optional address (t3...)] +$ ./lotus wallet balance [optional address (t3...)] ``` (NOTE: If you see an error like `actor not found` after executing this command, -it means that either there are no transactions to this address on chain - using -faucet should 'fix' this, or your node isn't fully synced). +it means that either your node isn't fully synced or there are no transactions to this address yet on chain. If the latter, using the faucet should 'fix' this). ### Mining Ensure that at least one BLS address (`t3..`) in your wallet has enough funds to cover pledge collateral: ```sh -$ lotus state pledge-collateral +$ ./lotus state pledge-collateral 1234 -$ lotus wallet balance t3... +$ ./lotus wallet balance [t3...] 8999 ``` (Balance must be higher than the returned pledge collateral for the next step to work) Initialize storage miner: ```sh -$ lotus-storage-miner init --owner=t3... +$ ./lotus-storage-miner init --owner=t3... ``` This command should return successfully after miner is setup on-chain (30-60s) Start mining: ```sh -$ lotus-storage-miner run +$ ./lotus-storage-miner run ``` To view the miner id used for deals: ```sh -$ lotus-storage-miner info +$ ./lotus-storage-miner info ``` e.g. miner id `t0111` @@ -109,25 +112,20 @@ e.g. miner id `t0111` Seal random data to start producing PoSts: ```sh -$ lotus-storage-miner store-garbage +$ ./lotus-storage-miner store-garbage ``` You can check miner power and sector usage with the miner id: ```sh # Total power of the network -$ lotus-storage-miner state power +$ ./lotus-storage-miner state power -$ lotus-storage-miner state power +$ ./lotus-storage-miner state power -$ lotus-storage-miner state sectors +$ ./lotus-storage-miner state sectors ``` -If you create multiple miners view them with: - -```sh -$ lotus state list-miners -``` ### Stage Data @@ -138,11 +136,11 @@ Import some data: $ echo "Hi my name is $USER" > hello.txt # Import the file into lotus & get a Data CID -$ lotus client import ./hello.txt +$ ./lotus client import ./hello.txt # List imported files by CID, name, size, status -$ lotus client local +$ ./lotus client local ``` (CID is short for Content Identifier, a self describing content address used throughout the IPFS ecosystem. It is a cryptographic hash that uniquely maps to the data and verifies it has not changed.) @@ -152,14 +150,17 @@ $ lotus client local (It is possible for a Client to make a deal with a Miner on the same lotus Node.) ```sh +# List all miners in the system. Choose one to make a deal with. +$ ./lotus state list-miners + # List asks proposed by a miner -$ lotus client query-ask +$ ./lotus client query-ask # Propose a deal with a miner -$ lotus client deal +$ ./lotus client deal ``` -For example `$ lotus client deal bafkre...qvtjsi t0111 36000 12` proposes a deal to store CID `bafkre...qvtjsi` with miner `t0111` at price `36000` for a duration of `12` blocks. +For example `$ ./lotus client deal bafkre...qvtjsi t0111 36000 12` proposes a deal to store CID `bafkre...qvtjsi` with miner `t0111` at price `36000` for a duration of `12` blocks. ### Search & Retrieval @@ -167,7 +168,7 @@ If you've stored data with a miner in the network, you can search for it by CID: ```sh # Search for data by CID -$ lotus client find +$ ./lotus client find LOCAL RETRIEVAL @-- ``` @@ -175,7 +176,7 @@ RETRIEVAL @-- To retrieve data from a miner: ```sh -$ lotus client retrieve +$ ./lotus client retrieve ``` This will initiate a retrieval deal and write the data to the outfile. (This process may take some time.)