fix issue 2304: ux improvements

This commit is contained in:
Frank 2020-07-08 18:38:59 +08:00
parent 7d841dbfa8
commit 5b9baba900
40 changed files with 404 additions and 403 deletions

View File

@ -93,10 +93,10 @@ jobs:
- store_artifacts: - store_artifacts:
path: lotus path: lotus
- store_artifacts: - store_artifacts:
path: lotus-storage-miner path: lotus-miner
- store_artifacts: - store_artifacts:
path: lotus-seal-worker path: lotus-seal-worker
- run: mkdir linux && mv lotus lotus-storage-miner lotus-seal-worker linux/ - run: mkdir linux && mv lotus lotus-miner lotus-seal-worker linux/
- persist_to_workspace: - persist_to_workspace:
root: "." root: "."
paths: paths:
@ -223,10 +223,10 @@ jobs:
- store_artifacts: - store_artifacts:
path: lotus path: lotus
- store_artifacts: - store_artifacts:
path: lotus-storage-miner path: lotus-miner
- store_artifacts: - store_artifacts:
path: lotus-seal-worker path: lotus-seal-worker
- run: mkdir darwin && mv lotus lotus-storage-miner lotus-seal-worker darwin/ - run: mkdir darwin && mv lotus lotus-miner lotus-seal-worker darwin/
- persist_to_workspace: - persist_to_workspace:
root: "." root: "."
paths: paths:

View File

@ -19,11 +19,11 @@ Including what commands you ran, and a description of your setup, is very helpfu
**Sectors list** **Sectors list**
The output of `./lotus-storage-miner sectors list`. The output of `./lotus-miner sectors list`.
**Sectors status** **Sectors status**
The output of `./lotus-storage-miner sectors status --log <sectorId>` for the failed sector(s). The output of `./lotus-miner sectors status --log <sectorId>` for the failed sector(s).
**Lotus storage miner logs** **Lotus storage miner logs**

15
.gitignore vendored
View File

@ -1,19 +1,21 @@
/lotus /lotus
/lotus-storage-miner /lotus-miner
/lotus-seal-worker /lotus-seal-worker
/lotus-seed /lotus-seed
/lotus-health /lotus-health
/lotus-chainwatch
/lotus-shed /lotus-shed
/pond /lotus-pond
/townhall /lotus-townhall
/fountain /lotus-fountain
/stats /lotus-stats
/bench /lotus-bench
/bench.json /bench.json
/lotuspond/front/node_modules /lotuspond/front/node_modules
/lotuspond/front/build /lotuspond/front/build
/cmd/lotus-townhall/townhall/node_modules /cmd/lotus-townhall/townhall/node_modules
/cmd/lotus-townhall/townhall/build /cmd/lotus-townhall/townhall/build
/cmd/lotus-townhall/townhall/package-lock.json
extern/filecoin-ffi/rust/target extern/filecoin-ffi/rust/target
**/*.a **/*.a
**/*.pc **/*.pc
@ -24,7 +26,6 @@ build/paramfetch.sh
/vendor /vendor
/blocks.dot /blocks.dot
/blocks.svg /blocks.svg
/chainwatch
/chainwatch.db /chainwatch.db
/bundle /bundle
/darwin /darwin

116
Makefile
View File

@ -58,10 +58,10 @@ deps: $(BUILD_DEPS)
.PHONY: deps .PHONY: deps
debug: GOFLAGS+=-tags=debug debug: GOFLAGS+=-tags=debug
debug: lotus lotus-storage-miner lotus-seal-worker lotus-seed debug: lotus lotus-miner lotus-seal-worker lotus-seed
2k: GOFLAGS+=-tags=2k 2k: GOFLAGS+=-tags=2k
2k: lotus lotus-storage-miner lotus-seal-worker lotus-seed 2k: lotus lotus-miner lotus-seal-worker lotus-seed
lotus: $(BUILD_DEPS) lotus: $(BUILD_DEPS)
rm -f lotus rm -f lotus
@ -71,12 +71,12 @@ lotus: $(BUILD_DEPS)
.PHONY: lotus .PHONY: lotus
BINS+=lotus BINS+=lotus
lotus-storage-miner: $(BUILD_DEPS) lotus-miner: $(BUILD_DEPS)
rm -f lotus-storage-miner rm -f lotus-miner
go build $(GOFLAGS) -o lotus-storage-miner ./cmd/lotus-storage-miner go build $(GOFLAGS) -o lotus-miner ./cmd/lotus-storage-miner
go run github.com/GeertJohan/go.rice/rice append --exec lotus-storage-miner -i ./build go run github.com/GeertJohan/go.rice/rice append --exec lotus-miner -i ./build
.PHONY: lotus-storage-miner .PHONY: lotus-miner
BINS+=lotus-storage-miner BINS+=lotus-miner
lotus-seal-worker: $(BUILD_DEPS) lotus-seal-worker: $(BUILD_DEPS)
rm -f lotus-seal-worker rm -f lotus-seal-worker
@ -92,7 +92,7 @@ lotus-shed: $(BUILD_DEPS)
.PHONY: lotus-shed .PHONY: lotus-shed
BINS+=lotus-shed BINS+=lotus-shed
build: lotus lotus-storage-miner lotus-seal-worker build: lotus lotus-miner lotus-seal-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
@ -100,7 +100,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-storage-miner /usr/local/bin/lotus-storage-miner install -C ./lotus-miner /usr/local/bin/lotus-miner
install -C ./lotus-seal-worker /usr/local/bin/lotus-seal-worker install -C ./lotus-seal-worker /usr/local/bin/lotus-seal-worker
install-services: install install-services: install
@ -115,7 +115,7 @@ install-services: install
clean-services: clean-services:
rm -f /usr/local/lib/systemd/system/lotus-daemon.service rm -f /usr/local/lib/systemd/system/lotus-daemon.service
rm -f /usr/local/lib/systemd/system/lotus-miner.service rm -f /usr/local/lib/systemd/system/lotus-miner.service
rm -f /usr/local/lib/systemd/system/chainwatch.service rm -f /usr/local/lib/systemd/system/lotus-chainwatch.service
systemctl daemon-reload systemctl daemon-reload
# TOOLS # TOOLS
@ -134,68 +134,68 @@ benchmarks:
@curl -X POST 'http://benchmark.kittyhawk.wtf/benchmark' -d '@bench.json' -u "${benchmark_http_cred}" @curl -X POST 'http://benchmark.kittyhawk.wtf/benchmark' -d '@bench.json' -u "${benchmark_http_cred}"
.PHONY: benchmarks .PHONY: benchmarks
pond: 2k lotus-pond: 2k
go build -o pond ./lotuspond go build -o lotus-pond ./lotuspond
(cd lotuspond/front && npm i && CI=false npm run build) (cd lotuspond/front && npm i && CI=false npm run build)
.PHONY: pond .PHONY: lotus-pond
BINS+=pond BINS+=lotus-pond
townhall: lotus-townhall:
rm -f townhall rm -f lotus-townhall
go build -o townhall ./cmd/lotus-townhall go build -o lotus-townhall ./cmd/lotus-townhall
(cd ./cmd/lotus-townhall/townhall && npm i && npm run build) (cd ./cmd/lotus-townhall/townhall && npm i && npm run build)
go run github.com/GeertJohan/go.rice/rice append --exec townhall -i ./cmd/lotus-townhall -i ./build go run github.com/GeertJohan/go.rice/rice append --exec lotus-townhall -i ./cmd/lotus-townhall -i ./build
.PHONY: townhall .PHONY: lotus-townhall
BINS+=townhall BINS+=lotus-townhall
fountain: lotus-fountain:
rm -f fountain rm -f lotus-fountain
go build -o fountain ./cmd/lotus-fountain go build -o lotus-fountain ./cmd/lotus-fountain
go run github.com/GeertJohan/go.rice/rice append --exec fountain -i ./cmd/lotus-fountain -i ./build go run github.com/GeertJohan/go.rice/rice append --exec lotus-fountain -i ./cmd/lotus-fountain -i ./build
.PHONY: fountain .PHONY: lotus-fountain
BINS+=fountain BINS+=lotus-fountain
chainwatch: lotus-chainwatch:
rm -f chainwatch rm -f lotus-chainwatch
go build -o chainwatch ./cmd/lotus-chainwatch go build -o lotus-chainwatch ./cmd/lotus-chainwatch
go run github.com/GeertJohan/go.rice/rice append --exec chainwatch -i ./cmd/lotus-chainwatch -i ./build go run github.com/GeertJohan/go.rice/rice append --exec lotus-chainwatch -i ./cmd/lotus-chainwatch -i ./build
.PHONY: chainwatch .PHONY: lotus-chainwatch
BINS+=chainwatch BINS+=lotus-chainwatch
install-chainwatch-service: chainwatch install-chainwatch-service: chainwatch
install -C ./chainwatch /usr/local/bin/chainwatch mkdir -p /etc/lotus
install -C -m 0644 ./scripts/chainwatch.service /usr/local/lib/systemd/system/chainwatch.service install -C ./lotus-chainwatch /usr/local/bin/lotus-chainwatch
install -C -m 0644 ./scripts/lotus-chainwatch.service /usr/local/lib/systemd/system/lotus-chainwatch.service
systemctl daemon-reload systemctl daemon-reload
@echo @echo
@echo "chainwatch installed. Don't forget to 'systemctl enable chainwatch' for it to be enabled on startup." @echo "chainwatch installed. Don't forget to 'systemctl enable chainwatch' for it to be enabled on startup."
bench: lotus-bench:
rm -f bench rm -f lotus-bench
go build -o bench ./cmd/lotus-bench go build -o lotus-bench ./cmd/lotus-bench
go run github.com/GeertJohan/go.rice/rice append --exec bench -i ./build go run github.com/GeertJohan/go.rice/rice append --exec lotus-bench -i ./build
.PHONY: bench .PHONY: lotus-bench
BINS+=bench BINS+=lotus-bench
stats: lotus-stats:
rm -f stats rm -f lotus-stats
go build -o stats ./tools/stats go build -o lotus-stats ./tools/stats
go run github.com/GeertJohan/go.rice/rice append --exec stats -i ./build go run github.com/GeertJohan/go.rice/rice append --exec lotus-stats -i ./build
.PHONY: stats .PHONY: lotus-stats
BINS+=stats BINS+=lotus-stats
health: lotus-health:
rm -f lotus-health rm -f lotus-health
go build -o lotus-health ./cmd/lotus-health go build -o lotus-health ./cmd/lotus-health
go run github.com/GeertJohan/go.rice/rice append --exec lotus-health -i ./build go run github.com/GeertJohan/go.rice/rice append --exec lotus-health -i ./build
.PHONY: lotus-health
BINS+=lotus-health
.PHONY: health lotus-testground:
BINS+=health go build -tags lotus-testground -o /dev/null ./cmd/lotus
testground: .PHONY: lotus-testground
go build -tags testground -o /dev/null ./cmd/lotus BINS+=lotus-testground
.PHONY: testground
BINS+=testground
# MISC # MISC
@ -203,15 +203,15 @@ buildall: $(BINS)
completions: completions:
./scripts/make-completions.sh lotus ./scripts/make-completions.sh lotus
./scripts/make-completions.sh lotus-storage-miner ./scripts/make-completions.sh lotus-miner
.PHONY: completions .PHONY: completions
install-completions: install-completions:
mkdir -p /usr/share/bash-completion/completions /usr/local/share/zsh/site-functions/ mkdir -p /usr/share/bash-completion/completions /usr/local/share/zsh/site-functions/
install -C ./scripts/bash-completion/lotus /usr/share/bash-completion/completions/lotus install -C ./scripts/bash-completion/lotus /usr/share/bash-completion/completions/lotus
install -C ./scripts/bash-completion/lotus-storage-miner /usr/share/bash-completion/completions/lotus-storage-miner install -C ./scripts/bash-completion/lotus-miner /usr/share/bash-completion/completions/lotus-miner
install -C ./scripts/zsh-completion/lotus /usr/local/share/zsh/site-functions/_lotus install -C ./scripts/zsh-completion/lotus /usr/local/share/zsh/site-functions/_lotus
install -C ./scripts/zsh-completion/lotus-storage-miner /usr/local/share/zsh/site-functions/_lotus-storage-miner install -C ./scripts/zsh-completion/lotus-miner /usr/local/share/zsh/site-functions/_lotus-miner
clean: clean:
rm -rf $(CLEAN) $(BINS) rm -rf $(CLEAN) $(BINS)

View File

@ -72,7 +72,7 @@ func flagForRepo(t repo.RepoType) string {
case repo.FullNode: case repo.FullNode:
return "repo" return "repo"
case repo.StorageMiner: case repo.StorageMiner:
return "storagerepo" return "miner-repo"
default: default:
panic(fmt.Sprintf("Unknown repo type: %v", t)) panic(fmt.Sprintf("Unknown repo type: %v", t))
} }

View File

@ -22,7 +22,7 @@
<div class="Index-node" style="display: none" id="mwait"> <div class="Index-node" style="display: none" id="mwait">
<div style="padding-bottom: 1em">To initialize the storage miner run the following command:</div> <div style="padding-bottom: 1em">To initialize the storage miner run the following command:</div>
<div style="overflow-x: visible; white-space: nowrap; background: #353500"> <div style="overflow-x: visible; white-space: nowrap; background: #353500">
<code>lotus-storage-miner init --actor=<span id="actaddr2">t</span> --owner=<span id="owner">t3</span></code> <code>lotus-miner init --actor=<span id="actaddr2">t</span> --owner=<span id="owner">t3</span></code>
</div> </div>
</div> </div>
</div> </div>

View File

@ -36,7 +36,7 @@ import (
var log = logging.Logger("main") var log = logging.Logger("main")
const FlagStorageRepo = "workerrepo" const FlagWorkerRepo = "workerrepo"
func main() { func main() {
lotuslog.SetupLogLevels() lotuslog.SetupLogLevels()
@ -53,14 +53,14 @@ func main() {
Version: build.UserVersion(), Version: build.UserVersion(),
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
Name: FlagStorageRepo, Name: FlagWorkerRepo,
EnvVars: []string{"WORKER_PATH"}, EnvVars: []string{"LOTUS_SEAL_WORKER_PATH"},
Value: "~/.lotusworker", // TODO: Consider XDG_DATA_HOME Value: "~/.lotusworker", // TODO: Consider XDG_DATA_HOME
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "storagerepo", Name: "miner-repo",
EnvVars: []string{"LOTUS_STORAGE_PATH"}, EnvVars: []string{"LOTUS_MINER_PATH"},
Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME Value: "~/.lotusminer", // TODO: Consider XDG_DATA_HOME
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "enable-gpu-proving", Name: "enable-gpu-proving",
@ -143,7 +143,7 @@ var runCmd = &cli.Command{
return err return err
} }
if v.APIVersion != build.APIVersion { if v.APIVersion != build.APIVersion {
return xerrors.Errorf("lotus-storage-miner API version doesn't match: local: ", api.Version{APIVersion: build.APIVersion}) return xerrors.Errorf("lotus-miner API version doesn't match: local: ", api.Version{APIVersion: build.APIVersion})
} }
log.Infof("Remote version %s", v) log.Infof("Remote version %s", v)
@ -186,7 +186,7 @@ var runCmd = &cli.Command{
// Open repo // Open repo
repoPath := cctx.String(FlagStorageRepo) repoPath := cctx.String(FlagWorkerRepo)
r, err := repo.NewFS(repoPath) r, err := repo.NewFS(repoPath)
if err != nil { if err != nil {
return err return err

View File

@ -151,7 +151,7 @@ var initCmd = &cli.Command{
log.Info("Checking if repo exists") log.Info("Checking if repo exists")
repoPath := cctx.String(FlagStorageRepo) repoPath := cctx.String(FlagMinerRepo)
r, err := repo.NewFS(repoPath) r, err := repo.NewFS(repoPath)
if err != nil { if err != nil {
return err return err
@ -162,7 +162,7 @@ var initCmd = &cli.Command{
return err return err
} }
if ok { if ok {
return xerrors.Errorf("repo at '%s' is already initialized", cctx.String(FlagStorageRepo)) return xerrors.Errorf("repo at '%s' is already initialized", cctx.String(FlagMinerRepo))
} }
log.Info("Checking full node version") log.Info("Checking full node version")
@ -236,7 +236,7 @@ var initCmd = &cli.Command{
} }
if err := storageMinerInit(ctx, cctx, api, r, ssize, gasPrice); err != nil { if err := storageMinerInit(ctx, cctx, api, r, ssize, gasPrice); err != nil {
log.Errorf("Failed to initialize lotus-storage-miner: %+v", err) log.Errorf("Failed to initialize lotus-miner: %+v", err)
path, err := homedir.Expand(repoPath) path, err := homedir.Expand(repoPath)
if err != nil { if err != nil {
return err return err
@ -249,7 +249,7 @@ var initCmd = &cli.Command{
} }
// TODO: Point to setting storage price, maybe do it interactively or something // TODO: Point to setting storage price, maybe do it interactively or something
log.Info("Storage miner successfully created, you can now start it with 'lotus-storage-miner run'") log.Info("Storage miner successfully created, you can now start it with 'lotus-miner run'")
return nil return nil
}, },

View File

@ -20,7 +20,7 @@ import (
var log = logging.Logger("main") var log = logging.Logger("main")
const FlagStorageRepo = "storagerepo" const FlagMinerRepo = "miner-repo"
func main() { func main() {
lotuslog.SetupLogLevels() lotuslog.SetupLogLevels()
@ -61,7 +61,7 @@ func main() {
} }
app := &cli.App{ app := &cli.App{
Name: "lotus-storage-miner", Name: "lotus-miner",
Usage: "Filecoin decentralized storage network storage miner", Usage: "Filecoin decentralized storage network storage miner",
Version: build.UserVersion(), Version: build.UserVersion(),
EnableBashCompletion: true, EnableBashCompletion: true,
@ -79,8 +79,8 @@ func main() {
Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: FlagStorageRepo, Name: FlagMinerRepo,
EnvVars: []string{"LOTUS_STORAGE_PATH"}, EnvVars: []string{"LOTUS_MINER_PATH"},
Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME
}, },
}, },

View File

@ -86,8 +86,8 @@ var runCmd = &cli.Command{
} }
} }
storageRepoPath := cctx.String(FlagStorageRepo) minerRepoPath := cctx.String(FlagMinerRepo)
r, err := repo.NewFS(storageRepoPath) r, err := repo.NewFS(minerRepoPath)
if err != nil { if err != nil {
return err return err
} }
@ -97,7 +97,7 @@ var runCmd = &cli.Command{
return err return err
} }
if !ok { if !ok {
return xerrors.Errorf("repo at '%s' is not initialized, run 'lotus-storage-miner init' to set it up", storageRepoPath) return xerrors.Errorf("repo at '%s' is not initialized, run 'lotus-miner init' to set it up", minerRepoPath)
} }
shutdownChan := make(chan struct{}) shutdownChan := make(chan struct{})

View File

@ -278,7 +278,7 @@ var storageFindCmd = &cli.Command{
} }
if !cctx.Args().Present() { if !cctx.Args().Present() {
return xerrors.New("Usage: lotus-storage-miner storage find [sector number]") return xerrors.New("Usage: lotus-miner storage find [sector number]")
} }
snum, err := strconv.ParseUint(cctx.Args().First(), 10, 64) snum, err := strconv.ParseUint(cctx.Args().First(), 10, 64)

View File

@ -96,7 +96,7 @@
"value": "The Block Producer Miner's logic. It currently shares an interface and process with the Lotus Node. A Block Producer chooses which messages to include in a block and is rewarded according to each messages gas price and consumption, forming a market." "value": "The Block Producer Miner's logic. It currently shares an interface and process with the Lotus Node. A Block Producer chooses which messages to include in a block and is rewarded according to each messages gas price and consumption, forming a market."
}, },
"lotus-storage-miner": { "lotus-storage-miner": {
"title": "Storage Miner (lotus-storage-miner)", "title": "Storage Miner (lotus-miner)",
"value": "The Storage Miner's logic. It has its own dedicated process. Contributes to the network through Sector commitments and Proofs of Spacetime to prove that it is storing the sectors it has commited to." "value": "The Storage Miner's logic. It has its own dedicated process. Contributes to the network through Sector commitments and Proofs of Spacetime to prove that it is storing the sectors it has commited to."
}, },
"swarm-port": { "swarm-port": {

View File

@ -72,7 +72,7 @@ To generate a JWT with custom permissions, use this command:
lotus auth create-token --perm admin lotus auth create-token --perm admin
# Lotus Storage Miner # Lotus Storage Miner
lotus-storage-miner auth create-token --perm admin lotus-miner auth create-token --perm admin
``` ```
## What authorization level should I use? ## What authorization level should I use?

View File

@ -32,7 +32,7 @@ Gossip sub spec and some introduction.
# Look at the constructor of a miner # Look at the constructor of a miner
Follow the `lotus-storage-miner` command to see how a miner is created, from the command to the message to the storage power logic. Follow the `lotus-miner` command to see how a miner is created, from the command to the message to the storage power logic.
# Directory structure so far, main structures seen, their relation # Directory structure so far, main structures seen, their relation

View File

@ -126,7 +126,7 @@ Community-contributed Docker and Docker Compose examples are available
### How can I run two miners on the same machine? ### 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., You can do so by changing the storage path variable for the second miner, e.g.,
`LOTUS_STORAGE_PATH=~/.lotusstorage2`. You will also need to make sure that no ports collide. `LOTUS_MINER_PATH=~/.lotusstorage2`. You will also need to make sure that no ports collide.
### How do I setup my own local devnet? ### How do I setup my own local devnet?

View File

@ -34,13 +34,13 @@ Then, in another console, import the genesis miner key:
Set up the genesis miner: Set up the genesis miner:
```sh ```sh
./lotus-storage-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync ./lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync
``` ```
Now, finally, start up the miner: Now, finally, start up the miner:
```sh ```sh
./lotus-storage-miner run --nosync ./lotus-miner run --nosync
``` ```
If all went well, you will have your own local Lotus Devnet running. If all went well, you will have your own local Lotus Devnet running.

View File

@ -6,7 +6,7 @@ to install a Lotus node and sync to the top of the chain.
## Set up an ask ## Set up an ask
``` ```
lotus-storage-miner set-price <price> lotus-miner set-price <price>
``` ```
This command will set up your miner to accept deal proposals that meet the input price. This command will set up your miner to accept deal proposals that meet the input price.

View File

@ -20,9 +20,9 @@ make lotus-seal-worker
## Setting up the Storage Miner ## Setting up the Storage Miner
First, you will need to ensure your `lotus-storage-miner`'s API is accessible over the network. 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_STORAGE_PATH`, look under that directory) and look for the API field. 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.
Default config: Default config:
@ -52,10 +52,10 @@ lotus-seal-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.
To check that the **Lotus Seal Worker** is connected to your **Lotus Storage Miner**, run `lotus-storage-miner workers list` and check that the remote worker count has increased. To check that the **Lotus Seal Worker** is connected to your **Lotus Storage Miner**, run `lotus-miner workers list` and check that the remote worker count has increased.
```sh ```sh
why@computer ~/lotus> lotus-storage-miner workers list why@computer ~/lotus> lotus-miner workers list
Worker 0, host computer Worker 0, host computer
CPU: [ ] 0 core(s) in use CPU: [ ] 0 core(s) in use
RAM: [|||||||||||||||||| ] 28% 18.1 GiB/62.7 GiB RAM: [|||||||||||||||||| ] 28% 18.1 GiB/62.7 GiB

View File

@ -16,12 +16,12 @@ The **Bellman** lockfile is created to lock a GPU for a process. This bug can oc
mining block failed: computing election proof: github.com/filecoin-project/lotus/miner.(*Miner).mineOne mining block failed: computing election proof: github.com/filecoin-project/lotus/miner.(*Miner).mineOne
``` ```
This bug occurs when the storage miner can't acquire the `bellman.lock`. To fix it you need to stop the `lotus-storage-miner` and remove `/tmp/bellman.lock`. This bug occurs when the storage miner can't acquire the `bellman.lock`. To fix it you need to stop the `lotus-miner` and remove `/tmp/bellman.lock`.
## Error: Failed to get api endpoint ## Error: Failed to get api endpoint
```sh ```sh
lotus-storage-miner info 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/.lotusstorage) %!w(*errors.errorString=&{API not running (no endpoint)}):
``` ```
@ -38,7 +38,7 @@ If you see this, that means your computer is too slow and your blocks are not in
## Error: No space left on device ## Error: No space left on device
```sh ```sh
lotus-storage-miner sectors pledge lotus-miner sectors pledge
# No space left on device (os error 28) # No space left on device (os error 28)
``` ```

View File

@ -6,7 +6,7 @@ It is useful to [join the Testnet](https://docs.lotu.sh/en+join-testnet) prior t
## Note: Using the Lotus Storage Miner from China ## Note: Using the Lotus Storage Miner from China
If you are trying to use `lotus-storage-miner` from China. You should set this **environment variable** on your machine. If you are trying to use `lotus-miner` 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/"
@ -43,13 +43,13 @@ New storage miners address is: <YOUR_NEW_MINING_ADDRESS>
In a CLI window, use the following command to start your miner: In a CLI window, use the following command to start your miner:
```sh ```sh
lotus-storage-miner init --actor=ACTOR_VALUE_RECEIVED --owner=OWNER_VALUE_RECEIVED lotus-miner init --actor=ACTOR_VALUE_RECEIVED --owner=OWNER_VALUE_RECEIVED
``` ```
Example Example
```sh ```sh
lotus-storage-miner init --actor=t01424 --owner=t3spmep2xxsl33o4gxk7yjxcobyohzgj3vejzerug25iinbznpzob6a6kexcbeix73th6vjtzfq7boakfdtd6a lotus-miner init --actor=t01424 --owner=t3spmep2xxsl33o4gxk7yjxcobyohzgj3vejzerug25iinbznpzob6a6kexcbeix73th6vjtzfq7boakfdtd6a
``` ```
You will have to wait some time for this operation to complete. You will have to wait some time for this operation to complete.
@ -59,7 +59,7 @@ You will have to wait some time for this operation to complete.
To mine: To mine:
```sh ```sh
lotus-storage-miner run lotus-miner run
``` ```
If you are downloading **Filecoin Proof Parameters**, the download can take some time. If you are downloading **Filecoin Proof Parameters**, the download can take some time.
@ -67,14 +67,14 @@ If you are downloading **Filecoin Proof Parameters**, the download can take some
Get information about your miner: Get information about your miner:
```sh ```sh
lotus-storage-miner info lotus-miner info
# example: miner id `t0111` # example: miner id `t0111`
``` ```
**Seal** random data to start producing **PoSts**: **Seal** random data to start producing **PoSts**:
```sh ```sh
lotus-storage-miner sectors pledge lotus-miner sectors pledge
``` ```
- Warning: On Linux configurations, this command will write data to `$TMPDIR` which is not usually the largest partition. You should point the value to a larger partition if possible. - Warning: On Linux configurations, this command will write data to `$TMPDIR` which is not usually the largest partition. You should point the value to a larger partition if possible.
@ -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-storage-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-seal-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-storage-miner`, `lotus-seal-worker`, and `lotus-bench` to enable experimental precommit2 GPU acceleration This env var can be used with `lotus-miner`, `lotus-seal-worker`, and `lotus-bench` to enable experimental precommit2 GPU acceleration

View File

@ -4,7 +4,7 @@ Depending on how your network is set up, you may need to set a static port to su
## Setup ## Setup
To change the random **swarm port**, you may edit the `config.toml` file located under `$LOTUS_STORAGE_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/.lotusstorage`.
To change the port to `1347`: To change the port to `1347`:

View File

@ -21,7 +21,7 @@ WARN main lotus/main.go:72 failed to start deal: computing commP failed: gene
In order to retrieve a file, it must be sealed. Miners can check sealing progress with this command: In order to retrieve a file, it must be sealed. Miners can check sealing progress with this command:
```sh ```sh
lotus-storage-miner sectors list lotus-miner sectors list
``` ```
When sealing is complete, `pSet: NO` will become `pSet: YES`. From now on the **Data CID** is [retrievable](https://docs.lotu.sh/en+retrieving-data) from the **Lotus Storage Miner**. When sealing is complete, `pSet: NO` will become `pSet: YES`. From now on the **Data CID** is [retrievable](https://docs.lotu.sh/en+retrieving-data) from the **Lotus Storage Miner**.

File diff suppressed because it is too large Load Diff

View File

@ -127,7 +127,7 @@ class StorageNode extends React.Component {
runtime = ( runtime = (
<div> <div>
<div>v{this.state.version.Version}, <abbr title={this.state.id}>{this.state.id.substr(-8)}</abbr>, {this.state.peers} peers</div> <div>v{this.state.version.Version}, <abbr title={this.state.id}>{this.state.id.substr(-8)}</abbr>, {this.state.peers} peers</div>
<div>Repo: LOTUS_STORAGE_PATH={this.props.node.Repo}</div> <div>Repo: LOTUS_MINER_PATH={this.props.node.Repo}</div>
<div> <div>
{pledgeSector} {sealStaged} {pledgeSector} {sealStaged}
</div> </div>

View File

@ -45,9 +45,9 @@ var onCmd = &cli.Command{
"LOTUS_PATH=" + node.Repo, "LOTUS_PATH=" + node.Repo,
} }
} else { } else {
cmd = exec.Command("./lotus-storage-miner") cmd = exec.Command("./lotus-miner")
cmd.Env = []string{ cmd.Env = []string{
"LOTUS_STORAGE_PATH=" + node.Repo, "LOTUS_MINER_PATH=" + node.Repo,
"LOTUS_PATH=" + node.FullNode, "LOTUS_PATH=" + node.FullNode,
} }
} }
@ -83,7 +83,7 @@ var shCmd = &cli.Command{
} }
} else { } else {
shcmd.Env = []string{ shcmd.Env = []string{
"LOTUS_STORAGE_PATH=" + node.Repo, "LOTUS_MINER_PATH=" + node.Repo,
"LOTUS_PATH=" + node.FullNode, "LOTUS_PATH=" + node.FullNode,
} }
} }

View File

@ -176,10 +176,10 @@ func (api *api) SpawnStorage(fullNodeRepo string) (nodeInfo, error) {
} }
id := atomic.AddInt32(&api.cmds, 1) id := atomic.AddInt32(&api.cmds, 1)
cmd := exec.Command("./lotus-storage-miner", initArgs...) cmd := exec.Command("./lotus-miner", initArgs...)
cmd.Stderr = io.MultiWriter(os.Stderr, errlogfile) cmd.Stderr = io.MultiWriter(os.Stderr, errlogfile)
cmd.Stdout = io.MultiWriter(os.Stdout, logfile) cmd.Stdout = io.MultiWriter(os.Stdout, logfile)
cmd.Env = append(os.Environ(), "LOTUS_STORAGE_PATH="+dir, "LOTUS_PATH="+fullNodeRepo) cmd.Env = append(os.Environ(), "LOTUS_MINER_PATH="+dir, "LOTUS_PATH="+fullNodeRepo)
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
return nodeInfo{}, err return nodeInfo{}, err
} }
@ -188,10 +188,10 @@ func (api *api) SpawnStorage(fullNodeRepo string) (nodeInfo, error) {
mux := newWsMux() mux := newWsMux()
cmd = exec.Command("./lotus-storage-miner", "run", "--api", fmt.Sprintf("%d", 2500+id), "--nosync") cmd = exec.Command("./lotus-miner", "run", "--api", fmt.Sprintf("%d", 2500+id), "--nosync")
cmd.Stderr = io.MultiWriter(os.Stderr, errlogfile, mux.errpw) cmd.Stderr = io.MultiWriter(os.Stderr, errlogfile, mux.errpw)
cmd.Stdout = io.MultiWriter(os.Stdout, logfile, mux.outpw) cmd.Stdout = io.MultiWriter(os.Stdout, logfile, mux.outpw)
cmd.Env = append(os.Environ(), "LOTUS_STORAGE_PATH="+dir, "LOTUS_PATH="+fullNodeRepo) cmd.Env = append(os.Environ(), "LOTUS_MINER_PATH="+dir, "LOTUS_PATH="+fullNodeRepo)
if err := cmd.Start(); err != nil { if err := cmd.Start(); err != nil {
return nodeInfo{}, err return nodeInfo{}, err
} }
@ -248,7 +248,7 @@ func (api *api) RestartNode(id int32) (nodeInfo, error) {
var cmd *exec.Cmd var cmd *exec.Cmd
if nd.meta.Storage { if nd.meta.Storage {
cmd = exec.Command("./lotus-storage-miner", "run", "--api", fmt.Sprintf("%d", 2500+id), "--nosync") cmd = exec.Command("./lotus-miner", "run", "--api", fmt.Sprintf("%d", 2500+id), "--nosync")
} else { } else {
cmd = exec.Command("./lotus", "daemon", "--api", fmt.Sprintf("%d", 2500+id)) cmd = exec.Command("./lotus", "daemon", "--api", fmt.Sprintf("%d", 2500+id))
} }

View File

@ -7,4 +7,4 @@ _cli_bash_autocomplete() {
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ); COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) );
return 0; return 0;
}; };
complete -F _cli_bash_autocomplete lotus-storage-miner complete -F _cli_bash_autocomplete lotus-miner

View File

@ -20,7 +20,7 @@ pushd bundle
BINARIES=( BINARIES=(
"lotus" "lotus"
"lotus-storage-miner" "lotus-miner"
"lotus-seal-worker" "lotus-seal-worker"
) )

View File

@ -10,7 +10,7 @@ log "> Deploying bootstrap node $host"
log "Stopping lotus daemon" log "Stopping lotus daemon"
ssh "$host" 'systemctl stop lotus-daemon' & ssh "$host" 'systemctl stop lotus-daemon' &
ssh "$host" 'systemctl stop lotus-storage-miner' & ssh "$host" 'systemctl stop lotus-miner' &
wait wait
@ -18,7 +18,7 @@ ssh "$host" 'rm -rf .lotus' &
ssh "$host" 'rm -rf .lotusstorage' & ssh "$host" 'rm -rf .lotusstorage' &
scp -C lotus "${host}":/usr/local/bin/lotus & scp -C lotus "${host}":/usr/local/bin/lotus &
scp -C lotus-storage-miner "${host}":/usr/local/bin/lotus-storage-miner & scp -C lotus-miner "${host}":/usr/local/bin/lotus-miner &
wait wait

View File

@ -14,5 +14,5 @@ echo "SYNC WAIT"
sleep 30 sleep 30
ssh "$HOST" 'lotus sync wait' ssh "$HOST" 'lotus sync wait'
ssh "$HOST" 'lotus-storage-miner init --owner=$(cat addr)' ssh "$HOST" 'lotus-miner init --owner=$(cat addr)'
ssh "$HOST" 'systemctl start lotus-storage-miner' & ssh "$HOST" 'systemctl start lotus-miner' &

View File

@ -11,7 +11,7 @@ HOST=$1
FILES_TO_SEND=( FILES_TO_SEND=(
./lotus ./lotus
./lotus-storage-miner ./lotus-miner
scripts/lotus-daemon.service scripts/lotus-daemon.service
scripts/louts-miner.service scripts/louts-miner.service
) )
@ -21,14 +21,14 @@ rsync -P "${FILES_TO_SEND[@]}" "$HOST:~/lotus-stage/"
ssh "$HOST" 'bash -s' << 'EOF' ssh "$HOST" 'bash -s' << 'EOF'
set -euo pipefail set -euo pipefail
systemctl stop lotus-storage-miner systemctl stop lotus-miner
systemctl stop lotus-daemon systemctl stop lotus-daemon
mkdir -p .lotus .lotusstorage mkdir -p .lotus .lotusstorage
cd "$HOME/lotus-stage/" cd "$HOME/lotus-stage/"
cp -f lotus lotus-storage-miner /usr/local/bin cp -f lotus lotus-miner /usr/local/bin
cp -f lotus-daemon.service /etc/systemd/system/lotus-daemon.service cp -f lotus-daemon.service /etc/systemd/system/lotus-daemon.service
cp -f lotus-miner.service /etc/systemd/system/lotus-storage-miner.service cp -f lotus-miner.service /etc/systemd/system/lotus-miner.service
systemctl daemon-reload systemctl daemon-reload
systemctl start lotus-daemon systemctl start lotus-daemon

View File

@ -7,4 +7,4 @@ export TRUST_PARAMS=1
tag=${TAG:-debug} tag=${TAG:-debug}
go run -tags=$tag ./cmd/lotus wallet import ~/.genesis-sectors/pre-seal-t01000.key go run -tags=$tag ./cmd/lotus wallet import ~/.genesis-sectors/pre-seal-t01000.key
go run -tags=$tag ./cmd/lotus-storage-miner init --actor=t01000 --genesis-miner --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json go run -tags=$tag ./cmd/lotus-miner init --actor=t01000 --genesis-miner --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json

View File

@ -42,8 +42,8 @@ SCRIPTDIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
pushd \$SCRIPTDIR/../build pushd \$SCRIPTDIR/../build
pwd pwd
env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps lotus lotus-storage-miner lotus-shed env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps lotus lotus-miner lotus-shed
cp lotus lotus-storage-miner lotus-shed ../bin/ cp lotus lotus-miner lotus-shed ../bin/
popd popd
EOF EOF
@ -51,13 +51,13 @@ EOF
cat > "${BASEDIR}/scripts/env.fish" <<EOF cat > "${BASEDIR}/scripts/env.fish" <<EOF
set -x PATH ${BASEDIR}/bin \$PATH set -x PATH ${BASEDIR}/bin \$PATH
set -x LOTUS_PATH ${BASEDIR}/.lotus set -x LOTUS_PATH ${BASEDIR}/.lotus
set -x LOTUS_STORAGE_PATH ${BASEDIR}/.lotusstorage set -x LOTUS_MINER_PATH ${BASEDIR}/.lotusstorage
EOF EOF
cat > "${BASEDIR}/scripts/env.bash" <<EOF cat > "${BASEDIR}/scripts/env.bash" <<EOF
export PATH=${BASEDIR}/bin:\$PATH export PATH=${BASEDIR}/bin:\$PATH
export LOTUS_PATH=${BASEDIR}/.lotus export LOTUS_PATH=${BASEDIR}/.lotus
export LOTUS_STORAGE_PATH=${BASEDIR}/.lotusstorage export LOTUS_MINER_PATH=${BASEDIR}/.lotusstorage
EOF EOF
cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF
@ -65,7 +65,7 @@ cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF
set -x set -x
lotus wallet import ~/.genesis-sectors/pre-seal-t01000.key lotus wallet import ~/.genesis-sectors/pre-seal-t01000.key
lotus-storage-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync
EOF EOF
cat > "${BASEDIR}/scripts/pledge_sectors.bash" <<EOF cat > "${BASEDIR}/scripts/pledge_sectors.bash" <<EOF
@ -83,16 +83,16 @@ done
sleep 30 sleep 30
sector=\$(lotus-storage-miner sectors list | tail -n1 | awk '{print \$1}' | tr -d ':') sector=\$(lotus-miner sectors list | tail -n1 | awk '{print \$1}' | tr -d ':')
current="\$sector" current="\$sector"
while true; do while true; do
if (( \$(lotus-storage-miner sectors list | wc -l) > ${PLEDGE_COUNT} )); then if (( \$(lotus-miner sectors list | wc -l) > ${PLEDGE_COUNT} )); then
break break
fi fi
while true; do while true; do
state=\$(lotus-storage-miner sectors list | tail -n1 | awk '{print \$2}') state=\$(lotus-miner sectors list | tail -n1 | awk '{print \$2}')
if [ -z "\$state" ]; then if [ -z "\$state" ]; then
break break
@ -102,15 +102,15 @@ while true; do
PreCommit1 | PreCommit2 | Packing | Unsealed | PreCommitting | Committing | CommitWait | FinalizeSector ) sleep 30 ;; PreCommit1 | PreCommit2 | Packing | Unsealed | PreCommitting | Committing | CommitWait | FinalizeSector ) sleep 30 ;;
WaitSeed | Proving ) break ;; WaitSeed | Proving ) break ;;
* ) echo "Unknown Sector State: \$state" * ) echo "Unknown Sector State: \$state"
lotus-storage-miner sectors status --log \$current lotus-miner sectors status --log \$current
break ;; break ;;
esac esac
done done
lotus-storage-miner sectors pledge lotus-miner sectors pledge
while [ "\$current" == "\$sector" ]; do while [ "\$current" == "\$sector" ]; do
sector=\$(lotus-storage-miner sectors list | tail -n1 | awk '{print \$1}' | tr -d ':') sector=\$(lotus-miner sectors list | tail -n1 | awk '{print \$1}' | tr -d ':')
sleep 5 sleep 5
done done
@ -128,12 +128,12 @@ while true; do
echo echo
echo echo
echo Storage Miner Info echo Storage Miner Info
lotus-storage-miner info lotus-miner info
echo echo
echo echo
echo Sector List echo Sector List
lotus-storage-miner sectors list | tail -n4 lotus-miner sectors list | tail -n4
sleep 25 sleep 25
@ -151,7 +151,7 @@ if [ "$BUILD" == "yes" ]; then
bash "${BASEDIR}/scripts/build.bash" bash "${BASEDIR}/scripts/build.bash"
else else
cp ./lotus ${BASEDIR}/bin/ cp ./lotus ${BASEDIR}/bin/
cp ./lotus-storage-miner ${BASEDIR}/bin/ cp ./lotus-miner ${BASEDIR}/bin/
cp ./lotus-seed ${BASEDIR}/bin/ cp ./lotus-seed ${BASEDIR}/bin/
cp ./lotus-shed ${BASEDIR}/bin/ cp ./lotus-shed ${BASEDIR}/bin/
fi fi
@ -186,7 +186,7 @@ export LOTUS_PATH="${BASEDIR}/.lotus"
${BASEDIR}/bin/lotus wait-api ${BASEDIR}/bin/lotus wait-api
tmux send-keys -t $session:$wminer "${BASEDIR}/scripts/create_miner.bash" C-m tmux send-keys -t $session:$wminer "${BASEDIR}/scripts/create_miner.bash" C-m
tmux send-keys -t $session:$wminer "lotus-storage-miner run --api 48020 --nosync 2>&1 | tee -a ${BASEDIR}/miner.log" C-m tmux send-keys -t $session:$wminer "lotus-miner run --api 48020 --nosync 2>&1 | tee -a ${BASEDIR}/miner.log" C-m
tmux send-keys -t $session:$wcli "${BASEDIR}/scripts/monitor.bash" C-m tmux send-keys -t $session:$wcli "${BASEDIR}/scripts/monitor.bash" C-m
tmux send-keys -t $session:$wpleding "${BASEDIR}/scripts/pledge_sectors.bash" C-m tmux send-keys -t $session:$wpleding "${BASEDIR}/scripts/pledge_sectors.bash" C-m

View File

@ -86,12 +86,12 @@ mdt0111=$(mktemp -d)
mdt0222=$(mktemp -d) mdt0222=$(mktemp -d)
mdt0333=$(mktemp -d) mdt0333=$(mktemp -d)
env LOTUS_PATH="${ldt0111}" LOTUS_STORAGE_PATH="${mdt0111}" ./lotus-storage-miner init --genesis-miner --actor=t0111 --pre-sealed-sectors="${sdt0111}" --pre-sealed-metadata="${sdt0111}/pre-seal-t0111.json" --nosync=true --sector-size="${SECTOR_SIZE}" || true env LOTUS_PATH="${ldt0111}" LOTUS_MINER_PATH="${mdt0111}" ./lotus-miner init --genesis-miner --actor=t0111 --pre-sealed-sectors="${sdt0111}" --pre-sealed-metadata="${sdt0111}/pre-seal-t0111.json" --nosync=true --sector-size="${SECTOR_SIZE}" || true
env LOTUS_PATH="${ldt0111}" LOTUS_STORAGE_PATH="${mdt0111}" ./lotus-storage-miner run --nosync & env LOTUS_PATH="${ldt0111}" LOTUS_MINER_PATH="${mdt0111}" ./lotus-miner run --nosync &
mpid=$! mpid=$!
env LOTUS_PATH="${ldt0222}" LOTUS_STORAGE_PATH="${mdt0222}" ./lotus-storage-miner init --actor=t0222 --pre-sealed-sectors="${sdt0222}" --pre-sealed-metadata="${sdt0222}/pre-seal-t0222.json" --nosync=true --sector-size="${SECTOR_SIZE}" || true env LOTUS_PATH="${ldt0222}" LOTUS_MINER_PATH="${mdt0222}" ./lotus-miner init --actor=t0222 --pre-sealed-sectors="${sdt0222}" --pre-sealed-metadata="${sdt0222}/pre-seal-t0222.json" --nosync=true --sector-size="${SECTOR_SIZE}" || true
env LOTUS_PATH="${ldt0333}" LOTUS_STORAGE_PATH="${mdt0333}" ./lotus-storage-miner init --actor=t0333 --pre-sealed-sectors="${sdt0333}" --pre-sealed-metadata="${sdt0333}/pre-seal-t0333.json" --nosync=true --sector-size="${SECTOR_SIZE}" || true env LOTUS_PATH="${ldt0333}" LOTUS_MINER_PATH="${mdt0333}" ./lotus-miner init --actor=t0333 --pre-sealed-sectors="${sdt0333}" --pre-sealed-metadata="${sdt0333}/pre-seal-t0333.json" --nosync=true --sector-size="${SECTOR_SIZE}" || true
kill $mpid kill $mpid
wait $mpid wait $mpid

View File

@ -9,7 +9,7 @@ Environment=GOLOG_LOG_FMT="json"
Environment=LOTUS_DB="" Environment=LOTUS_DB=""
Environment=LOTUS_PATH="%h/.lotus" Environment=LOTUS_PATH="%h/.lotus"
EnvironmentFile=-/etc/lotus/chainwatch.env EnvironmentFile=-/etc/lotus/chainwatch.env
ExecStart=/usr/local/bin/chainwatch run ExecStart=/usr/local/bin/lotus-chainwatch run
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -5,7 +5,7 @@ After=lotus-daemon.service
Requires=lotus-daemon.service Requires=lotus-daemon.service
[Service] [Service]
ExecStart=/usr/local/bin/lotus-storage-miner run ExecStart=/usr/local/bin/lotus-miner run
Environment=GOLOG_FILE="/var/log/lotus/miner.log" Environment=GOLOG_FILE="/var/log/lotus/miner.log"
Environment=GOLOG_LOG_FMT="json" Environment=GOLOG_LOG_FMT="json"

View File

@ -9,15 +9,15 @@ tmux new-window -t $SESSION:1 -n 'Storage Miner'
tmux split-window -h tmux split-window -h
tmux select-pane -t 0 tmux select-pane -t 0
tmux send-keys "watch -n1 './lotus-storage-miner info'" C-m tmux send-keys "watch -n1 './lotus-miner info'" C-m
tmux split-window -v tmux split-window -v
tmux select-pane -t 1 tmux select-pane -t 1
tmux send-keys "watch -n1 './lotus-storage-miner workers list'" C-m tmux send-keys "watch -n1 './lotus-miner workers list'" C-m
tmux select-pane -t 2 tmux select-pane -t 2
tmux send-keys "watch -n1 './lotus-storage-miner storage list'" C-m tmux send-keys "watch -n1 './lotus-miner storage list'" C-m
tmux -2 attach-session -t $SESSION tmux -2 attach-session -t $SESSION

View File

@ -25,8 +25,8 @@ SCRIPTDIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
pushd \$SCRIPTDIR/../build pushd \$SCRIPTDIR/../build
pwd pwd
env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps lotus lotus-storage-miner lotus-shed env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps lotus lotus-miner lotus-shed
cp lotus lotus-storage-miner lotus-shed ../bin/ cp lotus lotus-miner lotus-shed ../bin/
popd popd
EOF EOF
@ -34,13 +34,13 @@ EOF
cat > "${BASEDIR}/scripts/env.fish" <<EOF cat > "${BASEDIR}/scripts/env.fish" <<EOF
set -x PATH ${BASEDIR}/bin \$PATH set -x PATH ${BASEDIR}/bin \$PATH
set -x LOTUS_PATH ${BASEDIR}/.lotus set -x LOTUS_PATH ${BASEDIR}/.lotus
set -x LOTUS_STORAGE_PATH ${BASEDIR}/.lotusstorage set -x LOTUS_MINER_PATH ${BASEDIR}/.lotusstorage
EOF EOF
cat > "${BASEDIR}/scripts/env.bash" <<EOF cat > "${BASEDIR}/scripts/env.bash" <<EOF
export PATH=${BASEDIR}/bin:\$PATH export PATH=${BASEDIR}/bin:\$PATH
export LOTUS_PATH=${BASEDIR}/.lotus export LOTUS_PATH=${BASEDIR}/.lotus
export LOTUS_STORAGE_PATH=${BASEDIR}/.lotusstorage export LOTUS_MINER_PATH=${BASEDIR}/.lotusstorage
EOF EOF
cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF
@ -60,7 +60,7 @@ lotus state wait-msg "\${param[f]}"
maddr=\$(curl "$faucet/msgwaitaddr?cid=\${param[f]}" | jq -r '.addr') maddr=\$(curl "$faucet/msgwaitaddr?cid=\${param[f]}" | jq -r '.addr')
lotus-storage-miner init --actor=\$maddr --owner=\$owner lotus-miner init --actor=\$maddr --owner=\$owner
EOF EOF
cat > "${BASEDIR}/scripts/pledge_sectors.bash" <<EOF cat > "${BASEDIR}/scripts/pledge_sectors.bash" <<EOF
@ -78,16 +78,16 @@ done
sleep 30 sleep 30
sector=\$(lotus-storage-miner sectors list | tail -n1 | awk '{print \$1}' | tr -d ':') sector=\$(lotus-miner sectors list | tail -n1 | awk '{print \$1}' | tr -d ':')
current="\$sector" current="\$sector"
while true; do while true; do
if (( \$(lotus-storage-miner sectors list | wc -l) > ${PLEDGE_COUNT} )); then if (( \$(lotus-miner sectors list | wc -l) > ${PLEDGE_COUNT} )); then
break break
fi fi
while true; do while true; do
state=\$(lotus-storage-miner sectors list | tail -n1 | awk '{print \$2}') state=\$(lotus-miner sectors list | tail -n1 | awk '{print \$2}')
if [ -z "\$state" ]; then if [ -z "\$state" ]; then
break break
@ -97,15 +97,15 @@ while true; do
PreCommit1 | PreCommit2 | Packing | Unsealed | PreCommitting | Committing | CommitWait | FinalizeSector ) sleep 30 ;; PreCommit1 | PreCommit2 | Packing | Unsealed | PreCommitting | Committing | CommitWait | FinalizeSector ) sleep 30 ;;
WaitSeed | Proving ) break ;; WaitSeed | Proving ) break ;;
* ) echo "Unknown Sector State: \$state" * ) echo "Unknown Sector State: \$state"
lotus-storage-miner sectors status --log \$current lotus-miner sectors status --log \$current
break ;; break ;;
esac esac
done done
lotus-storage-miner sectors pledge lotus-miner sectors pledge
while [ "\$current" == "\$sector" ]; do while [ "\$current" == "\$sector" ]; do
sector=\$(lotus-storage-miner sectors list | tail -n1 | awk '{print \$1}' | tr -d ':') sector=\$(lotus-miner sectors list | tail -n1 | awk '{print \$1}' | tr -d ':')
sleep 5 sleep 5
done done
@ -123,12 +123,12 @@ while true; do
echo echo
echo echo
echo Storage Miner Info echo Storage Miner Info
lotus-storage-miner info lotus-miner info
echo echo
echo echo
echo Sector List echo Sector List
lotus-storage-miner sectors list | tail -n4 lotus-miner sectors list | tail -n4
sleep 25 sleep 25
@ -170,7 +170,7 @@ tmux send-keys -t $session:$wdaemon "lotus daemon --api 48010 daemon 2>&1 | tee
sleep 30 sleep 30
tmux send-keys -t $session:$wminer "${BASEDIR}/scripts/create_miner.bash" C-m tmux send-keys -t $session:$wminer "${BASEDIR}/scripts/create_miner.bash" C-m
tmux send-keys -t $session:$wminer "lotus-storage-miner run --api 48020 2>&1 | tee -a ${BASEDIR}/miner.log" C-m tmux send-keys -t $session:$wminer "lotus-miner run --api 48020 2>&1 | tee -a ${BASEDIR}/miner.log" C-m
tmux send-keys -t $session:$wcli "${BASEDIR}/scripts/monitor.bash" C-m tmux send-keys -t $session:$wcli "${BASEDIR}/scripts/monitor.bash" C-m
tmux send-keys -t $session:$wpleding "${BASEDIR}/scripts/pledge_sectors.bash" C-m tmux send-keys -t $session:$wpleding "${BASEDIR}/scripts/pledge_sectors.bash" C-m

View File

@ -3,4 +3,4 @@
HOST=$1 HOST=$1
scp scripts/lotus-daemon.service "${HOST}:/etc/systemd/system/lotus-daemon.service" scp scripts/lotus-daemon.service "${HOST}:/etc/systemd/system/lotus-daemon.service"
scp scripts/lotus-miner.service "${HOST}:/etc/systemd/system/lotus-storage-miner.service" scp scripts/lotus-miner.service "${HOST}:/etc/systemd/system/lotus-miner.service"

View File

@ -9,4 +9,4 @@ _cli_bash_autocomplete() {
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ); COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) );
return 0; return 0;
}; };
complete -F _cli_bash_autocomplete lotus-storage-miner complete -F _cli_bash_autocomplete lotus-miner