From 39cc536115fb07d0e65675cb5e72b2c34c01e797 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 29 Oct 2020 04:51:08 +0100 Subject: [PATCH 1/8] Add sectors vis Signed-off-by: Jakub Sztandera --- cmd/lotus-shed/sectors.go | 198 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) diff --git a/cmd/lotus-shed/sectors.go b/cmd/lotus-shed/sectors.go index cf40e1152..815b63315 100644 --- a/cmd/lotus-shed/sectors.go +++ b/cmd/lotus-shed/sectors.go @@ -1,8 +1,16 @@ package main import ( + "bytes" + "encoding/base64" "fmt" + "image" + "image/color" + "image/png" + "os" + "sort" "strconv" + "sync" "golang.org/x/xerrors" @@ -10,6 +18,7 @@ import ( "github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" + "github.com/ipfs/go-cid" "github.com/urfave/cli/v2" miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" @@ -18,6 +27,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" + "github.com/filecoin-project/lotus/lib/parmap" ) var sectorsCmd = &cli.Command{ @@ -27,6 +37,7 @@ var sectorsCmd = &cli.Command{ Subcommands: []*cli.Command{ terminateSectorCmd, terminateSectorPenaltyEstimationCmd, + visAllocatedSectorsCmd, }, } @@ -263,3 +274,190 @@ var terminateSectorPenaltyEstimationCmd = &cli.Command{ return nil }, } + +var visAllocatedSectorsCmd = &cli.Command{ + Name: "vis-allocated", + Usage: "Produces a html with visualisation of allocated sectors", + Action: func(cctx *cli.Context) error { + api, closer, err := lcli.GetFullNodeAPI(cctx) + if err != nil { + return err + } + defer closer() + ctx := lcli.ReqContext(cctx) + var miners []address.Address + if cctx.NArg() == 0 { + miners, err = api.StateListMiners(ctx, types.EmptyTSK) + if err != nil { + return err + } + powCache := make(map[address.Address]types.BigInt) + var lk sync.Mutex + parmap.Par(32, miners, func(a address.Address) { + pow, err := api.StateMinerPower(ctx, a, types.EmptyTSK) + if err != nil { + } + + lk.Lock() + if err == nil { + powCache[a] = pow.MinerPower.QualityAdjPower + } else { + powCache[a] = types.NewInt(0) + } + lk.Unlock() + }) + sort.Slice(miners, func(i, j int) bool { + return powCache[miners[i]].GreaterThan(powCache[miners[j]]) + }) + n := sort.Search(len(miners), func(i int) bool { + pow := powCache[miners[i]] + log.Infof("pow @%d = %s", i, pow) + return pow.IsZero() + }) + miners = miners[:n] + } else { + for _, mS := range cctx.Args().Slice() { + mA, err := address.NewFromString(mS) + if err != nil { + return xerrors.Errorf("parsing address '%s': %w", mS, err) + } + miners = append(miners, mA) + } + } + + pngs := make([][]byte, len(miners)) + for i := 0; i < len(miners); i++ { + func() { + state, err := api.StateReadState(ctx, miners[i], types.EmptyTSK) + if err != nil { + log.Errorf("getting state: %+v", err) + return + } + allocSString := state.State.(map[string]interface{})["AllocatedSectors"].(map[string]interface{})["/"].(string) + + allocCid, err := cid.Decode(allocSString) + if err != nil { + log.Errorf("decoding cid: %+v", err) + return + } + rle, err := api.ChainReadObj(ctx, allocCid) + if err != nil { + log.Errorf("reading AllocatedSectors: %+v", err) + return + } + png, err := rleToPng(rle) + if err != nil { + log.Errorf("converting to png: %+v", err) + return + } + pngs[i] = png + encoded := base64.StdEncoding.EncodeToString(pngs[i]) + fmt.Printf(`%s:

`+"\n", miners[i], encoded) + _ = os.Stdout.Sync() + }() + } + + return nil + }, +} + +func rleToPng(rleBytes []byte) ([]byte, error) { + var bf bitfield.BitField + err := bf.UnmarshalCBOR(bytes.NewReader(rleBytes)) + if err != nil { + return nil, xerrors.Errorf("decoding bitfield: %w", err) + } + { + last, err := bf.Last() + if err != nil { + return nil, xerrors.Errorf("getting last: %w", err) + } + if last == 0 { + return nil, nil + } + } + ri, err := bf.RunIterator() + if err != nil { + return nil, xerrors.Errorf("creating interator: %w", err) + } + + const width = 1024 + const skipTh = 128 + const skipSize = 64 + + var size uint64 + for ri.HasNext() { + run, err := ri.NextRun() + if err != nil { + return nil, xerrors.Errorf("getting next run: %w", err) + } + if !run.Val && run.Len > skipTh*width { + size += run.Len%(2*width) + skipSize*width + } else { + size += run.Len + } + } + + img := image.NewRGBA(image.Rect(0, 0, width, int((size+width-1)/width))) + for i := range img.Pix { + img.Pix[i] = 255 + } + + ri, err = bf.RunIterator() + if err != nil { + return nil, xerrors.Errorf("creating interator: %w", err) + } + + const shade = 15 + idx := uint64(0) + realIdx := uint64(0) + for ri.HasNext() { + run, err := ri.NextRun() + if err != nil { + return nil, xerrors.Errorf("getting next run: %w", err) + } + var cut = false + var oldLen uint64 + if !run.Val && run.Len > skipTh*width { + oldLen = run.Len + run.Len = run.Len%(2*width) + skipSize*width + cut = true + } + for i := uint64(0); i < run.Len; i++ { + col := color.Gray{0} + stripe := (realIdx+i)/width%256 >= 128 + if cut && i > skipSize*width/2 { + stripe = (realIdx+i+(skipSize/2*width))/width%256 >= 128 + } + if !run.Val { + col.Y = 255 + if stripe { + col.Y -= shade + } + } else if stripe { + col.Y += shade + } + img.Set(int((idx+i)%width), int((idx+i)/width), col) + } + if cut { + i := (idx + run.Len/2 + width) &^ (width - 1) + iend := i + width + col := color.RGBA{255, 0, 0, 255} + for ; i < iend; i++ { + img.Set(int(i)%width, int(i)/width, col) + } + realIdx += oldLen + idx += run.Len + } else { + realIdx += run.Len + idx += run.Len + } + } + buf := &bytes.Buffer{} + err = png.Encode(buf, img) + if err != nil { + return nil, xerrors.Errorf("encoding png: %w", err) + } + + return buf.Bytes(), nil +} From e615eecbea1e41146dc292eb067e8aa33373a2c9 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 29 Oct 2020 20:33:58 +0100 Subject: [PATCH 2/8] Skip also set sectors Signed-off-by: Jakub Sztandera --- cmd/lotus-shed/sectors.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/lotus-shed/sectors.go b/cmd/lotus-shed/sectors.go index 815b63315..bafbfddb7 100644 --- a/cmd/lotus-shed/sectors.go +++ b/cmd/lotus-shed/sectors.go @@ -382,8 +382,8 @@ func rleToPng(rleBytes []byte) ([]byte, error) { } const width = 1024 - const skipTh = 128 - const skipSize = 64 + const skipTh = 64 + const skipSize = 32 var size uint64 for ri.HasNext() { @@ -391,7 +391,7 @@ func rleToPng(rleBytes []byte) ([]byte, error) { if err != nil { return nil, xerrors.Errorf("getting next run: %w", err) } - if !run.Val && run.Len > skipTh*width { + if run.Len > skipTh*width { size += run.Len%(2*width) + skipSize*width } else { size += run.Len @@ -418,7 +418,7 @@ func rleToPng(rleBytes []byte) ([]byte, error) { } var cut = false var oldLen uint64 - if !run.Val && run.Len > skipTh*width { + if run.Len > skipTh*width { oldLen = run.Len run.Len = run.Len%(2*width) + skipSize*width cut = true From 7832545b7aaf2ce06681a21acf5d11f0b818189b Mon Sep 17 00:00:00 2001 From: Jennifer Wang Date: Fri, 23 Jul 2021 19:04:00 -0400 Subject: [PATCH 3/8] Rebase onto master --- documentation/en/cli-lotus-miner.md | 3 ++- documentation/en/cli-lotus-worker.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/en/cli-lotus-miner.md b/documentation/en/cli-lotus-miner.md index 2ba693bff..7c45d5d43 100644 --- a/documentation/en/cli-lotus-miner.md +++ b/documentation/en/cli-lotus-miner.md @@ -42,7 +42,8 @@ COMMANDS: GLOBAL OPTIONS: --actor value, -a value specify other actor to check state for (read only) --color use color in display output (default: depends on output being a TTY) - --miner-repo value, --storagerepo value Specify miner repo path. flag(storagerepo) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] + --miner-repo value, --storagerepo value Specify miner repo path. flag(storagerepo) and env(LOTUS_STORAGE_PATH) + are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] --help, -h show help (default: false) --version, -v print the version (default: false) ``` diff --git a/documentation/en/cli-lotus-worker.md b/documentation/en/cli-lotus-worker.md index dbfc8da29..f0f29afa0 100644 --- a/documentation/en/cli-lotus-worker.md +++ b/documentation/en/cli-lotus-worker.md @@ -20,7 +20,8 @@ COMMANDS: GLOBAL OPTIONS: --worker-repo value, --workerrepo value Specify worker repo path. flag workerrepo and env WORKER_PATH are DEPRECATION, will REMOVE SOON (default: "~/.lotusworker") [$LOTUS_WORKER_PATH, $WORKER_PATH] - --miner-repo value, --storagerepo value Specify miner repo path. flag storagerepo and env LOTUS_STORAGE_PATH are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] + --miner-repo value, --storagerepo value Specify miner repo path. flag storagerepo and env LOTUS_STORAGE_PATH are + DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] --enable-gpu-proving enable use of GPU for mining operations (default: true) --help, -h show help (default: false) --version, -v print the version (default: false) From 5cb7411c2a005c6305b68be93ab24e75ac29889e Mon Sep 17 00:00:00 2001 From: Jennifer Wang Date: Fri, 23 Jul 2021 19:11:26 -0400 Subject: [PATCH 4/8] docs fix --- documentation/en/cli-lotus-miner.md | 3 +-- documentation/en/cli-lotus-worker.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/documentation/en/cli-lotus-miner.md b/documentation/en/cli-lotus-miner.md index 7c45d5d43..2ba693bff 100644 --- a/documentation/en/cli-lotus-miner.md +++ b/documentation/en/cli-lotus-miner.md @@ -42,8 +42,7 @@ COMMANDS: GLOBAL OPTIONS: --actor value, -a value specify other actor to check state for (read only) --color use color in display output (default: depends on output being a TTY) - --miner-repo value, --storagerepo value Specify miner repo path. flag(storagerepo) and env(LOTUS_STORAGE_PATH) - are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] + --miner-repo value, --storagerepo value Specify miner repo path. flag(storagerepo) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] --help, -h show help (default: false) --version, -v print the version (default: false) ``` diff --git a/documentation/en/cli-lotus-worker.md b/documentation/en/cli-lotus-worker.md index f0f29afa0..dbfc8da29 100644 --- a/documentation/en/cli-lotus-worker.md +++ b/documentation/en/cli-lotus-worker.md @@ -20,8 +20,7 @@ COMMANDS: GLOBAL OPTIONS: --worker-repo value, --workerrepo value Specify worker repo path. flag workerrepo and env WORKER_PATH are DEPRECATION, will REMOVE SOON (default: "~/.lotusworker") [$LOTUS_WORKER_PATH, $WORKER_PATH] - --miner-repo value, --storagerepo value Specify miner repo path. flag storagerepo and env LOTUS_STORAGE_PATH are - DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] + --miner-repo value, --storagerepo value Specify miner repo path. flag storagerepo and env LOTUS_STORAGE_PATH are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] --enable-gpu-proving enable use of GPU for mining operations (default: true) --help, -h show help (default: false) --version, -v print the version (default: false) From 7de866d88182edf1a30bc9c837121176dd4a6d52 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Mon, 26 Jul 2021 16:39:12 +0200 Subject: [PATCH 5/8] lint = happy Signed-off-by: Jakub Sztandera --- cmd/lotus-shed/sectors.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmd/lotus-shed/sectors.go b/cmd/lotus-shed/sectors.go index bafbfddb7..726d992c4 100644 --- a/cmd/lotus-shed/sectors.go +++ b/cmd/lotus-shed/sectors.go @@ -295,8 +295,6 @@ var visAllocatedSectorsCmd = &cli.Command{ var lk sync.Mutex parmap.Par(32, miners, func(a address.Address) { pow, err := api.StateMinerPower(ctx, a, types.EmptyTSK) - if err != nil { - } lk.Lock() if err == nil { From d24b2acc637eacb34812c30355010753c2fd54f8 Mon Sep 17 00:00:00 2001 From: Jennifer Wang Date: Tue, 27 Jul 2021 04:29:17 -0400 Subject: [PATCH 6/8] update to go-fil-market v1.6.0 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d141bd16a..5f968f6e0 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/filecoin-project/go-data-transfer v1.7.0 github.com/filecoin-project/go-fil-commcid v0.1.0 github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 - github.com/filecoin-project/go-fil-markets v1.6.0-rc1.0.20210723225932-46b52248a0f2 + github.com/filecoin-project/go-fil-markets v1.6.0 github.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec github.com/filecoin-project/go-multistore v0.0.3 github.com/filecoin-project/go-padreader v0.0.0-20210723183308-812a16dc01b1 diff --git a/go.sum b/go.sum index 8dd40864e..b22f3dc15 100644 --- a/go.sum +++ b/go.sum @@ -285,8 +285,8 @@ github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+ github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 h1:imrrpZWEHRnNqqv0tN7LXep5bFEVOVmQWHJvl2mgsGo= github.com/filecoin-project/go-fil-commp-hashhash v0.1.0/go.mod h1:73S8WSEWh9vr0fDJVnKADhfIv/d6dCbAGaAGWbdJEI8= github.com/filecoin-project/go-fil-markets v1.0.5-0.20201113164554-c5eba40d5335/go.mod h1:AJySOJC00JRWEZzRG2KsfUnqEf5ITXxeX09BE9N4f9c= -github.com/filecoin-project/go-fil-markets v1.6.0-rc1.0.20210723225932-46b52248a0f2 h1:L5KvfMqZMxST/T4Zu8khwX0K1farbB0w2957ckkbO8A= -github.com/filecoin-project/go-fil-markets v1.6.0-rc1.0.20210723225932-46b52248a0f2/go.mod h1:ZuFDagROUV6GfvBU//KReTQDw+EZci4rH7jMYTD10vs= +github.com/filecoin-project/go-fil-markets v1.6.0 h1:+1usyX7rXz6Ey6hbHd/Fhx616ZvGCI94rW7wneMcptU= +github.com/filecoin-project/go-fil-markets v1.6.0/go.mod h1:ZuFDagROUV6GfvBU//KReTQDw+EZci4rH7jMYTD10vs= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM= From 06d01d7dc02b5b3d3a78537d97a57af35e9436d3 Mon Sep 17 00:00:00 2001 From: Jennifer Wang Date: Mon, 26 Jul 2021 22:57:44 -0400 Subject: [PATCH 7/8] Add github actions for staled pr --- .github/workflows/stale.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 20b2feb8a..16a9feebe 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,7 +2,7 @@ name: Close and mark stale issue on: schedule: - - cron: '0 0 * * *' + - cron: '0 12 * * *' jobs: stale: @@ -18,10 +18,16 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 24 hours.' close-issue-message: 'This issue was closed because it is missing author input.' + stale-pr-message: 'Thank you for submitting the PR and contributing to lotus! Lotus maintainers need more of your input before merging it, please address the suggested changes or reply to the comments or this PR will be closed in 48 hours. You are always more than welcome to reopen the PR later as well!' + close-pr-message: 'This PR was closed because it is missing author input. Please feel free to reopen the PR when you get to it! Thank you for your interest in contributing to lotus!' stale-issue-label: 'kind/stale' - any-of-labels: 'hint/needs-author-input' - days-before-issue-stale: 5 + stale-pr-label: 'kind/stale' + any-of-labels: 'need/author-input ' + days-before-issue-stale: 3 days-before-issue-close: 1 + days-before-pr-stale: 5 + days-before-pr-close: 2 + remove-stale-when-updated: true enable-statistics: true From e0522a6b1fa2a27e7347c3b16575f1d261a40652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Tue, 27 Jul 2021 10:57:23 +0100 Subject: [PATCH 8/8] rename cmd/lotus{-storage=>}-miner to match binary. --- Makefile | 2 +- cmd/{lotus-storage-miner => lotus-miner}/actor.go | 0 cmd/{lotus-storage-miner => lotus-miner}/actor_test.go | 0 cmd/{lotus-storage-miner => lotus-miner}/allinfo_test.go | 0 cmd/{lotus-storage-miner => lotus-miner}/backup.go | 0 cmd/{lotus-storage-miner => lotus-miner}/config.go | 0 cmd/{lotus-storage-miner => lotus-miner}/info.go | 0 cmd/{lotus-storage-miner => lotus-miner}/info_all.go | 0 cmd/{lotus-storage-miner => lotus-miner}/init.go | 0 cmd/{lotus-storage-miner => lotus-miner}/init_restore.go | 0 cmd/{lotus-storage-miner => lotus-miner}/init_service.go | 0 cmd/{lotus-storage-miner => lotus-miner}/main.go | 0 cmd/{lotus-storage-miner => lotus-miner}/market.go | 0 cmd/{lotus-storage-miner => lotus-miner}/pieces.go | 0 cmd/{lotus-storage-miner => lotus-miner}/proving.go | 0 cmd/{lotus-storage-miner => lotus-miner}/retrieval-deals.go | 0 cmd/{lotus-storage-miner => lotus-miner}/run.go | 0 cmd/{lotus-storage-miner => lotus-miner}/sealing.go | 0 cmd/{lotus-storage-miner => lotus-miner}/sectors.go | 0 cmd/{lotus-storage-miner => lotus-miner}/stop.go | 0 cmd/{lotus-storage-miner => lotus-miner}/storage.go | 0 scripts/dev/sminer-init | 2 +- 22 files changed, 2 insertions(+), 2 deletions(-) rename cmd/{lotus-storage-miner => lotus-miner}/actor.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/actor_test.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/allinfo_test.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/backup.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/config.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/info.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/info_all.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/init.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/init_restore.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/init_service.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/main.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/market.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/pieces.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/proving.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/retrieval-deals.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/run.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/sealing.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/sectors.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/stop.go (100%) rename cmd/{lotus-storage-miner => lotus-miner}/storage.go (100%) diff --git a/Makefile b/Makefile index 2e9fa7459..77fd38b9e 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,7 @@ BINS+=lotus lotus-miner: $(BUILD_DEPS) rm -f lotus-miner - go build $(GOFLAGS) -o lotus-miner ./cmd/lotus-storage-miner + go build $(GOFLAGS) -o lotus-miner ./cmd/lotus-miner .PHONY: lotus-miner BINS+=lotus-miner diff --git a/cmd/lotus-storage-miner/actor.go b/cmd/lotus-miner/actor.go similarity index 100% rename from cmd/lotus-storage-miner/actor.go rename to cmd/lotus-miner/actor.go diff --git a/cmd/lotus-storage-miner/actor_test.go b/cmd/lotus-miner/actor_test.go similarity index 100% rename from cmd/lotus-storage-miner/actor_test.go rename to cmd/lotus-miner/actor_test.go diff --git a/cmd/lotus-storage-miner/allinfo_test.go b/cmd/lotus-miner/allinfo_test.go similarity index 100% rename from cmd/lotus-storage-miner/allinfo_test.go rename to cmd/lotus-miner/allinfo_test.go diff --git a/cmd/lotus-storage-miner/backup.go b/cmd/lotus-miner/backup.go similarity index 100% rename from cmd/lotus-storage-miner/backup.go rename to cmd/lotus-miner/backup.go diff --git a/cmd/lotus-storage-miner/config.go b/cmd/lotus-miner/config.go similarity index 100% rename from cmd/lotus-storage-miner/config.go rename to cmd/lotus-miner/config.go diff --git a/cmd/lotus-storage-miner/info.go b/cmd/lotus-miner/info.go similarity index 100% rename from cmd/lotus-storage-miner/info.go rename to cmd/lotus-miner/info.go diff --git a/cmd/lotus-storage-miner/info_all.go b/cmd/lotus-miner/info_all.go similarity index 100% rename from cmd/lotus-storage-miner/info_all.go rename to cmd/lotus-miner/info_all.go diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-miner/init.go similarity index 100% rename from cmd/lotus-storage-miner/init.go rename to cmd/lotus-miner/init.go diff --git a/cmd/lotus-storage-miner/init_restore.go b/cmd/lotus-miner/init_restore.go similarity index 100% rename from cmd/lotus-storage-miner/init_restore.go rename to cmd/lotus-miner/init_restore.go diff --git a/cmd/lotus-storage-miner/init_service.go b/cmd/lotus-miner/init_service.go similarity index 100% rename from cmd/lotus-storage-miner/init_service.go rename to cmd/lotus-miner/init_service.go diff --git a/cmd/lotus-storage-miner/main.go b/cmd/lotus-miner/main.go similarity index 100% rename from cmd/lotus-storage-miner/main.go rename to cmd/lotus-miner/main.go diff --git a/cmd/lotus-storage-miner/market.go b/cmd/lotus-miner/market.go similarity index 100% rename from cmd/lotus-storage-miner/market.go rename to cmd/lotus-miner/market.go diff --git a/cmd/lotus-storage-miner/pieces.go b/cmd/lotus-miner/pieces.go similarity index 100% rename from cmd/lotus-storage-miner/pieces.go rename to cmd/lotus-miner/pieces.go diff --git a/cmd/lotus-storage-miner/proving.go b/cmd/lotus-miner/proving.go similarity index 100% rename from cmd/lotus-storage-miner/proving.go rename to cmd/lotus-miner/proving.go diff --git a/cmd/lotus-storage-miner/retrieval-deals.go b/cmd/lotus-miner/retrieval-deals.go similarity index 100% rename from cmd/lotus-storage-miner/retrieval-deals.go rename to cmd/lotus-miner/retrieval-deals.go diff --git a/cmd/lotus-storage-miner/run.go b/cmd/lotus-miner/run.go similarity index 100% rename from cmd/lotus-storage-miner/run.go rename to cmd/lotus-miner/run.go diff --git a/cmd/lotus-storage-miner/sealing.go b/cmd/lotus-miner/sealing.go similarity index 100% rename from cmd/lotus-storage-miner/sealing.go rename to cmd/lotus-miner/sealing.go diff --git a/cmd/lotus-storage-miner/sectors.go b/cmd/lotus-miner/sectors.go similarity index 100% rename from cmd/lotus-storage-miner/sectors.go rename to cmd/lotus-miner/sectors.go diff --git a/cmd/lotus-storage-miner/stop.go b/cmd/lotus-miner/stop.go similarity index 100% rename from cmd/lotus-storage-miner/stop.go rename to cmd/lotus-miner/stop.go diff --git a/cmd/lotus-storage-miner/storage.go b/cmd/lotus-miner/storage.go similarity index 100% rename from cmd/lotus-storage-miner/storage.go rename to cmd/lotus-miner/storage.go diff --git a/scripts/dev/sminer-init b/scripts/dev/sminer-init index 2f4a3f7af..767921511 100755 --- a/scripts/dev/sminer-init +++ b/scripts/dev/sminer-init @@ -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