diff --git a/.circleci/config.yml b/.circleci/config.yml index 54161a714..d88bbc9be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: diff --git a/.gitignore b/.gitignore index af1c1d5c8..0424c1f24 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ /lotus /lotus-miner -/lotus-seal-worker +/lotus-worker /lotus-seed /lotus-health /lotus-chainwatch diff --git a/Makefile b/Makefile index 88961b8f7..1bb5e07eb 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/cli/cmd.go b/cli/cmd.go index dd2c142b2..618173e87 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -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)) } diff --git a/cmd/lotus-seal-worker/main.go b/cmd/lotus-seal-worker/main.go index f0bcf5be0..f49599f4c 100644 --- a/cmd/lotus-seal-worker/main.go +++ b/cmd/lotus-seal-worker/main.go @@ -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{ diff --git a/documentation/en/api-scripting-support.md b/documentation/en/api-scripting-support.md index 0f39bbde3..8b674ee04 100644 --- a/documentation/en/api-scripting-support.md +++ b/documentation/en/api-scripting-support.md @@ -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 diff --git a/documentation/en/mining-lotus-seal-worker.md b/documentation/en/mining-lotus-seal-worker.md index 58000d226..bbc57cc7d 100644 --- a/documentation/en/mining-lotus-seal-worker.md +++ b/documentation/en/mining-lotus-seal-worker.md @@ -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 ``` \ No newline at end of file diff --git a/documentation/en/mining.md b/documentation/en/mining.md index da214b763..29a17191a 100644 --- a/documentation/en/mining.md +++ b/documentation/en/mining.md @@ -94,8 +94,8 @@ lotus state sectors ### `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 diff --git a/scripts/build-bundle.sh b/scripts/build-bundle.sh index 39fcfa0ed..8e4d608d0 100755 --- a/scripts/build-bundle.sh +++ b/scripts/build-bundle.sh @@ -21,7 +21,7 @@ pushd bundle BINARIES=( "lotus" "lotus-miner" - "lotus-seal-worker" + "lotus-worker" ) export IPFS_PATH=`mktemp -d`