update lotusstorage
This commit is contained in:
parent
5b9baba900
commit
b2f94e4239
@ -81,7 +81,7 @@ func main() {
|
||||
&cli.StringFlag{
|
||||
Name: FlagMinerRepo,
|
||||
EnvVars: []string{"LOTUS_MINER_PATH"},
|
||||
Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME
|
||||
Value: "~/.lotusminer", // TODO: Consider XDG_DATA_HOME
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -21,5 +21,5 @@ You can also use `lotus auth api-info --perm admin` to quickly create _API_INFO
|
||||
|
||||
- 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 Storage Miner**'s `multiaddr` is in `~/.lotusminer/config`.
|
||||
- The default token is in `~/.lotusminer/token`.
|
||||
|
@ -46,7 +46,7 @@ If the request requires authorization, add an authorization header:
|
||||
```sh
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $(cat ~/.lotusstorage/token)" \
|
||||
-H "Authorization: Bearer $(cat ~/.lotusminer/token)" \
|
||||
--data '{ "jsonrpc": "2.0", "method": "Filecoin.ChainHead", "params": [], "id": 3 }' \
|
||||
'http://127.0.0.1:1234/rpc/v0'
|
||||
```
|
||||
@ -58,10 +58,10 @@ curl -X POST \
|
||||
To authorize your request, you will need to include the **JWT** in a HTTP header, for example:
|
||||
|
||||
```sh
|
||||
-H "Authorization: Bearer $(cat ~/.lotusstorage/token)"
|
||||
-H "Authorization: Bearer $(cat ~/.lotusminer/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 `~/.lotusminer/token` for the **Lotus Storage Miner**.
|
||||
|
||||
## How do I generate a token?
|
||||
|
||||
|
@ -27,6 +27,6 @@ Don't leave Pond unattended for more than 10 hours, the web client will eventual
|
||||
## 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 ~/.lotusminer/`, 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`
|
||||
|
@ -49,7 +49,7 @@ To update Lotus, follow the instructions [here](https://lotu.sh/en+updating-lotu
|
||||
### How do I prepare a fresh installation of Lotus?
|
||||
|
||||
Stop the Lotus daemon, and delete all related files, including sealed and chain data by
|
||||
running `rm ~/.lotus ~/.lotusstorage`.
|
||||
running `rm ~/.lotus ~/.lotusminer`.
|
||||
|
||||
Then, install Lotus afresh by following the instructions
|
||||
found [here](https://docs.lotu.sh/en+getting-started).
|
||||
@ -126,7 +126,7 @@ Community-contributed Docker and Docker Compose examples are available
|
||||
### How can I run two miners on the same machine?
|
||||
|
||||
You can do so by changing the storage path variable for the second miner, e.g.,
|
||||
`LOTUS_MINER_PATH=~/.lotusstorage2`. You will also need to make sure that no ports collide.
|
||||
`LOTUS_MINER_PATH=~/.lotusminer2`. You will also need to make sure that no ports collide.
|
||||
|
||||
### How do I setup my own local devnet?
|
||||
|
||||
|
@ -22,7 +22,7 @@ make lotus-seal-worker
|
||||
|
||||
First, you will need to ensure your `lotus-miner`'s API is accessible over the network.
|
||||
|
||||
To do this, open up `~/.lotusstorage/config.toml` (Or if you manually set `LOTUS_MINER_PATH`, look under that directory) and look for the API field.
|
||||
To do this, open up `~/.lotusminer/config.toml` (Or if you manually set `LOTUS_MINER_PATH`, look under that directory) and look for the API field.
|
||||
|
||||
Default config:
|
||||
|
||||
|
@ -22,7 +22,7 @@ This bug occurs when the storage miner can't acquire the `bellman.lock`. To fix
|
||||
|
||||
```sh
|
||||
lotus-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)}):
|
||||
# WARN main lotus-storage-miner/main.go:73 failed to get api endpoint: (/Users/myrmidon/.lotusminer) %!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).
|
||||
|
@ -4,7 +4,7 @@ Depending on how your network is set up, you may need to set a static port to su
|
||||
|
||||
## Setup
|
||||
|
||||
To change the random **swarm port**, you may edit the `config.toml` file located under `$LOTUS_MINER_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_MINER_PATH`. The default location of this file is `$HOME/.lotusminer`.
|
||||
|
||||
To change the port to `1347`:
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
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
|
||||
rm -rf ~/.lotus ~/.lotusminer
|
||||
```
|
||||
|
||||
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.
|
||||
|
@ -15,7 +15,7 @@ ssh "$host" 'systemctl stop lotus-miner' &
|
||||
wait
|
||||
|
||||
ssh "$host" 'rm -rf .lotus' &
|
||||
ssh "$host" 'rm -rf .lotusstorage' &
|
||||
ssh "$host" 'rm -rf .lotusminer' &
|
||||
|
||||
scp -C lotus "${host}":/usr/local/bin/lotus &
|
||||
scp -C lotus-miner "${host}":/usr/local/bin/lotus-miner &
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
HOST=$1
|
||||
|
||||
ssh "$HOST" '[ -e ~/.lotusstorage/token ]' && exit 0
|
||||
ssh "$HOST" '[ -e ~/.lotusminer/token ]' && exit 0
|
||||
|
||||
ssh "$HOST" 'lotus wallet new bls > addr'
|
||||
ssh "$HOST" 'curl http://147.75.80.29:777/sendcoll?address=$(cat addr)' &
|
||||
|
@ -23,7 +23,7 @@ set -euo pipefail
|
||||
|
||||
systemctl stop lotus-miner
|
||||
systemctl stop lotus-daemon
|
||||
mkdir -p .lotus .lotusstorage
|
||||
mkdir -p .lotus .lotusminer
|
||||
|
||||
cd "$HOME/lotus-stage/"
|
||||
cp -f lotus lotus-miner /usr/local/bin
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
set -o xtrace
|
||||
|
||||
rm -rf ~/.lotus ~/.lotusstorage/ ~/.genesis-sectors ~/.lotusworker
|
||||
rm -rf ~/.lotus ~/.lotusminer/ ~/.genesis-sectors ~/.lotusworker
|
||||
|
@ -51,13 +51,13 @@ EOF
|
||||
cat > "${BASEDIR}/scripts/env.fish" <<EOF
|
||||
set -x PATH ${BASEDIR}/bin \$PATH
|
||||
set -x LOTUS_PATH ${BASEDIR}/.lotus
|
||||
set -x LOTUS_MINER_PATH ${BASEDIR}/.lotusstorage
|
||||
set -x LOTUS_MINER_PATH ${BASEDIR}/.lotusminer
|
||||
EOF
|
||||
|
||||
cat > "${BASEDIR}/scripts/env.bash" <<EOF
|
||||
export PATH=${BASEDIR}/bin:\$PATH
|
||||
export LOTUS_PATH=${BASEDIR}/.lotus
|
||||
export LOTUS_MINER_PATH=${BASEDIR}/.lotusstorage
|
||||
export LOTUS_MINER_PATH=${BASEDIR}/.lotusminer
|
||||
EOF
|
||||
|
||||
cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF
|
||||
@ -73,11 +73,11 @@ cat > "${BASEDIR}/scripts/pledge_sectors.bash" <<EOF
|
||||
|
||||
set -x
|
||||
|
||||
while [ ! -d ${BASEDIR}/.lotusstorage ]; do
|
||||
while [ ! -d ${BASEDIR}/.lotusminer ]; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
while [ ! -f ${BASEDIR}/.lotusstorage/api ]; do
|
||||
while [ ! -f ${BASEDIR}/.lotusminer/api ]; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
|
@ -4,7 +4,7 @@ filebeat.inputs:
|
||||
|
||||
- type: log
|
||||
paths:
|
||||
- /root/.lotusstorage/logs
|
||||
- /root/.lotusminer/logs
|
||||
fields:
|
||||
logzio_codec: json
|
||||
token: <API TOKEN>
|
||||
|
@ -34,13 +34,13 @@ EOF
|
||||
cat > "${BASEDIR}/scripts/env.fish" <<EOF
|
||||
set -x PATH ${BASEDIR}/bin \$PATH
|
||||
set -x LOTUS_PATH ${BASEDIR}/.lotus
|
||||
set -x LOTUS_MINER_PATH ${BASEDIR}/.lotusstorage
|
||||
set -x LOTUS_MINER_PATH ${BASEDIR}/.lotusminer
|
||||
EOF
|
||||
|
||||
cat > "${BASEDIR}/scripts/env.bash" <<EOF
|
||||
export PATH=${BASEDIR}/bin:\$PATH
|
||||
export LOTUS_PATH=${BASEDIR}/.lotus
|
||||
export LOTUS_MINER_PATH=${BASEDIR}/.lotusstorage
|
||||
export LOTUS_MINER_PATH=${BASEDIR}/.lotusminer
|
||||
EOF
|
||||
|
||||
cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF
|
||||
@ -68,11 +68,11 @@ cat > "${BASEDIR}/scripts/pledge_sectors.bash" <<EOF
|
||||
|
||||
set -x
|
||||
|
||||
while [ ! -d ${BASEDIR}/.lotusstorage ]; do
|
||||
while [ ! -d ${BASEDIR}/.lotusminer ]; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
while [ ! -f ${BASEDIR}/.lotusstorage/api ]; do
|
||||
while [ ! -f ${BASEDIR}/.lotusminer/api ]; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user