Update lotus-seal-worker to lotus-worker
This commit is contained in:
parent
b2f94e4239
commit
ce0f9922ee
@ -95,8 +95,8 @@ jobs:
|
|||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus-miner
|
path: lotus-miner
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus-seal-worker
|
path: lotus-worker
|
||||||
- run: mkdir linux && mv lotus lotus-miner lotus-seal-worker linux/
|
- run: mkdir linux && mv lotus lotus-miner lotus-worker linux/
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: "."
|
root: "."
|
||||||
paths:
|
paths:
|
||||||
@ -225,8 +225,8 @@ jobs:
|
|||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus-miner
|
path: lotus-miner
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus-seal-worker
|
path: lotus-worker
|
||||||
- run: mkdir darwin && mv lotus lotus-miner lotus-seal-worker darwin/
|
- run: mkdir darwin && mv lotus lotus-miner lotus-worker darwin/
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: "."
|
root: "."
|
||||||
paths:
|
paths:
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,6 @@
|
|||||||
/lotus
|
/lotus
|
||||||
/lotus-miner
|
/lotus-miner
|
||||||
/lotus-seal-worker
|
/lotus-worker
|
||||||
/lotus-seed
|
/lotus-seed
|
||||||
/lotus-health
|
/lotus-health
|
||||||
/lotus-chainwatch
|
/lotus-chainwatch
|
||||||
|
20
Makefile
20
Makefile
@ -58,10 +58,10 @@ deps: $(BUILD_DEPS)
|
|||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
|
|
||||||
debug: GOFLAGS+=-tags=debug
|
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: GOFLAGS+=-tags=2k
|
||||||
2k: lotus lotus-miner lotus-seal-worker lotus-seed
|
2k: lotus lotus-miner lotus-worker lotus-seed
|
||||||
|
|
||||||
lotus: $(BUILD_DEPS)
|
lotus: $(BUILD_DEPS)
|
||||||
rm -f lotus
|
rm -f lotus
|
||||||
@ -78,12 +78,12 @@ lotus-miner: $(BUILD_DEPS)
|
|||||||
.PHONY: lotus-miner
|
.PHONY: lotus-miner
|
||||||
BINS+=lotus-miner
|
BINS+=lotus-miner
|
||||||
|
|
||||||
lotus-seal-worker: $(BUILD_DEPS)
|
lotus-worker: $(BUILD_DEPS)
|
||||||
rm -f lotus-seal-worker
|
rm -f lotus-worker
|
||||||
go build $(GOFLAGS) -o lotus-seal-worker ./cmd/lotus-seal-worker
|
go build $(GOFLAGS) -o lotus-worker ./cmd/lotus-seal-worker
|
||||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-seal-worker -i ./build
|
go run github.com/GeertJohan/go.rice/rice append --exec lotus-worker -i ./build
|
||||||
.PHONY: lotus-seal-worker
|
.PHONY: lotus-worker
|
||||||
BINS+=lotus-seal-worker
|
BINS+=lotus-worker
|
||||||
|
|
||||||
lotus-shed: $(BUILD_DEPS)
|
lotus-shed: $(BUILD_DEPS)
|
||||||
rm -f lotus-shed
|
rm -f lotus-shed
|
||||||
@ -92,7 +92,7 @@ lotus-shed: $(BUILD_DEPS)
|
|||||||
.PHONY: lotus-shed
|
.PHONY: lotus-shed
|
||||||
BINS+=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 \
|
@[[ $$(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
|
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:
|
||||||
install -C ./lotus /usr/local/bin/lotus
|
install -C ./lotus /usr/local/bin/lotus
|
||||||
install -C ./lotus-miner /usr/local/bin/lotus-miner
|
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
|
install-services: install
|
||||||
mkdir -p /usr/local/lib/systemd/system
|
mkdir -p /usr/local/lib/systemd/system
|
||||||
|
@ -83,7 +83,7 @@ func envForRepo(t repo.RepoType) string {
|
|||||||
case repo.FullNode:
|
case repo.FullNode:
|
||||||
return "FULLNODE_API_INFO"
|
return "FULLNODE_API_INFO"
|
||||||
case repo.StorageMiner:
|
case repo.StorageMiner:
|
||||||
return "STORAGE_API_INFO"
|
return "MINER_API_INFO"
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("Unknown repo type: %v", t))
|
panic(fmt.Sprintf("Unknown repo type: %v", t))
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ import (
|
|||||||
|
|
||||||
var log = logging.Logger("main")
|
var log = logging.Logger("main")
|
||||||
|
|
||||||
const FlagWorkerRepo = "workerrepo"
|
const FlagWorkerRepo = "worker-repo"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
lotuslog.SetupLogLevels()
|
lotuslog.SetupLogLevels()
|
||||||
@ -48,13 +48,13 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "lotus-seal-worker",
|
Name: "lotus-worker",
|
||||||
Usage: "Remote storage miner worker",
|
Usage: "Remote storage miner worker",
|
||||||
Version: build.UserVersion(),
|
Version: build.UserVersion(),
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: FlagWorkerRepo,
|
Name: FlagWorkerRepo,
|
||||||
EnvVars: []string{"LOTUS_SEAL_WORKER_PATH"},
|
EnvVars: []string{"LOTUS_WORKER_PATH"},
|
||||||
Value: "~/.lotusworker", // TODO: Consider XDG_DATA_HOME
|
Value: "~/.lotusworker", // TODO: Consider XDG_DATA_HOME
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
|
@ -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"
|
FULLNODE_API_INFO="JWT_TOKEN:/ip4/127.0.0.1/tcp/1234/http"
|
||||||
|
|
||||||
# Lotus Storage Miner
|
# 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
|
You can also use `lotus auth api-info --perm admin` to quickly create _API_INFO env vars
|
||||||
|
@ -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
|
## 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
|
```sh
|
||||||
IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/"
|
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
|
## 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
|
```sh
|
||||||
make lotus-seal-worker
|
make lotus-worker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setting up the Storage Miner
|
## 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
|
### 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:
|
Once this is set, run:
|
||||||
|
|
||||||
```sh
|
```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.
|
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;
|
You can then run the storage miner on your local-loopback interface;
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
lotus-seal-worker run --address 127.0.0.1:2345
|
lotus-worker run --address 127.0.0.1:2345
|
||||||
```
|
```
|
@ -94,8 +94,8 @@ lotus state sectors <miner>
|
|||||||
|
|
||||||
### `FIL_PROOFS_MAXIMIZE_CACHING=1` Environment variable
|
### `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
|
### `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
|
||||||
|
@ -21,7 +21,7 @@ pushd bundle
|
|||||||
BINARIES=(
|
BINARIES=(
|
||||||
"lotus"
|
"lotus"
|
||||||
"lotus-miner"
|
"lotus-miner"
|
||||||
"lotus-seal-worker"
|
"lotus-worker"
|
||||||
)
|
)
|
||||||
|
|
||||||
export IPFS_PATH=`mktemp -d`
|
export IPFS_PATH=`mktemp -d`
|
||||||
|
Loading…
Reference in New Issue
Block a user