fix issue 2304: ux improvements
This commit is contained in:
parent
7d841dbfa8
commit
5b9baba900
@ -93,10 +93,10 @@ jobs:
|
||||
- store_artifacts:
|
||||
path: lotus
|
||||
- store_artifacts:
|
||||
path: lotus-storage-miner
|
||||
path: lotus-miner
|
||||
- store_artifacts:
|
||||
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:
|
||||
root: "."
|
||||
paths:
|
||||
@ -223,10 +223,10 @@ jobs:
|
||||
- store_artifacts:
|
||||
path: lotus
|
||||
- store_artifacts:
|
||||
path: lotus-storage-miner
|
||||
path: lotus-miner
|
||||
- store_artifacts:
|
||||
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:
|
||||
root: "."
|
||||
paths:
|
||||
|
4
.github/ISSUE_TEMPLATE/sealingfailed.md
vendored
4
.github/ISSUE_TEMPLATE/sealingfailed.md
vendored
@ -19,11 +19,11 @@ Including what commands you ran, and a description of your setup, is very helpfu
|
||||
|
||||
**Sectors list**
|
||||
|
||||
The output of `./lotus-storage-miner sectors list`.
|
||||
The output of `./lotus-miner sectors list`.
|
||||
|
||||
**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**
|
||||
|
||||
|
15
.gitignore
vendored
15
.gitignore
vendored
@ -1,19 +1,21 @@
|
||||
/lotus
|
||||
/lotus-storage-miner
|
||||
/lotus-miner
|
||||
/lotus-seal-worker
|
||||
/lotus-seed
|
||||
/lotus-health
|
||||
/lotus-chainwatch
|
||||
/lotus-shed
|
||||
/pond
|
||||
/townhall
|
||||
/fountain
|
||||
/stats
|
||||
/bench
|
||||
/lotus-pond
|
||||
/lotus-townhall
|
||||
/lotus-fountain
|
||||
/lotus-stats
|
||||
/lotus-bench
|
||||
/bench.json
|
||||
/lotuspond/front/node_modules
|
||||
/lotuspond/front/build
|
||||
/cmd/lotus-townhall/townhall/node_modules
|
||||
/cmd/lotus-townhall/townhall/build
|
||||
/cmd/lotus-townhall/townhall/package-lock.json
|
||||
extern/filecoin-ffi/rust/target
|
||||
**/*.a
|
||||
**/*.pc
|
||||
@ -24,7 +26,6 @@ build/paramfetch.sh
|
||||
/vendor
|
||||
/blocks.dot
|
||||
/blocks.svg
|
||||
/chainwatch
|
||||
/chainwatch.db
|
||||
/bundle
|
||||
/darwin
|
||||
|
116
Makefile
116
Makefile
@ -58,10 +58,10 @@ deps: $(BUILD_DEPS)
|
||||
.PHONY: deps
|
||||
|
||||
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: lotus lotus-storage-miner lotus-seal-worker lotus-seed
|
||||
2k: lotus lotus-miner lotus-seal-worker lotus-seed
|
||||
|
||||
lotus: $(BUILD_DEPS)
|
||||
rm -f lotus
|
||||
@ -71,12 +71,12 @@ lotus: $(BUILD_DEPS)
|
||||
.PHONY: lotus
|
||||
BINS+=lotus
|
||||
|
||||
lotus-storage-miner: $(BUILD_DEPS)
|
||||
rm -f lotus-storage-miner
|
||||
go build $(GOFLAGS) -o lotus-storage-miner ./cmd/lotus-storage-miner
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-storage-miner -i ./build
|
||||
.PHONY: lotus-storage-miner
|
||||
BINS+=lotus-storage-miner
|
||||
lotus-miner: $(BUILD_DEPS)
|
||||
rm -f lotus-miner
|
||||
go build $(GOFLAGS) -o lotus-miner ./cmd/lotus-storage-miner
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-miner -i ./build
|
||||
.PHONY: lotus-miner
|
||||
BINS+=lotus-miner
|
||||
|
||||
lotus-seal-worker: $(BUILD_DEPS)
|
||||
rm -f lotus-seal-worker
|
||||
@ -92,7 +92,7 @@ lotus-shed: $(BUILD_DEPS)
|
||||
.PHONY: 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 \
|
||||
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 -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-services: install
|
||||
@ -115,7 +115,7 @@ install-services: install
|
||||
clean-services:
|
||||
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/chainwatch.service
|
||||
rm -f /usr/local/lib/systemd/system/lotus-chainwatch.service
|
||||
systemctl daemon-reload
|
||||
|
||||
# TOOLS
|
||||
@ -134,68 +134,68 @@ benchmarks:
|
||||
@curl -X POST 'http://benchmark.kittyhawk.wtf/benchmark' -d '@bench.json' -u "${benchmark_http_cred}"
|
||||
.PHONY: benchmarks
|
||||
|
||||
pond: 2k
|
||||
go build -o pond ./lotuspond
|
||||
lotus-pond: 2k
|
||||
go build -o lotus-pond ./lotuspond
|
||||
(cd lotuspond/front && npm i && CI=false npm run build)
|
||||
.PHONY: pond
|
||||
BINS+=pond
|
||||
.PHONY: lotus-pond
|
||||
BINS+=lotus-pond
|
||||
|
||||
townhall:
|
||||
rm -f townhall
|
||||
go build -o townhall ./cmd/lotus-townhall
|
||||
lotus-townhall:
|
||||
rm -f lotus-townhall
|
||||
go build -o lotus-townhall ./cmd/lotus-townhall
|
||||
(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
|
||||
.PHONY: townhall
|
||||
BINS+=townhall
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-townhall -i ./cmd/lotus-townhall -i ./build
|
||||
.PHONY: lotus-townhall
|
||||
BINS+=lotus-townhall
|
||||
|
||||
fountain:
|
||||
rm -f fountain
|
||||
go build -o fountain ./cmd/lotus-fountain
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec fountain -i ./cmd/lotus-fountain -i ./build
|
||||
.PHONY: fountain
|
||||
BINS+=fountain
|
||||
lotus-fountain:
|
||||
rm -f lotus-fountain
|
||||
go build -o lotus-fountain ./cmd/lotus-fountain
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-fountain -i ./cmd/lotus-fountain -i ./build
|
||||
.PHONY: lotus-fountain
|
||||
BINS+=lotus-fountain
|
||||
|
||||
chainwatch:
|
||||
rm -f chainwatch
|
||||
go build -o chainwatch ./cmd/lotus-chainwatch
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec chainwatch -i ./cmd/lotus-chainwatch -i ./build
|
||||
.PHONY: chainwatch
|
||||
BINS+=chainwatch
|
||||
lotus-chainwatch:
|
||||
rm -f lotus-chainwatch
|
||||
go build -o lotus-chainwatch ./cmd/lotus-chainwatch
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-chainwatch -i ./cmd/lotus-chainwatch -i ./build
|
||||
.PHONY: lotus-chainwatch
|
||||
BINS+=lotus-chainwatch
|
||||
|
||||
install-chainwatch-service: chainwatch
|
||||
install -C ./chainwatch /usr/local/bin/chainwatch
|
||||
install -C -m 0644 ./scripts/chainwatch.service /usr/local/lib/systemd/system/chainwatch.service
|
||||
mkdir -p /etc/lotus
|
||||
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
|
||||
@echo
|
||||
@echo "chainwatch installed. Don't forget to 'systemctl enable chainwatch' for it to be enabled on startup."
|
||||
|
||||
bench:
|
||||
rm -f bench
|
||||
go build -o bench ./cmd/lotus-bench
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec bench -i ./build
|
||||
.PHONY: bench
|
||||
BINS+=bench
|
||||
lotus-bench:
|
||||
rm -f lotus-bench
|
||||
go build -o lotus-bench ./cmd/lotus-bench
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-bench -i ./build
|
||||
.PHONY: lotus-bench
|
||||
BINS+=lotus-bench
|
||||
|
||||
stats:
|
||||
rm -f stats
|
||||
go build -o stats ./tools/stats
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec stats -i ./build
|
||||
.PHONY: stats
|
||||
BINS+=stats
|
||||
lotus-stats:
|
||||
rm -f lotus-stats
|
||||
go build -o lotus-stats ./tools/stats
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-stats -i ./build
|
||||
.PHONY: lotus-stats
|
||||
BINS+=lotus-stats
|
||||
|
||||
health:
|
||||
lotus-health:
|
||||
rm -f lotus-health
|
||||
go build -o lotus-health ./cmd/lotus-health
|
||||
go run github.com/GeertJohan/go.rice/rice append --exec lotus-health -i ./build
|
||||
.PHONY: lotus-health
|
||||
BINS+=lotus-health
|
||||
|
||||
.PHONY: health
|
||||
BINS+=health
|
||||
lotus-testground:
|
||||
go build -tags lotus-testground -o /dev/null ./cmd/lotus
|
||||
|
||||
testground:
|
||||
go build -tags testground -o /dev/null ./cmd/lotus
|
||||
|
||||
.PHONY: testground
|
||||
BINS+=testground
|
||||
.PHONY: lotus-testground
|
||||
BINS+=lotus-testground
|
||||
|
||||
# MISC
|
||||
|
||||
@ -203,15 +203,15 @@ buildall: $(BINS)
|
||||
|
||||
completions:
|
||||
./scripts/make-completions.sh lotus
|
||||
./scripts/make-completions.sh lotus-storage-miner
|
||||
./scripts/make-completions.sh lotus-miner
|
||||
.PHONY: completions
|
||||
|
||||
install-completions:
|
||||
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-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-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:
|
||||
rm -rf $(CLEAN) $(BINS)
|
||||
|
@ -72,7 +72,7 @@ func flagForRepo(t repo.RepoType) string {
|
||||
case repo.FullNode:
|
||||
return "repo"
|
||||
case repo.StorageMiner:
|
||||
return "storagerepo"
|
||||
return "miner-repo"
|
||||
default:
|
||||
panic(fmt.Sprintf("Unknown repo type: %v", t))
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
<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="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>
|
||||
|
@ -36,7 +36,7 @@ import (
|
||||
|
||||
var log = logging.Logger("main")
|
||||
|
||||
const FlagStorageRepo = "workerrepo"
|
||||
const FlagWorkerRepo = "workerrepo"
|
||||
|
||||
func main() {
|
||||
lotuslog.SetupLogLevels()
|
||||
@ -53,14 +53,14 @@ func main() {
|
||||
Version: build.UserVersion(),
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: FlagStorageRepo,
|
||||
EnvVars: []string{"WORKER_PATH"},
|
||||
Name: FlagWorkerRepo,
|
||||
EnvVars: []string{"LOTUS_SEAL_WORKER_PATH"},
|
||||
Value: "~/.lotusworker", // TODO: Consider XDG_DATA_HOME
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storagerepo",
|
||||
EnvVars: []string{"LOTUS_STORAGE_PATH"},
|
||||
Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME
|
||||
Name: "miner-repo",
|
||||
EnvVars: []string{"LOTUS_MINER_PATH"},
|
||||
Value: "~/.lotusminer", // TODO: Consider XDG_DATA_HOME
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-gpu-proving",
|
||||
@ -143,7 +143,7 @@ var runCmd = &cli.Command{
|
||||
return err
|
||||
}
|
||||
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)
|
||||
|
||||
@ -186,7 +186,7 @@ var runCmd = &cli.Command{
|
||||
|
||||
// Open repo
|
||||
|
||||
repoPath := cctx.String(FlagStorageRepo)
|
||||
repoPath := cctx.String(FlagWorkerRepo)
|
||||
r, err := repo.NewFS(repoPath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -151,7 +151,7 @@ var initCmd = &cli.Command{
|
||||
|
||||
log.Info("Checking if repo exists")
|
||||
|
||||
repoPath := cctx.String(FlagStorageRepo)
|
||||
repoPath := cctx.String(FlagMinerRepo)
|
||||
r, err := repo.NewFS(repoPath)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -162,7 +162,7 @@ var initCmd = &cli.Command{
|
||||
return err
|
||||
}
|
||||
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")
|
||||
@ -236,7 +236,7 @@ var initCmd = &cli.Command{
|
||||
}
|
||||
|
||||
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)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -249,7 +249,7 @@ var initCmd = &cli.Command{
|
||||
}
|
||||
|
||||
// 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
|
||||
},
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
var log = logging.Logger("main")
|
||||
|
||||
const FlagStorageRepo = "storagerepo"
|
||||
const FlagMinerRepo = "miner-repo"
|
||||
|
||||
func main() {
|
||||
lotuslog.SetupLogLevels()
|
||||
@ -61,7 +61,7 @@ func main() {
|
||||
}
|
||||
|
||||
app := &cli.App{
|
||||
Name: "lotus-storage-miner",
|
||||
Name: "lotus-miner",
|
||||
Usage: "Filecoin decentralized storage network storage miner",
|
||||
Version: build.UserVersion(),
|
||||
EnableBashCompletion: true,
|
||||
@ -79,8 +79,8 @@ func main() {
|
||||
Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: FlagStorageRepo,
|
||||
EnvVars: []string{"LOTUS_STORAGE_PATH"},
|
||||
Name: FlagMinerRepo,
|
||||
EnvVars: []string{"LOTUS_MINER_PATH"},
|
||||
Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME
|
||||
},
|
||||
},
|
||||
|
@ -86,8 +86,8 @@ var runCmd = &cli.Command{
|
||||
}
|
||||
}
|
||||
|
||||
storageRepoPath := cctx.String(FlagStorageRepo)
|
||||
r, err := repo.NewFS(storageRepoPath)
|
||||
minerRepoPath := cctx.String(FlagMinerRepo)
|
||||
r, err := repo.NewFS(minerRepoPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -97,7 +97,7 @@ var runCmd = &cli.Command{
|
||||
return err
|
||||
}
|
||||
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{})
|
||||
|
@ -278,7 +278,7 @@ var storageFindCmd = &cli.Command{
|
||||
}
|
||||
|
||||
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)
|
||||
|
@ -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 message’s gas price and consumption, forming a market."
|
||||
},
|
||||
"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."
|
||||
},
|
||||
"swarm-port": {
|
||||
|
@ -72,7 +72,7 @@ To generate a JWT with custom permissions, use this command:
|
||||
lotus auth create-token --perm admin
|
||||
|
||||
# Lotus Storage Miner
|
||||
lotus-storage-miner auth create-token --perm admin
|
||||
lotus-miner auth create-token --perm admin
|
||||
```
|
||||
|
||||
## What authorization level should I use?
|
||||
|
@ -32,7 +32,7 @@ Gossip sub spec and some introduction.
|
||||
|
||||
# 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
|
||||
|
||||
|
@ -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_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?
|
||||
|
||||
|
@ -34,13 +34,13 @@ Then, in another console, import the genesis miner key:
|
||||
Set up the genesis miner:
|
||||
|
||||
```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:
|
||||
|
||||
```sh
|
||||
./lotus-storage-miner run --nosync
|
||||
./lotus-miner run --nosync
|
||||
```
|
||||
|
||||
If all went well, you will have your own local Lotus Devnet running.
|
||||
|
@ -6,7 +6,7 @@ to install a Lotus node and sync to the top of the chain.
|
||||
## 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.
|
||||
|
@ -20,9 +20,9 @@ make lotus-seal-worker
|
||||
|
||||
## 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:
|
||||
|
||||
@ -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.
|
||||
|
||||
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
|
||||
why@computer ~/lotus> lotus-storage-miner workers list
|
||||
why@computer ~/lotus> lotus-miner workers list
|
||||
Worker 0, host computer
|
||||
CPU: [ ] 0 core(s) in use
|
||||
RAM: [|||||||||||||||||| ] 28% 18.1 GiB/62.7 GiB
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
```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)}):
|
||||
```
|
||||
|
||||
@ -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
|
||||
|
||||
```sh
|
||||
lotus-storage-miner sectors pledge
|
||||
lotus-miner sectors pledge
|
||||
# No space left on device (os error 28)
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
```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
|
||||
|
||||
```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.
|
||||
@ -59,7 +59,7 @@ You will have to wait some time for this operation to complete.
|
||||
To mine:
|
||||
|
||||
```sh
|
||||
lotus-storage-miner run
|
||||
lotus-miner run
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```sh
|
||||
lotus-storage-miner info
|
||||
lotus-miner info
|
||||
# example: miner id `t0111`
|
||||
```
|
||||
|
||||
**Seal** random data to start producing **PoSts**:
|
||||
|
||||
```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.
|
||||
@ -94,8 +94,8 @@ lotus state sectors <miner>
|
||||
|
||||
### `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
|
||||
|
||||
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
|
||||
|
@ -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_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`:
|
||||
|
||||
|
@ -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:
|
||||
|
||||
```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**.
|
||||
|
452
lotuspond/front/package-lock.json
generated
452
lotuspond/front/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -127,7 +127,7 @@ class StorageNode extends React.Component {
|
||||
runtime = (
|
||||
<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>
|
||||
{pledgeSector} {sealStaged}
|
||||
</div>
|
||||
|
@ -45,9 +45,9 @@ var onCmd = &cli.Command{
|
||||
"LOTUS_PATH=" + node.Repo,
|
||||
}
|
||||
} else {
|
||||
cmd = exec.Command("./lotus-storage-miner")
|
||||
cmd = exec.Command("./lotus-miner")
|
||||
cmd.Env = []string{
|
||||
"LOTUS_STORAGE_PATH=" + node.Repo,
|
||||
"LOTUS_MINER_PATH=" + node.Repo,
|
||||
"LOTUS_PATH=" + node.FullNode,
|
||||
}
|
||||
}
|
||||
@ -83,7 +83,7 @@ var shCmd = &cli.Command{
|
||||
}
|
||||
} else {
|
||||
shcmd.Env = []string{
|
||||
"LOTUS_STORAGE_PATH=" + node.Repo,
|
||||
"LOTUS_MINER_PATH=" + node.Repo,
|
||||
"LOTUS_PATH=" + node.FullNode,
|
||||
}
|
||||
}
|
||||
|
@ -176,10 +176,10 @@ func (api *api) SpawnStorage(fullNodeRepo string) (nodeInfo, error) {
|
||||
}
|
||||
|
||||
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.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 {
|
||||
return nodeInfo{}, err
|
||||
}
|
||||
@ -188,10 +188,10 @@ func (api *api) SpawnStorage(fullNodeRepo string) (nodeInfo, error) {
|
||||
|
||||
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.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 {
|
||||
return nodeInfo{}, err
|
||||
}
|
||||
@ -248,7 +248,7 @@ func (api *api) RestartNode(id int32) (nodeInfo, error) {
|
||||
|
||||
var cmd *exec.Cmd
|
||||
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 {
|
||||
cmd = exec.Command("./lotus", "daemon", "--api", fmt.Sprintf("%d", 2500+id))
|
||||
}
|
||||
|
@ -7,4 +7,4 @@ _cli_bash_autocomplete() {
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) );
|
||||
return 0;
|
||||
};
|
||||
complete -F _cli_bash_autocomplete lotus-storage-miner
|
||||
complete -F _cli_bash_autocomplete lotus-miner
|
@ -20,7 +20,7 @@ pushd bundle
|
||||
|
||||
BINARIES=(
|
||||
"lotus"
|
||||
"lotus-storage-miner"
|
||||
"lotus-miner"
|
||||
"lotus-seal-worker"
|
||||
)
|
||||
|
||||
|
@ -10,7 +10,7 @@ log "> Deploying bootstrap node $host"
|
||||
log "Stopping lotus daemon"
|
||||
|
||||
ssh "$host" 'systemctl stop lotus-daemon' &
|
||||
ssh "$host" 'systemctl stop lotus-storage-miner' &
|
||||
ssh "$host" 'systemctl stop lotus-miner' &
|
||||
|
||||
wait
|
||||
|
||||
@ -18,7 +18,7 @@ ssh "$host" 'rm -rf .lotus' &
|
||||
ssh "$host" 'rm -rf .lotusstorage' &
|
||||
|
||||
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
|
||||
|
||||
|
@ -14,5 +14,5 @@ echo "SYNC WAIT"
|
||||
sleep 30
|
||||
|
||||
ssh "$HOST" 'lotus sync wait'
|
||||
ssh "$HOST" 'lotus-storage-miner init --owner=$(cat addr)'
|
||||
ssh "$HOST" 'systemctl start lotus-storage-miner' &
|
||||
ssh "$HOST" 'lotus-miner init --owner=$(cat addr)'
|
||||
ssh "$HOST" 'systemctl start lotus-miner' &
|
||||
|
@ -11,7 +11,7 @@ HOST=$1
|
||||
|
||||
FILES_TO_SEND=(
|
||||
./lotus
|
||||
./lotus-storage-miner
|
||||
./lotus-miner
|
||||
scripts/lotus-daemon.service
|
||||
scripts/louts-miner.service
|
||||
)
|
||||
@ -21,14 +21,14 @@ rsync -P "${FILES_TO_SEND[@]}" "$HOST:~/lotus-stage/"
|
||||
ssh "$HOST" 'bash -s' << 'EOF'
|
||||
set -euo pipefail
|
||||
|
||||
systemctl stop lotus-storage-miner
|
||||
systemctl stop lotus-miner
|
||||
systemctl stop lotus-daemon
|
||||
mkdir -p .lotus .lotusstorage
|
||||
|
||||
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-miner.service /etc/systemd/system/lotus-storage-miner.service
|
||||
cp -f lotus-miner.service /etc/systemd/system/lotus-miner.service
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl start lotus-daemon
|
||||
|
@ -7,4 +7,4 @@ export TRUST_PARAMS=1
|
||||
tag=${TAG:-debug}
|
||||
|
||||
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
|
||||
|
@ -42,8 +42,8 @@ SCRIPTDIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
pushd \$SCRIPTDIR/../build
|
||||
|
||||
pwd
|
||||
env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps lotus lotus-storage-miner lotus-shed
|
||||
cp lotus lotus-storage-miner lotus-shed ../bin/
|
||||
env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps lotus lotus-miner lotus-shed
|
||||
cp lotus lotus-miner lotus-shed ../bin/
|
||||
|
||||
popd
|
||||
EOF
|
||||
@ -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_STORAGE_PATH ${BASEDIR}/.lotusstorage
|
||||
set -x LOTUS_MINER_PATH ${BASEDIR}/.lotusstorage
|
||||
EOF
|
||||
|
||||
cat > "${BASEDIR}/scripts/env.bash" <<EOF
|
||||
export PATH=${BASEDIR}/bin:\$PATH
|
||||
export LOTUS_PATH=${BASEDIR}/.lotus
|
||||
export LOTUS_STORAGE_PATH=${BASEDIR}/.lotusstorage
|
||||
export LOTUS_MINER_PATH=${BASEDIR}/.lotusstorage
|
||||
EOF
|
||||
|
||||
cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF
|
||||
@ -65,7 +65,7 @@ cat > "${BASEDIR}/scripts/create_miner.bash" <<EOF
|
||||
set -x
|
||||
|
||||
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
|
||||
|
||||
cat > "${BASEDIR}/scripts/pledge_sectors.bash" <<EOF
|
||||
@ -83,16 +83,16 @@ done
|
||||
|
||||
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"
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
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
|
||||
break
|
||||
@ -102,15 +102,15 @@ while true; do
|
||||
PreCommit1 | PreCommit2 | Packing | Unsealed | PreCommitting | Committing | CommitWait | FinalizeSector ) sleep 30 ;;
|
||||
WaitSeed | Proving ) break ;;
|
||||
* ) echo "Unknown Sector State: \$state"
|
||||
lotus-storage-miner sectors status --log \$current
|
||||
lotus-miner sectors status --log \$current
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
lotus-storage-miner sectors pledge
|
||||
lotus-miner sectors pledge
|
||||
|
||||
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
|
||||
done
|
||||
|
||||
@ -128,12 +128,12 @@ while true; do
|
||||
echo
|
||||
echo
|
||||
echo Storage Miner Info
|
||||
lotus-storage-miner info
|
||||
lotus-miner info
|
||||
|
||||
echo
|
||||
echo
|
||||
echo Sector List
|
||||
lotus-storage-miner sectors list | tail -n4
|
||||
lotus-miner sectors list | tail -n4
|
||||
|
||||
sleep 25
|
||||
|
||||
@ -151,7 +151,7 @@ if [ "$BUILD" == "yes" ]; then
|
||||
bash "${BASEDIR}/scripts/build.bash"
|
||||
else
|
||||
cp ./lotus ${BASEDIR}/bin/
|
||||
cp ./lotus-storage-miner ${BASEDIR}/bin/
|
||||
cp ./lotus-miner ${BASEDIR}/bin/
|
||||
cp ./lotus-seed ${BASEDIR}/bin/
|
||||
cp ./lotus-shed ${BASEDIR}/bin/
|
||||
fi
|
||||
@ -186,7 +186,7 @@ export LOTUS_PATH="${BASEDIR}/.lotus"
|
||||
${BASEDIR}/bin/lotus wait-api
|
||||
|
||||
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:$wpleding "${BASEDIR}/scripts/pledge_sectors.bash" C-m
|
||||
|
||||
|
@ -86,12 +86,12 @@ mdt0111=$(mktemp -d)
|
||||
mdt0222=$(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_STORAGE_PATH="${mdt0111}" ./lotus-storage-miner run --nosync &
|
||||
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_MINER_PATH="${mdt0111}" ./lotus-miner run --nosync &
|
||||
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="${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="${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_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
|
||||
wait $mpid
|
||||
|
@ -9,7 +9,7 @@ Environment=GOLOG_LOG_FMT="json"
|
||||
Environment=LOTUS_DB=""
|
||||
Environment=LOTUS_PATH="%h/.lotus"
|
||||
EnvironmentFile=-/etc/lotus/chainwatch.env
|
||||
ExecStart=/usr/local/bin/chainwatch run
|
||||
ExecStart=/usr/local/bin/lotus-chainwatch run
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -5,7 +5,7 @@ After=lotus-daemon.service
|
||||
Requires=lotus-daemon.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_LOG_FMT="json"
|
||||
|
||||
|
@ -9,15 +9,15 @@ tmux new-window -t $SESSION:1 -n 'Storage Miner'
|
||||
tmux split-window -h
|
||||
|
||||
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 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 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
|
||||
|
@ -25,8 +25,8 @@ SCRIPTDIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
pushd \$SCRIPTDIR/../build
|
||||
|
||||
pwd
|
||||
env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps lotus lotus-storage-miner lotus-shed
|
||||
cp lotus lotus-storage-miner lotus-shed ../bin/
|
||||
env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps lotus lotus-miner lotus-shed
|
||||
cp lotus lotus-miner lotus-shed ../bin/
|
||||
|
||||
popd
|
||||
EOF
|
||||
@ -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_STORAGE_PATH ${BASEDIR}/.lotusstorage
|
||||
set -x LOTUS_MINER_PATH ${BASEDIR}/.lotusstorage
|
||||
EOF
|
||||
|
||||
cat > "${BASEDIR}/scripts/env.bash" <<EOF
|
||||
export PATH=${BASEDIR}/bin:\$PATH
|
||||
export LOTUS_PATH=${BASEDIR}/.lotus
|
||||
export LOTUS_STORAGE_PATH=${BASEDIR}/.lotusstorage
|
||||
export LOTUS_MINER_PATH=${BASEDIR}/.lotusstorage
|
||||
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')
|
||||
|
||||
lotus-storage-miner init --actor=\$maddr --owner=\$owner
|
||||
lotus-miner init --actor=\$maddr --owner=\$owner
|
||||
EOF
|
||||
|
||||
cat > "${BASEDIR}/scripts/pledge_sectors.bash" <<EOF
|
||||
@ -78,16 +78,16 @@ done
|
||||
|
||||
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"
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
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
|
||||
break
|
||||
@ -97,15 +97,15 @@ while true; do
|
||||
PreCommit1 | PreCommit2 | Packing | Unsealed | PreCommitting | Committing | CommitWait | FinalizeSector ) sleep 30 ;;
|
||||
WaitSeed | Proving ) break ;;
|
||||
* ) echo "Unknown Sector State: \$state"
|
||||
lotus-storage-miner sectors status --log \$current
|
||||
lotus-miner sectors status --log \$current
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
lotus-storage-miner sectors pledge
|
||||
lotus-miner sectors pledge
|
||||
|
||||
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
|
||||
done
|
||||
|
||||
@ -123,12 +123,12 @@ while true; do
|
||||
echo
|
||||
echo
|
||||
echo Storage Miner Info
|
||||
lotus-storage-miner info
|
||||
lotus-miner info
|
||||
|
||||
echo
|
||||
echo
|
||||
echo Sector List
|
||||
lotus-storage-miner sectors list | tail -n4
|
||||
lotus-miner sectors list | tail -n4
|
||||
|
||||
sleep 25
|
||||
|
||||
@ -170,7 +170,7 @@ tmux send-keys -t $session:$wdaemon "lotus daemon --api 48010 daemon 2>&1 | tee
|
||||
sleep 30
|
||||
|
||||
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:$wpleding "${BASEDIR}/scripts/pledge_sectors.bash" C-m
|
||||
|
||||
|
@ -3,4 +3,4 @@
|
||||
HOST=$1
|
||||
|
||||
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"
|
||||
|
@ -9,4 +9,4 @@ _cli_bash_autocomplete() {
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) );
|
||||
return 0;
|
||||
};
|
||||
complete -F _cli_bash_autocomplete lotus-storage-miner
|
||||
complete -F _cli_bash_autocomplete lotus-miner
|
Loading…
Reference in New Issue
Block a user