Update lotus-seal-worker to lotus-worker

This commit is contained in:
Frank 2020-07-09 11:04:45 +08:00
parent b2f94e4239
commit ce0f9922ee
9 changed files with 29 additions and 29 deletions

View File

@ -95,8 +95,8 @@ jobs:
- store_artifacts:
path: lotus-miner
- store_artifacts:
path: lotus-seal-worker
- run: mkdir linux && mv lotus lotus-miner lotus-seal-worker linux/
path: lotus-worker
- run: mkdir linux && mv lotus lotus-miner lotus-worker linux/
- persist_to_workspace:
root: "."
paths:
@ -225,8 +225,8 @@ jobs:
- store_artifacts:
path: lotus-miner
- store_artifacts:
path: lotus-seal-worker
- run: mkdir darwin && mv lotus lotus-miner lotus-seal-worker darwin/
path: lotus-worker
- run: mkdir darwin && mv lotus lotus-miner lotus-worker darwin/
- persist_to_workspace:
root: "."
paths:

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
/lotus
/lotus-miner
/lotus-seal-worker
/lotus-worker
/lotus-seed
/lotus-health
/lotus-chainwatch

View File

@ -58,10 +58,10 @@ deps: $(BUILD_DEPS)
.PHONY: deps
debug: GOFLAGS+=-tags=debug
debug: lotus lotus-miner lotus-seal-worker lotus-seed
debug: lotus lotus-miner lotus-worker lotus-seed
2k: GOFLAGS+=-tags=2k
2k: lotus lotus-miner lotus-seal-worker lotus-seed
2k: lotus lotus-miner lotus-worker lotus-seed
lotus: $(BUILD_DEPS)
rm -f lotus
@ -78,12 +78,12 @@ lotus-miner: $(BUILD_DEPS)
.PHONY: lotus-miner
BINS+=lotus-miner
lotus-seal-worker: $(BUILD_DEPS)
rm -f lotus-seal-worker
go build $(GOFLAGS) -o lotus-seal-worker ./cmd/lotus-seal-worker
go run github.com/GeertJohan/go.rice/rice append --exec lotus-seal-worker -i ./build
.PHONY: lotus-seal-worker
BINS+=lotus-seal-worker
lotus-worker: $(BUILD_DEPS)
rm -f lotus-worker
go build $(GOFLAGS) -o lotus-worker ./cmd/lotus-seal-worker
go run github.com/GeertJohan/go.rice/rice append --exec lotus-worker -i ./build
.PHONY: lotus-worker
BINS+=lotus-worker
lotus-shed: $(BUILD_DEPS)
rm -f lotus-shed
@ -92,7 +92,7 @@ lotus-shed: $(BUILD_DEPS)
.PHONY: lotus-shed
BINS+=lotus-shed
build: lotus lotus-miner lotus-seal-worker
build: lotus lotus-miner lotus-worker
@[[ $$(type -P "lotus") ]] && echo "Caution: you have \
an existing lotus binary in your PATH. This may cause problems if you don't run 'sudo make install'" || true
@ -101,7 +101,7 @@ an existing lotus binary in your PATH. This may cause problems if you don't run
install:
install -C ./lotus /usr/local/bin/lotus
install -C ./lotus-miner /usr/local/bin/lotus-miner
install -C ./lotus-seal-worker /usr/local/bin/lotus-seal-worker
install -C ./lotus-worker /usr/local/bin/lotus-worker
install-services: install
mkdir -p /usr/local/lib/systemd/system

View File

@ -83,7 +83,7 @@ func envForRepo(t repo.RepoType) string {
case repo.FullNode:
return "FULLNODE_API_INFO"
case repo.StorageMiner:
return "STORAGE_API_INFO"
return "MINER_API_INFO"
default:
panic(fmt.Sprintf("Unknown repo type: %v", t))
}

View File

@ -36,7 +36,7 @@ import (
var log = logging.Logger("main")
const FlagWorkerRepo = "workerrepo"
const FlagWorkerRepo = "worker-repo"
func main() {
lotuslog.SetupLogLevels()
@ -48,13 +48,13 @@ func main() {
}
app := &cli.App{
Name: "lotus-seal-worker",
Name: "lotus-worker",
Usage: "Remote storage miner worker",
Version: build.UserVersion(),
Flags: []cli.Flag{
&cli.StringFlag{
Name: FlagWorkerRepo,
EnvVars: []string{"LOTUS_SEAL_WORKER_PATH"},
EnvVars: []string{"LOTUS_WORKER_PATH"},
Value: "~/.lotusworker", // TODO: Consider XDG_DATA_HOME
},
&cli.StringFlag{

View File

@ -14,7 +14,7 @@ Using the [JWT you generated](https://lotu.sh/en+api#how-do-i-generate-a-token-1
FULLNODE_API_INFO="JWT_TOKEN:/ip4/127.0.0.1/tcp/1234/http"
# Lotus Storage Miner
STORAGE_API_INFO="JWT_TOKEN:/ip4/127.0.0.1/tcp/2345/http"
MINER_API_INFO="JWT_TOKEN:/ip4/127.0.0.1/tcp/2345/http"
```
You can also use `lotus auth api-info --perm admin` to quickly create _API_INFO env vars

View File

@ -4,7 +4,7 @@ The **Lotus Seal Worker** is an extra process that can offload heavy processing
## Note: Using the Lotus Seal Worker from China
If you are trying to use `lotus-seal-worker` from China. You should set this **environment variable** on your machine:
If you are trying to use `lotus-worker` from China. You should set this **environment variable** on your machine:
```sh
IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/"
@ -12,10 +12,10 @@ IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/"
## Get Started
Make sure that the `lotus-seal-worker` is compiled and installed by running:
Make sure that the `lotus-worker` is compiled and installed by running:
```sh
make lotus-seal-worker
make lotus-worker
```
## Setting up the Storage Miner
@ -42,12 +42,12 @@ Next, you will need to [create an authentication token](https://docs.lotu.sh/en+
### Connect the Lotus Seal Worker
On the machine that will run `lotus-seal-worker`, 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 **Lotus Storage Miner** API that was set in `config.toml`.
On the machine that will run `lotus-worker`, set the `MINER_API_INFO` environment variable to `TOKEN:MINER_NODE_MULTIADDR`. Where `TOKEN` is the token we created above, and `NIMER_NODE_MULTIADDR` is the `multiaddr` of the **Lotus Storage Miner** API that was set in `config.toml`.
Once this is set, run:
```sh
lotus-seal-worker run --address 192.168.2.10:2345
lotus-worker run --address 192.168.2.10:2345
```
Replace `192.168.2.10:2345` with the proper IP and port.
@ -77,5 +77,5 @@ To do so you have to first __disable all seal task types__ in the miner config.
You can then run the storage miner on your local-loopback interface;
```sh
lotus-seal-worker run --address 127.0.0.1:2345
lotus-worker run --address 127.0.0.1:2345
```

View File

@ -94,8 +94,8 @@ lotus state sectors <miner>
### `FIL_PROOFS_MAXIMIZE_CACHING=1` Environment variable
This env var can be used with `lotus-miner`, `lotus-seal-worker`, and `lotus-bench` to make the precommit1 step faster at the cost of some memory use (1x sector size)
This env var can be used with `lotus-miner`, `lotus-worker`, and `lotus-bench` to make the precommit1 step faster at the cost of some memory use (1x sector size)
### `FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1` Environment variable
This env var can be used with `lotus-miner`, `lotus-seal-worker`, and `lotus-bench` to enable experimental precommit2 GPU acceleration
This env var can be used with `lotus-miner`, `lotus-worker`, and `lotus-bench` to enable experimental precommit2 GPU acceleration

View File

@ -21,7 +21,7 @@ pushd bundle
BINARIES=(
"lotus"
"lotus-miner"
"lotus-seal-worker"
"lotus-worker"
)
export IPFS_PATH=`mktemp -d`