From 7f27c80a6a620c181a574e50a9902c37f1255c71 Mon Sep 17 00:00:00 2001 From: vyzo Date: Sat, 15 Aug 2020 21:20:02 +0300 Subject: [PATCH 01/37] move sleep into the select as it is it simply slows down the writer if there are many messages --- cmd/lotus-chainwatch/processor/mpool.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/lotus-chainwatch/processor/mpool.go b/cmd/lotus-chainwatch/processor/mpool.go index ad75baddc..1f5826170 100644 --- a/cmd/lotus-chainwatch/processor/mpool.go +++ b/cmd/lotus-chainwatch/processor/mpool.go @@ -30,11 +30,10 @@ func (p *Processor) subMpool(ctx context.Context) { loop: for { - time.Sleep(10 * time.Millisecond) select { case update := <-sub: updates = append(updates, update) - default: + case <-time.After(10 * time.Millisecond): break loop } } From e3c241e613f6be612f9ce89c3034f6781487524b Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Sat, 15 Aug 2020 21:48:42 -0400 Subject: [PATCH 02/37] Show how to set env vars --- documentation/en/join-testnet.md | 2 +- documentation/en/mining-lotus-worker.md | 2 +- documentation/en/mining.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/en/join-testnet.md b/documentation/en/join-testnet.md index 6354911f2..78db5094a 100644 --- a/documentation/en/join-testnet.md +++ b/documentation/en/join-testnet.md @@ -9,7 +9,7 @@ Anyone can set up a **Lotus Node** and connect to the **Lotus Testnet**. This is If you are trying to use `lotus` 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/" +export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" ``` ## Get started diff --git a/documentation/en/mining-lotus-worker.md b/documentation/en/mining-lotus-worker.md index da9ab0997..81f119262 100644 --- a/documentation/en/mining-lotus-worker.md +++ b/documentation/en/mining-lotus-worker.md @@ -7,7 +7,7 @@ The **Lotus Worker** is an extra process that can offload heavy processing tasks If you are trying to use `lotus-worker` from China. You should set this **environment variable** on your machine: ```sh -IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" +export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" ``` ## Get Started diff --git a/documentation/en/mining.md b/documentation/en/mining.md index 3ecdcc9e8..3a3bef956 100644 --- a/documentation/en/mining.md +++ b/documentation/en/mining.md @@ -9,7 +9,7 @@ It is useful to [join the Testnet](https://docs.lotu.sh/en+join-testnet) prior t 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/" +export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" ``` ## Get started From 10b5e3e576a6b55b0e3f02323ccd427a1c2878c2 Mon Sep 17 00:00:00 2001 From: Dan Shao Date: Sun, 16 Aug 2020 10:20:32 +0800 Subject: [PATCH 03/37] fix typo --- cli/cmd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index e9bf4d5c7..59a0d6c68 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -26,7 +26,7 @@ import ( var log = logging.Logger("cli") const ( - metadataTraceConetxt = "traceContext" + metadataTraceContext = "traceContext" ) // custom CLI error @@ -132,7 +132,7 @@ func GetAPIInfo(ctx *cli.Context, t repo.RepoType) (APIInfo, error) { p, err := homedir.Expand(ctx.String(repoFlag)) if err != nil { - return APIInfo{}, xerrors.Errorf("cound not expand home dir (%s): %w", repoFlag, err) + return APIInfo{}, xerrors.Errorf("could not expand home dir (%s): %w", repoFlag, err) } r, err := repo.NewFS(p) @@ -208,7 +208,7 @@ func GetStorageMinerAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientClose } func DaemonContext(cctx *cli.Context) context.Context { - if mtCtx, ok := cctx.App.Metadata[metadataTraceConetxt]; ok { + if mtCtx, ok := cctx.App.Metadata[metadataTraceContext]; ok { return mtCtx.(context.Context) } From 054fc4a61480c69ac8dac6d0c384ff181d2a518d Mon Sep 17 00:00:00 2001 From: vyzo Date: Sun, 16 Aug 2020 09:57:53 +0300 Subject: [PATCH 04/37] add client command for mpool config --- cli/mpool.go | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/cli/mpool.go b/cli/mpool.go index dff4a8110..62ab06dae 100644 --- a/cli/mpool.go +++ b/cli/mpool.go @@ -24,6 +24,7 @@ var mpoolCmd = &cli.Command{ mpoolStat, mpoolReplaceCmd, mpoolFindCmd, + mpoolConfig, }, } @@ -415,3 +416,48 @@ var mpoolFindCmd = &cli.Command{ return nil }, } + +var mpoolConfig = &cli.Command{ + Name: "config", + Usage: "get or set current mpool configuration", + ArgsUsage: "[new-config]", + Action: func(cctx *cli.Context) error { + if cctx.Args().Len() > 1 { + return cli.ShowCommandHelp(cctx, cctx.Command.Name) + } + + api, closer, err := GetFullNodeAPI(cctx) + if err != nil { + return err + } + defer closer() + + ctx := ReqContext(cctx) + + if cctx.Args().Len() == 0 { + cfg, err := api.MpoolGetConfig(ctx) + if err != nil { + return err + } + + bytes, err := json.Marshal(cfg) + if err != nil { + return err + } + + fmt.Println(string(bytes)) + } else { + cfg := new(types.MpoolConfig) + bytes := []byte(cctx.Args().Get(0)) + + err := json.Unmarshal(bytes, cfg) + if err != nil { + return err + } + + return api.MpoolSetConfig(ctx, cfg) + } + + return nil + }, +} From aa679a735972444d00b8a52104d8083ba42484ed Mon Sep 17 00:00:00 2001 From: vyzo Date: Sun, 16 Aug 2020 10:57:17 +0300 Subject: [PATCH 05/37] add message pool documentation --- documentation/en/.library.json | 12 ++- documentation/en/mpool.md | 155 +++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+), 2 deletions(-) create mode 100644 documentation/en/mpool.md diff --git a/documentation/en/.library.json b/documentation/en/.library.json index 55681b90b..4d348c145 100644 --- a/documentation/en/.library.json +++ b/documentation/en/.library.json @@ -75,8 +75,16 @@ "slug": "en+arch", "github": "en/architecture.md", "value": null, - "posts": [] - }, { + "posts": [ + { + "title": "The Message Pool", + "slug": "en+mpool", + "github": "en/mpool.md", + "value": null + } + ] + }, + { "title": "Storage Mining", "slug": "en+mining", "github": "en/mining.md", diff --git a/documentation/en/mpool.md b/documentation/en/mpool.md new file mode 100644 index 000000000..5ce9742f1 --- /dev/null +++ b/documentation/en/mpool.md @@ -0,0 +1,155 @@ +# The Message Pool + +The Message Pool (mpool) is the component of lotus that handles +pending messages for inclusion in the chain. Messages are added to the +mpool either directly for locally published messages or through pubsub +propagation. Whenever a miner is ready to create a block for a +tipset, it invokes the mpool selection algorithm which selects an +appropriate set of messages such that it optimizes miner reward and +chain capacity. + +## API + +The full node API defines the following methods for interacting with the mpool: +``` + MpoolPending(context.Context, types.TipSetKey) ([]*types.SignedMessage, error) + MpoolSelect(context.Context, types.TipSetKey, float64) ([]*types.SignedMessage, error) + MpoolPush(context.Context, *types.SignedMessage) (cid.Cid, error) + MpoolPushMessage(ctx context.Context, msg *types.Message, spec *MessageSendSpec) (*types.SignedMessage, error) + MpoolGetNonce(context.Context, address.Address) (uint64, error) + MpoolSub(context.Context) (<-chan MpoolUpdate, error) + MpoolGetConfig(context.Context) (*types.MpoolConfig, error) + MpoolSetConfig(context.Context, *types.MpoolConfig) error +``` + +### MpoolPending + +Returns the list of messages that are pending for a tipset. + +### MpoolSelect + +Selects and returns a list of pending messages for inclusion in the next block. + +### MpoolPush + +Pushes a signed message to the mpool; returns the CID of the message. + +### MpoolPushMessage + +Atomically assigns a nonce, signs, and pushes a message to the mpool. + +The MaxFee field of the spec argument is only used when +GasFeeCap/GasPremium fields aren't specified in the message. When +maxFee is set to 0, MpoolPushMessage will guess appropriate fee based +on current chain conditions. + +### MpoolGetNonce + +Returns the next nonce for the specified sender. Note that this method may not be atomic. +Use `MpoolPushMessage` instead. + +### MpoolSub + +Returns a channel to receive notifications about updates to the message pool. +Note that the context *must* be cancelled when the caller is done with the subscription. + +### MpoolGetConfig + +Returns (a copy of) the current mpool configuration. + +### MpoolSetConfig + +Sets the mpool configuration to (a copy of) the supplied configuration object. + + +## Command Line Interfae + +The lotus command line interface defines an `mpool` command which +allows a user to interact with the mpool. + +The following commands are supported: +``` +lotus mpool pending [--local] +lotus mpool sub +lotus mpool stat [--local] +lotus mpool replace [--gas-feecap ] [--gas-premium ] [--gas-limit ] [from] [nonce] +lotus mpool find [--from
] [--to
] [--method ] +lotus mpool config [] +``` + +### lotus mpool pending +Prints the pending messages in the mpool, as returned by the `MpoolPending` API call. +If `--local` is specified, it only prints pending messages for addresses in the local wallet. + +### lotus mpool sub +Subscribes to mpool changes using the `MpoolSub` API call and prints the stream of mpool +updates. + +### lotus mpool stat +Prints various mpool statistics. +If `--local` is specified then only prints statistics for addresses in the local wallet. + +### lotus mpool replace +Replaces a message in the mpool. + +### lotus mpool find +Searches for messages in the mpool. + +### lotus mpool config +Gets or sets the current mpool configuration. + +## Configuration + +The mpool a few parameters that can be configured by the user, either through the API +or the command line interface. + +The config struct is defined as follows: +``` +type MpoolConfig struct { + PriorityAddrs []address.Address + SizeLimitHigh int + SizeLimitLow int + ReplaceByFeeRatio float64 + PruneCooldown time.Duration + GasLimitOverestimation float64 +} + +``` + +The meaning of these fields is as follows: +- `PriorityAddrs` -- these are the addresses of actors whose pending messages should always + be included in a block during message selection, regardless of profitability. + Miners should configure their own worker addresses so that they include their own messages + when they produce a new block. +- `SizeLimitHigh` -- this is the maximum number of pending messages before triggering a + prune in the message pool. Note that messages from priority addresses are never pruned. +- `SizeLimitLow` -- this is the number of pending messages that should be kept after a prune. +- `ReplaceByFeeRatio` -- this is the gas fee ratio for replacing messages in the mpool. + Whenever a message is replaced, the `GasPremium` must be increased by this ratio. +- `PruneCooldown` -- this is the period of time to wait before triggering a new prune. +- `GasLimitOverestimation` -- this is a parameter that controls the gas limit overestimation for new messages. + + +## Message Selection + +A few words regarding message selection are pertinent. In message +selection, a miner selects a set of messages from the pending messages +for inclusion to the next block in order to maximize its reward. The +problem however is NP-hard (it's an instance of knapsack packing), +further confounded by the fact that miners don't communicate their +tickets to each other. So at best we can approximate the optimal +selection in a reasonable amount of time. + +The mpool employs a sophisticated algorithm for selecting messages for +inclusion, given the ticket quality of a miner. The ticket quality +reflects the probability that a block will execute in the +tipset. Given the ticket quality the algorithm computes the +probability of each block, and picks dependent chains of messages such +that the reward is maximized, while also optimizing the capacity of +the chain. If the ticket quality is sufficiently high, then a greedy +selection algorithm is used instead that simply picks dependent chains of +maximum reward. Note that pending message chains from priority addresses +are always selected, regardless of their profitability. + +For algorithm details, please prefer to the implementation in +`chain/messagepool/selection.go`. From fb0ccc92606daf34f9dab54104be72b99a6bbc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Sun, 16 Aug 2020 10:42:13 +0100 Subject: [PATCH 06/37] integrate extern/storage-fsm into lotus proper. --- Makefile | 1 + api/test/deals.go | 2 +- api/test/window_post.go | 2 +- cmd/lotus-storage-miner/info.go | 2 +- cmd/lotus-storage-miner/init.go | 2 +- extern/storage-fsm/.circleci/config.yml | 79 ---- extern/storage-fsm/.gitignore | 24 - extern/storage-fsm/.gitmodules | 4 - extern/storage-fsm/LICENSE-APACHE | 5 - extern/storage-fsm/LICENSE-MIT | 19 - extern/storage-fsm/Makefile | 59 --- extern/storage-fsm/README.md | 18 - extern/storage-fsm/build/.keep | 0 extern/storage-fsm/go.mod | 28 -- extern/storage-fsm/go.sum | 422 ------------------ extern/storage-fsm/parameters.json | 152 ------- go.mod | 4 +- go.sum | 15 +- lib/rpcenc/reader.go | 2 +- lib/rpcenc/reader_test.go | 2 +- markets/storageadapter/provider.go | 2 +- node/builder.go | 2 +- node/impl/storminer.go | 2 +- node/modules/storageminer.go | 2 +- storage/adapter_events.go | 2 +- storage/adapter_storage_miner.go | 2 +- storage/miner.go | 2 +- storage/sealing.go | 2 +- .../sealing}/cbor_gen.go | 4 +- .../storage-fsm => storage/sealing}/checks.go | 0 .../sealing}/constants.go | 0 .../storage-fsm => storage/sealing}/events.go | 0 .../storage-fsm => storage/sealing}/fsm.go | 2 + .../sealing}/fsm_events.go | 0 .../sealing}/fsm_test.go | 0 .../sealing}/garbage.go | 0 .../sealing}/gen/main.go | 2 +- .../sealing}/lib/nullreader/nullreader.go | 0 .../sealing}/nullreader.go | 2 +- .../sealing}/precommit_policy.go | 0 .../sealing}/precommit_policy_test.go | 2 +- .../sealing}/sealing.go | 4 +- .../sealing}/sector_state.go | 0 .../sealing}/states_failed.go | 0 .../sealing}/states_proving.go | 0 .../sealing}/states_sealing.go | 0 .../storage-fsm => storage/sealing}/types.go | 0 .../sealing}/types_test.go | 0 .../sealing}/upgrade_queue.go | 0 .../storage-fsm => storage/sealing}/utils.go | 0 .../sealing}/utils_test.go | 0 storage/sectorblocks/blocks.go | 2 +- 52 files changed, 36 insertions(+), 840 deletions(-) delete mode 100644 extern/storage-fsm/.circleci/config.yml delete mode 100644 extern/storage-fsm/.gitignore delete mode 100644 extern/storage-fsm/.gitmodules delete mode 100644 extern/storage-fsm/LICENSE-APACHE delete mode 100644 extern/storage-fsm/LICENSE-MIT delete mode 100644 extern/storage-fsm/Makefile delete mode 100644 extern/storage-fsm/README.md delete mode 100644 extern/storage-fsm/build/.keep delete mode 100644 extern/storage-fsm/go.mod delete mode 100644 extern/storage-fsm/go.sum delete mode 100644 extern/storage-fsm/parameters.json rename {extern/storage-fsm => storage/sealing}/cbor_gen.go (99%) rename {extern/storage-fsm => storage/sealing}/checks.go (100%) rename {extern/storage-fsm => storage/sealing}/constants.go (100%) rename {extern/storage-fsm => storage/sealing}/events.go (100%) rename {extern/storage-fsm => storage/sealing}/fsm.go (99%) rename {extern/storage-fsm => storage/sealing}/fsm_events.go (100%) rename {extern/storage-fsm => storage/sealing}/fsm_test.go (100%) rename {extern/storage-fsm => storage/sealing}/garbage.go (100%) rename {extern/storage-fsm => storage/sealing}/gen/main.go (85%) rename {extern/storage-fsm => storage/sealing}/lib/nullreader/nullreader.go (100%) rename {extern/storage-fsm => storage/sealing}/nullreader.go (99%) rename {extern/storage-fsm => storage/sealing}/precommit_policy.go (100%) rename {extern/storage-fsm => storage/sealing}/precommit_policy_test.go (98%) rename {extern/storage-fsm => storage/sealing}/sealing.go (99%) rename {extern/storage-fsm => storage/sealing}/sector_state.go (100%) rename {extern/storage-fsm => storage/sealing}/states_failed.go (100%) rename {extern/storage-fsm => storage/sealing}/states_proving.go (100%) rename {extern/storage-fsm => storage/sealing}/states_sealing.go (100%) rename {extern/storage-fsm => storage/sealing}/types.go (100%) rename {extern/storage-fsm => storage/sealing}/types_test.go (100%) rename {extern/storage-fsm => storage/sealing}/upgrade_queue.go (100%) rename {extern/storage-fsm => storage/sealing}/utils.go (100%) rename {extern/storage-fsm => storage/sealing}/utils_test.go (100%) diff --git a/Makefile b/Makefile index 0ef3c2264..2f6983782 100644 --- a/Makefile +++ b/Makefile @@ -272,6 +272,7 @@ dist-clean: type-gen: go run ./gen/main.go + go generate ./... method-gen: (cd ./lotuspond/front/src/chain && go run ./methodgen.go) diff --git a/api/test/deals.go b/api/test/deals.go index 289445083..f3c53933b 100644 --- a/api/test/deals.go +++ b/api/test/deals.go @@ -23,7 +23,7 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/miner" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" dag "github.com/ipfs/go-merkledag" dstest "github.com/ipfs/go-merkledag/test" unixfile "github.com/ipfs/go-unixfs/file" diff --git a/api/test/window_post.go b/api/test/window_post.go index 4ff02afa4..75319f5c0 100644 --- a/api/test/window_post.go +++ b/api/test/window_post.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" + "github.com/filecoin-project/lotus/storage/sealing" "github.com/filecoin-project/sector-storage/mock" "github.com/filecoin-project/specs-actors/actors/abi" miner2 "github.com/filecoin-project/specs-actors/actors/builtin/miner" - sealing "github.com/filecoin-project/storage-fsm" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" diff --git a/cmd/lotus-storage-miner/info.go b/cmd/lotus-storage-miner/info.go index 2010d8cf1..9755ff698 100644 --- a/cmd/lotus-storage-miner/info.go +++ b/cmd/lotus-storage-miner/info.go @@ -11,9 +11,9 @@ import ( "github.com/urfave/cli/v2" "golang.org/x/xerrors" + "github.com/filecoin-project/lotus/storage/sealing" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-actors/actors/builtin/power" - sealing "github.com/filecoin-project/storage-fsm" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 6e21893db..ea99c2c58 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -47,7 +47,7 @@ import ( "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/storage" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" ) var initCmd = &cli.Command{ diff --git a/extern/storage-fsm/.circleci/config.yml b/extern/storage-fsm/.circleci/config.yml deleted file mode 100644 index a7cb9a24b..000000000 --- a/extern/storage-fsm/.circleci/config.yml +++ /dev/null @@ -1,79 +0,0 @@ -version: 2.1 -orbs: - go: gotest/tools@0.0.9 -executors: - golang: - docker: - - image: circleci/golang:1.13 - resource_class: 2xlarge -commands: - prepare-git-checkout: - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init --recursive - install-build-dependencies: - steps: - - run: sudo apt-get update - - run: sudo apt-get install -y jq ocl-icd-opencl-dev - - run: ./extern/filecoin-ffi/install-filcrypto - download-groth-params-and-verifying-keys: - steps: - - restore_cache: - name: Restore parameters cache - keys: - - 'v24-2k-lotus-params' - paths: - - /var/tmp/filecoin-proof-parameters/ - - run: | - DIR=$(pwd) - cd $(mktemp -d) - go get github.com/filecoin-project/go-paramfetch/paramfetch - go build -o go-paramfetch github.com/filecoin-project/go-paramfetch/paramfetch - ./go-paramfetch 2048 "${DIR}/parameters.json" - - save_cache: - name: Save parameters cache - key: 'v24-2k-lotus-params' - paths: - - /var/tmp/filecoin-proof-parameters/ -jobs: - test: - executor: golang - environment: - RUST_LOG: info - steps: - - prepare-git-checkout - - install-build-dependencies - - download-groth-params-and-verifying-keys - - run: go test -v -timeout 10m ./... - mod-tidy-check: - executor: golang - steps: - - prepare-git-checkout - - go/mod-download - - go/mod-tidy-check - gofmt-check: - executor: golang - steps: - - prepare-git-checkout - - go/mod-download - - run: "! go fmt ./... 2>&1 | read" - lint-check: - executor: golang - steps: - - prepare-git-checkout - - install-build-dependencies - - go/mod-download - - go/install-golangci-lint: - gobin: $HOME/.local/bin - version: 1.23.8 - - run: - command: $HOME/.local/bin/golangci-lint run -v --concurrency 2 -workflows: - version: 2.1 - build_and_test: - jobs: - - mod-tidy-check - - lint-check - - gofmt-check - - test diff --git a/extern/storage-fsm/.gitignore b/extern/storage-fsm/.gitignore deleted file mode 100644 index 72fda5716..000000000 --- a/extern/storage-fsm/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# filecoin-ffi assets -*.a -*.h -*.pc - -# build artifacts -build/.filecoin-ffi-install -build/.update-submodules diff --git a/extern/storage-fsm/.gitmodules b/extern/storage-fsm/.gitmodules deleted file mode 100644 index c50b68575..000000000 --- a/extern/storage-fsm/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "extern/filecoin-ffi"] - path = extern/filecoin-ffi - url = git@github.com:filecoin-project/filecoin-ffi - branch = master diff --git a/extern/storage-fsm/LICENSE-APACHE b/extern/storage-fsm/LICENSE-APACHE deleted file mode 100644 index 14478a3b6..000000000 --- a/extern/storage-fsm/LICENSE-APACHE +++ /dev/null @@ -1,5 +0,0 @@ -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/extern/storage-fsm/LICENSE-MIT b/extern/storage-fsm/LICENSE-MIT deleted file mode 100644 index 72dc60d84..000000000 --- a/extern/storage-fsm/LICENSE-MIT +++ /dev/null @@ -1,19 +0,0 @@ -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/extern/storage-fsm/Makefile b/extern/storage-fsm/Makefile deleted file mode 100644 index d22fa2636..000000000 --- a/extern/storage-fsm/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -SHELL=/usr/bin/env bash - -all: build -.PHONY: all - -# git submodules that need to be loaded -SUBMODULES:= - -# things to clean up, e.g. libfilecoin.a -CLEAN:= - -FFI_PATH:=extern/filecoin-ffi/ -FFI_DEPS:=libfilcrypto.a filcrypto.pc filcrypto.h -FFI_DEPS:=$(addprefix $(FFI_PATH),$(FFI_DEPS)) - -$(FFI_DEPS): build/.filecoin-ffi-install ; - -# dummy file that marks the last time the filecoin-ffi project was built -build/.filecoin-ffi-install: $(FFI_PATH) - $(MAKE) -C $(FFI_PATH) $(FFI_DEPS:$(FFI_PATH)%=%) - @touch $@ - -SUBMODULES+=$(FFI_PATH) -BUILD_DEPS+=build/.filecoin-ffi-install -CLEAN+=build/.filecoin-ffi-install - -$(SUBMODULES): build/.update-submodules ; - -# dummy file that marks the last time submodules were updated -build/.update-submodules: - git submodule update --init --recursive - touch $@ - -CLEAN+=build/.update-submodules - -# build and install any upstream dependencies, e.g. filecoin-ffi -deps: $(BUILD_DEPS) -.PHONY: deps - -test: $(BUILD_DEPS) - RUST_LOG=info go test -race -count 1 -v -timeout 120m ./... -.PHONY: test - -lint: $(BUILD_DEPS) - golangci-lint run -v --concurrency 2 --new-from-rev origin/master -.PHONY: lint - -build: $(BUILD_DEPS) - go build -v $(GOFLAGS) ./... -.PHONY: build - -clean: - rm -rf $(CLEAN) - -$(MAKE) -C $(FFI_PATH) clean -.PHONY: clean - -type-gen: - go run ./gen/main.go -.PHONY: type-gen diff --git a/extern/storage-fsm/README.md b/extern/storage-fsm/README.md deleted file mode 100644 index 346bd4614..000000000 --- a/extern/storage-fsm/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# storage-fsm - -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![CircleCI](https://circleci.com/gh/filecoin-project/storage-fsm.svg?style=svg)](https://circleci.com/gh/filecoin-project/storage-fsm) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) - -> A finite state machine used for sector storage - -## Disclaimer - -Please report your issues with regards to storage-fsm at the [lotus issue tracker](https://github.com/filecoin-project/lotus/issues) - -## License - -The Filecoin Project is dual-licensed under Apache 2.0 and MIT terms: - -- Apache License, Version 2.0, ([LICENSE-APACHE](https://github.com/filecoin-project/storage-fsm/blob/master/LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) -- MIT license ([LICENSE-MIT](https://github.com/filecoin-project/storage-fsm/blob/master/LICENSE-MIT) or http://opensource.org/licenses/MIT) diff --git a/extern/storage-fsm/build/.keep b/extern/storage-fsm/build/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/extern/storage-fsm/go.mod b/extern/storage-fsm/go.mod deleted file mode 100644 index 40651421e..000000000 --- a/extern/storage-fsm/go.mod +++ /dev/null @@ -1,28 +0,0 @@ -module github.com/filecoin-project/storage-fsm - -go 1.13 - -require ( - github.com/filecoin-project/go-address v0.0.3 - github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 - github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f - github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 - github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 // indirect - github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7 - github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0 - github.com/filecoin-project/specs-actors v0.8.7-0.20200811223639-8db91253c07a - github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 - github.com/ipfs/go-cid v0.0.7 - github.com/ipfs/go-datastore v0.4.4 - github.com/ipfs/go-log/v2 v2.0.5 - github.com/stretchr/testify v1.6.1 - github.com/whyrusleeping/cbor-gen v0.0.0-20200811225321-4fed70922d45 - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 - gotest.tools v2.2.0+incompatible -) - -replace github.com/golangci/golangci-lint => github.com/golangci/golangci-lint v1.18.0 - -replace github.com/filecoin-project/sector-storage => ../sector-storage - -replace github.com/filecoin-project/filecoin-ffi => ../filecoin-ffi diff --git a/extern/storage-fsm/go.sum b/extern/storage-fsm/go.sum deleted file mode 100644 index 5a454683e..000000000 --- a/extern/storage-fsm/go.sum +++ /dev/null @@ -1,422 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= -github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= -github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk= -github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= -github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= -github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= -github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/fatih/color v1.8.0 h1:5bzFgL+oy7JITMTxUPJ00n7VxmYd/PdMp5mHFX40/RY= -github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= -github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be h1:TooKBwR/g8jG0hZ3lqe9S5sy2vTUcLOZLlz3M5wGn2E= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= -github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e h1:IOoff6yAZSJ5zHCPY2jzGNwQYQU6ygsRVe/cSnJrY+o= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2 h1:jamfsxfK0Q9yCMHt8MPWx7Aa/O9k2Lve8eSc6FILYGQ= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM= -github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= -github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060 h1:/3qjGMn6ukXgZJHsIbuwGL7ipla8DOV3uHZDBJkBYfU= -github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= -github.com/filecoin-project/go-bitfield v0.0.1 h1:Xg/JnrqqE77aJVKdbEyR04n9FZQWhwrN+buDgQCVpZU= -github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= -github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= -github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= -github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= -github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= -github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663 h1:eYxi6vI5CyeXD15X1bB3bledDXbqKxqf0wQzTLgwYwA= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 h1:A256QonvzRaknIIAuWhe/M2dpV2otzs3NBhi5TWa/UA= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7 h1:KAF3WM/xSnl6G6RHX8vDJthg4+e4PSgBh72//6c6Qvc= -github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= -github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= -github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= -github.com/filecoin-project/specs-actors v0.3.0 h1:QxgAuTrZr5TPqjyprZk0nTYW5o0JWpzbb5v+4UHHvN0= -github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= -github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= -github.com/filecoin-project/specs-actors v0.8.7-0.20200811223639-8db91253c07a h1:DIOf9d5S4aBs6jwqGPzNSGhuMjn5w3R4kbHU3NpNBtw= -github.com/filecoin-project/specs-actors v0.8.7-0.20200811223639-8db91253c07a/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= -github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= -github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= -github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= -github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= -github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.4-0.20191112011718-79e75dffeb10/go.mod h1:/BYOuUoxkE+0f6tGzlzMvycuN+5l35VOR4Bpg2sCmds= -github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= -github.com/ipfs/go-cid v0.0.5 h1:o0Ix8e/ql7Zb5UVUJEUfjsWCIY8t48++9lR8qi6oiJU= -github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6 h1:go0y+GcDOGeJIV01FeBsta4FHngoA4Wz7KMeLkXAhMs= -github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= -github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= -github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= -github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= -github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= -github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= -github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= -github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-files v0.0.7 h1:s5BRD12ndahqYifeH1S8Z73zqZhR+3IdKYAG9PiETs0= -github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= -github.com/ipfs/go-ipfs-util v0.0.1 h1:Wz9bL2wB2YBJqggkA4dD7oSmqB4cAnpNbGrlHJulv50= -github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= -github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= -github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669 h1:jIVle1vGSzxyUhseYNEqd7qcDVRrIbJ7UxGwao70cF0= -github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= -github.com/ipfs/go-ipld-format v0.0.2 h1:OVAGlyYT6JPZ0pEfGntFPS40lfrDmaDbQwNHEY2G9Zs= -github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= -github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= -github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA= -github.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I= -github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= -github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= -github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.5 h1:fL4YI+1g5V/b1Yxr1qAiXTMg1H8z9vx/VmJxBuQMHvU= -github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= -github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= -github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= -github.com/jbenet/goprocess v0.1.3 h1:YKyIEECS/XvcfHtBzxtjBBbWK+MbvA6dG8ASiqwvr10= -github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= -github.com/libp2p/go-openssl v0.0.4 h1:d27YZvLoTyMhIN4njrkr8zMDOM4lfpHIp6A+TK9fovg= -github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc= -github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= -github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= -github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= -github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= -github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multibase v0.0.1 h1:PN9/v21eLywrFWdFNsFKaU04kLJzuYzmrJR+ubhT9qA= -github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= -github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= -github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= -github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.13 h1:06x+mk/zj1FoMsgNejLpy6QTvJqlSt/BhLEy87zidlc= -github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= -github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= -github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0 h1:c8R11WC8m7KNMkTv/0+Be8vvwo4I3/Ut9AC2FW8fX3U= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= -github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= -github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830 h1:8kxMKmKzXXL4Ru1nyhvdms/JjWt+3YLpvRb/bAjO/y0= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200206220010-03c9665e2a66/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e h1:JY8o/ebUUrCYetWmjRCNghxC59cOEaili83rxPRQCLw= -github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= -github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c h1:BMg3YUwLEUIYBJoYZVhA4ZDTciXRj6r7ffOCshWrsoE= -github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200811225321-4fed70922d45 h1:2QQ0rYt7Y8NhRPtuAlZMBNdqoVCh2dR6BQAtGJLlZgw= -github.com/whyrusleeping/cbor-gen v0.0.0-20200811225321-4fed70922d45/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= -github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= -github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829 h1:wb7xrDzfkLgPHsSEBm+VSx6aDdi64VtV0xvP0E6j8bk= -github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= -github.com/xorcare/golden v0.6.0 h1:E8emU8bhyMIEpYmgekkTUaw4vtcrRE+Wa0c5wYIcgXc= -github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190302025703-b6889370fb10/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae h1:QoJmnb9uyPCrH8GIg9uRLn4Ta45yhcQtpymCd0AavO8= -golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181130052023-1c3d964395ce/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d h1:F3OmlXCzYtG9YE6tXDnUOlJBzVzHF8EcmZ1yTJlcgIk= -golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVYcSwSjGebuDL6176A1XskgbtNl64NSg+n8= -gopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= -howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -modernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0 h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE= -modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc= -modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0 h1:7ccXrupWZIS3twbUGrtKmHS2DXY6xegFua+6O3xgAFU= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= diff --git a/extern/storage-fsm/parameters.json b/extern/storage-fsm/parameters.json deleted file mode 100644 index 4ca3e6d2d..000000000 --- a/extern/storage-fsm/parameters.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.params": { - "cid": "QmYkygifkXnrnsN4MJsjBFHTQJHx294CyikDgDK8nYxdGh", - "digest": "df3f30442a6d6b4192f5071fb17e820c", - "sector_size": 2048 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.vk": { - "cid": "QmdXyqbmy2bkJA9Kyhh6z25GrTCq48LwX6c1mxPsm54wi7", - "digest": "0bea3951abf9557a3569f68e52a30c6c", - "sector_size": 2048 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0cfb4f178bbb71cf2ecfcd42accce558b27199ab4fb59cb78f2483fe21ef36d9.params": { - "cid": "Qmf5XZZtP5VcYTf65MbKjLVabcS6cYMbr2rFShmfJzh5e5", - "digest": "655e6277638edc8c658094f6f0b33d54", - "sector_size": 536870912 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0cfb4f178bbb71cf2ecfcd42accce558b27199ab4fb59cb78f2483fe21ef36d9.vk": { - "cid": "QmPuhdWnAXBks43emnkqi9FQzyU1gASKyz23zrD27BPGs8", - "digest": "57690e3a6a94c3f704802a674b34f36b", - "sector_size": 536870912 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-3ea05428c9d11689f23529cde32fd30aabd50f7d2c93657c1d3650bca3e8ea9e.params": { - "cid": "QmPNVgTN7N5vDtD5u7ERMTLcvUtrKRBfYVUDr6uW3pKhX7", - "digest": "3d390654f58e603b896ac70c653f5676", - "sector_size": 2048 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-3ea05428c9d11689f23529cde32fd30aabd50f7d2c93657c1d3650bca3e8ea9e.vk": { - "cid": "Qmbj61Zez7v5xA7nSCnmWbyLYznWJDWeusz7Yg8EcgVdoN", - "digest": "8c170a164743c39576a7f47a1b51e6f3", - "sector_size": 2048 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-50c7368dea9593ed0989e70974d28024efa9d156d585b7eea1be22b2e753f331.params": { - "cid": "QmRApb8RZoBK3cqicT7V3ydXg8yVvqPFMPrQNXP33aBihp", - "digest": "b1b58ff9a297b82885e8a7dfb035f83c", - "sector_size": 8388608 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-50c7368dea9593ed0989e70974d28024efa9d156d585b7eea1be22b2e753f331.vk": { - "cid": "QmcytF1dTdqMFoyXi931j1RgmGtLfR9LLLaBznRt1tPQyD", - "digest": "1a09e00c641f192f55af3433a028f050", - "sector_size": 8388608 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-5294475db5237a2e83c3e52fd6c2b03859a1831d45ed08c4f35dbf9a803165a9.params": { - "cid": "QmPvr54tWaVeP4WnekivzUAJitTqsQfvikBvAHNEaDNQSw", - "digest": "9380e41368ed4083dbc922b290d3b786", - "sector_size": 8388608 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-5294475db5237a2e83c3e52fd6c2b03859a1831d45ed08c4f35dbf9a803165a9.vk": { - "cid": "QmXyVLVDRCcxA9SjT7PeK8HFtyxZ2ZH3SHa8KoGLw8VGJt", - "digest": "f0731a7e20f90704bd38fc5d27882f6d", - "sector_size": 8388608 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-7d739b8cf60f1b0709eeebee7730e297683552e4b69cab6984ec0285663c5781.params": { - "cid": "Qmf5f6ko3dqj7qauzXpZqxM9B2x2sL977K6gE2ppNwuJPv", - "digest": "273ebb8c896326b7c292bee8b775fd38", - "sector_size": 536870912 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-7d739b8cf60f1b0709eeebee7730e297683552e4b69cab6984ec0285663c5781.vk": { - "cid": "QmfP3MQe8koW63n5MkDENENVHxib78MJYYyZvbneCsuze8", - "digest": "3dd94da9da64e51b3445bc528d84e76d", - "sector_size": 536870912 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-0-0377ded656c6f524f1618760bffe4e0a1c51d5a70c4509eedae8a27555733edc.params": { - "cid": "QmYEeeCE8uT2bsVkxcqqUYeMmMEbe6rfmo8wQCv7jFHqqm", - "digest": "c947f2021304ed43b7216f7a8436e294", - "sector_size": 34359738368 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-0-0377ded656c6f524f1618760bffe4e0a1c51d5a70c4509eedae8a27555733edc.vk": { - "cid": "QmXB63ExriFjB4ywWnXTnFwCcLFfCeEP3h15qtL5i7F4aX", - "digest": "ab20d7b253e7e9a0d2ccdf7599ec8ec3", - "sector_size": 34359738368 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-0-559e581f022bb4e4ec6e719e563bf0e026ad6de42e56c18714a2c692b1b88d7e.params": { - "cid": "QmW5Yxg3L1NSzuQVcRMHMbG3uvVoi4dTLzVaDpnEUPQpnA", - "digest": "079ba19645828ae42b22b0e3f4866e8d", - "sector_size": 34359738368 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-0-559e581f022bb4e4ec6e719e563bf0e026ad6de42e56c18714a2c692b1b88d7e.vk": { - "cid": "QmQzZ5dJ11tcSBees38WX41tZLXS9BqpEti253m5QcnTNs", - "digest": "c76125a50a7de315165de359b5174ae4", - "sector_size": 34359738368 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-2-2627e4006b67f99cef990c0a47d5426cb7ab0a0ad58fc1061547bf2d28b09def.params": { - "cid": "QmNk3wga1tS53FUu1QnkK8ehWA2cqpCnSEAPv3KLxdJxNa", - "digest": "421e4790c0b80e0107a7ff67acf14084", - "sector_size": 68719476736 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-2-2627e4006b67f99cef990c0a47d5426cb7ab0a0ad58fc1061547bf2d28b09def.vk": { - "cid": "QmVQCHGsrUtbn9RjHs1e6GXfeXDW5m9w4ge48PSX3Z2as2", - "digest": "8b60e9cc1470a6729c687d6cf0a1f79c", - "sector_size": 68719476736 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-2-b62098629d07946e9028127e70295ed996fe3ed25b0f9f88eb610a0ab4385a3c.params": { - "cid": "QmTL3VvydaMFWKvE5VzxjgKsJYgL9JMM4JVYNtQxdj9JK1", - "digest": "2685f31124b22ea6b2857e5a5e87ffa3", - "sector_size": 68719476736 - }, - "v26-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-2-b62098629d07946e9028127e70295ed996fe3ed25b0f9f88eb610a0ab4385a3c.vk": { - "cid": "QmSVWbLqQYbUbbJyfsRMzEib2rfSqMtnPks1Nw22omcBQm", - "digest": "efe703cd2839597c7ca5c2a906b74296", - "sector_size": 68719476736 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-032d3138d22506ec0082ed72b2dcba18df18477904e35bafee82b3793b06832f.params": { - "cid": "QmU9dH31nZZUJnsogR4Ld4ySUcH6wm2RgmGiujwnqtbU6k", - "digest": "fcef8e87ae2afd7a28aae44347b804cf", - "sector_size": 2048 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-032d3138d22506ec0082ed72b2dcba18df18477904e35bafee82b3793b06832f.vk": { - "cid": "QmdJ15DMGPooye5NaPcRfXUdHUDibcN7hKjbmTGuu1K4AQ", - "digest": "2ee2b3518229680db15161d4f582af37", - "sector_size": 2048 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-6babf46ce344ae495d558e7770a585b2382d54f225af8ed0397b8be7c3fcd472.params": { - "cid": "QmZgtxcY3tMXXQxZTA7ZTUDXLVUnfxNcerXgeW4gG2NnfP", - "digest": "3273c7135cb75684248b475781b738ee", - "sector_size": 536870912 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-6babf46ce344ae495d558e7770a585b2382d54f225af8ed0397b8be7c3fcd472.vk": { - "cid": "QmSS6ZkAV2aGZcgKgdPpEEgihXF1ryZX8PSAZDWSoeL1d4", - "digest": "1519b5f61d9044a59f2bdc57537c094b", - "sector_size": 536870912 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-ecd683648512ab1765faa2a5f14bab48f676e633467f0aa8aad4b55dcb0652bb.params": { - "cid": "QmQBGXeiNn6hVwbR6qFarQqiNGDdKk4h9ucfyvcXyfYz2N", - "digest": "7d5f896f435c38e93bcda6dd168d860b", - "sector_size": 8388608 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-ecd683648512ab1765faa2a5f14bab48f676e633467f0aa8aad4b55dcb0652bb.vk": { - "cid": "QmPrZgBVGMckEAeu5eSJnLmiAwcPQjKjZe5ir6VaQ5AxKs", - "digest": "fe6d2de44580a0db5a4934688899b92f", - "sector_size": 8388608 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-8-0-sha256_hasher-82a357d2f2ca81dc61bb45f4a762807aedee1b0a53fd6c4e77b46a01bfef7820.params": { - "cid": "QmZL2cq45XJn5BFzagAZwgFmLrcM1W6CXoiEF9C5j5tjEF", - "digest": "acdfed9f0512bc85a01a9fb871d475d5", - "sector_size": 34359738368 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-8-0-sha256_hasher-82a357d2f2ca81dc61bb45f4a762807aedee1b0a53fd6c4e77b46a01bfef7820.vk": { - "cid": "QmQ4zB7nNa1tDYNifBkExRnZtwtxZw775iaqvVsZyRi6Q2", - "digest": "524a2f3e9d6826593caebc41bb545c40", - "sector_size": 34359738368 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-8-2-sha256_hasher-96f1b4a04c5c51e4759bbf224bbc2ef5a42c7100f16ec0637123f16a845ddfb2.params": { - "cid": "QmY7DitNKXFeLQt9QoVQkfjM1EvRnprqUVxjmkTXkHDNka", - "digest": "f27271c0537ba65ade2ec045f8fbd069", - "sector_size": 68719476736 - }, - "v26-stacked-proof-of-replication-merkletree-poseidon_hasher-8-8-2-sha256_hasher-96f1b4a04c5c51e4759bbf224bbc2ef5a42c7100f16ec0637123f16a845ddfb2.vk": { - "cid": "QmUJsvoCuQ4LszPmeRVAkMYb5qY95ctz3UXKhu8xLzyFKo", - "digest": "576b292938c6c9d0a0e721bd867a543b", - "sector_size": 68719476736 - } -} \ No newline at end of file diff --git a/go.mod b/go.mod index 8f4e9fc16..d2312e887 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,7 @@ require ( github.com/filecoin-project/go-multistore v0.0.3 github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 + github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 github.com/filecoin-project/go-statestore v0.1.0 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0 @@ -130,6 +131,7 @@ require ( golang.org/x/time v0.0.0-20191024005414-555d28b269f0 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.25.0 // indirect + gotest.tools v2.2.0+incompatible launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect ) @@ -139,6 +141,4 @@ replace github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi replace github.com/filecoin-project/sector-storage => ./extern/sector-storage -replace github.com/filecoin-project/storage-fsm => ./extern/storage-fsm - replace github.com/dgraph-io/badger/v2 => github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200716180832-3ab515320794 diff --git a/go.sum b/go.sum index 2eab0cce0..733c4fb2c 100644 --- a/go.sum +++ b/go.sum @@ -228,6 +228,7 @@ github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.1.2 h1:TjLregCoyP1/5lm7WCM0axyV1myIHwbjGa21skuu5tk= github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= @@ -238,6 +239,7 @@ github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMX github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer v0.6.1 h1:EA6X8fSiBRNVVwKm5pA7+njZnBbdqpRtedZagrrwHHI= github.com/filecoin-project/go-data-transfer v0.6.1/go.mod h1:uRYBRKVBVM12CSusBtVrzDHkVw/3DKZpkxKJVP1Ydas= +github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-markets v0.5.6 h1:WmBbV0qBU4NvLJ64xROpzrKUbkZxZqszZiEiCGmCEIY= @@ -251,9 +253,8 @@ github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.m github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 h1:A256QonvzRaknIIAuWhe/M2dpV2otzs3NBhi5TWa/UA= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= +github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7 h1:KAF3WM/xSnl6G6RHX8vDJthg4+e4PSgBh72//6c6Qvc= -github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 h1:Jbburj7Ih2iaJ/o5Q9A+EAeTabME6YII7FLi9SKUf5c= github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= @@ -263,17 +264,18 @@ github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/ github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= +github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923 h1:+H4IG4OjTThljPkMH1ZpynxCulNdx4amEeHoP2GdQJI= github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= -github.com/filecoin-project/specs-actors v0.8.7-0.20200811223639-8db91253c07a h1:DIOf9d5S4aBs6jwqGPzNSGhuMjn5w3R4kbHU3NpNBtw= -github.com/filecoin-project/specs-actors v0.8.7-0.20200811223639-8db91253c07a/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= github.com/filecoin-project/specs-actors v0.9.2 h1:0JG0QLHw8pO6BPqPRe9eQxQW60biHAQsx1rlQ9QbzZ0= github.com/filecoin-project/specs-actors v0.9.2/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f h1:WeMFRLMtAFqUwobouSeYj3pfgYtsSUwi3ztqDzFJMZY= +github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f/go.mod h1:1CGbd11KkHuyWPT+xwwCol1zl/jnlpiKD2L4fzKxaiI= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= @@ -525,6 +527,7 @@ github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CE github.com/ipfs/go-graphsync v0.1.1 h1:bFDAYS0Z48yd8ROPI6f/zIVmJxaDLA6m8cVuJPKC5fE= github.com/ipfs/go-graphsync v0.1.1/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= +github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= @@ -1388,8 +1391,6 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c h1:BMg3YUwLEUIYBJoYZVhA4ZDTciXRj6r7ffOCshWrsoE= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200811225321-4fed70922d45 h1:2QQ0rYt7Y8NhRPtuAlZMBNdqoVCh2dR6BQAtGJLlZgw= -github.com/whyrusleeping/cbor-gen v0.0.0-20200811225321-4fed70922d45/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c h1:otRnI08JoahNBxUFqX3372Ab9GnTj8L5J9iP5ImyxGU= github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= @@ -1502,6 +1503,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1662,6 +1664,7 @@ golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/lib/rpcenc/reader.go b/lib/rpcenc/reader.go index 355bc9767..439f9c318 100644 --- a/lib/rpcenc/reader.go +++ b/lib/rpcenc/reader.go @@ -19,8 +19,8 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/lotus/storage/sealing" "github.com/filecoin-project/specs-actors/actors/abi" - sealing "github.com/filecoin-project/storage-fsm" ) var log = logging.Logger("rpcenc") diff --git a/lib/rpcenc/reader_test.go b/lib/rpcenc/reader_test.go index ec4ead52d..a30d81b10 100644 --- a/lib/rpcenc/reader_test.go +++ b/lib/rpcenc/reader_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-jsonrpc" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" ) type ReaderHandler struct { diff --git a/markets/storageadapter/provider.go b/markets/storageadapter/provider.go index c6d3a2a8f..e14a419dd 100644 --- a/markets/storageadapter/provider.go +++ b/markets/storageadapter/provider.go @@ -31,8 +31,8 @@ import ( "github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/markets/utils" "github.com/filecoin-project/lotus/node/modules/dtypes" + "github.com/filecoin-project/lotus/storage/sealing" "github.com/filecoin-project/lotus/storage/sectorblocks" - sealing "github.com/filecoin-project/storage-fsm" ) var log = logging.Logger("storageadapter") diff --git a/node/builder.go b/node/builder.go index cce2a76e5..b8d091d23 100644 --- a/node/builder.go +++ b/node/builder.go @@ -60,11 +60,11 @@ import ( "github.com/filecoin-project/lotus/paychmgr" "github.com/filecoin-project/lotus/paychmgr/settler" "github.com/filecoin-project/lotus/storage" + "github.com/filecoin-project/lotus/storage/sealing" "github.com/filecoin-project/lotus/storage/sectorblocks" sectorstorage "github.com/filecoin-project/sector-storage" "github.com/filecoin-project/sector-storage/ffiwrapper" "github.com/filecoin-project/sector-storage/stores" - sealing "github.com/filecoin-project/storage-fsm" ) var log = logging.Logger("builder") diff --git a/node/impl/storminer.go b/node/impl/storminer.go index be1f4e0fd..64b5bf1d5 100644 --- a/node/impl/storminer.go +++ b/node/impl/storminer.go @@ -18,12 +18,12 @@ import ( retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket" storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-jsonrpc/auth" + "github.com/filecoin-project/lotus/storage/sealing" sectorstorage "github.com/filecoin-project/sector-storage" "github.com/filecoin-project/sector-storage/ffiwrapper" "github.com/filecoin-project/sector-storage/stores" "github.com/filecoin-project/sector-storage/storiface" "github.com/filecoin-project/specs-actors/actors/abi" - sealing "github.com/filecoin-project/storage-fsm" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/apistruct" diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index 71ec8fc75..4175ae5e1 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -42,11 +42,11 @@ import ( "github.com/filecoin-project/go-multistore" paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-storedcounter" + "github.com/filecoin-project/lotus/storage/sealing" sectorstorage "github.com/filecoin-project/sector-storage" "github.com/filecoin-project/sector-storage/ffiwrapper" "github.com/filecoin-project/sector-storage/stores" "github.com/filecoin-project/specs-actors/actors/abi" - sealing "github.com/filecoin-project/storage-fsm" lapi "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" diff --git a/storage/adapter_events.go b/storage/adapter_events.go index db37f4c0c..f89deea3a 100644 --- a/storage/adapter_events.go +++ b/storage/adapter_events.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/types" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" ) var _ sealing.Events = new(EventsAdapter) diff --git a/storage/adapter_storage_miner.go b/storage/adapter_storage_miner.go index 1fccc361a..a692b4b62 100644 --- a/storage/adapter_storage_miner.go +++ b/storage/adapter_storage_miner.go @@ -23,7 +23,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/types" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" ) var _ sealing.SealingAPI = new(SealingAPIAdapter) diff --git a/storage/miner.go b/storage/miner.go index 006f01632..77c347bf6 100644 --- a/storage/miner.go +++ b/storage/miner.go @@ -26,7 +26,7 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/modules/dtypes" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" ) var log = logging.Logger("storageminer") diff --git a/storage/sealing.go b/storage/sealing.go index 1cbaa075c..964e3d266 100644 --- a/storage/sealing.go +++ b/storage/sealing.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-actors/actors/abi" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" ) // TODO: refactor this to be direct somehow diff --git a/extern/storage-fsm/cbor_gen.go b/storage/sealing/cbor_gen.go similarity index 99% rename from extern/storage-fsm/cbor_gen.go rename to storage/sealing/cbor_gen.go index b686f467a..5a513dbdb 100644 --- a/extern/storage-fsm/cbor_gen.go +++ b/storage/sealing/cbor_gen.go @@ -6,8 +6,8 @@ import ( "fmt" "io" - "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/specs-actors/actors/builtin/miner" + abi "github.com/filecoin-project/specs-actors/actors/abi" + miner "github.com/filecoin-project/specs-actors/actors/builtin/miner" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) diff --git a/extern/storage-fsm/checks.go b/storage/sealing/checks.go similarity index 100% rename from extern/storage-fsm/checks.go rename to storage/sealing/checks.go diff --git a/extern/storage-fsm/constants.go b/storage/sealing/constants.go similarity index 100% rename from extern/storage-fsm/constants.go rename to storage/sealing/constants.go diff --git a/extern/storage-fsm/events.go b/storage/sealing/events.go similarity index 100% rename from extern/storage-fsm/events.go rename to storage/sealing/events.go diff --git a/extern/storage-fsm/fsm.go b/storage/sealing/fsm.go similarity index 99% rename from extern/storage-fsm/fsm.go rename to storage/sealing/fsm.go index 25b8f364a..536de5a5c 100644 --- a/extern/storage-fsm/fsm.go +++ b/storage/sealing/fsm.go @@ -1,3 +1,5 @@ +//go:generate go run ./gen + package sealing import ( diff --git a/extern/storage-fsm/fsm_events.go b/storage/sealing/fsm_events.go similarity index 100% rename from extern/storage-fsm/fsm_events.go rename to storage/sealing/fsm_events.go diff --git a/extern/storage-fsm/fsm_test.go b/storage/sealing/fsm_test.go similarity index 100% rename from extern/storage-fsm/fsm_test.go rename to storage/sealing/fsm_test.go diff --git a/extern/storage-fsm/garbage.go b/storage/sealing/garbage.go similarity index 100% rename from extern/storage-fsm/garbage.go rename to storage/sealing/garbage.go diff --git a/extern/storage-fsm/gen/main.go b/storage/sealing/gen/main.go similarity index 85% rename from extern/storage-fsm/gen/main.go rename to storage/sealing/gen/main.go index 0d5f7507b..4d8f28a1b 100644 --- a/extern/storage-fsm/gen/main.go +++ b/storage/sealing/gen/main.go @@ -6,7 +6,7 @@ import ( gen "github.com/whyrusleeping/cbor-gen" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" ) func main() { diff --git a/extern/storage-fsm/lib/nullreader/nullreader.go b/storage/sealing/lib/nullreader/nullreader.go similarity index 100% rename from extern/storage-fsm/lib/nullreader/nullreader.go rename to storage/sealing/lib/nullreader/nullreader.go diff --git a/extern/storage-fsm/nullreader.go b/storage/sealing/nullreader.go similarity index 99% rename from extern/storage-fsm/nullreader.go rename to storage/sealing/nullreader.go index 518584599..a8e6a5c31 100644 --- a/extern/storage-fsm/nullreader.go +++ b/storage/sealing/nullreader.go @@ -17,4 +17,4 @@ func NewNullReader(size abi.UnpaddedPieceSize) io.Reader { func (m NullReader) NullBytes() int64 { return m.N -} \ No newline at end of file +} diff --git a/extern/storage-fsm/precommit_policy.go b/storage/sealing/precommit_policy.go similarity index 100% rename from extern/storage-fsm/precommit_policy.go rename to storage/sealing/precommit_policy.go diff --git a/extern/storage-fsm/precommit_policy_test.go b/storage/sealing/precommit_policy_test.go similarity index 98% rename from extern/storage-fsm/precommit_policy_test.go rename to storage/sealing/precommit_policy_test.go index 901501cc8..fb93c909b 100644 --- a/extern/storage-fsm/precommit_policy_test.go +++ b/storage/sealing/precommit_policy_test.go @@ -11,7 +11,7 @@ import ( commcid "github.com/filecoin-project/go-fil-commcid" "github.com/filecoin-project/specs-actors/actors/abi" - sealing "github.com/filecoin-project/storage-fsm" + "github.com/filecoin-project/lotus/storage/sealing" ) type fakeChain struct { diff --git a/extern/storage-fsm/sealing.go b/storage/sealing/sealing.go similarity index 99% rename from extern/storage-fsm/sealing.go rename to storage/sealing/sealing.go index c704207f6..a1c931aa4 100644 --- a/extern/storage-fsm/sealing.go +++ b/storage/sealing/sealing.go @@ -74,8 +74,8 @@ type Sealing struct { } type FeeConfig struct { - MaxPreCommitGasFee abi.TokenAmount - MaxCommitGasFee abi.TokenAmount + MaxPreCommitGasFee abi.TokenAmount + MaxCommitGasFee abi.TokenAmount } type UnsealedSectorMap struct { diff --git a/extern/storage-fsm/sector_state.go b/storage/sealing/sector_state.go similarity index 100% rename from extern/storage-fsm/sector_state.go rename to storage/sealing/sector_state.go diff --git a/extern/storage-fsm/states_failed.go b/storage/sealing/states_failed.go similarity index 100% rename from extern/storage-fsm/states_failed.go rename to storage/sealing/states_failed.go diff --git a/extern/storage-fsm/states_proving.go b/storage/sealing/states_proving.go similarity index 100% rename from extern/storage-fsm/states_proving.go rename to storage/sealing/states_proving.go diff --git a/extern/storage-fsm/states_sealing.go b/storage/sealing/states_sealing.go similarity index 100% rename from extern/storage-fsm/states_sealing.go rename to storage/sealing/states_sealing.go diff --git a/extern/storage-fsm/types.go b/storage/sealing/types.go similarity index 100% rename from extern/storage-fsm/types.go rename to storage/sealing/types.go diff --git a/extern/storage-fsm/types_test.go b/storage/sealing/types_test.go similarity index 100% rename from extern/storage-fsm/types_test.go rename to storage/sealing/types_test.go diff --git a/extern/storage-fsm/upgrade_queue.go b/storage/sealing/upgrade_queue.go similarity index 100% rename from extern/storage-fsm/upgrade_queue.go rename to storage/sealing/upgrade_queue.go diff --git a/extern/storage-fsm/utils.go b/storage/sealing/utils.go similarity index 100% rename from extern/storage-fsm/utils.go rename to storage/sealing/utils.go diff --git a/extern/storage-fsm/utils_test.go b/storage/sealing/utils_test.go similarity index 100% rename from extern/storage-fsm/utils_test.go rename to storage/sealing/utils_test.go diff --git a/storage/sectorblocks/blocks.go b/storage/sectorblocks/blocks.go index a5d109cb4..49031b6f1 100644 --- a/storage/sectorblocks/blocks.go +++ b/storage/sectorblocks/blocks.go @@ -15,8 +15,8 @@ import ( "golang.org/x/xerrors" cborutil "github.com/filecoin-project/go-cbor-util" + "github.com/filecoin-project/lotus/storage/sealing" "github.com/filecoin-project/specs-actors/actors/abi" - sealing "github.com/filecoin-project/storage-fsm" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/node/modules/dtypes" From 3c17cd655e1ecf515dddfa62ba9b14d62c36ebdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Sun, 16 Aug 2020 11:09:58 +0100 Subject: [PATCH 07/37] integrate extern/sector-storage into lotus proper. --- api/api_storage.go | 6 +- api/api_worker.go | 6 +- api/apistruct/struct.go | 8 +- api/test/window_post.go | 2 +- chain/gen/gen.go | 2 +- chain/gen/genesis/miners.go | 2 +- chain/stmgr/utils.go | 2 +- chain/sync.go | 2 +- chain/vm/syscalls.go | 2 +- cmd/lotus-bench/import.go | 2 +- cmd/lotus-bench/main.go | 6 +- cmd/lotus-fountain/main.go | 2 +- cmd/lotus-seal-worker/main.go | 10 +- cmd/lotus-seal-worker/rpc.go | 5 +- cmd/lotus-seed/main.go | 2 +- cmd/lotus-seed/seed/seed.go | 8 +- cmd/lotus-storage-miner/init.go | 10 +- cmd/lotus-storage-miner/sealing.go | 2 +- cmd/lotus-storage-miner/storage.go | 4 +- cmd/lotus/daemon.go | 2 +- extern/sector-storage/.circleci/config.yml | 79 ---- extern/sector-storage/.gitignore | 2 - extern/sector-storage/.gitmodules | 4 - extern/sector-storage/LICENSE-APACHE | 5 - extern/sector-storage/LICENSE-MIT | 19 - extern/sector-storage/go.mod | 33 -- extern/sector-storage/go.sum | 384 ------------------ extern/sector-storage/parameters.json | 152 ------- go.mod | 6 +- go.sum | 9 + markets/retrievaladapter/provider.go | 23 +- node/builder.go | 20 +- node/config/def.go | 7 +- node/config/storage.go | 2 +- node/impl/client/client.go | 2 +- node/impl/full/state.go | 2 +- node/impl/remoteworker.go | 4 +- node/impl/storminer.go | 14 +- node/modules/chain.go | 2 +- node/modules/storageminer.go | 20 +- node/node_test.go | 12 +- node/repo/fsrepo.go | 4 +- node/repo/interface.go | 4 +- node/repo/memrepo.go | 4 +- storage/miner.go | 8 +- storage/mockstorage/preseal.go | 6 +- storage/sealing/checks.go | 4 +- storage/sealing/sealing.go | 10 +- storage/sealing/types.go | 4 +- .../sector}/Makefile | 0 .../sector}/README.md | 0 .../sector}/docs/sector-storage.svg | 0 .../sector}/faults.go | 4 +- .../sector}/ffiwrapper/basicfs/fs.go | 4 +- .../sector}/ffiwrapper/config.go | 0 .../sector}/ffiwrapper/files.go | 0 .../sector}/ffiwrapper/partialfile.go | 4 +- .../sector}/ffiwrapper/sealer.go | 0 .../sector}/ffiwrapper/sealer_cgo.go | 8 +- .../sector}/ffiwrapper/sealer_test.go | 4 +- .../sector}/ffiwrapper/types.go | 6 +- .../sector}/ffiwrapper/unseal_ranges.go | 2 +- .../sector}/ffiwrapper/verifier_cgo.go | 2 +- .../sector}/fr32/fr32.go | 0 .../sector}/fr32/fr32_ffi_cmp_test.go | 4 +- .../sector}/fr32/fr32_test.go | 4 +- .../sector}/fr32/readers.go | 0 .../sector}/fr32/readers_test.go | 2 +- .../sector}/fr32/utils.go | 0 .../sector}/fsutil/dealloc_linux.go | 0 .../sector}/fsutil/dealloc_other.go | 0 .../sector}/fsutil/filesize_unix.go | 0 .../sector}/fsutil/statfs.go | 0 .../sector}/fsutil/statfs_unix.go | 0 .../sector}/fsutil/statfs_windows.go | 0 .../sector}/localworker.go | 10 +- .../sector}/manager.go | 12 +- .../sector}/manager_test.go | 10 +- .../sector}/mock/mock.go | 4 +- .../sector}/mock/mock_test.go | 0 .../sector}/mock/util.go | 0 .../sector}/request_queue.go | 2 +- .../sector}/request_queue_test.go | 4 +- .../sector}/resources.go | 4 +- .../sector}/roprov.go | 4 +- .../sector}/sched.go | 6 +- .../sector}/sched_resources.go | 4 +- .../sector}/sched_test.go | 10 +- .../sector}/sched_watch.go | 2 +- .../sector}/sealtasks/task.go | 0 .../sector}/selector_alloc.go | 6 +- .../sector}/selector_existing.go | 6 +- .../sector}/selector_task.go | 6 +- .../sector}/stats.go | 4 +- .../sector}/stores/filetype.go | 0 .../sector}/stores/http_handler.go | 2 +- .../sector}/stores/index.go | 2 +- .../sector}/stores/index_locks.go | 0 .../sector}/stores/index_locks_test.go | 0 .../sector}/stores/index_locks_util.go | 0 .../sector}/stores/interface.go | 2 +- .../sector}/stores/local.go | 2 +- .../sector}/stores/local_test.go | 2 +- .../sector}/stores/remote.go | 6 +- .../sector}/stores/util_unix.go | 0 .../sector}/storiface/ffi.go | 0 .../sector}/storiface/worker.go | 2 +- .../sector}/tarutil/systar.go | 0 .../sector}/testworker_test.go | 10 +- .../sector}/work_tracker.go | 8 +- .../sector}/zerocomm/zerocomm.go | 0 .../sector}/zerocomm/zerocomm_test.go | 4 +- storage/wdpost_sched.go | 6 +- 113 files changed, 223 insertions(+), 891 deletions(-) delete mode 100644 extern/sector-storage/.circleci/config.yml delete mode 100644 extern/sector-storage/.gitignore delete mode 100644 extern/sector-storage/.gitmodules delete mode 100644 extern/sector-storage/LICENSE-APACHE delete mode 100644 extern/sector-storage/LICENSE-MIT delete mode 100644 extern/sector-storage/go.mod delete mode 100644 extern/sector-storage/go.sum delete mode 100644 extern/sector-storage/parameters.json rename {extern/sector-storage => storage/sector}/Makefile (100%) rename {extern/sector-storage => storage/sector}/README.md (100%) rename {extern/sector-storage => storage/sector}/docs/sector-storage.svg (100%) rename {extern/sector-storage => storage/sector}/faults.go (97%) rename {extern/sector-storage => storage/sector}/ffiwrapper/basicfs/fs.go (94%) rename {extern/sector-storage => storage/sector}/ffiwrapper/config.go (100%) rename {extern/sector-storage => storage/sector}/ffiwrapper/files.go (100%) rename {extern/sector-storage => storage/sector}/ffiwrapper/partialfile.go (98%) rename {extern/sector-storage => storage/sector}/ffiwrapper/sealer.go (100%) rename {extern/sector-storage => storage/sector}/ffiwrapper/sealer_cgo.go (98%) rename {extern/sector-storage => storage/sector}/ffiwrapper/sealer_test.go (99%) rename {extern/sector-storage => storage/sector}/ffiwrapper/types.go (89%) rename {extern/sector-storage => storage/sector}/ffiwrapper/unseal_ranges.go (92%) rename {extern/sector-storage => storage/sector}/ffiwrapper/verifier_cgo.go (98%) rename {extern/sector-storage => storage/sector}/fr32/fr32.go (100%) rename {extern/sector-storage => storage/sector}/fr32/fr32_ffi_cmp_test.go (91%) rename {extern/sector-storage => storage/sector}/fr32/fr32_test.go (97%) rename {extern/sector-storage => storage/sector}/fr32/readers.go (100%) rename {extern/sector-storage => storage/sector}/fr32/readers_test.go (90%) rename {extern/sector-storage => storage/sector}/fr32/utils.go (100%) rename {extern/sector-storage => storage/sector}/fsutil/dealloc_linux.go (100%) rename {extern/sector-storage => storage/sector}/fsutil/dealloc_other.go (100%) rename {extern/sector-storage => storage/sector}/fsutil/filesize_unix.go (100%) rename {extern/sector-storage => storage/sector}/fsutil/statfs.go (100%) rename {extern/sector-storage => storage/sector}/fsutil/statfs_unix.go (100%) rename {extern/sector-storage => storage/sector}/fsutil/statfs_windows.go (100%) rename {extern/sector-storage => storage/sector}/localworker.go (97%) rename {extern/sector-storage => storage/sector}/manager.go (97%) rename {extern/sector-storage => storage/sector}/manager_test.go (92%) rename {extern/sector-storage => storage/sector}/mock/mock.go (98%) rename {extern/sector-storage => storage/sector}/mock/mock_test.go (100%) rename {extern/sector-storage => storage/sector}/mock/util.go (100%) rename {extern/sector-storage => storage/sector}/request_queue.go (97%) rename {extern/sector-storage => storage/sector}/request_queue_test.go (93%) rename {extern/sector-storage => storage/sector}/resources.go (98%) rename {extern/sector-storage => storage/sector}/roprov.go (93%) rename {extern/sector-storage => storage/sector}/sched.go (99%) rename {extern/sector-storage => storage/sector}/sched_resources.go (97%) rename {extern/sector-storage => storage/sector}/sched_test.go (97%) rename {extern/sector-storage => storage/sector}/sched_watch.go (98%) rename {extern/sector-storage => storage/sector}/sealtasks/task.go (100%) rename {extern/sector-storage => storage/sector}/selector_alloc.go (91%) rename {extern/sector-storage => storage/sector}/selector_existing.go (92%) rename {extern/sector-storage => storage/sector}/selector_task.go (89%) rename {extern/sector-storage => storage/sector}/stats.go (89%) rename {extern/sector-storage => storage/sector}/stores/filetype.go (100%) rename {extern/sector-storage => storage/sector}/stores/http_handler.go (98%) rename {extern/sector-storage => storage/sector}/stores/index.go (99%) rename {extern/sector-storage => storage/sector}/stores/index_locks.go (100%) rename {extern/sector-storage => storage/sector}/stores/index_locks_test.go (100%) rename {extern/sector-storage => storage/sector}/stores/index_locks_util.go (100%) rename {extern/sector-storage => storage/sector}/stores/interface.go (94%) rename {extern/sector-storage => storage/sector}/stores/local.go (99%) rename {extern/sector-storage => storage/sector}/stores/local_test.go (96%) rename {extern/sector-storage => storage/sector}/stores/remote.go (98%) rename {extern/sector-storage => storage/sector}/stores/util_unix.go (100%) rename {extern/sector-storage => storage/sector}/storiface/ffi.go (100%) rename {extern/sector-storage => storage/sector}/storiface/worker.go (90%) rename {extern/sector-storage => storage/sector}/tarutil/systar.go (100%) rename {extern/sector-storage => storage/sector}/testworker_test.go (93%) rename {extern/sector-storage => storage/sector}/work_tracker.go (94%) rename {extern/sector-storage => storage/sector}/zerocomm/zerocomm.go (100%) rename {extern/sector-storage => storage/sector}/zerocomm/zerocomm_test.go (95%) diff --git a/api/api_storage.go b/api/api_storage.go index 00cf3400d..62bf5f5a4 100644 --- a/api/api_storage.go +++ b/api/api_storage.go @@ -12,9 +12,9 @@ import ( "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/sector-storage/fsutil" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/api/api_worker.go b/api/api_worker.go index 884e0c348..64445becd 100644 --- a/api/api_worker.go +++ b/api/api_worker.go @@ -6,9 +6,9 @@ import ( "github.com/ipfs/go-cid" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index a6c69df25..ec8d7c784 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -16,10 +16,10 @@ import ( "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/go-multistore" marketevents "github.com/filecoin-project/lotus/markets/loggers" - "github.com/filecoin-project/sector-storage/fsutil" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/miner" diff --git a/api/test/window_post.go b/api/test/window_post.go index 75319f5c0..8ced2b00f 100644 --- a/api/test/window_post.go +++ b/api/test/window_post.go @@ -13,7 +13,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/storage/sealing" - "github.com/filecoin-project/sector-storage/mock" + "github.com/filecoin-project/lotus/storage/sector/mock" "github.com/filecoin-project/specs-actors/actors/abi" miner2 "github.com/filecoin-project/specs-actors/actors/builtin/miner" diff --git a/chain/gen/gen.go b/chain/gen/gen.go index d718315c0..a7c1bfda4 100644 --- a/chain/gen/gen.go +++ b/chain/gen/gen.go @@ -38,7 +38,7 @@ import ( "github.com/filecoin-project/lotus/lib/blockstore" "github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/node/repo" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" ) var log = logging.Logger("gen") diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index 85d51fcb8..44a1544ce 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -14,7 +14,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index 42ba1d4de..720b528f3 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -13,7 +13,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin" "github.com/filecoin-project/specs-actors/actors/builtin/account" diff --git a/chain/sync.go b/chain/sync.go index 582446193..0753d79a3 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -24,7 +24,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin" "github.com/filecoin-project/specs-actors/actors/builtin/power" diff --git a/chain/vm/syscalls.go b/chain/vm/syscalls.go index 06bf345f8..1530b8bcd 100644 --- a/chain/vm/syscalls.go +++ b/chain/vm/syscalls.go @@ -23,7 +23,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/runtime" "github.com/filecoin-project/specs-actors/actors/util/adt" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" ) func init() { diff --git a/cmd/lotus-bench/import.go b/cmd/lotus-bench/import.go index 8dbdd9dea..cb3cae628 100644 --- a/cmd/lotus-bench/import.go +++ b/cmd/lotus-bench/import.go @@ -25,7 +25,7 @@ import ( _ "github.com/filecoin-project/lotus/lib/sigs/bls" _ "github.com/filecoin-project/lotus/lib/sigs/secp" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/ipfs/go-datastore" diff --git a/cmd/lotus-bench/main.go b/cmd/lotus-bench/main.go index e3d19d59c..0b163eb79 100644 --- a/cmd/lotus-bench/main.go +++ b/cmd/lotus-bench/main.go @@ -21,9 +21,9 @@ import ( "github.com/filecoin-project/go-address" paramfetch "github.com/filecoin-project/go-paramfetch" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/ffiwrapper/basicfs" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-storage/storage" diff --git a/cmd/lotus-fountain/main.go b/cmd/lotus-fountain/main.go index 4f84760c0..e0c929498 100644 --- a/cmd/lotus-fountain/main.go +++ b/cmd/lotus-fountain/main.go @@ -21,7 +21,7 @@ import ( "github.com/urfave/cli/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" diff --git a/cmd/lotus-seal-worker/main.go b/cmd/lotus-seal-worker/main.go index 128862e0d..9ac16799f 100644 --- a/cmd/lotus-seal-worker/main.go +++ b/cmd/lotus-seal-worker/main.go @@ -22,7 +22,7 @@ import ( "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-jsonrpc/auth" paramfetch "github.com/filecoin-project/go-paramfetch" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/apistruct" @@ -31,9 +31,9 @@ import ( "github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/lib/rpcenc" "github.com/filecoin-project/lotus/node/repo" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" ) var log = logging.Logger("main") @@ -336,7 +336,7 @@ var runCmd = &cli.Command{ // Create / expose the worker workerApi := &worker{ - LocalWorker: sectorstorage.NewLocalWorker(sectorstorage.WorkerConfig{ + LocalWorker: sector.NewLocalWorker(sector.WorkerConfig{ SealProof: spt, TaskTypes: taskTypes, }, remote, localStore, nodeApi), diff --git a/cmd/lotus-seal-worker/rpc.go b/cmd/lotus-seal-worker/rpc.go index 1046056be..7a1632284 100644 --- a/cmd/lotus-seal-worker/rpc.go +++ b/cmd/lotus-seal-worker/rpc.go @@ -5,12 +5,13 @@ import ( "github.com/filecoin-project/specs-storage/storage" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/build" - "github.com/filecoin-project/sector-storage" ) type worker struct { - *sectorstorage.LocalWorker + *sector.LocalWorker } func (w *worker) Version(context.Context) (build.Version, error) { diff --git a/cmd/lotus-seed/main.go b/cmd/lotus-seed/main.go index 67762e4dd..9a2b498e6 100644 --- a/cmd/lotus-seed/main.go +++ b/cmd/lotus-seed/main.go @@ -8,7 +8,7 @@ import ( "os" "github.com/docker/go-units" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" logging "github.com/ipfs/go-log/v2" "github.com/mitchellh/go-homedir" diff --git a/cmd/lotus-seed/seed/seed.go b/cmd/lotus-seed/seed/seed.go index 9fdf9efbf..33dc360e5 100644 --- a/cmd/lotus-seed/seed/seed.go +++ b/cmd/lotus-seed/seed/seed.go @@ -19,7 +19,7 @@ import ( ffi "github.com/filecoin-project/filecoin-ffi" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/sector-storage/zerocomm" + "github.com/filecoin-project/lotus/storage/sector/zerocomm" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -28,9 +28,9 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/genesis" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/ffiwrapper/basicfs" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" + "github.com/filecoin-project/lotus/storage/sector/stores" ) var log = logging.Logger("preseal") diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index ea99c2c58..3802e6925 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -25,9 +25,9 @@ import ( "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" paramfetch "github.com/filecoin-project/go-paramfetch" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin" "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -436,9 +436,9 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api lapi.FullNode, return err } - smgr, err := sectorstorage.New(ctx, lr, stores.NewIndex(), &ffiwrapper.Config{ + smgr, err := sector.New(ctx, lr, stores.NewIndex(), &ffiwrapper.Config{ SealProofType: spt, - }, sectorstorage.SealerConfig{ + }, sector.SealerConfig{ ParallelFetchLimit: 10, AllowPreCommit1: true, AllowPreCommit2: true, diff --git a/cmd/lotus-storage-miner/sealing.go b/cmd/lotus-storage-miner/sealing.go index 25a1ae890..e948c8bf0 100644 --- a/cmd/lotus-storage-miner/sealing.go +++ b/cmd/lotus-storage-miner/sealing.go @@ -13,7 +13,7 @@ import ( "github.com/fatih/color" "github.com/urfave/cli/v2" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" diff --git a/cmd/lotus-storage-miner/storage.go b/cmd/lotus-storage-miner/storage.go index 712962c9b..4a7b8e0a5 100644 --- a/cmd/lotus-storage-miner/storage.go +++ b/cmd/lotus-storage-miner/storage.go @@ -18,8 +18,8 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/sector-storage/fsutil" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/lotus/chain/types" diff --git a/cmd/lotus/daemon.go b/cmd/lotus/daemon.go index 99763dc40..0e0e841a8 100644 --- a/cmd/lotus/daemon.go +++ b/cmd/lotus/daemon.go @@ -39,7 +39,7 @@ import ( "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/repo" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" ) const ( diff --git a/extern/sector-storage/.circleci/config.yml b/extern/sector-storage/.circleci/config.yml deleted file mode 100644 index 339fd4d4d..000000000 --- a/extern/sector-storage/.circleci/config.yml +++ /dev/null @@ -1,79 +0,0 @@ -version: 2.1 -orbs: - go: gotest/tools@0.0.9 -executors: - golang: - docker: - - image: circleci/golang:1.13 - resource_class: 2xlarge -commands: - prepare-git-checkout: - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init --recursive - install-build-dependencies: - steps: - - run: sudo apt-get update - - run: sudo apt-get install -y jq ocl-icd-opencl-dev - - run: ./extern/filecoin-ffi/install-filcrypto - download-groth-params-and-verifying-keys: - steps: - - restore_cache: - name: Restore parameters cache - keys: - - 'v26a-2k-lotus-params' - paths: - - /var/tmp/filecoin-proof-parameters/ - - run: | - DIR=$(pwd) - cd $(mktemp -d) - go get github.com/filecoin-project/go-paramfetch/paramfetch - go build -o go-paramfetch github.com/filecoin-project/go-paramfetch/paramfetch - ./go-paramfetch 2048 "${DIR}/parameters.json" - - save_cache: - name: Save parameters cache - key: 'v26a-2k-lotus-params' - paths: - - /var/tmp/filecoin-proof-parameters/ -jobs: - test: - executor: golang - environment: - RUST_LOG: info - steps: - - prepare-git-checkout - - install-build-dependencies - - download-groth-params-and-verifying-keys - - run: go test -v -timeout 10m ./... - mod-tidy-check: - executor: golang - steps: - - prepare-git-checkout - - go/mod-download - - go/mod-tidy-check - gofmt-check: - executor: golang - steps: - - prepare-git-checkout - - go/mod-download - - run: "! go fmt ./... 2>&1 | read" - lint-check: - executor: golang - steps: - - prepare-git-checkout - - install-build-dependencies - - go/mod-download - - go/install-golangci-lint: - gobin: $HOME/.local/bin - version: 1.23.8 - - run: - command: $HOME/.local/bin/golangci-lint run -v --concurrency 2 -workflows: - version: 2.1 - build_and_test: - jobs: - - mod-tidy-check - - lint-check - - gofmt-check - - test diff --git a/extern/sector-storage/.gitignore b/extern/sector-storage/.gitignore deleted file mode 100644 index c90dde94c..000000000 --- a/extern/sector-storage/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.update-modules -.filecoin-build diff --git a/extern/sector-storage/.gitmodules b/extern/sector-storage/.gitmodules deleted file mode 100644 index a655f05b9..000000000 --- a/extern/sector-storage/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "extern/filecoin-ffi"] - path = extern/filecoin-ffi - url = https://github.com/filecoin-project/filecoin-ffi.git - branch = master diff --git a/extern/sector-storage/LICENSE-APACHE b/extern/sector-storage/LICENSE-APACHE deleted file mode 100644 index 14478a3b6..000000000 --- a/extern/sector-storage/LICENSE-APACHE +++ /dev/null @@ -1,5 +0,0 @@ -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/extern/sector-storage/LICENSE-MIT b/extern/sector-storage/LICENSE-MIT deleted file mode 100644 index 72dc60d84..000000000 --- a/extern/sector-storage/LICENSE-MIT +++ /dev/null @@ -1,19 +0,0 @@ -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/extern/sector-storage/go.mod b/extern/sector-storage/go.mod deleted file mode 100644 index 1b5eb271e..000000000 --- a/extern/sector-storage/go.mod +++ /dev/null @@ -1,33 +0,0 @@ -module github.com/filecoin-project/sector-storage - -go 1.13 - -require ( - github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e - github.com/elastic/go-sysinfo v1.3.0 - github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d - github.com/filecoin-project/go-bitfield v0.1.2 - github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f - github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663 - github.com/filecoin-project/specs-actors v0.8.2 - github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea - github.com/google/uuid v1.1.1 - github.com/gorilla/mux v1.7.4 - github.com/hashicorp/go-multierror v1.0.0 - github.com/ipfs/go-cid v0.0.6 - github.com/ipfs/go-ipfs-files v0.0.7 - github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669 // indirect - github.com/ipfs/go-log v1.0.4 - github.com/ipfs/go-log/v2 v2.0.5 - github.com/mattn/go-isatty v0.0.9 // indirect - github.com/mitchellh/go-homedir v1.1.0 - github.com/stretchr/testify v1.6.1 - go.opencensus.io v0.22.3 - golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect - golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 - honnef.co/go/tools v0.0.1-2020.1.3 // indirect -) - -replace github.com/filecoin-project/storage-fsm => ../storage-fsm - -replace github.com/filecoin-project/filecoin-ffi => ../filecoin-ffi diff --git a/extern/sector-storage/go.sum b/extern/sector-storage/go.sum deleted file mode 100644 index 411dc20db..000000000 --- a/extern/sector-storage/go.sum +++ /dev/null @@ -1,384 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= -github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= -github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk= -github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= -github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= -github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= -github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/fatih/color v1.8.0 h1:5bzFgL+oy7JITMTxUPJ00n7VxmYd/PdMp5mHFX40/RY= -github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be h1:TooKBwR/g8jG0hZ3lqe9S5sy2vTUcLOZLlz3M5wGn2E= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= -github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= -github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.1.2 h1:TjLregCoyP1/5lm7WCM0axyV1myIHwbjGa21skuu5tk= -github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663 h1:eYxi6vI5CyeXD15X1bB3bledDXbqKxqf0wQzTLgwYwA= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= -github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.8.2 h1:fpAPOPqWqmzJCWHpm6P1XDRSpQrxyY5Pzh5H3doYs7Q= -github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= -github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= -github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= -github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= -github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.5 h1:o0Ix8e/ql7Zb5UVUJEUfjsWCIY8t48++9lR8qi6oiJU= -github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6 h1:go0y+GcDOGeJIV01FeBsta4FHngoA4Wz7KMeLkXAhMs= -github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= -github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= -github.com/ipfs/go-ipfs-files v0.0.7 h1:s5BRD12ndahqYifeH1S8Z73zqZhR+3IdKYAG9PiETs0= -github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= -github.com/ipfs/go-ipfs-util v0.0.1 h1:Wz9bL2wB2YBJqggkA4dD7oSmqB4cAnpNbGrlHJulv50= -github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= -github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= -github.com/ipfs/go-ipld-cbor v0.0.4 h1:Aw3KPOKXjvrm6VjwJvFf1F1ekR/BH3jdof3Bk7OTiSA= -github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669 h1:jIVle1vGSzxyUhseYNEqd7qcDVRrIbJ7UxGwao70cF0= -github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-format v0.0.1 h1:HCu4eB/Gh+KD/Q0M8u888RFkorTWNIL3da4oc5dwc80= -github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= -github.com/ipfs/go-ipld-format v0.0.2 h1:OVAGlyYT6JPZ0pEfGntFPS40lfrDmaDbQwNHEY2G9Zs= -github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= -github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= -github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA= -github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= -github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= -github.com/ipfs/go-log/v2 v2.0.5 h1:fL4YI+1g5V/b1Yxr1qAiXTMg1H8z9vx/VmJxBuQMHvU= -github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= -github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= -github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= -github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc= -github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= -github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= -github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= -github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= -github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multibase v0.0.1 h1:PN9/v21eLywrFWdFNsFKaU04kLJzuYzmrJR+ubhT9qA= -github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= -github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= -github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= -github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.13 h1:06x+mk/zj1FoMsgNejLpy6QTvJqlSt/BhLEy87zidlc= -github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= -github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= -github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1 h1:CskT+S6Ay54OwxBGB0R3Rsx4Muto6UnEYTyKJbyRIAI= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0 h1:c8R11WC8m7KNMkTv/0+Be8vvwo4I3/Ut9AC2FW8fX3U= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= -github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa h1:E+gaaifzi2xF65PbDmuKI3PhLWY6G5opMLniFq8vmXA= -github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= -github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436 h1:qOpVTI+BrstcjTZLm2Yz/3sOnqkzj3FQoh0g+E5s3Gc= -github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830 h1:8kxMKmKzXXL4Ru1nyhvdms/JjWt+3YLpvRb/bAjO/y0= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e h1:JY8o/ebUUrCYetWmjRCNghxC59cOEaili83rxPRQCLw= -github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= -github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377 h1:LHFlP/ktDvOnCap7PsT87cs7Gwd0p+qv6Qm5g2ZPR+I= -github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= -github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= -github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829 h1:wb7xrDzfkLgPHsSEBm+VSx6aDdi64VtV0xvP0E6j8bk= -github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= -github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.4.0 h1:f3WCSC2KzAcBXGATIxAB1E2XuCpNU255wNKZ505qi3E= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190302025703-b6889370fb10/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae h1:QoJmnb9uyPCrH8GIg9uRLn4Ta45yhcQtpymCd0AavO8= -golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181130052023-1c3d964395ce/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d h1:F3OmlXCzYtG9YE6tXDnUOlJBzVzHF8EcmZ1yTJlcgIk= -golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVYcSwSjGebuDL6176A1XskgbtNl64NSg+n8= -gopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= -howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -modernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0 h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE= -modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc= -modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0 h1:7ccXrupWZIS3twbUGrtKmHS2DXY6xegFua+6O3xgAFU= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= diff --git a/extern/sector-storage/parameters.json b/extern/sector-storage/parameters.json deleted file mode 100644 index b632c17e8..000000000 --- a/extern/sector-storage/parameters.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.params": { - "cid": "QmeDRyxek34F1H6xJY6AkFdWvPsy5F6dKTrebV3ZtWT4ky", - "digest": "f5827f2d8801c62c831e0f972f6dc8bb", - "sector_size": 2048 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.vk": { - "cid": "QmUw1ZmG4BBbX19MsbH3zAEGKUc42iFJc5ZAyomDHeJTsA", - "digest": "398fecdb4b2de445125852bc3c080b35", - "sector_size": 2048 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0cfb4f178bbb71cf2ecfcd42accce558b27199ab4fb59cb78f2483fe21ef36d9.params": { - "cid": "QmUeNKp9YZpiAFm81RV5KuxH1FDGJx2DuwcbU2XNSZLLSv", - "digest": "2b6d2972ac9e862e8134d98fb695b0c5", - "sector_size": 536870912 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0cfb4f178bbb71cf2ecfcd42accce558b27199ab4fb59cb78f2483fe21ef36d9.vk": { - "cid": "QmQaQmTXX995Akd66ggtJY5bNx6Gkxk8P34JTdMMq8393G", - "digest": "3688c9eb256b7b17f411dad78d5ef74a", - "sector_size": 536870912 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-3ea05428c9d11689f23529cde32fd30aabd50f7d2c93657c1d3650bca3e8ea9e.params": { - "cid": "QmfEYTMSkwGJTumQx26iKXGNKiYh3mmAC4SkdybZpJCj5p", - "digest": "09bff16aed893349d94485cfae366a9c", - "sector_size": 2048 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-3ea05428c9d11689f23529cde32fd30aabd50f7d2c93657c1d3650bca3e8ea9e.vk": { - "cid": "QmP4ThPieSUJyRanjibWpT5R5cCMzMAU4j8Y7kBn7CSW1Q", - "digest": "142f2f7e8f1b1779290315cabfd2c803", - "sector_size": 2048 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-50c7368dea9593ed0989e70974d28024efa9d156d585b7eea1be22b2e753f331.params": { - "cid": "QmcAixrHsz29DgvtZiMc2kQjvPRvWxYUp36QYmRDZbmREm", - "digest": "8f987f64d434365562180b96ec12e299", - "sector_size": 8388608 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-50c7368dea9593ed0989e70974d28024efa9d156d585b7eea1be22b2e753f331.vk": { - "cid": "QmT4iFnbL6r4txS5PXsiV7NTzbhCxHy54PvdkJJGV2VFXb", - "digest": "94b6c24ac01924f4feeecedd16b5d77d", - "sector_size": 8388608 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-5294475db5237a2e83c3e52fd6c2b03859a1831d45ed08c4f35dbf9a803165a9.params": { - "cid": "QmbjFst6SFCK1KsTQrfwPdxf3VTNa1raed574tEZZ9PoyQ", - "digest": "2c245fe8179839dd6c6cdea207c67ae8", - "sector_size": 8388608 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-5294475db5237a2e83c3e52fd6c2b03859a1831d45ed08c4f35dbf9a803165a9.vk": { - "cid": "QmQJKmvZN1a5cQ1Nw6CDyXs3nuRPzvyU5NvCFMUL2BfcZC", - "digest": "56ae47bfda53bb8d22981ed8d8d27d72", - "sector_size": 8388608 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-7d739b8cf60f1b0709eeebee7730e297683552e4b69cab6984ec0285663c5781.params": { - "cid": "QmQCABxeTpdvXTyjDyk7nPBxkQzCh7MXfGztWnSXEPKMLW", - "digest": "7e6b2eb5ecbb11ac651ad66ebbb2075a", - "sector_size": 536870912 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-7d739b8cf60f1b0709eeebee7730e297683552e4b69cab6984ec0285663c5781.vk": { - "cid": "QmPBweyugh5Sx4umk8ULhgEGbjY8xmWLfU6M7EMpc8Mad6", - "digest": "94a8d9e25a9ab9674d339833664eba25", - "sector_size": 536870912 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-0-0377ded656c6f524f1618760bffe4e0a1c51d5a70c4509eedae8a27555733edc.params": { - "cid": "QmY5yax1E9KymBnCeHksE9Zi8NieZbmwcpoDGoabkeeb9h", - "digest": "c909ea9e3fe25ab9b391a64593afdbba", - "sector_size": 34359738368 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-0-0377ded656c6f524f1618760bffe4e0a1c51d5a70c4509eedae8a27555733edc.vk": { - "cid": "QmXnPo4yH5mwMguwrvqgRfduSttbmPrXtbBfbwU21wQWHt", - "digest": "caf900461e988bbf86dbcaca087b7864", - "sector_size": 34359738368 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-0-559e581f022bb4e4ec6e719e563bf0e026ad6de42e56c18714a2c692b1b88d7e.params": { - "cid": "QmZtzzPWwmZEgR7MSMvXRbt9KVK8k4XZ5RLWHybHJW9SdE", - "digest": "a2844f0703f186d143a06146a04577d8", - "sector_size": 34359738368 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-0-559e581f022bb4e4ec6e719e563bf0e026ad6de42e56c18714a2c692b1b88d7e.vk": { - "cid": "QmWxEA7EdQCUJTzjNpxg5XTF45D2uVyYnN1QRUb5TRYU8M", - "digest": "2306247a1e616dbe07f01b88196c2044", - "sector_size": 34359738368 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-2-2627e4006b67f99cef990c0a47d5426cb7ab0a0ad58fc1061547bf2d28b09def.params": { - "cid": "QmP676KwuvyF9Y64uJnXvLtvD1xcuWQ6wD23RzYtQ6dd4f", - "digest": "215b1c667a4f46a1d0178338df568615", - "sector_size": 68719476736 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-2-2627e4006b67f99cef990c0a47d5426cb7ab0a0ad58fc1061547bf2d28b09def.vk": { - "cid": "QmPvPwbJtcSGyqB1rQJhSF5yvFbX9ZBSsHVej5F8JUyHUJ", - "digest": "0c9c423b28b1455fcbc329a1045fd4dd", - "sector_size": 68719476736 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-2-b62098629d07946e9028127e70295ed996fe3ed25b0f9f88eb610a0ab4385a3c.params": { - "cid": "QmUxPQfvckzm1t6MFRdDZ1fDK5UJzAjK7pTZ97cwyachdr", - "digest": "965132f51ae445b0e6d32692b7561995", - "sector_size": 68719476736 - }, - "v27-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-8-2-b62098629d07946e9028127e70295ed996fe3ed25b0f9f88eb610a0ab4385a3c.vk": { - "cid": "QmTxq2EBnQWb5R8tS4MHdchj4vNfLYGoSXxwJFvs5xgW4K", - "digest": "fc8c3d26e0e56373ad96cb41520d55a6", - "sector_size": 68719476736 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-032d3138d22506ec0082ed72b2dcba18df18477904e35bafee82b3793b06832f.params": { - "cid": "QmRjgZHERgqGoRagR788Kh6ybi26csVYa8mqbqhmZm57Jx", - "digest": "cfc7b0897d1eee48c586f7beb89e67f7", - "sector_size": 2048 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-032d3138d22506ec0082ed72b2dcba18df18477904e35bafee82b3793b06832f.vk": { - "cid": "QmNjvnvFP7KgovHUddULoB19fBHT81iz7NcUbzEHZUUPsm", - "digest": "fb59bd061c987eac7068008c44de346b", - "sector_size": 2048 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-6babf46ce344ae495d558e7770a585b2382d54f225af8ed0397b8be7c3fcd472.params": { - "cid": "QmTpRPBA4dt8fgGpcVzi4L1KA1U2eBHCE8WVmS2GUygMvT", - "digest": "36d465915b0afbf96bd08e7915e00952", - "sector_size": 536870912 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-6babf46ce344ae495d558e7770a585b2382d54f225af8ed0397b8be7c3fcd472.vk": { - "cid": "QmRzDyVfQCLsxspoVsed5bcQRsG6KiktngJfcNBL3TJPZe", - "digest": "99d16df0eb6a7e227a4f4570c4f6b6f1", - "sector_size": 536870912 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-ecd683648512ab1765faa2a5f14bab48f676e633467f0aa8aad4b55dcb0652bb.params": { - "cid": "QmV8ZjTSGzDUWmFvsq9NSyPBR7eDDUcvCPNgj2yE7HMAFu", - "digest": "34f3ddf1d1c9f41c0cd73b91e8b4bc27", - "sector_size": 8388608 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-0-0-sha256_hasher-ecd683648512ab1765faa2a5f14bab48f676e633467f0aa8aad4b55dcb0652bb.vk": { - "cid": "QmTa3VbjTiqJWU6r4WKayaQrUaaBsrpp5UDqYvPDd2C5hs", - "digest": "ec62d59651daa5631d3d1e9c782dd940", - "sector_size": 8388608 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-8-0-sha256_hasher-82a357d2f2ca81dc61bb45f4a762807aedee1b0a53fd6c4e77b46a01bfef7820.params": { - "cid": "Qmf8ngfArxrv9tFWDqBcNegdBMymvuakwyHKd1pbW3pbsb", - "digest": "a16d6f4c6424fb280236739f84b24f97", - "sector_size": 34359738368 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-8-0-sha256_hasher-82a357d2f2ca81dc61bb45f4a762807aedee1b0a53fd6c4e77b46a01bfef7820.vk": { - "cid": "QmfQgVFerArJ6Jupwyc9tKjLD9n1J9ajLHBdpY465tRM7M", - "digest": "7a139d82b8a02e35279d657e197f5c1f", - "sector_size": 34359738368 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-8-2-sha256_hasher-96f1b4a04c5c51e4759bbf224bbc2ef5a42c7100f16ec0637123f16a845ddfb2.params": { - "cid": "QmfDha8271nXJn14Aq3qQeghjMBWbs6HNSGa6VuzCVk4TW", - "digest": "5d3cd3f107a3bea8a96d1189efd2965c", - "sector_size": 68719476736 - }, - "v27-stacked-proof-of-replication-merkletree-poseidon_hasher-8-8-2-sha256_hasher-96f1b4a04c5c51e4759bbf224bbc2ef5a42c7100f16ec0637123f16a845ddfb2.vk": { - "cid": "QmRVtTtiFzHJTHurYzaCvetGAchux9cktixT4aGHthN6Zt", - "digest": "62c366405404e60f171e661492740b1c", - "sector_size": 68719476736 - } -} \ No newline at end of file diff --git a/go.mod b/go.mod index d2312e887..fe0196819 100644 --- a/go.mod +++ b/go.mod @@ -13,10 +13,12 @@ require ( github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d github.com/coreos/go-systemd/v22 v22.0.0 + github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e github.com/dgraph-io/badger/v2 v2.0.3 github.com/docker/go-units v0.4.0 github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 github.com/drand/kyber v1.1.1 + github.com/elastic/go-sysinfo v1.3.0 github.com/fatih/color v1.8.0 github.com/filecoin-project/chain-validation v0.0.6-0.20200813000554-40c22fe26eef github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d @@ -35,7 +37,7 @@ require ( github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 github.com/filecoin-project/go-statestore v0.1.0 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b - github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0 + github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0 // indirect github.com/filecoin-project/specs-actors v0.9.2 github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f @@ -139,6 +141,4 @@ replace github.com/golangci/golangci-lint => github.com/golangci/golangci-lint v replace github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi -replace github.com/filecoin-project/sector-storage => ./extern/sector-storage - replace github.com/dgraph-io/badger/v2 => github.com/dgraph-io/badger/v2 v2.0.1-rc1.0.20200716180832-3ab515320794 diff --git a/go.sum b/go.sum index 733c4fb2c..98ae5c945 100644 --- a/go.sum +++ b/go.sum @@ -229,6 +229,7 @@ github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/ github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.1.2 h1:TjLregCoyP1/5lm7WCM0axyV1myIHwbjGa21skuu5tk= github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= @@ -250,6 +251,7 @@ github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0 github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= +github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 h1:A256QonvzRaknIIAuWhe/M2dpV2otzs3NBhi5TWa/UA= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= @@ -261,6 +263,10 @@ github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIi github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b h1:fkRZSPrYpk42PV3/lIXiL0LHetxde7vyYYvSsttQtfg= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= +github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= +github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= +github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0 h1:E1fZ27fhKK05bhZItfTwqr1i05vXnEZJznQFEYwEEUU= +github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= @@ -1500,6 +1506,7 @@ golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1656,6 +1663,7 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1717,6 +1725,7 @@ golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108195415-316d2f248479/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= diff --git a/markets/retrievaladapter/provider.go b/markets/retrievaladapter/provider.go index 211f10500..f21b50d55 100644 --- a/markets/retrievaladapter/provider.go +++ b/markets/retrievaladapter/provider.go @@ -4,29 +4,30 @@ import ( "context" "io" - "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/go-fil-markets/shared" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/storiface" - "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/specs-actors/actors/builtin/paych" - "github.com/ipfs/go-cid" - "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/storage" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/storiface" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-fil-markets/retrievalmarket" + "github.com/filecoin-project/go-fil-markets/shared" + "github.com/filecoin-project/specs-actors/actors/abi" + "github.com/filecoin-project/specs-actors/actors/builtin/paych" + + "github.com/ipfs/go-cid" ) type retrievalProviderNode struct { miner *storage.Miner - sealer sectorstorage.SectorManager + sealer sector.SectorManager full api.FullNode } // NewRetrievalProviderNode returns a new node adapter for a retrieval provider that talks to the // Lotus Node -func NewRetrievalProviderNode(miner *storage.Miner, sealer sectorstorage.SectorManager, full api.FullNode) retrievalmarket.RetrievalProviderNode { +func NewRetrievalProviderNode(miner *storage.Miner, sealer sector.SectorManager, full api.FullNode) retrievalmarket.RetrievalProviderNode { return &retrievalProviderNode{miner, sealer, full} } diff --git a/node/builder.go b/node/builder.go index b8d091d23..5d9af760b 100644 --- a/node/builder.go +++ b/node/builder.go @@ -61,10 +61,10 @@ import ( "github.com/filecoin-project/lotus/paychmgr/settler" "github.com/filecoin-project/lotus/storage" "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/lotus/storage/sectorblocks" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/stores" ) var log = logging.Logger("builder") @@ -281,7 +281,7 @@ func Online() Option { // miner ApplyIf(func(s *Settings) bool { return s.nodeType == repo.StorageMiner }, Override(new(api.Common), From(new(common.CommonAPI))), - Override(new(sectorstorage.StorageAuth), modules.StorageAuth), + Override(new(sector.StorageAuth), modules.StorageAuth), Override(new(*stores.Index), stores.NewIndex), Override(new(stores.SectorIndex), From(new(*stores.Index))), @@ -290,11 +290,11 @@ func Online() Option { Override(new(*ffiwrapper.Config), modules.ProofsConfig), Override(new(stores.LocalStorage), From(new(repo.LockedRepo))), Override(new(sealing.SectorIDCounter), modules.SectorIDCounter), - Override(new(*sectorstorage.Manager), modules.SectorStorage), + Override(new(*sector.Manager), modules.SectorStorage), Override(new(ffiwrapper.Verifier), ffiwrapper.ProofVerifier), - Override(new(sectorstorage.SectorManager), From(new(*sectorstorage.Manager))), - Override(new(storage2.Prover), From(new(sectorstorage.SectorManager))), + Override(new(sector.SectorManager), From(new(*sector.Manager))), + Override(new(storage2.Prover), From(new(sector.SectorManager))), Override(new(*sectorblocks.SectorBlocks), sectorblocks.NewSectorBlocks), Override(new(*storage.Miner), modules.StorageMiner(config.DefaultStorageMiner().Fees)), @@ -369,10 +369,10 @@ func ConfigCommon(cfg *config.Common) Option { Override(SetApiEndpointKey, func(lr repo.LockedRepo, e dtypes.APIEndpoint) error { return lr.SetAPIEndpoint(e) }), - Override(new(sectorstorage.URLs), func(e dtypes.APIEndpoint) (sectorstorage.URLs, error) { + Override(new(sector.URLs), func(e dtypes.APIEndpoint) (sector.URLs, error) { ip := cfg.API.RemoteListenAddress - var urls sectorstorage.URLs + var urls sector.URLs urls = append(urls, "http://"+ip+"/remote") // TODO: This makes no assumptions, and probably could... return urls, nil }), @@ -430,7 +430,7 @@ func ConfigStorageMiner(c interface{}) Option { Override(new(dtypes.DealFilter), modules.BasicDealFilter(dealfilter.CliDealFilter(cfg.Dealmaking.Filter))), ), - Override(new(sectorstorage.SealerConfig), cfg.Storage), + Override(new(sector.SealerConfig), cfg.Storage), Override(new(*storage.Miner), modules.StorageMiner(cfg.Fees)), ) } diff --git a/node/config/def.go b/node/config/def.go index 2e1243e5b..cd5da8d26 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -6,9 +6,8 @@ import ( "github.com/ipfs/go-cid" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/storage/sector" ) // Common is common config between full node and miner @@ -32,7 +31,7 @@ type StorageMiner struct { Common Dealmaking DealmakingConfig - Storage sectorstorage.SealerConfig + Storage sector.SealerConfig Fees MinerFeeConfig SealingDelay Duration @@ -132,7 +131,7 @@ func DefaultStorageMiner() *StorageMiner { cfg := &StorageMiner{ Common: defCommon(), - Storage: sectorstorage.SealerConfig{ + Storage: sector.SealerConfig{ AllowPreCommit1: true, AllowPreCommit2: true, AllowCommit: true, diff --git a/node/config/storage.go b/node/config/storage.go index 2c603df03..239806a57 100644 --- a/node/config/storage.go +++ b/node/config/storage.go @@ -8,7 +8,7 @@ import ( "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/stores" ) func StorageFromFile(path string, def *stores.StorageConfig) (*stores.StorageConfig, error) { diff --git a/node/impl/client/client.go b/node/impl/client/client.go index df9febe75..b8ab59375 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -39,7 +39,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/builtin/miner" marketevents "github.com/filecoin-project/lotus/markets/loggers" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" diff --git a/node/impl/full/state.go b/node/impl/full/state.go index 5140ba22a..498e67c5d 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -15,7 +15,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" diff --git a/node/impl/remoteworker.go b/node/impl/remoteworker.go index a665e7caf..278474e6b 100644 --- a/node/impl/remoteworker.go +++ b/node/impl/remoteworker.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/client" - "github.com/filecoin-project/sector-storage" + "github.com/filecoin-project/lotus/storage/sector" ) type remoteWorker struct { @@ -46,4 +46,4 @@ func (r *remoteWorker) Close() error { return nil } -var _ sectorstorage.Worker = &remoteWorker{} +var _ sector.Worker = &remoteWorker{} diff --git a/node/impl/storminer.go b/node/impl/storminer.go index 64b5bf1d5..6add843c2 100644 --- a/node/impl/storminer.go +++ b/node/impl/storminer.go @@ -8,7 +8,7 @@ import ( "strconv" "time" - "github.com/filecoin-project/sector-storage/fsutil" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/ipfs/go-cid" "golang.org/x/xerrors" @@ -19,10 +19,10 @@ import ( storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/lotus/storage/sealing" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/lotus/api" @@ -47,8 +47,8 @@ type StorageMinerAPI struct { Miner *storage.Miner BlockMiner *miner.Miner Full api.FullNode - StorageMgr *sectorstorage.Manager `optional:"true"` - IStorageMgr sectorstorage.SectorManager + StorageMgr *sector.Manager `optional:"true"` + IStorageMgr sector.SectorManager *stores.Index ConsiderOnlineStorageDealsConfigFunc dtypes.ConsiderOnlineStorageDealsConfigFunc diff --git a/node/modules/chain.go b/node/modules/chain.go index 0c9943b21..941eed1b0 100644 --- a/node/modules/chain.go +++ b/node/modules/chain.go @@ -16,7 +16,7 @@ import ( "go.uber.org/fx" "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/lotus/chain" "github.com/filecoin-project/lotus/chain/beacon" diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index 4175ae5e1..073b6c42a 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -43,9 +43,9 @@ import ( paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-storedcounter" "github.com/filecoin-project/lotus/storage/sealing" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/specs-actors/actors/abi" lapi "github.com/filecoin-project/lotus/api" @@ -140,8 +140,8 @@ func SectorIDCounter(ds dtypes.MetadataDS) sealing.SectorIDCounter { return &sidsc{sc} } -func StorageMiner(fc config.MinerFeeConfig) func(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h host.Host, ds dtypes.MetadataDS, sealer sectorstorage.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc) (*storage.Miner, error) { - return func(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h host.Host, ds dtypes.MetadataDS, sealer sectorstorage.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc) (*storage.Miner, error) { +func StorageMiner(fc config.MinerFeeConfig) func(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h host.Host, ds dtypes.MetadataDS, sealer sector.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc) (*storage.Miner, error) { + return func(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h host.Host, ds dtypes.MetadataDS, sealer sector.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc) (*storage.Miner, error) { maddr, err := minerAddrFromDS(ds) if err != nil { return nil, err @@ -440,7 +440,7 @@ func StorageProvider(minerAddress dtypes.MinerAddress, } // RetrievalProvider creates a new retrieval provider attached to the provider blockstore -func RetrievalProvider(h host.Host, miner *storage.Miner, sealer sectorstorage.SectorManager, full lapi.FullNode, ds dtypes.MetadataDS, pieceStore dtypes.ProviderPieceStore, mds dtypes.StagingMultiDstore, dt dtypes.ProviderDataTransfer, onlineOk dtypes.ConsiderOnlineRetrievalDealsConfigFunc, offlineOk dtypes.ConsiderOfflineRetrievalDealsConfigFunc) (retrievalmarket.RetrievalProvider, error) { +func RetrievalProvider(h host.Host, miner *storage.Miner, sealer sector.SectorManager, full lapi.FullNode, ds dtypes.MetadataDS, pieceStore dtypes.ProviderPieceStore, mds dtypes.StagingMultiDstore, dt dtypes.ProviderDataTransfer, onlineOk dtypes.ConsiderOnlineRetrievalDealsConfigFunc, offlineOk dtypes.ConsiderOfflineRetrievalDealsConfigFunc) (retrievalmarket.RetrievalProvider, error) { adapter := retrievaladapter.NewRetrievalProviderNode(miner, sealer, full) maddr, err := minerAddrFromDS(ds) @@ -476,10 +476,10 @@ func RetrievalProvider(h host.Host, miner *storage.Miner, sealer sectorstorage.S return retrievalimpl.NewProvider(maddr, adapter, netwk, pieceStore, mds, dt, namespace.Wrap(ds, datastore.NewKey("/retrievals/provider")), opt) } -func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, ls stores.LocalStorage, si stores.SectorIndex, cfg *ffiwrapper.Config, sc sectorstorage.SealerConfig, urls sectorstorage.URLs, sa sectorstorage.StorageAuth) (*sectorstorage.Manager, error) { +func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, ls stores.LocalStorage, si stores.SectorIndex, cfg *ffiwrapper.Config, sc sector.SealerConfig, urls sector.URLs, sa sector.StorageAuth) (*sector.Manager, error) { ctx := helpers.LifecycleCtx(mctx, lc) - sst, err := sectorstorage.New(ctx, ls, si, cfg, sc, urls, sa) + sst, err := sector.New(ctx, ls, si, cfg, sc, urls, sa) if err != nil { return nil, err } @@ -491,7 +491,7 @@ func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, ls stores.LocalStor return sst, nil } -func StorageAuth(ctx helpers.MetricsCtx, ca lapi.Common) (sectorstorage.StorageAuth, error) { +func StorageAuth(ctx helpers.MetricsCtx, ca lapi.Common) (sector.StorageAuth, error) { token, err := ca.AuthNew(ctx, []auth.Permission{"admin"}) if err != nil { return nil, xerrors.Errorf("creating storage auth header: %w", err) @@ -499,7 +499,7 @@ func StorageAuth(ctx helpers.MetricsCtx, ca lapi.Common) (sectorstorage.StorageA headers := http.Header{} headers.Add("Authorization", "Bearer "+string(token)) - return sectorstorage.StorageAuth(headers), nil + return sector.StorageAuth(headers), nil } func NewConsiderOnlineStorageDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOnlineStorageDealsConfigFunc, error) { diff --git a/node/node_test.go b/node/node_test.go index 030132e23..20eb6504f 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -13,7 +13,7 @@ import ( "github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/storage/mockstorage" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/go-storedcounter" "github.com/ipfs/go-datastore" @@ -42,14 +42,14 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/cmd/lotus-seed/seed" - genesis "github.com/filecoin-project/lotus/genesis" + "github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/miner" "github.com/filecoin-project/lotus/node" "github.com/filecoin-project/lotus/node/modules" modtest "github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/repo" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/mock" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/mock" ) func init() { @@ -422,11 +422,11 @@ func mockSbBuilder(t *testing.T, nFull int, storage []test.StorageMiner) ([]test } storers[i] = testStorageNode(ctx, t, genms[i].Worker, maddrs[i], pidKeys[i], f, mn, node.Options( - node.Override(new(sectorstorage.SectorManager), func() (sectorstorage.SectorManager, error) { + node.Override(new(sector.SectorManager), func() (sector.SectorManager, error) { return mock.NewMockSectorMgr(build.DefaultSectorSize(), sectors), nil }), node.Override(new(ffiwrapper.Verifier), mock.MockVerifier), - node.Unset(new(*sectorstorage.Manager)), + node.Unset(new(*sector.Manager)), )) } diff --git a/node/repo/fsrepo.go b/node/repo/fsrepo.go index 470d016cd..c55a04c58 100644 --- a/node/repo/fsrepo.go +++ b/node/repo/fsrepo.go @@ -20,8 +20,8 @@ import ( "github.com/multiformats/go-multiaddr" "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/fsutil" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/node/config" diff --git a/node/repo/interface.go b/node/repo/interface.go index 17336d413..331f83028 100644 --- a/node/repo/interface.go +++ b/node/repo/interface.go @@ -6,8 +6,8 @@ import ( "github.com/ipfs/go-datastore" "github.com/multiformats/go-multiaddr" - "github.com/filecoin-project/sector-storage/fsutil" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/lotus/chain/types" ) diff --git a/node/repo/memrepo.go b/node/repo/memrepo.go index f2762acea..082970dc6 100644 --- a/node/repo/memrepo.go +++ b/node/repo/memrepo.go @@ -14,11 +14,11 @@ import ( "github.com/multiformats/go-multiaddr" "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/fsutil" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/node/config" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/stores" ) type MemRepo struct { diff --git a/storage/miner.go b/storage/miner.go index 77c347bf6..2b1ab4f36 100644 --- a/storage/miner.go +++ b/storage/miner.go @@ -12,8 +12,8 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-actors/actors/crypto" @@ -35,7 +35,7 @@ type Miner struct { api storageMinerApi feeCfg config.MinerFeeConfig h host.Host - sealer sectorstorage.SectorManager + sealer sector.SectorManager ds datastore.Batching sc sealing.SectorIDCounter verif ffiwrapper.Verifier @@ -84,7 +84,7 @@ type storageMinerApi interface { WalletHas(context.Context, address.Address) (bool, error) } -func NewMiner(api storageMinerApi, maddr, worker address.Address, h host.Host, ds datastore.Batching, sealer sectorstorage.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc, feeCfg config.MinerFeeConfig) (*Miner, error) { +func NewMiner(api storageMinerApi, maddr, worker address.Address, h host.Host, ds datastore.Batching, sealer sector.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc, feeCfg config.MinerFeeConfig) (*Miner, error) { m := &Miner{ api: api, feeCfg: feeCfg, diff --git a/storage/mockstorage/preseal.go b/storage/mockstorage/preseal.go index af1a7c80b..22672c602 100644 --- a/storage/mockstorage/preseal.go +++ b/storage/mockstorage/preseal.go @@ -5,7 +5,7 @@ import ( "github.com/filecoin-project/go-address" commcid "github.com/filecoin-project/go-fil-commcid" - "github.com/filecoin-project/sector-storage/mock" + "github.com/filecoin-project/lotus/storage/sector/mock" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -14,8 +14,8 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/genesis" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/zerocomm" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/zerocomm" ) func PreSeal(ssize abi.SectorSize, maddr address.Address, sectors int) (*genesis.Miner, *types.KeyInfo, error) { diff --git a/storage/sealing/checks.go b/storage/sealing/checks.go index d42656c7c..38ed31022 100644 --- a/storage/sealing/checks.go +++ b/storage/sealing/checks.go @@ -7,8 +7,8 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/zerocomm" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/zerocomm" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-actors/actors/crypto" diff --git a/storage/sealing/sealing.go b/storage/sealing/sealing.go index a1c931aa4..04c7830f4 100644 --- a/storage/sealing/sealing.go +++ b/storage/sealing/sealing.go @@ -15,8 +15,8 @@ import ( "github.com/filecoin-project/go-address" padreader "github.com/filecoin-project/go-padreader" statemachine "github.com/filecoin-project/go-statemachine" - sectorstorage "github.com/filecoin-project/sector-storage" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -59,7 +59,7 @@ type Sealing struct { maddr address.Address - sealer sectorstorage.SectorManager + sealer sector.SectorManager sectors *statemachine.StateGroup sc SectorIDCounter verif ffiwrapper.Verifier @@ -90,7 +90,7 @@ type UnsealedSectorInfo struct { pieceSizes []abi.UnpaddedPieceSize } -func New(api SealingAPI, fc FeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sectorstorage.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, pcp PreCommitPolicy, gsd GetSealingDelayFunc) *Sealing { +func New(api SealingAPI, fc FeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sector.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, pcp PreCommitPolicy, gsd GetSealingDelayFunc) *Sealing { s := &Sealing{ api: api, feeCfg: fc, @@ -174,7 +174,7 @@ func (m *Sealing) AddPieceToAnySector(ctx context.Context, size abi.UnpaddedPiec // Caller should hold m.unsealedInfoMap.mux func (m *Sealing) addPiece(ctx context.Context, sectorID abi.SectorNumber, size abi.UnpaddedPieceSize, r io.Reader, di *DealInfo) error { log.Infof("Adding piece to sector %d", sectorID) - ppi, err := m.sealer.AddPiece(sectorstorage.WithPriority(ctx, DealSectorPriority), m.minerSector(sectorID), m.unsealedInfoMap.infos[sectorID].pieceSizes, size, r) + ppi, err := m.sealer.AddPiece(sector.WithPriority(ctx, DealSectorPriority), m.minerSector(sectorID), m.unsealedInfoMap.infos[sectorID].pieceSizes, size, r) if err != nil { return xerrors.Errorf("writing piece: %w", err) } diff --git a/storage/sealing/types.go b/storage/sealing/types.go index 08bdcb739..ad2f5d459 100644 --- a/storage/sealing/types.go +++ b/storage/sealing/types.go @@ -7,7 +7,7 @@ import ( "github.com/ipfs/go-cid" - sectorstorage "github.com/filecoin-project/sector-storage" + "github.com/filecoin-project/lotus/storage/sector" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/miner" @@ -137,7 +137,7 @@ func (t *SectorInfo) sealingCtx(ctx context.Context) context.Context { // we need sealed sooner if t.hasDeals() { - return sectorstorage.WithPriority(ctx, DealSectorPriority) + return sector.WithPriority(ctx, DealSectorPriority) } return ctx diff --git a/extern/sector-storage/Makefile b/storage/sector/Makefile similarity index 100% rename from extern/sector-storage/Makefile rename to storage/sector/Makefile diff --git a/extern/sector-storage/README.md b/storage/sector/README.md similarity index 100% rename from extern/sector-storage/README.md rename to storage/sector/README.md diff --git a/extern/sector-storage/docs/sector-storage.svg b/storage/sector/docs/sector-storage.svg similarity index 100% rename from extern/sector-storage/docs/sector-storage.svg rename to storage/sector/docs/sector-storage.svg diff --git a/extern/sector-storage/faults.go b/storage/sector/faults.go similarity index 97% rename from extern/sector-storage/faults.go rename to storage/sector/faults.go index ea0ab6e01..36a2113ec 100644 --- a/extern/sector-storage/faults.go +++ b/storage/sector/faults.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -8,7 +8,7 @@ import ( "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/extern/sector-storage/ffiwrapper/basicfs/fs.go b/storage/sector/ffiwrapper/basicfs/fs.go similarity index 94% rename from extern/sector-storage/ffiwrapper/basicfs/fs.go rename to storage/sector/ffiwrapper/basicfs/fs.go index 3f865f590..d167f6dec 100644 --- a/extern/sector-storage/ffiwrapper/basicfs/fs.go +++ b/storage/sector/ffiwrapper/basicfs/fs.go @@ -8,8 +8,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) type sectorFile struct { diff --git a/extern/sector-storage/ffiwrapper/config.go b/storage/sector/ffiwrapper/config.go similarity index 100% rename from extern/sector-storage/ffiwrapper/config.go rename to storage/sector/ffiwrapper/config.go diff --git a/extern/sector-storage/ffiwrapper/files.go b/storage/sector/ffiwrapper/files.go similarity index 100% rename from extern/sector-storage/ffiwrapper/files.go rename to storage/sector/ffiwrapper/files.go diff --git a/extern/sector-storage/ffiwrapper/partialfile.go b/storage/sector/ffiwrapper/partialfile.go similarity index 98% rename from extern/sector-storage/ffiwrapper/partialfile.go rename to storage/sector/ffiwrapper/partialfile.go index 3e8b32288..9171704f4 100644 --- a/extern/sector-storage/ffiwrapper/partialfile.go +++ b/storage/sector/ffiwrapper/partialfile.go @@ -12,8 +12,8 @@ import ( rlepluslazy "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/fsutil" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) const veryLargeRle = 1 << 20 diff --git a/extern/sector-storage/ffiwrapper/sealer.go b/storage/sector/ffiwrapper/sealer.go similarity index 100% rename from extern/sector-storage/ffiwrapper/sealer.go rename to storage/sector/ffiwrapper/sealer.go diff --git a/extern/sector-storage/ffiwrapper/sealer_cgo.go b/storage/sector/ffiwrapper/sealer_cgo.go similarity index 98% rename from extern/sector-storage/ffiwrapper/sealer_cgo.go rename to storage/sector/ffiwrapper/sealer_cgo.go index 8a4f18bc7..9bdb3f6d3 100644 --- a/extern/sector-storage/ffiwrapper/sealer_cgo.go +++ b/storage/sector/ffiwrapper/sealer_cgo.go @@ -20,10 +20,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/sector-storage/fr32" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" - "github.com/filecoin-project/sector-storage/zerocomm" + "github.com/filecoin-project/lotus/storage/sector/fr32" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/storage/sector/zerocomm" ) var _ Storage = &Sealer{} diff --git a/extern/sector-storage/ffiwrapper/sealer_test.go b/storage/sector/ffiwrapper/sealer_test.go similarity index 99% rename from extern/sector-storage/ffiwrapper/sealer_test.go rename to storage/sector/ffiwrapper/sealer_test.go index f795be159..22cc29cfc 100644 --- a/extern/sector-storage/ffiwrapper/sealer_test.go +++ b/storage/sector/ffiwrapper/sealer_test.go @@ -25,8 +25,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/sector-storage/ffiwrapper/basicfs" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" + "github.com/filecoin-project/lotus/storage/sector/stores" ) func init() { diff --git a/extern/sector-storage/ffiwrapper/types.go b/storage/sector/ffiwrapper/types.go similarity index 89% rename from extern/sector-storage/ffiwrapper/types.go rename to storage/sector/ffiwrapper/types.go index bc3c44f54..60c362776 100644 --- a/extern/sector-storage/ffiwrapper/types.go +++ b/storage/sector/ffiwrapper/types.go @@ -9,9 +9,9 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/sector-storage/ffiwrapper/basicfs" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) type Validator interface { diff --git a/extern/sector-storage/ffiwrapper/unseal_ranges.go b/storage/sector/ffiwrapper/unseal_ranges.go similarity index 92% rename from extern/sector-storage/ffiwrapper/unseal_ranges.go rename to storage/sector/ffiwrapper/unseal_ranges.go index 0bc7b52df..78fceb1c7 100644 --- a/extern/sector-storage/ffiwrapper/unseal_ranges.go +++ b/storage/sector/ffiwrapper/unseal_ranges.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) // merge gaps between ranges which are close to each other diff --git a/extern/sector-storage/ffiwrapper/verifier_cgo.go b/storage/sector/ffiwrapper/verifier_cgo.go similarity index 98% rename from extern/sector-storage/ffiwrapper/verifier_cgo.go rename to storage/sector/ffiwrapper/verifier_cgo.go index 1fecf9598..dd7ab196a 100644 --- a/extern/sector-storage/ffiwrapper/verifier_cgo.go +++ b/storage/sector/ffiwrapper/verifier_cgo.go @@ -11,7 +11,7 @@ import ( ffi "github.com/filecoin-project/filecoin-ffi" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/stores" ) func (sb *Sealer) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []abi.SectorInfo, randomness abi.PoStRandomness) ([]abi.PoStProof, error) { diff --git a/extern/sector-storage/fr32/fr32.go b/storage/sector/fr32/fr32.go similarity index 100% rename from extern/sector-storage/fr32/fr32.go rename to storage/sector/fr32/fr32.go diff --git a/extern/sector-storage/fr32/fr32_ffi_cmp_test.go b/storage/sector/fr32/fr32_ffi_cmp_test.go similarity index 91% rename from extern/sector-storage/fr32/fr32_ffi_cmp_test.go rename to storage/sector/fr32/fr32_ffi_cmp_test.go index d9c3ba283..280a2981f 100644 --- a/extern/sector-storage/fr32/fr32_ffi_cmp_test.go +++ b/storage/sector/fr32/fr32_ffi_cmp_test.go @@ -2,7 +2,7 @@ package fr32_test import ( "bytes" - "github.com/filecoin-project/sector-storage/fr32" + "github.com/filecoin-project/lotus/storage/sector/fr32" "io" "io/ioutil" "os" @@ -13,7 +13,7 @@ import ( ffi "github.com/filecoin-project/filecoin-ffi" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" ) func TestWriteTwoPcs(t *testing.T) { diff --git a/extern/sector-storage/fr32/fr32_test.go b/storage/sector/fr32/fr32_test.go similarity index 97% rename from extern/sector-storage/fr32/fr32_test.go rename to storage/sector/fr32/fr32_test.go index 219f10f5c..262fb6674 100644 --- a/extern/sector-storage/fr32/fr32_test.go +++ b/storage/sector/fr32/fr32_test.go @@ -12,8 +12,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/stretchr/testify/require" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/fr32" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/fr32" ) func padFFI(buf []byte) []byte { diff --git a/extern/sector-storage/fr32/readers.go b/storage/sector/fr32/readers.go similarity index 100% rename from extern/sector-storage/fr32/readers.go rename to storage/sector/fr32/readers.go diff --git a/extern/sector-storage/fr32/readers_test.go b/storage/sector/fr32/readers_test.go similarity index 90% rename from extern/sector-storage/fr32/readers_test.go rename to storage/sector/fr32/readers_test.go index f0f1e21bc..2c6f01f8c 100644 --- a/extern/sector-storage/fr32/readers_test.go +++ b/storage/sector/fr32/readers_test.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/fr32" + "github.com/filecoin-project/lotus/storage/sector/fr32" ) func TestUnpadReader(t *testing.T) { diff --git a/extern/sector-storage/fr32/utils.go b/storage/sector/fr32/utils.go similarity index 100% rename from extern/sector-storage/fr32/utils.go rename to storage/sector/fr32/utils.go diff --git a/extern/sector-storage/fsutil/dealloc_linux.go b/storage/sector/fsutil/dealloc_linux.go similarity index 100% rename from extern/sector-storage/fsutil/dealloc_linux.go rename to storage/sector/fsutil/dealloc_linux.go diff --git a/extern/sector-storage/fsutil/dealloc_other.go b/storage/sector/fsutil/dealloc_other.go similarity index 100% rename from extern/sector-storage/fsutil/dealloc_other.go rename to storage/sector/fsutil/dealloc_other.go diff --git a/extern/sector-storage/fsutil/filesize_unix.go b/storage/sector/fsutil/filesize_unix.go similarity index 100% rename from extern/sector-storage/fsutil/filesize_unix.go rename to storage/sector/fsutil/filesize_unix.go diff --git a/extern/sector-storage/fsutil/statfs.go b/storage/sector/fsutil/statfs.go similarity index 100% rename from extern/sector-storage/fsutil/statfs.go rename to storage/sector/fsutil/statfs.go diff --git a/extern/sector-storage/fsutil/statfs_unix.go b/storage/sector/fsutil/statfs_unix.go similarity index 100% rename from extern/sector-storage/fsutil/statfs_unix.go rename to storage/sector/fsutil/statfs_unix.go diff --git a/extern/sector-storage/fsutil/statfs_windows.go b/storage/sector/fsutil/statfs_windows.go similarity index 100% rename from extern/sector-storage/fsutil/statfs_windows.go rename to storage/sector/fsutil/statfs_windows.go diff --git a/extern/sector-storage/localworker.go b/storage/sector/localworker.go similarity index 97% rename from extern/sector-storage/localworker.go rename to storage/sector/localworker.go index 14ed1cd0b..6b4b163f3 100644 --- a/extern/sector-storage/localworker.go +++ b/storage/sector/localworker.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -15,10 +15,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" storage2 "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) var pathTypes = []stores.SectorFileType{stores.FTUnsealed, stores.FTSealed, stores.FTCache} diff --git a/extern/sector-storage/manager.go b/storage/sector/manager.go similarity index 97% rename from extern/sector-storage/manager.go rename to storage/sector/manager.go index e9fa1ccd4..90c13e37e 100644 --- a/extern/sector-storage/manager.go +++ b/storage/sector/manager.go @@ -1,9 +1,9 @@ -package sectorstorage +package sector import ( "context" "errors" - "github.com/filecoin-project/sector-storage/fsutil" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "io" "net/http" @@ -15,10 +15,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) var log = logging.Logger("advmgr") diff --git a/extern/sector-storage/manager_test.go b/storage/sector/manager_test.go similarity index 92% rename from extern/sector-storage/manager_test.go rename to storage/sector/manager_test.go index 10e6a5020..869f8556c 100644 --- a/extern/sector-storage/manager_test.go +++ b/storage/sector/manager_test.go @@ -1,12 +1,12 @@ -package sectorstorage +package sector import ( "bytes" "context" "encoding/json" "fmt" - "github.com/filecoin-project/sector-storage/fsutil" - "github.com/filecoin-project/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" logging "github.com/ipfs/go-log" "io/ioutil" "os" @@ -19,8 +19,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/stores" ) func init() { diff --git a/extern/sector-storage/mock/mock.go b/storage/sector/mock/mock.go similarity index 98% rename from extern/sector-storage/mock/mock.go rename to storage/sector/mock/mock.go index 07256f2ec..9ad399d54 100644 --- a/extern/sector-storage/mock/mock.go +++ b/storage/sector/mock/mock.go @@ -16,8 +16,8 @@ import ( logging "github.com/ipfs/go-log" "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) var log = logging.Logger("sbmock") diff --git a/extern/sector-storage/mock/mock_test.go b/storage/sector/mock/mock_test.go similarity index 100% rename from extern/sector-storage/mock/mock_test.go rename to storage/sector/mock/mock_test.go diff --git a/extern/sector-storage/mock/util.go b/storage/sector/mock/util.go similarity index 100% rename from extern/sector-storage/mock/util.go rename to storage/sector/mock/util.go diff --git a/extern/sector-storage/request_queue.go b/storage/sector/request_queue.go similarity index 97% rename from extern/sector-storage/request_queue.go rename to storage/sector/request_queue.go index 85d3abf46..66f2da754 100644 --- a/extern/sector-storage/request_queue.go +++ b/storage/sector/request_queue.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import "sort" diff --git a/extern/sector-storage/request_queue_test.go b/storage/sector/request_queue_test.go similarity index 93% rename from extern/sector-storage/request_queue_test.go rename to storage/sector/request_queue_test.go index cb4a5d5dd..e00fb3e4e 100644 --- a/extern/sector-storage/request_queue_test.go +++ b/storage/sector/request_queue_test.go @@ -1,10 +1,10 @@ -package sectorstorage +package sector import ( "fmt" "testing" - "github.com/filecoin-project/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" ) func TestRequestQueue(t *testing.T) { diff --git a/extern/sector-storage/resources.go b/storage/sector/resources.go similarity index 98% rename from extern/sector-storage/resources.go rename to storage/sector/resources.go index 2f67dc84e..4c4323d3f 100644 --- a/extern/sector-storage/resources.go +++ b/storage/sector/resources.go @@ -1,9 +1,9 @@ -package sectorstorage +package sector import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" ) type Resources struct { diff --git a/extern/sector-storage/roprov.go b/storage/sector/roprov.go similarity index 93% rename from extern/sector-storage/roprov.go rename to storage/sector/roprov.go index fc10ebbec..612e1d474 100644 --- a/extern/sector-storage/roprov.go +++ b/storage/sector/roprov.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/stores" ) type readonlyProvider struct { diff --git a/extern/sector-storage/sched.go b/storage/sector/sched.go similarity index 99% rename from extern/sector-storage/sched.go rename to storage/sector/sched.go index e8eda4834..7213d6377 100644 --- a/extern/sector-storage/sched.go +++ b/storage/sector/sched.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -12,8 +12,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) type schedPrioCtxKey int diff --git a/extern/sector-storage/sched_resources.go b/storage/sector/sched_resources.go similarity index 97% rename from extern/sector-storage/sched_resources.go rename to storage/sector/sched_resources.go index 0ba9d1f66..d76456a0f 100644 --- a/extern/sector-storage/sched_resources.go +++ b/storage/sector/sched_resources.go @@ -1,9 +1,9 @@ -package sectorstorage +package sector import ( "sync" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) func (a *activeResources) withResources(id WorkerID, wr storiface.WorkerResources, r Resources, locker sync.Locker, cb func() error) error { diff --git a/extern/sector-storage/sched_test.go b/storage/sector/sched_test.go similarity index 97% rename from extern/sector-storage/sched_test.go rename to storage/sector/sched_test.go index 6490e738e..e8c68501d 100644 --- a/extern/sector-storage/sched_test.go +++ b/storage/sector/sched_test.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -14,10 +14,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/fsutil" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/specs-storage/storage" ) diff --git a/extern/sector-storage/sched_watch.go b/storage/sector/sched_watch.go similarity index 98% rename from extern/sector-storage/sched_watch.go rename to storage/sector/sched_watch.go index 2dd9875d7..aa65d5c8b 100644 --- a/extern/sector-storage/sched_watch.go +++ b/storage/sector/sched_watch.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" diff --git a/extern/sector-storage/sealtasks/task.go b/storage/sector/sealtasks/task.go similarity index 100% rename from extern/sector-storage/sealtasks/task.go rename to storage/sector/sealtasks/task.go diff --git a/extern/sector-storage/selector_alloc.go b/storage/sector/selector_alloc.go similarity index 91% rename from extern/sector-storage/selector_alloc.go rename to storage/sector/selector_alloc.go index cf7937587..e9eb6a740 100644 --- a/extern/sector-storage/selector_alloc.go +++ b/storage/sector/selector_alloc.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" ) type allocSelector struct { diff --git a/extern/sector-storage/selector_existing.go b/storage/sector/selector_existing.go similarity index 92% rename from extern/sector-storage/selector_existing.go rename to storage/sector/selector_existing.go index 0a324ac5c..3a653ec42 100644 --- a/extern/sector-storage/selector_existing.go +++ b/storage/sector/selector_existing.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" ) type existingSelector struct { diff --git a/extern/sector-storage/selector_task.go b/storage/sector/selector_task.go similarity index 89% rename from extern/sector-storage/selector_task.go rename to storage/sector/selector_task.go index bf0788ef9..ca122aa6f 100644 --- a/extern/sector-storage/selector_task.go +++ b/storage/sector/selector_task.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" ) type taskSelector struct { diff --git a/extern/sector-storage/stats.go b/storage/sector/stats.go similarity index 89% rename from extern/sector-storage/stats.go rename to storage/sector/stats.go index be7cab73b..e8de2c1b0 100644 --- a/extern/sector-storage/stats.go +++ b/storage/sector/stats.go @@ -1,6 +1,6 @@ -package sectorstorage +package sector -import "github.com/filecoin-project/sector-storage/storiface" +import "github.com/filecoin-project/lotus/storage/sector/storiface" func (m *Manager) WorkerStats() map[uint64]storiface.WorkerStats { m.sched.workersLk.RLock() diff --git a/extern/sector-storage/stores/filetype.go b/storage/sector/stores/filetype.go similarity index 100% rename from extern/sector-storage/stores/filetype.go rename to storage/sector/stores/filetype.go diff --git a/extern/sector-storage/stores/http_handler.go b/storage/sector/stores/http_handler.go similarity index 98% rename from extern/sector-storage/stores/http_handler.go rename to storage/sector/stores/http_handler.go index 4f0556138..ed77da0c7 100644 --- a/extern/sector-storage/stores/http_handler.go +++ b/storage/sector/stores/http_handler.go @@ -10,7 +10,7 @@ import ( logging "github.com/ipfs/go-log/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/tarutil" + "github.com/filecoin-project/lotus/storage/sector/tarutil" ) var log = logging.Logger("stores") diff --git a/extern/sector-storage/stores/index.go b/storage/sector/stores/index.go similarity index 99% rename from extern/sector-storage/stores/index.go rename to storage/sector/stores/index.go index 94858d3e8..fb874784d 100644 --- a/extern/sector-storage/stores/index.go +++ b/storage/sector/stores/index.go @@ -2,7 +2,7 @@ package stores import ( "context" - "github.com/filecoin-project/sector-storage/fsutil" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "net/url" gopath "path" "sort" diff --git a/extern/sector-storage/stores/index_locks.go b/storage/sector/stores/index_locks.go similarity index 100% rename from extern/sector-storage/stores/index_locks.go rename to storage/sector/stores/index_locks.go diff --git a/extern/sector-storage/stores/index_locks_test.go b/storage/sector/stores/index_locks_test.go similarity index 100% rename from extern/sector-storage/stores/index_locks_test.go rename to storage/sector/stores/index_locks_test.go diff --git a/extern/sector-storage/stores/index_locks_util.go b/storage/sector/stores/index_locks_util.go similarity index 100% rename from extern/sector-storage/stores/index_locks_util.go rename to storage/sector/stores/index_locks_util.go diff --git a/extern/sector-storage/stores/interface.go b/storage/sector/stores/interface.go similarity index 94% rename from extern/sector-storage/stores/interface.go rename to storage/sector/stores/interface.go index 142769b1b..7a1a0d449 100644 --- a/extern/sector-storage/stores/interface.go +++ b/storage/sector/stores/interface.go @@ -2,7 +2,7 @@ package stores import ( "context" - "github.com/filecoin-project/sector-storage/fsutil" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/extern/sector-storage/stores/local.go b/storage/sector/stores/local.go similarity index 99% rename from extern/sector-storage/stores/local.go rename to storage/sector/stores/local.go index 4895e161b..7c41e09bb 100644 --- a/extern/sector-storage/stores/local.go +++ b/storage/sector/stores/local.go @@ -13,7 +13,7 @@ import ( "golang.org/x/xerrors" - "github.com/filecoin-project/sector-storage/fsutil" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/extern/sector-storage/stores/local_test.go b/storage/sector/stores/local_test.go similarity index 96% rename from extern/sector-storage/stores/local_test.go rename to storage/sector/stores/local_test.go index 56ac7c020..91119ceb3 100644 --- a/extern/sector-storage/stores/local_test.go +++ b/storage/sector/stores/local_test.go @@ -3,7 +3,7 @@ package stores import ( "context" "encoding/json" - "github.com/filecoin-project/sector-storage/fsutil" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "github.com/google/uuid" "io/ioutil" "os" diff --git a/extern/sector-storage/stores/remote.go b/storage/sector/stores/remote.go similarity index 98% rename from extern/sector-storage/stores/remote.go rename to storage/sector/stores/remote.go index 12587a86e..97c7311b7 100644 --- a/extern/sector-storage/stores/remote.go +++ b/storage/sector/stores/remote.go @@ -3,7 +3,7 @@ package stores import ( "context" "encoding/json" - "github.com/filecoin-project/sector-storage/fsutil" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "io/ioutil" "math/bits" "mime" @@ -21,8 +21,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/sector-storage/storiface" - "github.com/filecoin-project/sector-storage/tarutil" + "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/storage/sector/tarutil" ) var FetchTempSubdir = "fetching" diff --git a/extern/sector-storage/stores/util_unix.go b/storage/sector/stores/util_unix.go similarity index 100% rename from extern/sector-storage/stores/util_unix.go rename to storage/sector/stores/util_unix.go diff --git a/extern/sector-storage/storiface/ffi.go b/storage/sector/storiface/ffi.go similarity index 100% rename from extern/sector-storage/storiface/ffi.go rename to storage/sector/storiface/ffi.go diff --git a/extern/sector-storage/storiface/worker.go b/storage/sector/storiface/worker.go similarity index 90% rename from extern/sector-storage/storiface/worker.go rename to storage/sector/storiface/worker.go index 01ef59d36..bc3d9f1ad 100644 --- a/extern/sector-storage/storiface/worker.go +++ b/storage/sector/storiface/worker.go @@ -3,7 +3,7 @@ package storiface import ( "time" - "github.com/filecoin-project/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/extern/sector-storage/tarutil/systar.go b/storage/sector/tarutil/systar.go similarity index 100% rename from extern/sector-storage/tarutil/systar.go rename to storage/sector/tarutil/systar.go diff --git a/extern/sector-storage/testworker_test.go b/storage/sector/testworker_test.go similarity index 93% rename from extern/sector-storage/testworker_test.go rename to storage/sector/testworker_test.go index 40151a84d..c1c2852b5 100644 --- a/extern/sector-storage/testworker_test.go +++ b/storage/sector/testworker_test.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -9,10 +9,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/sector-storage/mock" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/mock" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) type testWorker struct { diff --git a/extern/sector-storage/work_tracker.go b/storage/sector/work_tracker.go similarity index 94% rename from extern/sector-storage/work_tracker.go rename to storage/sector/work_tracker.go index 7453752c9..78c3926ec 100644 --- a/extern/sector-storage/work_tracker.go +++ b/storage/sector/work_tracker.go @@ -1,4 +1,4 @@ -package sectorstorage +package sector import ( "context" @@ -11,9 +11,9 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/sector-storage/sealtasks" - "github.com/filecoin-project/sector-storage/stores" - "github.com/filecoin-project/sector-storage/storiface" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/storage/sector/storiface" ) type workTracker struct { diff --git a/extern/sector-storage/zerocomm/zerocomm.go b/storage/sector/zerocomm/zerocomm.go similarity index 100% rename from extern/sector-storage/zerocomm/zerocomm.go rename to storage/sector/zerocomm/zerocomm.go diff --git a/extern/sector-storage/zerocomm/zerocomm_test.go b/storage/sector/zerocomm/zerocomm_test.go similarity index 95% rename from extern/sector-storage/zerocomm/zerocomm_test.go rename to storage/sector/zerocomm/zerocomm_test.go index f3206740b..a187db49e 100644 --- a/extern/sector-storage/zerocomm/zerocomm_test.go +++ b/storage/sector/zerocomm/zerocomm_test.go @@ -10,8 +10,8 @@ import ( abi "github.com/filecoin-project/specs-actors/actors/abi" "github.com/ipfs/go-cid" - "github.com/filecoin-project/sector-storage/ffiwrapper" - "github.com/filecoin-project/sector-storage/zerocomm" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/zerocomm" ) func TestComms(t *testing.T) { diff --git a/storage/wdpost_sched.go b/storage/wdpost_sched.go index 2bf7799d9..6ecdd5f29 100644 --- a/storage/wdpost_sched.go +++ b/storage/wdpost_sched.go @@ -9,7 +9,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - sectorstorage "github.com/filecoin-project/sector-storage" + "github.com/filecoin-project/lotus/storage/sector" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-storage/storage" @@ -26,7 +26,7 @@ type WindowPoStScheduler struct { api storageMinerApi feeCfg config.MinerFeeConfig prover storage.Prover - faultTracker sectorstorage.FaultTracker + faultTracker sector.FaultTracker proofType abi.RegisteredPoStProof partitionSectors uint64 @@ -43,7 +43,7 @@ type WindowPoStScheduler struct { //failLk sync.Mutex } -func NewWindowedPoStScheduler(api storageMinerApi, fc config.MinerFeeConfig, sb storage.Prover, ft sectorstorage.FaultTracker, actor address.Address, worker address.Address) (*WindowPoStScheduler, error) { +func NewWindowedPoStScheduler(api storageMinerApi, fc config.MinerFeeConfig, sb storage.Prover, ft sector.FaultTracker, actor address.Address, worker address.Address) (*WindowPoStScheduler, error) { mi, err := api.StateMinerInfo(context.TODO(), actor, types.EmptyTSK) if err != nil { return nil, xerrors.Errorf("getting sector size: %w", err) From 1eed341951c2724d3e46423e74668f4f5343133e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Sun, 16 Aug 2020 11:14:24 +0100 Subject: [PATCH 08/37] fix test compilation error. --- storage/sector/ffiwrapper/sealer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/sector/ffiwrapper/sealer_test.go b/storage/sector/ffiwrapper/sealer_test.go index 22cc29cfc..ca27531bc 100644 --- a/storage/sector/ffiwrapper/sealer_test.go +++ b/storage/sector/ffiwrapper/sealer_test.go @@ -225,7 +225,7 @@ func getGrothParamFileAndVerifyingKeys(s abi.SectorSize) { panic(err) } - err = paramfetch.GetParams(dat, uint64(s)) + err = paramfetch.GetParams(context.TODO(), dat, uint64(s)) if err != nil { panic(xerrors.Errorf("failed to acquire Groth parameters for 2KiB sectors: %w", err)) } From 2b511d2f571b63b12c30274bddae8b8488dd9c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Sun, 16 Aug 2020 11:40:35 +0100 Subject: [PATCH 09/37] fix lint errors. --- storage/sector/faults.go | 4 ++-- storage/sector/ffiwrapper/basicfs/fs.go | 8 ++++---- storage/sector/ffiwrapper/partialfile.go | 8 ++++---- storage/sector/ffiwrapper/sealer_cgo.go | 24 +++++++++++----------- storage/sector/ffiwrapper/sealer_test.go | 10 +++++---- storage/sector/ffiwrapper/unseal_ranges.go | 3 ++- storage/sector/ffiwrapper/verifier_cgo.go | 8 +++++--- storage/sector/fr32/fr32.go | 4 ++-- storage/sector/fr32/fr32_ffi_cmp_test.go | 9 ++++---- storage/sector/fr32/fr32_test.go | 2 +- storage/sector/fsutil/filesize_unix.go | 2 +- storage/sector/manager.go | 3 ++- storage/sector/manager_test.go | 14 ++++++------- storage/sector/mock/mock.go | 12 +++++------ storage/sector/sched.go | 8 ++++---- storage/sector/stores/filetype.go | 3 ++- storage/sector/stores/http_handler.go | 2 +- storage/sector/stores/index.go | 23 +++++++++++---------- storage/sector/stores/interface.go | 1 + storage/sector/stores/local.go | 9 ++++---- storage/sector/stores/local_test.go | 5 +++-- storage/sector/stores/remote.go | 20 +++++++++--------- storage/sector/stores/util_unix.go | 2 +- storage/sector/storiface/worker.go | 4 ++-- storage/sector/tarutil/systar.go | 5 +++-- 25 files changed, 103 insertions(+), 90 deletions(-) diff --git a/storage/sector/faults.go b/storage/sector/faults.go index 36a2113ec..1b69e4f68 100644 --- a/storage/sector/faults.go +++ b/storage/sector/faults.go @@ -12,12 +12,12 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" ) -// TODO: Track things more actively +// FaultTracker TODO: Track things more actively type FaultTracker interface { CheckProvable(ctx context.Context, spt abi.RegisteredSealProof, sectors []abi.SectorID) ([]abi.SectorID, error) } -// Returns unprovable sectors +// CheckProvable returns unprovable sectors func (m *Manager) CheckProvable(ctx context.Context, spt abi.RegisteredSealProof, sectors []abi.SectorID) ([]abi.SectorID, error) { var bad []abi.SectorID diff --git a/storage/sector/ffiwrapper/basicfs/fs.go b/storage/sector/ffiwrapper/basicfs/fs.go index d167f6dec..9e36bf797 100644 --- a/storage/sector/ffiwrapper/basicfs/fs.go +++ b/storage/sector/ffiwrapper/basicfs/fs.go @@ -25,20 +25,20 @@ type Provider struct { } func (b *Provider) AcquireSector(ctx context.Context, id abi.SectorID, existing stores.SectorFileType, allocate stores.SectorFileType, ptype stores.PathType) (stores.SectorPaths, func(), error) { - if err := os.Mkdir(filepath.Join(b.Root, stores.FTUnsealed.String()), 0755); err != nil && !os.IsExist(err) { + if err := os.Mkdir(filepath.Join(b.Root, stores.FTUnsealed.String()), 0755); err != nil && !os.IsExist(err) { // nolint return stores.SectorPaths{}, nil, err } - if err := os.Mkdir(filepath.Join(b.Root, stores.FTSealed.String()), 0755); err != nil && !os.IsExist(err) { + if err := os.Mkdir(filepath.Join(b.Root, stores.FTSealed.String()), 0755); err != nil && !os.IsExist(err) { // nolint return stores.SectorPaths{}, nil, err } - if err := os.Mkdir(filepath.Join(b.Root, stores.FTCache.String()), 0755); err != nil && !os.IsExist(err) { + if err := os.Mkdir(filepath.Join(b.Root, stores.FTCache.String()), 0755); err != nil && !os.IsExist(err) { // nolint return stores.SectorPaths{}, nil, err } done := func() {} out := stores.SectorPaths{ - Id: id, + ID: id, } for _, fileType := range stores.PathTypes { diff --git a/storage/sector/ffiwrapper/partialfile.go b/storage/sector/ffiwrapper/partialfile.go index 9171704f4..5599d1fde 100644 --- a/storage/sector/ffiwrapper/partialfile.go +++ b/storage/sector/ffiwrapper/partialfile.go @@ -58,7 +58,7 @@ func writeTrailer(maxPieceSize int64, w *os.File, r rlepluslazy.RunIterator) err } func createPartialFile(maxPieceSize abi.PaddedPieceSize, path string) (*partialFile, error) { - f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0644) + f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0644) // nolint if err != nil { return nil, xerrors.Errorf("openning partial file '%s': %w", path, err) } @@ -82,7 +82,7 @@ func createPartialFile(maxPieceSize abi.PaddedPieceSize, path string) (*partialF return nil }() if err != nil { - f.Close() + _ = f.Close() return nil, err } if err := f.Close(); err != nil { @@ -93,7 +93,7 @@ func createPartialFile(maxPieceSize abi.PaddedPieceSize, path string) (*partialF } func openPartialFile(maxPieceSize abi.PaddedPieceSize, path string) (*partialFile, error) { - f, err := os.OpenFile(path, os.O_RDWR, 0644) + f, err := os.OpenFile(path, os.O_RDWR, 0644) // nolint if err != nil { return nil, xerrors.Errorf("openning partial file '%s': %w", path, err) } @@ -161,7 +161,7 @@ func openPartialFile(maxPieceSize abi.PaddedPieceSize, path string) (*partialFil return nil }() if err != nil { - f.Close() + _ = f.Close() return nil, err } diff --git a/storage/sector/ffiwrapper/sealer_cgo.go b/storage/sector/ffiwrapper/sealer_cgo.go index 9bdb3f6d3..5e7930546 100644 --- a/storage/sector/ffiwrapper/sealer_cgo.go +++ b/storage/sector/ffiwrapper/sealer_cgo.go @@ -190,7 +190,7 @@ func (sb *Sealer) pieceCid(in []byte) (cid.Cid, error) { return cid.Undef, xerrors.Errorf("generating piece commitment: %w", err) } - prf.Close() + _ = prf.Close() return pieceCID, werr() } @@ -225,7 +225,7 @@ func (sb *Sealer) UnsealPiece(ctx context.Context, sector abi.SectorID, offset s default: return xerrors.Errorf("acquire unsealed sector path (existing): %w", err) } - defer pf.Close() + defer pf.Close() // nolint allocated, err := pf.Allocated() if err != nil { @@ -247,11 +247,11 @@ func (sb *Sealer) UnsealPiece(ctx context.Context, sector abi.SectorID, offset s } defer srcDone() - sealed, err := os.OpenFile(srcPaths.Sealed, os.O_RDONLY, 0644) + sealed, err := os.OpenFile(srcPaths.Sealed, os.O_RDONLY, 0644) // nolint:gosec if err != nil { return xerrors.Errorf("opening sealed file: %w", err) } - defer sealed.Close() + defer sealed.Close() // nolint var at, nextat abi.PaddedPieceSize first := true @@ -287,7 +287,7 @@ func (sb *Sealer) UnsealPiece(ctx context.Context, sector abi.SectorID, offset s { go func() { defer close(outWait) - defer opr.Close() + defer opr.Close() // nolint padwriter := fr32.NewPadWriter(out) if err != nil { @@ -377,18 +377,18 @@ func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector abi.Se ok, err := pf.HasAllocated(offset, size) if err != nil { - pf.Close() + _ = pf.Close() return false, err } if !ok { - pf.Close() + _ = pf.Close() return false, nil } f, err := pf.Reader(offset.Padded(), size.Padded()) if err != nil { - pf.Close() + _ = pf.Close() return false, xerrors.Errorf("getting partial file reader: %w", err) } @@ -398,7 +398,7 @@ func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector abi.Se } if _, err := io.CopyN(writer, upr, int64(size)); err != nil { - pf.Close() + _ = pf.Close() return false, xerrors.Errorf("reading unsealed file: %w", err) } @@ -416,7 +416,7 @@ func (sb *Sealer) SealPreCommit1(ctx context.Context, sector abi.SectorID, ticke } defer done() - e, err := os.OpenFile(paths.Sealed, os.O_RDWR|os.O_CREATE, 0644) + e, err := os.OpenFile(paths.Sealed, os.O_RDWR|os.O_CREATE, 0644) // nolint:gosec if err != nil { return nil, xerrors.Errorf("ensuring sealed file exists: %w", err) } @@ -424,7 +424,7 @@ func (sb *Sealer) SealPreCommit1(ctx context.Context, sector abi.SectorID, ticke return nil, err } - if err := os.Mkdir(paths.Cache, 0755); err != nil { + if err := os.Mkdir(paths.Cache, 0755); err != nil { // nolint if os.IsExist(err) { log.Warnf("existing cache in %s; removing", paths.Cache) @@ -432,7 +432,7 @@ func (sb *Sealer) SealPreCommit1(ctx context.Context, sector abi.SectorID, ticke return nil, xerrors.Errorf("remove existing sector cache from %s (sector %d): %w", paths.Cache, sector, err) } - if err := os.Mkdir(paths.Cache, 0755); err != nil { + if err := os.Mkdir(paths.Cache, 0755); err != nil { // nolint:gosec return nil, xerrors.Errorf("mkdir cache path after cleanup: %w", err) } } else { diff --git a/storage/sector/ffiwrapper/sealer_test.go b/storage/sector/ffiwrapper/sealer_test.go index ca27531bc..6af5a6217 100644 --- a/storage/sector/ffiwrapper/sealer_test.go +++ b/storage/sector/ffiwrapper/sealer_test.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "fmt" - "github.com/ipfs/go-cid" "io" "io/ioutil" "math/rand" @@ -16,15 +15,18 @@ import ( "testing" "time" + "github.com/ipfs/go-cid" + logging "github.com/ipfs/go-log" "github.com/stretchr/testify/require" "golang.org/x/xerrors" - ffi "github.com/filecoin-project/filecoin-ffi" paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" + ffi "github.com/filecoin-project/filecoin-ffi" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" "github.com/filecoin-project/lotus/storage/sector/stores" ) @@ -443,8 +445,8 @@ func BenchmarkWriteWithAlignment(b *testing.B) { tf, _ := ioutil.TempFile("/tmp/", "scrb-") b.StartTimer() - ffi.WriteWithAlignment(abi.RegisteredSealProof_StackedDrg2KiBV1, rf, bt, tf, nil) - w() + ffi.WriteWithAlignment(abi.RegisteredSealProof_StackedDrg2KiBV1, rf, bt, tf, nil) // nolint:errcheck + _ = w() } } diff --git a/storage/sector/ffiwrapper/unseal_ranges.go b/storage/sector/ffiwrapper/unseal_ranges.go index 78fceb1c7..8d0d4936a 100644 --- a/storage/sector/ffiwrapper/unseal_ranges.go +++ b/storage/sector/ffiwrapper/unseal_ranges.go @@ -3,7 +3,8 @@ package ffiwrapper import ( "golang.org/x/xerrors" - "github.com/filecoin-project/go-bitfield/rle" + rlepluslazy "github.com/filecoin-project/go-bitfield/rle" + "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/lotus/storage/sector/storiface" diff --git a/storage/sector/ffiwrapper/verifier_cgo.go b/storage/sector/ffiwrapper/verifier_cgo.go index dd7ab196a..ccc2ec7a2 100644 --- a/storage/sector/ffiwrapper/verifier_cgo.go +++ b/storage/sector/ffiwrapper/verifier_cgo.go @@ -4,14 +4,16 @@ package ffiwrapper import ( "context" + "golang.org/x/xerrors" - "go.opencensus.io/trace" - - ffi "github.com/filecoin-project/filecoin-ffi" "github.com/filecoin-project/specs-actors/actors/abi" + ffi "github.com/filecoin-project/filecoin-ffi" + "github.com/filecoin-project/lotus/storage/sector/stores" + + "go.opencensus.io/trace" ) func (sb *Sealer) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []abi.SectorInfo, randomness abi.PoStRandomness) ([]abi.PoStProof, error) { diff --git a/storage/sector/fr32/fr32.go b/storage/sector/fr32/fr32.go index fdf9d9223..b7248db7e 100644 --- a/storage/sector/fr32/fr32.go +++ b/storage/sector/fr32/fr32.go @@ -44,8 +44,8 @@ func mt(in, out []byte, padLen int, op func(unpadded, padded []byte)) { wg.Wait() } -// Assumes len(in)%127==0 and len(out)%128==0 func Pad(in, out []byte) { + // Assumes len(in)%127==0 and len(out)%128==0 if len(out) > int(MTTresh) { mt(in, out, len(out), pad) return @@ -94,8 +94,8 @@ func pad(in, out []byte) { } } -// Assumes len(in)%128==0 and len(out)%127==0 func Unpad(in []byte, out []byte) { + // Assumes len(in)%128==0 and len(out)%127==0 if len(in) > int(MTTresh) { mt(out, in, len(in), unpad) return diff --git a/storage/sector/fr32/fr32_ffi_cmp_test.go b/storage/sector/fr32/fr32_ffi_cmp_test.go index 280a2981f..29f7a58c7 100644 --- a/storage/sector/fr32/fr32_ffi_cmp_test.go +++ b/storage/sector/fr32/fr32_ffi_cmp_test.go @@ -2,18 +2,19 @@ package fr32_test import ( "bytes" - "github.com/filecoin-project/lotus/storage/sector/fr32" "io" "io/ioutil" "os" "testing" - "github.com/stretchr/testify/require" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/fr32" ffi "github.com/filecoin-project/filecoin-ffi" + "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/stretchr/testify/require" ) func TestWriteTwoPcs(t *testing.T) { @@ -39,7 +40,7 @@ func TestWriteTwoPcs(t *testing.T) { } } - if _, err := tf.Seek(io.SeekStart, 0); err != nil { + if _, err := tf.Seek(io.SeekStart, 0); err != nil { // nolint:staticcheck panic(err) } diff --git a/storage/sector/fr32/fr32_test.go b/storage/sector/fr32/fr32_test.go index 262fb6674..be3ec3e3d 100644 --- a/storage/sector/fr32/fr32_test.go +++ b/storage/sector/fr32/fr32_test.go @@ -28,7 +28,7 @@ func padFFI(buf []byte) []byte { panic(err) } - if _, err := tf.Seek(io.SeekStart, 0); err != nil { + if _, err := tf.Seek(io.SeekStart, 0); err != nil { // nolint:staticcheck panic(err) } diff --git a/storage/sector/fsutil/filesize_unix.go b/storage/sector/fsutil/filesize_unix.go index dacdcd515..23732013b 100644 --- a/storage/sector/fsutil/filesize_unix.go +++ b/storage/sector/fsutil/filesize_unix.go @@ -24,6 +24,6 @@ func FileSize(path string) (SizeInfo, error) { // NOTE: stat.Blocks is in 512B blocks, NOT in stat.Blksize // See https://www.gnu.org/software/libc/manual/html_node/Attribute-Meanings.html return SizeInfo{ - int64(stat.Blocks) * 512, // NOTE: int64 cast is needed on osx + stat.Blocks * 512, // NOTE: int64 cast is needed on osx }, nil } diff --git a/storage/sector/manager.go b/storage/sector/manager.go index 90c13e37e..a6fffdb22 100644 --- a/storage/sector/manager.go +++ b/storage/sector/manager.go @@ -3,10 +3,11 @@ package sector import ( "context" "errors" - "github.com/filecoin-project/lotus/storage/sector/fsutil" "io" "net/http" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" "github.com/mitchellh/go-homedir" diff --git a/storage/sector/manager_test.go b/storage/sector/manager_test.go index 869f8556c..04291c1bd 100644 --- a/storage/sector/manager_test.go +++ b/storage/sector/manager_test.go @@ -5,22 +5,22 @@ import ( "context" "encoding/json" "fmt" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - logging "github.com/ipfs/go-log" "io/ioutil" "os" "path/filepath" "strings" "testing" - "github.com/google/uuid" - "github.com/stretchr/testify/require" + "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/google/uuid" + logging "github.com/ipfs/go-log" + "github.com/stretchr/testify/require" ) func init() { diff --git a/storage/sector/mock/mock.go b/storage/sector/mock/mock.go index 9ad399d54..afe82f290 100644 --- a/storage/sector/mock/mock.go +++ b/storage/sector/mock/mock.go @@ -76,8 +76,8 @@ func (mgr *SectorMgr) NewSector(ctx context.Context, sector abi.SectorID) error return nil } -func (mgr *SectorMgr) AddPiece(ctx context.Context, sectorId abi.SectorID, existingPieces []abi.UnpaddedPieceSize, size abi.UnpaddedPieceSize, r io.Reader) (abi.PieceInfo, error) { - log.Warn("Add piece: ", sectorId, size, mgr.proofType) +func (mgr *SectorMgr) AddPiece(ctx context.Context, sectorID abi.SectorID, existingPieces []abi.UnpaddedPieceSize, size abi.UnpaddedPieceSize, r io.Reader) (abi.PieceInfo, error) { + log.Warn("Add piece: ", sectorID, size, mgr.proofType) var b bytes.Buffer tr := io.TeeReader(r, &b) @@ -92,12 +92,12 @@ func (mgr *SectorMgr) AddPiece(ctx context.Context, sectorId abi.SectorID, exist mgr.lk.Lock() mgr.pieces[c] = b.Bytes() - ss, ok := mgr.sectors[sectorId] + ss, ok := mgr.sectors[sectorID] if !ok { ss = §orState{ state: statePacking, } - mgr.sectors[sectorId] = ss + mgr.sectors[sectorID] = ss } mgr.lk.Unlock() @@ -260,7 +260,7 @@ func opFinishWait(ctx context.Context) { func AddOpFinish(ctx context.Context) (context.Context, func()) { done := make(chan struct{}) - return context.WithValue(ctx, "opfinish", done), func() { + return context.WithValue(ctx, "opfinish", done), func() { // nolint close(done) } } @@ -338,7 +338,7 @@ func (mgr *SectorMgr) StageFakeData(mid abi.ActorID) (abi.SectorID, []abi.PieceI } buf := make([]byte, usize) - rand.Read(buf) + _, _ = rand.Read(buf) // nolint:gosec id := abi.SectorID{ Miner: mid, diff --git a/storage/sector/sched.go b/storage/sector/sched.go index 7213d6377..2dcf94e91 100644 --- a/storage/sector/sched.go +++ b/storage/sector/sched.go @@ -323,15 +323,15 @@ func (sh *scheduler) trySched() { // Pick best worker (shuffle in case some workers are equally as good) rand.Shuffle(len(acceptableWindows[sqi]), func(i, j int) { - acceptableWindows[sqi][i], acceptableWindows[sqi][j] = acceptableWindows[sqi][j], acceptableWindows[sqi][i] + acceptableWindows[sqi][i], acceptableWindows[sqi][j] = acceptableWindows[sqi][j], acceptableWindows[sqi][i] // nolint:scopelint }) sort.SliceStable(acceptableWindows[sqi], func(i, j int) bool { - wii := sh.openWindows[acceptableWindows[sqi][i]].worker - wji := sh.openWindows[acceptableWindows[sqi][j]].worker + wii := sh.openWindows[acceptableWindows[sqi][i]].worker // nolint:scopelint + wji := sh.openWindows[acceptableWindows[sqi][j]].worker // nolint:scopelint if wii == wji { // for the same worker prefer older windows - return acceptableWindows[sqi][i] < acceptableWindows[sqi][j] + return acceptableWindows[sqi][i] < acceptableWindows[sqi][j] // nolint:scopelint } wi := sh.workers[wii] diff --git a/storage/sector/stores/filetype.go b/storage/sector/stores/filetype.go index 650b92f71..50417d968 100644 --- a/storage/sector/stores/filetype.go +++ b/storage/sector/stores/filetype.go @@ -2,6 +2,7 @@ package stores import ( "fmt" + "golang.org/x/xerrors" "github.com/filecoin-project/specs-actors/actors/abi" @@ -86,7 +87,7 @@ func (t SectorFileType) All() [FileTypes]bool { } type SectorPaths struct { - Id abi.SectorID + ID abi.SectorID Unsealed string Sealed string diff --git a/storage/sector/stores/http_handler.go b/storage/sector/stores/http_handler.go index ed77da0c7..3bf664fd5 100644 --- a/storage/sector/stores/http_handler.go +++ b/storage/sector/stores/http_handler.go @@ -100,7 +100,7 @@ func (handler *FetchHandler) remoteGetSector(w http.ResponseWriter, r *http.Requ rd, err = tarutil.TarDirectory(path) w.Header().Set("Content-Type", "application/x-tar") } else { - rd, err = os.OpenFile(path, os.O_RDONLY, 0644) + rd, err = os.OpenFile(path, os.O_RDONLY, 0644) // nolint w.Header().Set("Content-Type", "application/octet-stream") } if err != nil { diff --git a/storage/sector/stores/index.go b/storage/sector/stores/index.go index fb874784d..b51ea0f52 100644 --- a/storage/sector/stores/index.go +++ b/storage/sector/stores/index.go @@ -2,7 +2,6 @@ package stores import ( "context" - "github.com/filecoin-project/lotus/storage/sector/fsutil" "net/url" gopath "path" "sort" @@ -11,6 +10,8 @@ import ( "golang.org/x/xerrors" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" ) @@ -52,8 +53,8 @@ type SectorIndex interface { // part of storage-miner api StorageInfo(context.Context, ID) (StorageInfo, error) StorageReportHealth(context.Context, ID, HealthReport) error - StorageDeclareSector(ctx context.Context, storageId ID, s abi.SectorID, ft SectorFileType, primary bool) error - StorageDropSector(ctx context.Context, storageId ID, s abi.SectorID, ft SectorFileType) error + StorageDeclareSector(ctx context.Context, storageID ID, s abi.SectorID, ft SectorFileType, primary bool) error + StorageDropSector(ctx context.Context, storageID ID, s abi.SectorID, ft SectorFileType) error StorageFindSector(ctx context.Context, sector abi.SectorID, ft SectorFileType, spt abi.RegisteredSealProof, allowFetch bool) ([]SectorStorageInfo, error) StorageBestAlloc(ctx context.Context, allocate SectorFileType, spt abi.RegisteredSealProof, pathType PathType) ([]StorageInfo, error) @@ -179,7 +180,7 @@ func (i *Index) StorageReportHealth(ctx context.Context, id ID, report HealthRep return nil } -func (i *Index) StorageDeclareSector(ctx context.Context, storageId ID, s abi.SectorID, ft SectorFileType, primary bool) error { +func (i *Index) StorageDeclareSector(ctx context.Context, storageID ID, s abi.SectorID, ft SectorFileType, primary bool) error { i.lk.Lock() defer i.lk.Unlock() @@ -192,18 +193,18 @@ loop: d := Decl{s, fileType} for _, sid := range i.sectors[d] { - if sid.storage == storageId { + if sid.storage == storageID { if !sid.primary && primary { sid.primary = true } else { - log.Warnf("sector %v redeclared in %s", s, storageId) + log.Warnf("sector %v redeclared in %s", s, storageID) } continue loop } } i.sectors[d] = append(i.sectors[d], &declMeta{ - storage: storageId, + storage: storageID, primary: primary, }) } @@ -211,7 +212,7 @@ loop: return nil } -func (i *Index) StorageDropSector(ctx context.Context, storageId ID, s abi.SectorID, ft SectorFileType) error { +func (i *Index) StorageDropSector(ctx context.Context, storageID ID, s abi.SectorID, ft SectorFileType) error { i.lk.Lock() defer i.lk.Unlock() @@ -228,7 +229,7 @@ func (i *Index) StorageDropSector(ctx context.Context, storageId ID, s abi.Secto rewritten := make([]*declMeta, 0, len(i.sectors[d])-1) for _, sid := range i.sectors[d] { - if sid.storage == storageId { + if sid.storage == storageID { continue } @@ -406,8 +407,8 @@ func (i *Index) StorageBestAlloc(ctx context.Context, allocate SectorFileType, s } sort.Slice(candidates, func(i, j int) bool { - iw := big.Mul(big.NewInt(int64(candidates[i].fsi.Available)), big.NewInt(int64(candidates[i].info.Weight))) - jw := big.Mul(big.NewInt(int64(candidates[j].fsi.Available)), big.NewInt(int64(candidates[j].info.Weight))) + iw := big.Mul(big.NewInt(candidates[i].fsi.Available), big.NewInt(int64(candidates[i].info.Weight))) + jw := big.Mul(big.NewInt(candidates[j].fsi.Available), big.NewInt(int64(candidates[j].info.Weight))) return iw.GreaterThan(jw) }) diff --git a/storage/sector/stores/interface.go b/storage/sector/stores/interface.go index 7a1a0d449..46a07ee0d 100644 --- a/storage/sector/stores/interface.go +++ b/storage/sector/stores/interface.go @@ -2,6 +2,7 @@ package stores import ( "context" + "github.com/filecoin-project/lotus/storage/sector/fsutil" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/storage/sector/stores/local.go b/storage/sector/stores/local.go index 7c41e09bb..cf301b902 100644 --- a/storage/sector/stores/local.go +++ b/storage/sector/stores/local.go @@ -13,8 +13,9 @@ import ( "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/fsutil" "github.com/filecoin-project/specs-actors/actors/abi" + + "github.com/filecoin-project/lotus/storage/sector/fsutil" ) type StoragePath struct { @@ -27,7 +28,7 @@ type StoragePath struct { CanStore bool } -// [path]/sectorstore.json +// LocalStorageMeta [path]/sectorstore.json type LocalStorageMeta struct { ID ID Weight uint64 // 0 = readonly @@ -36,7 +37,7 @@ type LocalStorageMeta struct { CanStore bool } -// .lotusstorage/storage.json +// StorageConfig .lotusstorage/storage.json type StorageConfig struct { StoragePaths []LocalPath } @@ -182,7 +183,7 @@ func (st *Local) OpenPath(ctx context.Context, p string) error { ents, err := ioutil.ReadDir(filepath.Join(p, t.String())) if err != nil { if os.IsNotExist(err) { - if err := os.MkdirAll(filepath.Join(p, t.String()), 0755); err != nil { + if err := os.MkdirAll(filepath.Join(p, t.String()), 0755); err != nil { // nolint return xerrors.Errorf("openPath mkdir '%s': %w", filepath.Join(p, t.String()), err) } diff --git a/storage/sector/stores/local_test.go b/storage/sector/stores/local_test.go index 91119ceb3..a4e39894e 100644 --- a/storage/sector/stores/local_test.go +++ b/storage/sector/stores/local_test.go @@ -3,13 +3,14 @@ package stores import ( "context" "encoding/json" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/google/uuid" "io/ioutil" "os" "path/filepath" "testing" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + + "github.com/google/uuid" "github.com/stretchr/testify/require" ) diff --git a/storage/sector/stores/remote.go b/storage/sector/stores/remote.go index 97c7311b7..6e069e0a4 100644 --- a/storage/sector/stores/remote.go +++ b/storage/sector/stores/remote.go @@ -3,7 +3,6 @@ package stores import ( "context" "encoding/json" - "github.com/filecoin-project/lotus/storage/sector/fsutil" "io/ioutil" "math/bits" "mime" @@ -15,14 +14,15 @@ import ( "sort" "sync" - "github.com/hashicorp/go-multierror" - files "github.com/ipfs/go-ipfs-files" - "golang.org/x/xerrors" + "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/storage/sector/tarutil" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/storiface" - "github.com/filecoin-project/lotus/storage/sector/tarutil" + "github.com/hashicorp/go-multierror" + files "github.com/ipfs/go-ipfs-files" + "golang.org/x/xerrors" ) var FetchTempSubdir = "fetching" @@ -161,7 +161,7 @@ func tempFetchDest(spath string, create bool) (string, error) { st, b := filepath.Split(spath) tempdir := filepath.Join(st, FetchTempSubdir) if create { - if err := os.MkdirAll(tempdir, 0755); err != nil { + if err := os.MkdirAll(tempdir, 0755); err != nil { // nolint return "", xerrors.Errorf("creating temp fetch dir: %w", err) } } @@ -246,7 +246,7 @@ func (r *Remote) fetch(ctx context.Context, url, outname string) error { if err != nil { return xerrors.Errorf("do request: %w", err) } - defer resp.Body.Close() + defer resp.Body.Close() // nolint if resp.StatusCode != 200 { return xerrors.Errorf("non-200 code: %d", resp.StatusCode) @@ -332,7 +332,7 @@ func (r *Remote) deleteFromRemote(ctx context.Context, url string) error { if err != nil { return xerrors.Errorf("do request: %w", err) } - defer resp.Body.Close() + defer resp.Body.Close() // nolint if resp.StatusCode != 200 { return xerrors.Errorf("non-200 code: %d", resp.StatusCode) @@ -398,7 +398,7 @@ func (r *Remote) FsStat(ctx context.Context, id ID) (fsutil.FsStat, error) { return fsutil.FsStat{}, xerrors.Errorf("decoding fsstat: %w", err) } - defer resp.Body.Close() + defer resp.Body.Close() // nolint return out, nil } diff --git a/storage/sector/stores/util_unix.go b/storage/sector/stores/util_unix.go index eeb691ddf..2b057468d 100644 --- a/storage/sector/stores/util_unix.go +++ b/storage/sector/stores/util_unix.go @@ -33,7 +33,7 @@ func move(from, to string) error { // can do better var errOut bytes.Buffer - cmd := exec.Command("/usr/bin/env", "mv", "-t", toDir, from) + cmd := exec.Command("/usr/bin/env", "mv", "-t", toDir, from) // nolint cmd.Stderr = &errOut if err := cmd.Run(); err != nil { return xerrors.Errorf("exec mv (stderr: %s): %w", strings.TrimSpace(errOut.String()), err) diff --git a/storage/sector/storiface/worker.go b/storage/sector/storiface/worker.go index bc3d9f1ad..78051b20e 100644 --- a/storage/sector/storiface/worker.go +++ b/storage/sector/storiface/worker.go @@ -28,8 +28,8 @@ type WorkerStats struct { MemUsedMin uint64 MemUsedMax uint64 - GpuUsed bool - CpuUse uint64 + GpuUsed bool // nolint + CpuUse uint64 // nolint } type WorkerJob struct { diff --git a/storage/sector/tarutil/systar.go b/storage/sector/tarutil/systar.go index 94de58ea8..6811cb46a 100644 --- a/storage/sector/tarutil/systar.go +++ b/storage/sector/tarutil/systar.go @@ -2,19 +2,20 @@ package tarutil import ( "archive/tar" - "golang.org/x/xerrors" "io" "io/ioutil" "os" "path/filepath" + "golang.org/x/xerrors" + logging "github.com/ipfs/go-log/v2" ) var log = logging.Logger("tarutil") // nolint func ExtractTar(body io.Reader, dir string) error { - if err := os.MkdirAll(dir, 0755); err != nil { + if err := os.MkdirAll(dir, 0755); err != nil { // nolint return xerrors.Errorf("mkdir: %w", err) } From 4f6d01d2ea3f6804e787290d588b9e36b2970681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Sun, 16 Aug 2020 12:28:39 +0100 Subject: [PATCH 10/37] fix path in failing test. --- storage/sector/ffiwrapper/sealer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/sector/ffiwrapper/sealer_test.go b/storage/sector/ffiwrapper/sealer_test.go index 6af5a6217..eb1f94485 100644 --- a/storage/sector/ffiwrapper/sealer_test.go +++ b/storage/sector/ffiwrapper/sealer_test.go @@ -222,7 +222,7 @@ func post(t *testing.T, sealer *Sealer, seals ...seal) time.Time { } func getGrothParamFileAndVerifyingKeys(s abi.SectorSize) { - dat, err := ioutil.ReadFile("../parameters.json") + dat, err := ioutil.ReadFile("../../../build/proof-params/parameters.json") if err != nil { panic(err) } From 884d4ad9dfcfe1dc30e8ecde4db75f71437c0b12 Mon Sep 17 00:00:00 2001 From: vyzo Date: Sun, 16 Aug 2020 20:46:19 +0300 Subject: [PATCH 11/37] fix clown shoes pubsub validation: we always accept our own self-published messages --- chain/sub/incoming.go | 18 +++++++++++++++--- node/modules/services.go | 6 +++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/chain/sub/incoming.go b/chain/sub/incoming.go index 75f23cd3b..fb00e4ae1 100644 --- a/chain/sub/incoming.go +++ b/chain/sub/incoming.go @@ -195,6 +195,8 @@ func fetchCids( } type BlockValidator struct { + self peer.ID + peers *lru.TwoQueueCache killThresh int @@ -211,9 +213,10 @@ type BlockValidator struct { keycache map[string]address.Address } -func NewBlockValidator(chain *store.ChainStore, stmgr *stmgr.StateManager, blacklist func(peer.ID)) *BlockValidator { +func NewBlockValidator(self peer.ID, chain *store.ChainStore, stmgr *stmgr.StateManager, blacklist func(peer.ID)) *BlockValidator { p, _ := lru.New2Q(4096) return &BlockValidator{ + self: self, peers: p, killThresh: 10, blacklist: blacklist, @@ -243,6 +246,10 @@ func (bv *BlockValidator) flagPeer(p peer.ID) { } func (bv *BlockValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub.Message) pubsub.ValidationResult { + if pid == bv.self { + return pubsub.ValidationAccept + } + // track validation time begin := build.Clock.Now() defer func() { @@ -485,14 +492,19 @@ func (brc *blockReceiptCache) add(bcid cid.Cid) int { } type MessageValidator struct { + self peer.ID mpool *messagepool.MessagePool } -func NewMessageValidator(mp *messagepool.MessagePool) *MessageValidator { - return &MessageValidator{mp} +func NewMessageValidator(self peer.ID, mp *messagepool.MessagePool) *MessageValidator { + return &MessageValidator{self: self, mpool: mp} } func (mv *MessageValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub.Message) pubsub.ValidationResult { + if pid == mv.self { + return pubsub.ValidationAccept + } + stats.Record(ctx, metrics.MessageReceived.M(1)) m, err := types.DecodeSignedMessage(msg.Message.GetData()) if err != nil { diff --git a/node/modules/services.go b/node/modules/services.go index 0d148ffb4..013a6c0af 100644 --- a/node/modules/services.go +++ b/node/modules/services.go @@ -82,7 +82,7 @@ func HandleIncomingBlocks(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub.P } v := sub.NewBlockValidator( - chain, stmgr, + h.ID(), chain, stmgr, func(p peer.ID) { ps.BlacklistPeer(p) h.ConnManager().TagPeer(p, "badblock", -1000) @@ -95,7 +95,7 @@ func HandleIncomingBlocks(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub.P go sub.HandleIncomingBlocks(ctx, blocksub, s, bserv, h.ConnManager()) } -func HandleIncomingMessages(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub.PubSub, mpool *messagepool.MessagePool, nn dtypes.NetworkName) { +func HandleIncomingMessages(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub.PubSub, mpool *messagepool.MessagePool, h host.Host, nn dtypes.NetworkName) { ctx := helpers.LifecycleCtx(mctx, lc) msgsub, err := ps.Subscribe(build.MessagesTopic(nn)) @@ -103,7 +103,7 @@ func HandleIncomingMessages(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub panic(err) } - v := sub.NewMessageValidator(mpool) + v := sub.NewMessageValidator(h.ID(), mpool) if err := ps.RegisterTopicValidator(build.MessagesTopic(nn), v.Validate); err != nil { panic(err) From 0d3aaabd2cc1adf857cb7530608b55b13e4bc77f Mon Sep 17 00:00:00 2001 From: lanzafame Date: Mon, 17 Aug 2020 13:51:04 +1000 Subject: [PATCH 12/37] Add config command that prints the default config file for a storage miner --- cmd/lotus-storage-miner/config.go | 22 ++++++++++++++++++++++ cmd/lotus-storage-miner/main.go | 1 + 2 files changed, 23 insertions(+) create mode 100644 cmd/lotus-storage-miner/config.go diff --git a/cmd/lotus-storage-miner/config.go b/cmd/lotus-storage-miner/config.go new file mode 100644 index 000000000..0c843fe23 --- /dev/null +++ b/cmd/lotus-storage-miner/config.go @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + + "github.com/urfave/cli/v2" + + "github.com/filecoin-project/lotus/node/config" +) + +var configCmd = &cli.Command{ + Name: "config", + Usage: "Output default configuration", + Action: func(cctx *cli.Context) error { + comm, err := config.ConfigComment(config.DefaultStorageMiner()) + if err != nil { + return err + } + fmt.Println(string(comm)) + return nil + }, +} diff --git a/cmd/lotus-storage-miner/main.go b/cmd/lotus-storage-miner/main.go index 5848bb0eb..c4ba2a171 100644 --- a/cmd/lotus-storage-miner/main.go +++ b/cmd/lotus-storage-miner/main.go @@ -32,6 +32,7 @@ func main() { initCmd, runCmd, stopCmd, + configCmd, lcli.WithCategory("chain", actorCmd), lcli.WithCategory("chain", rewardsCmd), lcli.WithCategory("chain", infoCmd), From ae88a99c842b887ee8c2ca93c73003590fe9f848 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 17 Aug 2020 09:04:22 +0300 Subject: [PATCH 13/37] add some lightweight validation of local messages --- chain/sub/incoming.go | 79 +++++++++++++++++++++++++++++++++++++++++-- metrics/metrics.go | 2 ++ 2 files changed, 79 insertions(+), 2 deletions(-) diff --git a/chain/sub/incoming.go b/chain/sub/incoming.go index fb00e4ae1..d65794aea 100644 --- a/chain/sub/incoming.go +++ b/chain/sub/incoming.go @@ -247,7 +247,7 @@ func (bv *BlockValidator) flagPeer(p peer.ID) { func (bv *BlockValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub.Message) pubsub.ValidationResult { if pid == bv.self { - return pubsub.ValidationAccept + return bv.validateLocalBlock(ctx, msg) } // track validation time @@ -339,6 +339,42 @@ func (bv *BlockValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub return pubsub.ValidationAccept } +func (bv *BlockValidator) validateLocalBlock(ctx context.Context, msg *pubsub.Message) pubsub.ValidationResult { + stats.Record(ctx, metrics.BlockPublished.M(1)) + + // do some lightweight validation for local blocks + blk, err := types.DecodeBlockMsg(msg.GetData()) + if err != nil { + log.Warnf("error decoding local block: %s", err) + stats.Record(ctx, metrics.BlockValidationFailure.M(1)) + return pubsub.ValidationIgnore + } + + if len(blk.BlsMessages)+len(blk.SecpkMessages) > build.BlockMessageLimit { + log.Warnf("local block with too many messages: %d", len(blk.BlsMessages)+len(blk.SecpkMessages)) + stats.Record(ctx, metrics.BlockValidationFailure.M(1)) + return pubsub.ValidationIgnore + } + + // make sure we have a signature + if blk.Header.BlockSig == nil { + log.Warn("local block without a signature") + stats.Record(ctx, metrics.BlockValidationFailure.M(1)) + return pubsub.ValidationIgnore + } + + // Note we don't actually validate that signature as this is a slow process + + if count := bv.recvBlocks.add(blk.Header.Cid()); count > 0 { + log.Warnf("local block has been seen %d times; ignoring", count) + return pubsub.ValidationIgnore + } + + msg.ValidatorData = blk + stats.Record(ctx, metrics.BlockValidationSuccess.M(1)) + return pubsub.ValidationAccept +} + func (bv *BlockValidator) isChainNearSynced() bool { ts := bv.chain.GetHeaviestTipSet() timestamp := ts.MinTimestamp() @@ -502,7 +538,7 @@ func NewMessageValidator(self peer.ID, mp *messagepool.MessagePool) *MessageVali func (mv *MessageValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub.Message) pubsub.ValidationResult { if pid == mv.self { - return pubsub.ValidationAccept + return mv.validateLocalMessage(ctx, msg) } stats.Record(ctx, metrics.MessageReceived.M(1)) @@ -532,6 +568,45 @@ func (mv *MessageValidator) Validate(ctx context.Context, pid peer.ID, msg *pubs return pubsub.ValidationAccept } +func (mv *MessageValidator) validateLocalMessage(ctx context.Context, msg *pubsub.Message) pubsub.ValidationResult { + // do some lightweight validation + stats.Record(ctx, metrics.MessagePublished.M(1)) + + m, err := types.DecodeSignedMessage(msg.Message.GetData()) + if err != nil { + log.Warnf("failed to decode local message: %s", err) + stats.Record(ctx, metrics.MessageValidationFailure.M(1)) + return pubsub.ValidationIgnore + } + + if m.Size() > 32*1024 { + log.Warnf("local message is too large! (%dB)", m.Size()) + stats.Record(ctx, metrics.MessageValidationFailure.M(1)) + return pubsub.ValidationIgnore + } + + if m.Message.To == address.Undef { + log.Warn("local message has invalid destination address") + stats.Record(ctx, metrics.MessageValidationFailure.M(1)) + return pubsub.ValidationIgnore + } + + if !m.Message.Value.LessThan(types.TotalFilecoinInt) { + log.Warnf("local messages has too high value: %s", m.Message.Value) + stats.Record(ctx, metrics.MessageValidationFailure.M(1)) + return pubsub.ValidationIgnore + } + + if err := mv.mpool.VerifyMsgSig(m); err != nil { + log.Warnf("signature verification failed for local message: %s", err) + stats.Record(ctx, metrics.MessageValidationFailure.M(1)) + return pubsub.ValidationIgnore + } + + stats.Record(ctx, metrics.MessageValidationSuccess.M(1)) + return pubsub.ValidationAccept +} + func HandleIncomingMessages(ctx context.Context, mpool *messagepool.MessagePool, msub *pubsub.Subscription) { for { _, err := msub.Next(ctx) diff --git a/metrics/metrics.go b/metrics/metrics.go index f60e809e8..38df27c70 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -30,9 +30,11 @@ var ( LotusInfo = stats.Int64("info", "Arbitrary counter to tag lotus info to", stats.UnitDimensionless) ChainNodeHeight = stats.Int64("chain/node_height", "Current Height of the node", stats.UnitDimensionless) ChainNodeWorkerHeight = stats.Int64("chain/node_worker_height", "Current Height of workers on the node", stats.UnitDimensionless) + MessagePublished = stats.Int64("message/pubished", "Counter for total locally published messages", stats.UnitDimensionless) MessageReceived = stats.Int64("message/received", "Counter for total received messages", stats.UnitDimensionless) MessageValidationFailure = stats.Int64("message/failure", "Counter for message validation failures", stats.UnitDimensionless) MessageValidationSuccess = stats.Int64("message/success", "Counter for message validation successes", stats.UnitDimensionless) + BlockPublished = stats.Int64("block/published", "Counter for total locally published blocks", stats.UnitDimensionless) BlockReceived = stats.Int64("block/received", "Counter for total received blocks", stats.UnitDimensionless) BlockValidationFailure = stats.Int64("block/failure", "Counter for block validation failures", stats.UnitDimensionless) BlockValidationSuccess = stats.Int64("block/success", "Counter for block validation successes", stats.UnitDimensionless) From 3b6e2bdb7bfa74f61b939ac47e6ab81126b05fc5 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 17 Aug 2020 10:03:39 +0300 Subject: [PATCH 14/37] trigger early republish from head changes --- chain/messagepool/messagepool.go | 34 ++++++++++++++++++++++++++++++-- chain/messagepool/repub.go | 16 +++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index 5cb2f3048..92f29b8ba 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -75,8 +75,12 @@ type MessagePool struct { addSema chan struct{} - closer chan struct{} - repubTk *clock.Ticker + closer chan struct{} + + repubTk *clock.Ticker + repubTrigger chan struct{} + + republished map[cid.Cid]struct{} localAddrs map[address.Address]struct{} @@ -166,6 +170,7 @@ func New(api Provider, ds dtypes.MetadataDS, netName dtypes.NetworkName) (*Messa addSema: make(chan struct{}, 1), closer: make(chan struct{}), repubTk: build.Clock.Ticker(RepublishInterval), + repubTrigger: make(chan struct{}, 1), localAddrs: make(map[address.Address]struct{}), pending: make(map[address.Address]*msgSet), minGasPrice: types.NewInt(0), @@ -224,6 +229,10 @@ func (mp *MessagePool) runLoop() { if err := mp.republishPendingMessages(); err != nil { log.Errorf("error while republishing messages: %s", err) } + case <-mp.repubTrigger: + if err := mp.republishPendingMessages(); err != nil { + log.Errorf("error while republishing messages: %s", err) + } case <-mp.pruneTrigger: if err := mp.pruneExcessMessages(); err != nil { log.Errorf("failed to prune excess messages from mempool: %s", err) @@ -676,6 +685,7 @@ func (mp *MessagePool) HeadChange(revert []*types.TipSet, apply []*types.TipSet) mp.curTsLk.Lock() defer mp.curTsLk.Unlock() + repubTrigger := false rmsgs := make(map[address.Address]map[uint64]*types.SignedMessage) add := func(m *types.SignedMessage) { s, ok := rmsgs[m.Message.From] @@ -700,6 +710,17 @@ func (mp *MessagePool) HeadChange(revert []*types.TipSet, apply []*types.TipSet) mp.Remove(from, nonce) } + maybeRepub := func(cid cid.Cid) { + if !repubTrigger { + mp.lk.Lock() + _, republished := mp.republished[cid] + mp.lk.Unlock() + if republished { + repubTrigger = true + } + } + } + for _, ts := range revert { pts, err := mp.api.LoadTipSet(ts.Parents()) if err != nil { @@ -726,16 +747,25 @@ func (mp *MessagePool) HeadChange(revert []*types.TipSet, apply []*types.TipSet) } for _, msg := range smsgs { rm(msg.Message.From, msg.Message.Nonce) + maybeRepub(msg.Cid()) } for _, msg := range bmsgs { rm(msg.From, msg.Nonce) + maybeRepub(msg.Cid()) } } mp.curTs = ts } + if repubTrigger { + select { + case mp.repubTrigger <- struct{}{}: + default: + } + } + for _, s := range rmsgs { for _, msg := range s { if err := mp.addSkipChecks(msg); err != nil { diff --git a/chain/messagepool/repub.go b/chain/messagepool/repub.go index a55bc4f3f..ba375cab8 100644 --- a/chain/messagepool/repub.go +++ b/chain/messagepool/repub.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/messagepool/gasguess" "github.com/filecoin-project/lotus/chain/types" + "github.com/ipfs/go-cid" ) const repubMsgLimit = 30 @@ -26,6 +27,7 @@ func (mp *MessagePool) republishPendingMessages() error { pending := make(map[address.Address]map[uint64]*types.SignedMessage) mp.lk.Lock() + mp.republished = nil // clear this to avoid races triggering an early republish for actor := range mp.localAddrs { mset, ok := mp.pending[actor] if !ok { @@ -115,6 +117,7 @@ func (mp *MessagePool) republishPendingMessages() error { } } + count := 0 log.Infof("republishing %d messages", len(msgs)) for _, m := range msgs { mb, err := m.Serialize() @@ -126,7 +129,20 @@ func (mp *MessagePool) republishPendingMessages() error { if err != nil { return xerrors.Errorf("cannot publish: %w", err) } + + count++ } + // track most recently republished messages + republished := make(map[cid.Cid]struct{}) + for _, m := range msgs[:count] { + republished[m.Cid()] = struct{}{} + } + + mp.lk.Lock() + // update the republished set so that we can trigger early republish from head changes + mp.republished = republished + mp.lk.Unlock() + return nil } From fb77a758ffe105efb930108c7981daa86d7298c2 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 17 Aug 2020 10:10:25 +0300 Subject: [PATCH 15/37] note defaults in mpool configuration docs --- documentation/en/mpool.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/documentation/en/mpool.md b/documentation/en/mpool.md index 5ce9742f1..b9d18101f 100644 --- a/documentation/en/mpool.md +++ b/documentation/en/mpool.md @@ -121,13 +121,19 @@ The meaning of these fields is as follows: be included in a block during message selection, regardless of profitability. Miners should configure their own worker addresses so that they include their own messages when they produce a new block. + Default is empty. - `SizeLimitHigh` -- this is the maximum number of pending messages before triggering a prune in the message pool. Note that messages from priority addresses are never pruned. + Defafult is 30000. - `SizeLimitLow` -- this is the number of pending messages that should be kept after a prune. + Default is 20000. - `ReplaceByFeeRatio` -- this is the gas fee ratio for replacing messages in the mpool. Whenever a message is replaced, the `GasPremium` must be increased by this ratio. + Default is 1.25. - `PruneCooldown` -- this is the period of time to wait before triggering a new prune. + Default is 1min. - `GasLimitOverestimation` -- this is a parameter that controls the gas limit overestimation for new messages. + Default is 1.25. ## Message Selection From 8d7994cd82cec44045d8307cf908724ab39aca00 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 17 Aug 2020 10:12:54 +0300 Subject: [PATCH 16/37] fix confusing wording --- documentation/en/mpool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/en/mpool.md b/documentation/en/mpool.md index b9d18101f..0425b04e0 100644 --- a/documentation/en/mpool.md +++ b/documentation/en/mpool.md @@ -148,7 +148,7 @@ selection in a reasonable amount of time. The mpool employs a sophisticated algorithm for selecting messages for inclusion, given the ticket quality of a miner. The ticket quality -reflects the probability that a block will execute in the +reflects the probability of execution order for a block in the tipset. Given the ticket quality the algorithm computes the probability of each block, and picks dependent chains of messages such that the reward is maximized, while also optimizing the capacity of From 8cf9595d3560b977af95c7f70fd15a11472fa326 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 17 Aug 2020 10:46:20 +0300 Subject: [PATCH 17/37] collect pubsub metrics through the tracer --- metrics/metrics.go | 4 ++++ node/modules/lp2p/pubsub.go | 47 ++++++++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/metrics/metrics.go b/metrics/metrics.go index f60e809e8..738e6fbf8 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -38,6 +38,10 @@ var ( BlockValidationSuccess = stats.Int64("block/success", "Counter for block validation successes", stats.UnitDimensionless) BlockValidationDurationMilliseconds = stats.Float64("block/validation_ms", "Duration for Block Validation in ms", stats.UnitMilliseconds) PeerCount = stats.Int64("peer/count", "Current number of FIL peers", stats.UnitDimensionless) + PubsubPublishMessage = stats.Int64("pubsub/published", "Counter for total published messages", stats.UnitDimensionless) + PubsubDeliverMessage = stats.Int64("pubsub/delivered", "Counter for total delivered messages", stats.UnitDimensionless) + PubsubRejectMessage = stats.Int64("pubsub/rejected", "Counter for total rejected messages", stats.UnitDimensionless) + PubsubDuplicateMessage = stats.Int64("pubsub/duplicate", "Counter for total duplicate messages", stats.UnitDimensionless) ) var ( diff --git a/node/modules/lp2p/pubsub.go b/node/modules/lp2p/pubsub.go index cd5b24fe4..95596b7d5 100644 --- a/node/modules/lp2p/pubsub.go +++ b/node/modules/lp2p/pubsub.go @@ -11,10 +11,12 @@ import ( pubsub_pb "github.com/libp2p/go-libp2p-pubsub/pb" blake2b "github.com/minio/blake2b-simd" ma "github.com/multiformats/go-multiaddr" + "go.opencensus.io/stats" "go.uber.org/fx" "golang.org/x/xerrors" "github.com/filecoin-project/lotus/build" + "github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/helpers" @@ -303,12 +305,12 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) { trw := newTracerWrapper(tr, build.BlocksTopic(in.Nn)) options = append(options, pubsub.WithEventTracer(trw)) + } else { + // still instantiate a tracer for collecting metrics + trw := newTracerWrapper(nil) + options = append(options, pubsub.WithEventTracer(trw)) } - // TODO: we want to hook the peer score inspector so that we can gain visibility - // in peer scores for debugging purposes -- this might be trigged by metrics collection - // options = append(options, pubsub.WithPeerScoreInspect(XXX, time.Second)) - return pubsub.NewGossipSub(helpers.LifecycleCtx(in.Mctx, in.Lc), in.Host, options...) } @@ -318,10 +320,14 @@ func HashMsgId(m *pubsub_pb.Message) string { } func newTracerWrapper(tr pubsub.EventTracer, topics ...string) pubsub.EventTracer { - topicsMap := make(map[string]struct{}) - for _, topic := range topics { - topicsMap[topic] = struct{}{} + var topicsMap map[string]struct{} + if len(topics) > 0 { + topicsMap = make(map[string]struct{}) + for _, topic := range topics { + topicsMap[topic] = struct{}{} + } } + return &tracerWrapper{tr: tr, topics: topicsMap} } @@ -347,23 +353,36 @@ func (trw *tracerWrapper) Trace(evt *pubsub_pb.TraceEvent) { // distributions. // Furthermore, we only trace message publication and deliveries for specified topics // (here just the blocks topic). - // TODO: hook all events into local metrics for inspection through the dashboard switch evt.GetType() { case pubsub_pb.TraceEvent_PUBLISH_MESSAGE: - if trw.traceMessage(evt.GetPublishMessage().Topics) { + stats.Record(context.TODO(), metrics.PubsubPublishMessage.M(1)) + if trw.tr != nil && trw.traceMessage(evt.GetPublishMessage().Topics) { trw.tr.Trace(evt) } case pubsub_pb.TraceEvent_DELIVER_MESSAGE: - if trw.traceMessage(evt.GetDeliverMessage().Topics) { + stats.Record(context.TODO(), metrics.PubsubDeliverMessage.M(1)) + if trw.tr != nil && trw.traceMessage(evt.GetDeliverMessage().Topics) { trw.tr.Trace(evt) } + case pubsub_pb.TraceEvent_REJECT_MESSAGE: + stats.Record(context.TODO(), metrics.PubsubRejectMessage.M(1)) + case pubsub_pb.TraceEvent_DUPLICATE_MESSAGE: + stats.Record(context.TODO(), metrics.PubsubDuplicateMessage.M(1)) case pubsub_pb.TraceEvent_JOIN: - trw.tr.Trace(evt) + if trw.tr != nil { + trw.tr.Trace(evt) + } case pubsub_pb.TraceEvent_LEAVE: - trw.tr.Trace(evt) + if trw.tr != nil { + trw.tr.Trace(evt) + } case pubsub_pb.TraceEvent_GRAFT: - trw.tr.Trace(evt) + if trw.tr != nil { + trw.tr.Trace(evt) + } case pubsub_pb.TraceEvent_PRUNE: - trw.tr.Trace(evt) + if trw.tr != nil { + trw.tr.Trace(evt) + } } } From aded4b41999f9407de0ff6a281677291d13bbced Mon Sep 17 00:00:00 2001 From: yaohcn Date: Mon, 17 Aug 2020 16:04:50 +0800 Subject: [PATCH 18/37] add missing restart flag --- cmd/lotus-seal-worker/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/lotus-seal-worker/main.go b/cmd/lotus-seal-worker/main.go index 128862e0d..750affb5d 100644 --- a/cmd/lotus-seal-worker/main.go +++ b/cmd/lotus-seal-worker/main.go @@ -429,9 +429,13 @@ func watchMinerConn(ctx context.Context, cctx *cli.Context, nodeApi api.StorageM "run", fmt.Sprintf("--listen=%s", cctx.String("listen")), fmt.Sprintf("--no-local-storage=%t", cctx.Bool("no-local-storage")), + fmt.Sprintf("--addpiece=%t", cctx.Bool("addpiece")), fmt.Sprintf("--precommit1=%t", cctx.Bool("precommit1")), + fmt.Sprintf("--unseal=%t", cctx.Bool("unseal")), fmt.Sprintf("--precommit2=%t", cctx.Bool("precommit2")), fmt.Sprintf("--commit=%t", cctx.Bool("commit")), + fmt.Sprintf("--parallel-fetch-limit=%d", cctx.Int("parallel-fetch-limit")), + fmt.Sprintf("--timeout=%s", cctx.String("timeout")), }, os.Environ()); err != nil { fmt.Println(err) } From 39bcfab37c2757c4513d903ac558796cc1d81261 Mon Sep 17 00:00:00 2001 From: yaohcn Date: Mon, 17 Aug 2020 17:39:29 +0800 Subject: [PATCH 19/37] make addpiece configurable --- cmd/lotus-storage-miner/init.go | 1 + extern/sector-storage/manager.go | 6 +++++- node/config/def.go | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 6e21893db..8091de8d5 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -440,6 +440,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api lapi.FullNode, SealProofType: spt, }, sectorstorage.SealerConfig{ ParallelFetchLimit: 10, + AllowAddPiece: true, AllowPreCommit1: true, AllowPreCommit2: true, AllowCommit: true, diff --git a/extern/sector-storage/manager.go b/extern/sector-storage/manager.go index e9fa1ccd4..3f045ae93 100644 --- a/extern/sector-storage/manager.go +++ b/extern/sector-storage/manager.go @@ -79,6 +79,7 @@ type SealerConfig struct { ParallelFetchLimit int // Local worker config + AllowAddPiece bool AllowPreCommit1 bool AllowPreCommit2 bool AllowCommit bool @@ -117,7 +118,10 @@ func New(ctx context.Context, ls stores.LocalStorage, si stores.SectorIndex, cfg go m.sched.runSched() localTasks := []sealtasks.TaskType{ - sealtasks.TTAddPiece, sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTFetch, sealtasks.TTReadUnsealed, + sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTFetch, sealtasks.TTReadUnsealed, + } + if sc.AllowAddPiece { + localTasks = append(localTasks, sealtasks.TTAddPiece) } if sc.AllowPreCommit1 { localTasks = append(localTasks, sealtasks.TTPreCommit1) diff --git a/node/config/def.go b/node/config/def.go index 2e1243e5b..dca0f686d 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -133,6 +133,7 @@ func DefaultStorageMiner() *StorageMiner { Common: defCommon(), Storage: sectorstorage.SealerConfig{ + AllowAddPiece: true, AllowPreCommit1: true, AllowPreCommit2: true, AllowCommit: true, From 7595b1d8d40157365f288a1db92df024df092e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 17 Aug 2020 11:48:12 +0200 Subject: [PATCH 20/37] cli: pprof goroutines command --- cli/cmd.go | 2 + cli/pprof.go | 59 +++++++++++++++++++++++++++++ cmd/lotus-storage-miner/info_all.go | 5 +++ 3 files changed, 66 insertions(+) create mode 100644 cli/pprof.go diff --git a/cli/cmd.go b/cli/cmd.go index 59a0d6c68..a201af2e9 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -238,6 +238,7 @@ var CommonCommands = []*cli.Command{ logCmd, waitApiCmd, fetchParamCmd, + pprofCmd, VersionCmd, } @@ -256,6 +257,7 @@ var Commands = []*cli.Command{ WithCategory("developer", fetchParamCmd), WithCategory("network", netCmd), WithCategory("network", syncCmd), + pprofCmd, VersionCmd, } diff --git a/cli/pprof.go b/cli/pprof.go new file mode 100644 index 000000000..dff089e7f --- /dev/null +++ b/cli/pprof.go @@ -0,0 +1,59 @@ +package cli + +import ( + "io" + "net/http" + "os" + + "github.com/urfave/cli/v2" + "golang.org/x/xerrors" + + "github.com/filecoin-project/lotus/node/repo" + manet "github.com/multiformats/go-multiaddr-net" +) + +var pprofCmd = &cli.Command{ + Name: "pprof", + Hidden: true, + Subcommands: []*cli.Command{ + PprofGoroutines, + }, +} + +var PprofGoroutines = &cli.Command{ + Name: "goroutines", + Usage: "Get goroutine stacks", + Action: func(cctx *cli.Context) error { + ti, ok := cctx.App.Metadata["repoType"] + if !ok { + log.Errorf("unknown repo type, are you sure you want to use GetAPI?") + ti = repo.FullNode + } + t, ok := ti.(repo.RepoType) + if !ok { + log.Errorf("repoType type does not match the type of repo.RepoType") + } + ainfo, err := GetAPIInfo(cctx, t) + if err != nil { + return xerrors.Errorf("could not get API info: %w", err) + } + _, addr, err := manet.DialArgs(ainfo.Addr) + if err != nil { + return err + } + + addr = "http://" + addr + "/debug/pprof/goroutine?debug=2" + + r, err := http.Get(addr) + if err != nil { + return err + } + + if _, err := io.Copy(os.Stdout, r.Body); err != nil { + return err + } + + return r.Body.Close() + }, +} + diff --git a/cmd/lotus-storage-miner/info_all.go b/cmd/lotus-storage-miner/info_all.go index cc0cadbac..78b7cb0d5 100644 --- a/cmd/lotus-storage-miner/info_all.go +++ b/cmd/lotus-storage-miner/info_all.go @@ -148,6 +148,11 @@ var infoAllCmd = &cli.Command{ } } + fmt.Println("\n#: Goroutines") + if err := lcli.PprofGoroutines.Action(cctx); err != nil { + return err + } + return nil }, } From efdc428d5d6461a2ac01c37d59b9ac1da7581c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Mon, 17 Aug 2020 14:26:18 +0100 Subject: [PATCH 21/37] keep storage-fsm (renamed to storage-sealing) and sector-storage in extern. --- api/api_storage.go | 6 ++-- api/api_worker.go | 6 ++-- api/apistruct/struct.go | 8 ++--- api/test/deals.go | 2 +- api/test/window_post.go | 4 +-- chain/gen/gen.go | 2 +- chain/gen/genesis/miners.go | 2 +- chain/stmgr/utils.go | 2 +- chain/sync.go | 2 +- chain/vm/syscalls.go | 2 +- cmd/lotus-bench/import.go | 2 +- cmd/lotus-bench/main.go | 6 ++-- cmd/lotus-fountain/main.go | 2 +- cmd/lotus-seal-worker/main.go | 10 +++---- cmd/lotus-seal-worker/rpc.go | 4 +-- cmd/lotus-seed/main.go | 2 +- cmd/lotus-seed/seed/seed.go | 8 ++--- cmd/lotus-storage-miner/info.go | 2 +- cmd/lotus-storage-miner/init.go | 12 ++++---- cmd/lotus-storage-miner/sealing.go | 2 +- cmd/lotus-storage-miner/storage.go | 4 +-- cmd/lotus/daemon.go | 2 +- .../sector-storage}/README.md | 0 .../sector-storage}/docs/sector-storage.svg | 0 .../sector-storage}/faults.go | 4 +-- .../sector-storage}/ffiwrapper/basicfs/fs.go | 4 +-- .../sector-storage}/ffiwrapper/config.go | 0 .../sector-storage}/ffiwrapper/files.go | 0 .../sector-storage}/ffiwrapper/partialfile.go | 4 +-- .../sector-storage}/ffiwrapper/sealer.go | 0 .../sector-storage}/ffiwrapper/sealer_cgo.go | 8 ++--- .../sector-storage}/ffiwrapper/sealer_test.go | 4 +-- .../sector-storage}/ffiwrapper/types.go | 6 ++-- .../ffiwrapper/unseal_ranges.go | 2 +- .../ffiwrapper/verifier_cgo.go | 2 +- .../sector-storage}/fr32/fr32.go | 0 .../sector-storage}/fr32/fr32_ffi_cmp_test.go | 4 +-- .../sector-storage}/fr32/fr32_test.go | 4 +-- .../sector-storage}/fr32/readers.go | 0 .../sector-storage}/fr32/readers_test.go | 2 +- .../sector-storage}/fr32/utils.go | 0 .../sector-storage}/fsutil/dealloc_linux.go | 0 .../sector-storage}/fsutil/dealloc_other.go | 0 .../sector-storage}/fsutil/filesize_unix.go | 0 .../sector-storage}/fsutil/statfs.go | 0 .../sector-storage}/fsutil/statfs_unix.go | 0 .../sector-storage}/fsutil/statfs_windows.go | 0 .../sector-storage}/localworker.go | 10 +++---- .../sector-storage}/manager.go | 12 ++++---- .../sector-storage}/manager_test.go | 10 +++---- .../sector-storage}/mock/mock.go | 4 +-- .../sector-storage}/mock/mock_test.go | 0 .../sector-storage}/mock/util.go | 0 .../sector-storage}/request_queue.go | 2 +- .../sector-storage}/request_queue_test.go | 4 +-- .../sector-storage}/resources.go | 4 +-- .../sector-storage}/roprov.go | 4 +-- .../sector => extern/sector-storage}/sched.go | 6 ++-- .../sector-storage}/sched_resources.go | 4 +-- .../sector-storage}/sched_test.go | 10 +++---- .../sector-storage}/sched_watch.go | 2 +- .../sector-storage}/sealtasks/task.go | 0 .../sector-storage}/selector_alloc.go | 6 ++-- .../sector-storage}/selector_existing.go | 6 ++-- .../sector-storage}/selector_task.go | 6 ++-- .../sector => extern/sector-storage}/stats.go | 4 +-- .../sector-storage}/stores/filetype.go | 0 .../sector-storage}/stores/http_handler.go | 2 +- .../sector-storage}/stores/index.go | 2 +- .../sector-storage}/stores/index_locks.go | 0 .../stores/index_locks_test.go | 0 .../stores/index_locks_util.go | 0 .../sector-storage}/stores/interface.go | 2 +- .../sector-storage}/stores/local.go | 2 +- .../sector-storage}/stores/local_test.go | 2 +- .../sector-storage}/stores/remote.go | 6 ++-- .../sector-storage}/stores/util_unix.go | 0 .../sector-storage}/storiface/ffi.go | 0 .../sector-storage}/storiface/worker.go | 2 +- .../sector-storage}/tarutil/systar.go | 0 .../sector-storage}/testworker_test.go | 10 +++---- .../sector-storage}/work_tracker.go | 8 ++--- .../sector-storage}/zerocomm/zerocomm.go | 0 .../sector-storage}/zerocomm/zerocomm_test.go | 4 +-- .../storage-sealing}/cbor_gen.go | 0 .../storage-sealing}/checks.go | 4 +-- .../storage-sealing}/constants.go | 0 .../storage-sealing}/events.go | 0 .../sealing => extern/storage-sealing}/fsm.go | 0 .../storage-sealing}/fsm_events.go | 0 .../storage-sealing}/fsm_test.go | 0 .../storage-sealing}/garbage.go | 0 .../storage-sealing}/gen/main.go | 2 +- .../lib/nullreader/nullreader.go | 0 .../storage-sealing}/nullreader.go | 0 .../storage-sealing}/precommit_policy.go | 0 .../storage-sealing}/precommit_policy_test.go | 2 +- .../storage-sealing}/sealing.go | 10 +++---- .../storage-sealing}/sector_state.go | 0 .../storage-sealing}/states_failed.go | 0 .../storage-sealing}/states_proving.go | 0 .../storage-sealing}/states_sealing.go | 0 .../storage-sealing}/types.go | 5 ++-- .../storage-sealing}/types_test.go | 0 .../storage-sealing}/upgrade_queue.go | 0 .../storage-sealing}/utils.go | 0 .../storage-sealing}/utils_test.go | 0 lib/rpcenc/reader.go | 2 +- lib/rpcenc/reader_test.go | 2 +- markets/retrievaladapter/provider.go | 8 ++--- markets/storageadapter/provider.go | 2 +- node/builder.go | 22 +++++++------- node/config/def.go | 6 ++-- node/config/storage.go | 2 +- node/impl/client/client.go | 2 +- node/impl/full/state.go | 2 +- node/impl/remoteworker.go | 4 +-- node/impl/storminer.go | 17 ++++++----- node/modules/chain.go | 2 +- node/modules/storageminer.go | 23 ++++++++------- node/node_test.go | 10 +++---- node/repo/fsrepo.go | 4 +-- node/repo/interface.go | 4 +-- node/repo/memrepo.go | 4 +-- storage/adapter_events.go | 2 +- storage/adapter_storage_miner.go | 2 +- storage/miner.go | 10 +++---- storage/mockstorage/preseal.go | 6 ++-- storage/sealing.go | 2 +- storage/sector/Makefile | 29 ------------------- storage/sectorblocks/blocks.go | 2 +- storage/wdpost_run.go | 2 +- storage/wdpost_sched.go | 11 +++---- 133 files changed, 225 insertions(+), 250 deletions(-) rename {storage/sector => extern/sector-storage}/README.md (100%) rename {storage/sector => extern/sector-storage}/docs/sector-storage.svg (100%) rename {storage/sector => extern/sector-storage}/faults.go (97%) rename {storage/sector => extern/sector-storage}/ffiwrapper/basicfs/fs.go (93%) rename {storage/sector => extern/sector-storage}/ffiwrapper/config.go (100%) rename {storage/sector => extern/sector-storage}/ffiwrapper/files.go (100%) rename {storage/sector => extern/sector-storage}/ffiwrapper/partialfile.go (98%) rename {storage/sector => extern/sector-storage}/ffiwrapper/sealer.go (100%) rename {storage/sector => extern/sector-storage}/ffiwrapper/sealer_cgo.go (98%) rename {storage/sector => extern/sector-storage}/ffiwrapper/sealer_test.go (98%) rename {storage/sector => extern/sector-storage}/ffiwrapper/types.go (88%) rename {storage/sector => extern/sector-storage}/ffiwrapper/unseal_ranges.go (92%) rename {storage/sector => extern/sector-storage}/ffiwrapper/verifier_cgo.go (98%) rename {storage/sector => extern/sector-storage}/fr32/fr32.go (100%) rename {storage/sector => extern/sector-storage}/fr32/fr32_ffi_cmp_test.go (90%) rename {storage/sector => extern/sector-storage}/fr32/fr32_test.go (97%) rename {storage/sector => extern/sector-storage}/fr32/readers.go (100%) rename {storage/sector => extern/sector-storage}/fr32/readers_test.go (89%) rename {storage/sector => extern/sector-storage}/fr32/utils.go (100%) rename {storage/sector => extern/sector-storage}/fsutil/dealloc_linux.go (100%) rename {storage/sector => extern/sector-storage}/fsutil/dealloc_other.go (100%) rename {storage/sector => extern/sector-storage}/fsutil/filesize_unix.go (100%) rename {storage/sector => extern/sector-storage}/fsutil/statfs.go (100%) rename {storage/sector => extern/sector-storage}/fsutil/statfs_unix.go (100%) rename {storage/sector => extern/sector-storage}/fsutil/statfs_windows.go (100%) rename {storage/sector => extern/sector-storage}/localworker.go (96%) rename {storage/sector => extern/sector-storage}/manager.go (97%) rename {storage/sector => extern/sector-storage}/manager_test.go (91%) rename {storage/sector => extern/sector-storage}/mock/mock.go (98%) rename {storage/sector => extern/sector-storage}/mock/mock_test.go (100%) rename {storage/sector => extern/sector-storage}/mock/util.go (100%) rename {storage/sector => extern/sector-storage}/request_queue.go (97%) rename {storage/sector => extern/sector-storage}/request_queue_test.go (92%) rename {storage/sector => extern/sector-storage}/resources.go (98%) rename {storage/sector => extern/sector-storage}/roprov.go (92%) rename {storage/sector => extern/sector-storage}/sched.go (98%) rename {storage/sector => extern/sector-storage}/sched_resources.go (96%) rename {storage/sector => extern/sector-storage}/sched_test.go (97%) rename {storage/sector => extern/sector-storage}/sched_watch.go (98%) rename {storage/sector => extern/sector-storage}/sealtasks/task.go (100%) rename {storage/sector => extern/sector-storage}/selector_alloc.go (90%) rename {storage/sector => extern/sector-storage}/selector_existing.go (91%) rename {storage/sector => extern/sector-storage}/selector_task.go (88%) rename {storage/sector => extern/sector-storage}/stats.go (88%) rename {storage/sector => extern/sector-storage}/stores/filetype.go (100%) rename {storage/sector => extern/sector-storage}/stores/http_handler.go (97%) rename {storage/sector => extern/sector-storage}/stores/index.go (99%) rename {storage/sector => extern/sector-storage}/stores/index_locks.go (100%) rename {storage/sector => extern/sector-storage}/stores/index_locks_test.go (100%) rename {storage/sector => extern/sector-storage}/stores/index_locks_util.go (100%) rename {storage/sector => extern/sector-storage}/stores/interface.go (93%) rename {storage/sector => extern/sector-storage}/stores/local.go (99%) rename {storage/sector => extern/sector-storage}/stores/local_test.go (96%) rename {storage/sector => extern/sector-storage}/stores/remote.go (98%) rename {storage/sector => extern/sector-storage}/stores/util_unix.go (100%) rename {storage/sector => extern/sector-storage}/storiface/ffi.go (100%) rename {storage/sector => extern/sector-storage}/storiface/worker.go (89%) rename {storage/sector => extern/sector-storage}/tarutil/systar.go (100%) rename {storage/sector => extern/sector-storage}/testworker_test.go (92%) rename {storage/sector => extern/sector-storage}/work_tracker.go (94%) rename {storage/sector => extern/sector-storage}/zerocomm/zerocomm.go (100%) rename {storage/sector => extern/sector-storage}/zerocomm/zerocomm_test.go (95%) rename {storage/sealing => extern/storage-sealing}/cbor_gen.go (100%) rename {storage/sealing => extern/storage-sealing}/checks.go (97%) rename {storage/sealing => extern/storage-sealing}/constants.go (100%) rename {storage/sealing => extern/storage-sealing}/events.go (100%) rename {storage/sealing => extern/storage-sealing}/fsm.go (100%) rename {storage/sealing => extern/storage-sealing}/fsm_events.go (100%) rename {storage/sealing => extern/storage-sealing}/fsm_test.go (100%) rename {storage/sealing => extern/storage-sealing}/garbage.go (100%) rename {storage/sealing => extern/storage-sealing}/gen/main.go (84%) rename {storage/sealing => extern/storage-sealing}/lib/nullreader/nullreader.go (100%) rename {storage/sealing => extern/storage-sealing}/nullreader.go (100%) rename {storage/sealing => extern/storage-sealing}/precommit_policy.go (100%) rename {storage/sealing => extern/storage-sealing}/precommit_policy_test.go (98%) rename {storage/sealing => extern/storage-sealing}/sealing.go (94%) rename {storage/sealing => extern/storage-sealing}/sector_state.go (100%) rename {storage/sealing => extern/storage-sealing}/states_failed.go (100%) rename {storage/sealing => extern/storage-sealing}/states_proving.go (100%) rename {storage/sealing => extern/storage-sealing}/states_sealing.go (100%) rename {storage/sealing => extern/storage-sealing}/types.go (97%) rename {storage/sealing => extern/storage-sealing}/types_test.go (100%) rename {storage/sealing => extern/storage-sealing}/upgrade_queue.go (100%) rename {storage/sealing => extern/storage-sealing}/utils.go (100%) rename {storage/sealing => extern/storage-sealing}/utils_test.go (100%) delete mode 100644 storage/sector/Makefile diff --git a/api/api_storage.go b/api/api_storage.go index 62bf5f5a4..3e029bc9f 100644 --- a/api/api_storage.go +++ b/api/api_storage.go @@ -12,9 +12,9 @@ import ( "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/api/api_worker.go b/api/api_worker.go index 64445becd..5b7cdc7e4 100644 --- a/api/api_worker.go +++ b/api/api_worker.go @@ -6,9 +6,9 @@ import ( "github.com/ipfs/go-cid" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index ec8d7c784..eabf4fa26 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -15,11 +15,11 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/go-multistore" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" marketevents "github.com/filecoin-project/lotus/markets/loggers" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/miner" diff --git a/api/test/deals.go b/api/test/deals.go index f3c53933b..d29c6473a 100644 --- a/api/test/deals.go +++ b/api/test/deals.go @@ -22,8 +22,8 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/miner" - "github.com/filecoin-project/lotus/storage/sealing" dag "github.com/ipfs/go-merkledag" dstest "github.com/ipfs/go-merkledag/test" unixfile "github.com/ipfs/go-unixfs/file" diff --git a/api/test/window_post.go b/api/test/window_post.go index 8ced2b00f..a22f78904 100644 --- a/api/test/window_post.go +++ b/api/test/window_post.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/storage/sealing" - "github.com/filecoin-project/lotus/storage/sector/mock" + "github.com/filecoin-project/lotus/extern/sector-storage/mock" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/specs-actors/actors/abi" miner2 "github.com/filecoin-project/specs-actors/actors/builtin/miner" diff --git a/chain/gen/gen.go b/chain/gen/gen.go index a7c1bfda4..bcf9c4f10 100644 --- a/chain/gen/gen.go +++ b/chain/gen/gen.go @@ -34,11 +34,11 @@ import ( "github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/cmd/lotus-seed/seed" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/lib/blockstore" "github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/node/repo" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" ) var log = logging.Logger("gen") diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index 44a1544ce..0491371d3 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -14,7 +14,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index 720b528f3..c8ae9ce53 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -13,7 +13,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin" "github.com/filecoin-project/specs-actors/actors/builtin/account" diff --git a/chain/sync.go b/chain/sync.go index 0753d79a3..b0ae185b0 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -24,7 +24,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin" "github.com/filecoin-project/specs-actors/actors/builtin/power" diff --git a/chain/vm/syscalls.go b/chain/vm/syscalls.go index 1530b8bcd..41ed9c762 100644 --- a/chain/vm/syscalls.go +++ b/chain/vm/syscalls.go @@ -23,7 +23,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/runtime" "github.com/filecoin-project/specs-actors/actors/util/adt" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" ) func init() { diff --git a/cmd/lotus-bench/import.go b/cmd/lotus-bench/import.go index cb3cae628..9944adc0b 100644 --- a/cmd/lotus-bench/import.go +++ b/cmd/lotus-bench/import.go @@ -25,7 +25,7 @@ import ( _ "github.com/filecoin-project/lotus/lib/sigs/bls" _ "github.com/filecoin-project/lotus/lib/sigs/secp" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/ipfs/go-datastore" diff --git a/cmd/lotus-bench/main.go b/cmd/lotus-bench/main.go index 0b163eb79..694987f27 100644 --- a/cmd/lotus-bench/main.go +++ b/cmd/lotus-bench/main.go @@ -21,9 +21,9 @@ import ( "github.com/filecoin-project/go-address" paramfetch "github.com/filecoin-project/go-paramfetch" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-storage/storage" diff --git a/cmd/lotus-fountain/main.go b/cmd/lotus-fountain/main.go index e0c929498..8e3461595 100644 --- a/cmd/lotus-fountain/main.go +++ b/cmd/lotus-fountain/main.go @@ -21,7 +21,7 @@ import ( "github.com/urfave/cli/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" diff --git a/cmd/lotus-seal-worker/main.go b/cmd/lotus-seal-worker/main.go index 9ac16799f..8113067ca 100644 --- a/cmd/lotus-seal-worker/main.go +++ b/cmd/lotus-seal-worker/main.go @@ -22,18 +22,18 @@ import ( "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-jsonrpc/auth" paramfetch "github.com/filecoin-project/go-paramfetch" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/apistruct" "github.com/filecoin-project/lotus/build" lcli "github.com/filecoin-project/lotus/cli" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/lib/rpcenc" "github.com/filecoin-project/lotus/node/repo" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" ) var log = logging.Logger("main") @@ -336,7 +336,7 @@ var runCmd = &cli.Command{ // Create / expose the worker workerApi := &worker{ - LocalWorker: sector.NewLocalWorker(sector.WorkerConfig{ + LocalWorker: sectorstorage.NewLocalWorker(sectorstorage.WorkerConfig{ SealProof: spt, TaskTypes: taskTypes, }, remote, localStore, nodeApi), diff --git a/cmd/lotus-seal-worker/rpc.go b/cmd/lotus-seal-worker/rpc.go index 7a1632284..ec3bccad5 100644 --- a/cmd/lotus-seal-worker/rpc.go +++ b/cmd/lotus-seal-worker/rpc.go @@ -5,13 +5,13 @@ import ( "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/build" ) type worker struct { - *sector.LocalWorker + *sectorstorage.LocalWorker } func (w *worker) Version(context.Context) (build.Version, error) { diff --git a/cmd/lotus-seed/main.go b/cmd/lotus-seed/main.go index 9a2b498e6..508d1d222 100644 --- a/cmd/lotus-seed/main.go +++ b/cmd/lotus-seed/main.go @@ -8,7 +8,7 @@ import ( "os" "github.com/docker/go-units" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" logging "github.com/ipfs/go-log/v2" "github.com/mitchellh/go-homedir" diff --git a/cmd/lotus-seed/seed/seed.go b/cmd/lotus-seed/seed/seed.go index 33dc360e5..5b4a1fbac 100644 --- a/cmd/lotus-seed/seed/seed.go +++ b/cmd/lotus-seed/seed/seed.go @@ -19,7 +19,7 @@ import ( ffi "github.com/filecoin-project/filecoin-ffi" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/storage/sector/zerocomm" + "github.com/filecoin-project/lotus/extern/sector-storage/zerocomm" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -27,10 +27,10 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/genesis" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" - "github.com/filecoin-project/lotus/storage/sector/stores" ) var log = logging.Logger("preseal") diff --git a/cmd/lotus-storage-miner/info.go b/cmd/lotus-storage-miner/info.go index 9755ff698..f8a5c0476 100644 --- a/cmd/lotus-storage-miner/info.go +++ b/cmd/lotus-storage-miner/info.go @@ -11,7 +11,7 @@ import ( "github.com/urfave/cli/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-actors/actors/builtin/power" diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 3802e6925..f5810d6d9 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -25,9 +25,9 @@ import ( "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" paramfetch "github.com/filecoin-project/go-paramfetch" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin" "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -41,13 +41,13 @@ import ( "github.com/filecoin-project/lotus/chain/gen/slashfilter" "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/miner" "github.com/filecoin-project/lotus/node/modules" "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/storage" - "github.com/filecoin-project/lotus/storage/sealing" ) var initCmd = &cli.Command{ @@ -436,9 +436,9 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api lapi.FullNode, return err } - smgr, err := sector.New(ctx, lr, stores.NewIndex(), &ffiwrapper.Config{ + smgr, err := sectorstorage.New(ctx, lr, stores.NewIndex(), &ffiwrapper.Config{ SealProofType: spt, - }, sector.SealerConfig{ + }, sectorstorage.SealerConfig{ ParallelFetchLimit: 10, AllowPreCommit1: true, AllowPreCommit2: true, diff --git a/cmd/lotus-storage-miner/sealing.go b/cmd/lotus-storage-miner/sealing.go index e948c8bf0..c9ed224b3 100644 --- a/cmd/lotus-storage-miner/sealing.go +++ b/cmd/lotus-storage-miner/sealing.go @@ -13,7 +13,7 @@ import ( "github.com/fatih/color" "github.com/urfave/cli/v2" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" diff --git a/cmd/lotus-storage-miner/storage.go b/cmd/lotus-storage-miner/storage.go index 4a7b8e0a5..7fadcf83f 100644 --- a/cmd/lotus-storage-miner/storage.go +++ b/cmd/lotus-storage-miner/storage.go @@ -18,8 +18,8 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/lotus/chain/types" diff --git a/cmd/lotus/daemon.go b/cmd/lotus/daemon.go index 0e0e841a8..848596944 100644 --- a/cmd/lotus/daemon.go +++ b/cmd/lotus/daemon.go @@ -30,6 +30,7 @@ import ( "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/vm" lcli "github.com/filecoin-project/lotus/cli" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/lib/blockstore" "github.com/filecoin-project/lotus/lib/peermgr" "github.com/filecoin-project/lotus/lib/ulimit" @@ -39,7 +40,6 @@ import ( "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/repo" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" ) const ( diff --git a/storage/sector/README.md b/extern/sector-storage/README.md similarity index 100% rename from storage/sector/README.md rename to extern/sector-storage/README.md diff --git a/storage/sector/docs/sector-storage.svg b/extern/sector-storage/docs/sector-storage.svg similarity index 100% rename from storage/sector/docs/sector-storage.svg rename to extern/sector-storage/docs/sector-storage.svg diff --git a/storage/sector/faults.go b/extern/sector-storage/faults.go similarity index 97% rename from storage/sector/faults.go rename to extern/sector-storage/faults.go index 1b69e4f68..06c823bb8 100644 --- a/storage/sector/faults.go +++ b/extern/sector-storage/faults.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -8,7 +8,7 @@ import ( "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/storage/sector/ffiwrapper/basicfs/fs.go b/extern/sector-storage/ffiwrapper/basicfs/fs.go similarity index 93% rename from storage/sector/ffiwrapper/basicfs/fs.go rename to extern/sector-storage/ffiwrapper/basicfs/fs.go index 9e36bf797..ae17273e9 100644 --- a/storage/sector/ffiwrapper/basicfs/fs.go +++ b/extern/sector-storage/ffiwrapper/basicfs/fs.go @@ -8,8 +8,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) type sectorFile struct { diff --git a/storage/sector/ffiwrapper/config.go b/extern/sector-storage/ffiwrapper/config.go similarity index 100% rename from storage/sector/ffiwrapper/config.go rename to extern/sector-storage/ffiwrapper/config.go diff --git a/storage/sector/ffiwrapper/files.go b/extern/sector-storage/ffiwrapper/files.go similarity index 100% rename from storage/sector/ffiwrapper/files.go rename to extern/sector-storage/ffiwrapper/files.go diff --git a/storage/sector/ffiwrapper/partialfile.go b/extern/sector-storage/ffiwrapper/partialfile.go similarity index 98% rename from storage/sector/ffiwrapper/partialfile.go rename to extern/sector-storage/ffiwrapper/partialfile.go index 5599d1fde..74992f7ba 100644 --- a/storage/sector/ffiwrapper/partialfile.go +++ b/extern/sector-storage/ffiwrapper/partialfile.go @@ -12,8 +12,8 @@ import ( rlepluslazy "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) const veryLargeRle = 1 << 20 diff --git a/storage/sector/ffiwrapper/sealer.go b/extern/sector-storage/ffiwrapper/sealer.go similarity index 100% rename from storage/sector/ffiwrapper/sealer.go rename to extern/sector-storage/ffiwrapper/sealer.go diff --git a/storage/sector/ffiwrapper/sealer_cgo.go b/extern/sector-storage/ffiwrapper/sealer_cgo.go similarity index 98% rename from storage/sector/ffiwrapper/sealer_cgo.go rename to extern/sector-storage/ffiwrapper/sealer_cgo.go index 5e7930546..a72f5a66f 100644 --- a/storage/sector/ffiwrapper/sealer_cgo.go +++ b/extern/sector-storage/ffiwrapper/sealer_cgo.go @@ -20,10 +20,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/storage/sector/fr32" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" - "github.com/filecoin-project/lotus/storage/sector/zerocomm" + "github.com/filecoin-project/lotus/extern/sector-storage/fr32" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/zerocomm" ) var _ Storage = &Sealer{} diff --git a/storage/sector/ffiwrapper/sealer_test.go b/extern/sector-storage/ffiwrapper/sealer_test.go similarity index 98% rename from storage/sector/ffiwrapper/sealer_test.go rename to extern/sector-storage/ffiwrapper/sealer_test.go index eb1f94485..b484b391f 100644 --- a/storage/sector/ffiwrapper/sealer_test.go +++ b/extern/sector-storage/ffiwrapper/sealer_test.go @@ -27,8 +27,8 @@ import ( ffi "github.com/filecoin-project/filecoin-ffi" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" ) func init() { diff --git a/storage/sector/ffiwrapper/types.go b/extern/sector-storage/ffiwrapper/types.go similarity index 88% rename from storage/sector/ffiwrapper/types.go rename to extern/sector-storage/ffiwrapper/types.go index 60c362776..a634134ee 100644 --- a/storage/sector/ffiwrapper/types.go +++ b/extern/sector-storage/ffiwrapper/types.go @@ -9,9 +9,9 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper/basicfs" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper/basicfs" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) type Validator interface { diff --git a/storage/sector/ffiwrapper/unseal_ranges.go b/extern/sector-storage/ffiwrapper/unseal_ranges.go similarity index 92% rename from storage/sector/ffiwrapper/unseal_ranges.go rename to extern/sector-storage/ffiwrapper/unseal_ranges.go index 8d0d4936a..2e5119994 100644 --- a/storage/sector/ffiwrapper/unseal_ranges.go +++ b/extern/sector-storage/ffiwrapper/unseal_ranges.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) // merge gaps between ranges which are close to each other diff --git a/storage/sector/ffiwrapper/verifier_cgo.go b/extern/sector-storage/ffiwrapper/verifier_cgo.go similarity index 98% rename from storage/sector/ffiwrapper/verifier_cgo.go rename to extern/sector-storage/ffiwrapper/verifier_cgo.go index ccc2ec7a2..de6fc0849 100644 --- a/storage/sector/ffiwrapper/verifier_cgo.go +++ b/extern/sector-storage/ffiwrapper/verifier_cgo.go @@ -11,7 +11,7 @@ import ( ffi "github.com/filecoin-project/filecoin-ffi" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "go.opencensus.io/trace" ) diff --git a/storage/sector/fr32/fr32.go b/extern/sector-storage/fr32/fr32.go similarity index 100% rename from storage/sector/fr32/fr32.go rename to extern/sector-storage/fr32/fr32.go diff --git a/storage/sector/fr32/fr32_ffi_cmp_test.go b/extern/sector-storage/fr32/fr32_ffi_cmp_test.go similarity index 90% rename from storage/sector/fr32/fr32_ffi_cmp_test.go rename to extern/sector-storage/fr32/fr32_ffi_cmp_test.go index 29f7a58c7..2a602424a 100644 --- a/storage/sector/fr32/fr32_ffi_cmp_test.go +++ b/extern/sector-storage/fr32/fr32_ffi_cmp_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/fr32" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/fr32" ffi "github.com/filecoin-project/filecoin-ffi" diff --git a/storage/sector/fr32/fr32_test.go b/extern/sector-storage/fr32/fr32_test.go similarity index 97% rename from storage/sector/fr32/fr32_test.go rename to extern/sector-storage/fr32/fr32_test.go index be3ec3e3d..e27e7b1e3 100644 --- a/storage/sector/fr32/fr32_test.go +++ b/extern/sector-storage/fr32/fr32_test.go @@ -12,8 +12,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/stretchr/testify/require" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/fr32" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/fr32" ) func padFFI(buf []byte) []byte { diff --git a/storage/sector/fr32/readers.go b/extern/sector-storage/fr32/readers.go similarity index 100% rename from storage/sector/fr32/readers.go rename to extern/sector-storage/fr32/readers.go diff --git a/storage/sector/fr32/readers_test.go b/extern/sector-storage/fr32/readers_test.go similarity index 89% rename from storage/sector/fr32/readers_test.go rename to extern/sector-storage/fr32/readers_test.go index 2c6f01f8c..e87a776ef 100644 --- a/storage/sector/fr32/readers_test.go +++ b/extern/sector-storage/fr32/readers_test.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/fr32" + "github.com/filecoin-project/lotus/extern/sector-storage/fr32" ) func TestUnpadReader(t *testing.T) { diff --git a/storage/sector/fr32/utils.go b/extern/sector-storage/fr32/utils.go similarity index 100% rename from storage/sector/fr32/utils.go rename to extern/sector-storage/fr32/utils.go diff --git a/storage/sector/fsutil/dealloc_linux.go b/extern/sector-storage/fsutil/dealloc_linux.go similarity index 100% rename from storage/sector/fsutil/dealloc_linux.go rename to extern/sector-storage/fsutil/dealloc_linux.go diff --git a/storage/sector/fsutil/dealloc_other.go b/extern/sector-storage/fsutil/dealloc_other.go similarity index 100% rename from storage/sector/fsutil/dealloc_other.go rename to extern/sector-storage/fsutil/dealloc_other.go diff --git a/storage/sector/fsutil/filesize_unix.go b/extern/sector-storage/fsutil/filesize_unix.go similarity index 100% rename from storage/sector/fsutil/filesize_unix.go rename to extern/sector-storage/fsutil/filesize_unix.go diff --git a/storage/sector/fsutil/statfs.go b/extern/sector-storage/fsutil/statfs.go similarity index 100% rename from storage/sector/fsutil/statfs.go rename to extern/sector-storage/fsutil/statfs.go diff --git a/storage/sector/fsutil/statfs_unix.go b/extern/sector-storage/fsutil/statfs_unix.go similarity index 100% rename from storage/sector/fsutil/statfs_unix.go rename to extern/sector-storage/fsutil/statfs_unix.go diff --git a/storage/sector/fsutil/statfs_windows.go b/extern/sector-storage/fsutil/statfs_windows.go similarity index 100% rename from storage/sector/fsutil/statfs_windows.go rename to extern/sector-storage/fsutil/statfs_windows.go diff --git a/storage/sector/localworker.go b/extern/sector-storage/localworker.go similarity index 96% rename from storage/sector/localworker.go rename to extern/sector-storage/localworker.go index 6b4b163f3..f96cc8472 100644 --- a/storage/sector/localworker.go +++ b/extern/sector-storage/localworker.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -15,10 +15,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" storage2 "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) var pathTypes = []stores.SectorFileType{stores.FTUnsealed, stores.FTSealed, stores.FTCache} diff --git a/storage/sector/manager.go b/extern/sector-storage/manager.go similarity index 97% rename from storage/sector/manager.go rename to extern/sector-storage/manager.go index a6fffdb22..fb8636970 100644 --- a/storage/sector/manager.go +++ b/extern/sector-storage/manager.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -6,7 +6,7 @@ import ( "io" "net/http" - "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" @@ -16,10 +16,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) var log = logging.Logger("advmgr") diff --git a/storage/sector/manager_test.go b/extern/sector-storage/manager_test.go similarity index 91% rename from storage/sector/manager_test.go rename to extern/sector-storage/manager_test.go index 04291c1bd..13ad9f8bf 100644 --- a/storage/sector/manager_test.go +++ b/extern/sector-storage/manager_test.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "bytes" @@ -11,10 +11,10 @@ import ( "strings" "testing" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/specs-actors/actors/abi" diff --git a/storage/sector/mock/mock.go b/extern/sector-storage/mock/mock.go similarity index 98% rename from storage/sector/mock/mock.go rename to extern/sector-storage/mock/mock.go index afe82f290..783d2e19c 100644 --- a/storage/sector/mock/mock.go +++ b/extern/sector-storage/mock/mock.go @@ -16,8 +16,8 @@ import ( logging "github.com/ipfs/go-log" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) var log = logging.Logger("sbmock") diff --git a/storage/sector/mock/mock_test.go b/extern/sector-storage/mock/mock_test.go similarity index 100% rename from storage/sector/mock/mock_test.go rename to extern/sector-storage/mock/mock_test.go diff --git a/storage/sector/mock/util.go b/extern/sector-storage/mock/util.go similarity index 100% rename from storage/sector/mock/util.go rename to extern/sector-storage/mock/util.go diff --git a/storage/sector/request_queue.go b/extern/sector-storage/request_queue.go similarity index 97% rename from storage/sector/request_queue.go rename to extern/sector-storage/request_queue.go index 66f2da754..85d3abf46 100644 --- a/storage/sector/request_queue.go +++ b/extern/sector-storage/request_queue.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import "sort" diff --git a/storage/sector/request_queue_test.go b/extern/sector-storage/request_queue_test.go similarity index 92% rename from storage/sector/request_queue_test.go rename to extern/sector-storage/request_queue_test.go index e00fb3e4e..ed802f30a 100644 --- a/storage/sector/request_queue_test.go +++ b/extern/sector-storage/request_queue_test.go @@ -1,10 +1,10 @@ -package sector +package sectorstorage import ( "fmt" "testing" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" ) func TestRequestQueue(t *testing.T) { diff --git a/storage/sector/resources.go b/extern/sector-storage/resources.go similarity index 98% rename from storage/sector/resources.go rename to extern/sector-storage/resources.go index 4c4323d3f..d2c5646fa 100644 --- a/storage/sector/resources.go +++ b/extern/sector-storage/resources.go @@ -1,9 +1,9 @@ -package sector +package sectorstorage import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" ) type Resources struct { diff --git a/storage/sector/roprov.go b/extern/sector-storage/roprov.go similarity index 92% rename from storage/sector/roprov.go rename to extern/sector-storage/roprov.go index 612e1d474..fe58a8445 100644 --- a/storage/sector/roprov.go +++ b/extern/sector-storage/roprov.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" ) type readonlyProvider struct { diff --git a/storage/sector/sched.go b/extern/sector-storage/sched.go similarity index 98% rename from storage/sector/sched.go rename to extern/sector-storage/sched.go index 2dcf94e91..328110c64 100644 --- a/storage/sector/sched.go +++ b/extern/sector-storage/sched.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -12,8 +12,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) type schedPrioCtxKey int diff --git a/storage/sector/sched_resources.go b/extern/sector-storage/sched_resources.go similarity index 96% rename from storage/sector/sched_resources.go rename to extern/sector-storage/sched_resources.go index d76456a0f..f468d5fe9 100644 --- a/storage/sector/sched_resources.go +++ b/extern/sector-storage/sched_resources.go @@ -1,9 +1,9 @@ -package sector +package sectorstorage import ( "sync" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) func (a *activeResources) withResources(id WorkerID, wr storiface.WorkerResources, r Resources, locker sync.Locker, cb func() error) error { diff --git a/storage/sector/sched_test.go b/extern/sector-storage/sched_test.go similarity index 97% rename from storage/sector/sched_test.go rename to extern/sector-storage/sched_test.go index e8c68501d..5c9bc44ee 100644 --- a/storage/sector/sched_test.go +++ b/extern/sector-storage/sched_test.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -14,10 +14,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/specs-storage/storage" ) diff --git a/storage/sector/sched_watch.go b/extern/sector-storage/sched_watch.go similarity index 98% rename from storage/sector/sched_watch.go rename to extern/sector-storage/sched_watch.go index aa65d5c8b..2dd9875d7 100644 --- a/storage/sector/sched_watch.go +++ b/extern/sector-storage/sched_watch.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" diff --git a/storage/sector/sealtasks/task.go b/extern/sector-storage/sealtasks/task.go similarity index 100% rename from storage/sector/sealtasks/task.go rename to extern/sector-storage/sealtasks/task.go diff --git a/storage/sector/selector_alloc.go b/extern/sector-storage/selector_alloc.go similarity index 90% rename from storage/sector/selector_alloc.go rename to extern/sector-storage/selector_alloc.go index e9eb6a740..57ac6c124 100644 --- a/storage/sector/selector_alloc.go +++ b/extern/sector-storage/selector_alloc.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" ) type allocSelector struct { diff --git a/storage/sector/selector_existing.go b/extern/sector-storage/selector_existing.go similarity index 91% rename from storage/sector/selector_existing.go rename to extern/sector-storage/selector_existing.go index 3a653ec42..fda084672 100644 --- a/storage/sector/selector_existing.go +++ b/extern/sector-storage/selector_existing.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" ) type existingSelector struct { diff --git a/storage/sector/selector_task.go b/extern/sector-storage/selector_task.go similarity index 88% rename from storage/sector/selector_task.go rename to extern/sector-storage/selector_task.go index ca122aa6f..4586ce4db 100644 --- a/storage/sector/selector_task.go +++ b/extern/sector-storage/selector_task.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" ) type taskSelector struct { diff --git a/storage/sector/stats.go b/extern/sector-storage/stats.go similarity index 88% rename from storage/sector/stats.go rename to extern/sector-storage/stats.go index e8de2c1b0..9abbdb83a 100644 --- a/storage/sector/stats.go +++ b/extern/sector-storage/stats.go @@ -1,6 +1,6 @@ -package sector +package sectorstorage -import "github.com/filecoin-project/lotus/storage/sector/storiface" +import "github.com/filecoin-project/lotus/extern/sector-storage/storiface" func (m *Manager) WorkerStats() map[uint64]storiface.WorkerStats { m.sched.workersLk.RLock() diff --git a/storage/sector/stores/filetype.go b/extern/sector-storage/stores/filetype.go similarity index 100% rename from storage/sector/stores/filetype.go rename to extern/sector-storage/stores/filetype.go diff --git a/storage/sector/stores/http_handler.go b/extern/sector-storage/stores/http_handler.go similarity index 97% rename from storage/sector/stores/http_handler.go rename to extern/sector-storage/stores/http_handler.go index 3bf664fd5..97af6e769 100644 --- a/storage/sector/stores/http_handler.go +++ b/extern/sector-storage/stores/http_handler.go @@ -10,7 +10,7 @@ import ( logging "github.com/ipfs/go-log/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/tarutil" + "github.com/filecoin-project/lotus/extern/sector-storage/tarutil" ) var log = logging.Logger("stores") diff --git a/storage/sector/stores/index.go b/extern/sector-storage/stores/index.go similarity index 99% rename from storage/sector/stores/index.go rename to extern/sector-storage/stores/index.go index b51ea0f52..256dc9651 100644 --- a/storage/sector/stores/index.go +++ b/extern/sector-storage/stores/index.go @@ -10,7 +10,7 @@ import ( "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" diff --git a/storage/sector/stores/index_locks.go b/extern/sector-storage/stores/index_locks.go similarity index 100% rename from storage/sector/stores/index_locks.go rename to extern/sector-storage/stores/index_locks.go diff --git a/storage/sector/stores/index_locks_test.go b/extern/sector-storage/stores/index_locks_test.go similarity index 100% rename from storage/sector/stores/index_locks_test.go rename to extern/sector-storage/stores/index_locks_test.go diff --git a/storage/sector/stores/index_locks_util.go b/extern/sector-storage/stores/index_locks_util.go similarity index 100% rename from storage/sector/stores/index_locks_util.go rename to extern/sector-storage/stores/index_locks_util.go diff --git a/storage/sector/stores/interface.go b/extern/sector-storage/stores/interface.go similarity index 93% rename from storage/sector/stores/interface.go rename to extern/sector-storage/stores/interface.go index 46a07ee0d..d94f28e83 100644 --- a/storage/sector/stores/interface.go +++ b/extern/sector-storage/stores/interface.go @@ -3,7 +3,7 @@ package stores import ( "context" - "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/storage/sector/stores/local.go b/extern/sector-storage/stores/local.go similarity index 99% rename from storage/sector/stores/local.go rename to extern/sector-storage/stores/local.go index cf301b902..b308f5d86 100644 --- a/storage/sector/stores/local.go +++ b/extern/sector-storage/stores/local.go @@ -15,7 +15,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" ) type StoragePath struct { diff --git a/storage/sector/stores/local_test.go b/extern/sector-storage/stores/local_test.go similarity index 96% rename from storage/sector/stores/local_test.go rename to extern/sector-storage/stores/local_test.go index a4e39894e..1c31e8c09 100644 --- a/storage/sector/stores/local_test.go +++ b/extern/sector-storage/stores/local_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "testing" - "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/google/uuid" "github.com/stretchr/testify/require" diff --git a/storage/sector/stores/remote.go b/extern/sector-storage/stores/remote.go similarity index 98% rename from storage/sector/stores/remote.go rename to extern/sector-storage/stores/remote.go index 6e069e0a4..a88e3b947 100644 --- a/storage/sector/stores/remote.go +++ b/extern/sector-storage/stores/remote.go @@ -14,9 +14,9 @@ import ( "sort" "sync" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/storiface" - "github.com/filecoin-project/lotus/storage/sector/tarutil" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/tarutil" "github.com/filecoin-project/specs-actors/actors/abi" diff --git a/storage/sector/stores/util_unix.go b/extern/sector-storage/stores/util_unix.go similarity index 100% rename from storage/sector/stores/util_unix.go rename to extern/sector-storage/stores/util_unix.go diff --git a/storage/sector/storiface/ffi.go b/extern/sector-storage/storiface/ffi.go similarity index 100% rename from storage/sector/storiface/ffi.go rename to extern/sector-storage/storiface/ffi.go diff --git a/storage/sector/storiface/worker.go b/extern/sector-storage/storiface/worker.go similarity index 89% rename from storage/sector/storiface/worker.go rename to extern/sector-storage/storiface/worker.go index 78051b20e..37c447031 100644 --- a/storage/sector/storiface/worker.go +++ b/extern/sector-storage/storiface/worker.go @@ -3,7 +3,7 @@ package storiface import ( "time" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/storage/sector/tarutil/systar.go b/extern/sector-storage/tarutil/systar.go similarity index 100% rename from storage/sector/tarutil/systar.go rename to extern/sector-storage/tarutil/systar.go diff --git a/storage/sector/testworker_test.go b/extern/sector-storage/testworker_test.go similarity index 92% rename from storage/sector/testworker_test.go rename to extern/sector-storage/testworker_test.go index c1c2852b5..f9b541f0a 100644 --- a/storage/sector/testworker_test.go +++ b/extern/sector-storage/testworker_test.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -9,10 +9,10 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/storage/sector/mock" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/mock" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) type testWorker struct { diff --git a/storage/sector/work_tracker.go b/extern/sector-storage/work_tracker.go similarity index 94% rename from storage/sector/work_tracker.go rename to extern/sector-storage/work_tracker.go index 78c3926ec..fe176a7f7 100644 --- a/storage/sector/work_tracker.go +++ b/extern/sector-storage/work_tracker.go @@ -1,4 +1,4 @@ -package sector +package sectorstorage import ( "context" @@ -11,9 +11,9 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/storage/sector/sealtasks" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" + "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" ) type workTracker struct { diff --git a/storage/sector/zerocomm/zerocomm.go b/extern/sector-storage/zerocomm/zerocomm.go similarity index 100% rename from storage/sector/zerocomm/zerocomm.go rename to extern/sector-storage/zerocomm/zerocomm.go diff --git a/storage/sector/zerocomm/zerocomm_test.go b/extern/sector-storage/zerocomm/zerocomm_test.go similarity index 95% rename from storage/sector/zerocomm/zerocomm_test.go rename to extern/sector-storage/zerocomm/zerocomm_test.go index a187db49e..f5f508796 100644 --- a/storage/sector/zerocomm/zerocomm_test.go +++ b/extern/sector-storage/zerocomm/zerocomm_test.go @@ -10,8 +10,8 @@ import ( abi "github.com/filecoin-project/specs-actors/actors/abi" "github.com/ipfs/go-cid" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/zerocomm" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/zerocomm" ) func TestComms(t *testing.T) { diff --git a/storage/sealing/cbor_gen.go b/extern/storage-sealing/cbor_gen.go similarity index 100% rename from storage/sealing/cbor_gen.go rename to extern/storage-sealing/cbor_gen.go diff --git a/storage/sealing/checks.go b/extern/storage-sealing/checks.go similarity index 97% rename from storage/sealing/checks.go rename to extern/storage-sealing/checks.go index 38ed31022..a86953d08 100644 --- a/storage/sealing/checks.go +++ b/extern/storage-sealing/checks.go @@ -7,8 +7,8 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/zerocomm" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/zerocomm" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-actors/actors/crypto" diff --git a/storage/sealing/constants.go b/extern/storage-sealing/constants.go similarity index 100% rename from storage/sealing/constants.go rename to extern/storage-sealing/constants.go diff --git a/storage/sealing/events.go b/extern/storage-sealing/events.go similarity index 100% rename from storage/sealing/events.go rename to extern/storage-sealing/events.go diff --git a/storage/sealing/fsm.go b/extern/storage-sealing/fsm.go similarity index 100% rename from storage/sealing/fsm.go rename to extern/storage-sealing/fsm.go diff --git a/storage/sealing/fsm_events.go b/extern/storage-sealing/fsm_events.go similarity index 100% rename from storage/sealing/fsm_events.go rename to extern/storage-sealing/fsm_events.go diff --git a/storage/sealing/fsm_test.go b/extern/storage-sealing/fsm_test.go similarity index 100% rename from storage/sealing/fsm_test.go rename to extern/storage-sealing/fsm_test.go diff --git a/storage/sealing/garbage.go b/extern/storage-sealing/garbage.go similarity index 100% rename from storage/sealing/garbage.go rename to extern/storage-sealing/garbage.go diff --git a/storage/sealing/gen/main.go b/extern/storage-sealing/gen/main.go similarity index 84% rename from storage/sealing/gen/main.go rename to extern/storage-sealing/gen/main.go index 4d8f28a1b..295199fc2 100644 --- a/storage/sealing/gen/main.go +++ b/extern/storage-sealing/gen/main.go @@ -6,7 +6,7 @@ import ( gen "github.com/whyrusleeping/cbor-gen" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" ) func main() { diff --git a/storage/sealing/lib/nullreader/nullreader.go b/extern/storage-sealing/lib/nullreader/nullreader.go similarity index 100% rename from storage/sealing/lib/nullreader/nullreader.go rename to extern/storage-sealing/lib/nullreader/nullreader.go diff --git a/storage/sealing/nullreader.go b/extern/storage-sealing/nullreader.go similarity index 100% rename from storage/sealing/nullreader.go rename to extern/storage-sealing/nullreader.go diff --git a/storage/sealing/precommit_policy.go b/extern/storage-sealing/precommit_policy.go similarity index 100% rename from storage/sealing/precommit_policy.go rename to extern/storage-sealing/precommit_policy.go diff --git a/storage/sealing/precommit_policy_test.go b/extern/storage-sealing/precommit_policy_test.go similarity index 98% rename from storage/sealing/precommit_policy_test.go rename to extern/storage-sealing/precommit_policy_test.go index fb93c909b..9fd56b77e 100644 --- a/storage/sealing/precommit_policy_test.go +++ b/extern/storage-sealing/precommit_policy_test.go @@ -11,7 +11,7 @@ import ( commcid "github.com/filecoin-project/go-fil-commcid" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" ) type fakeChain struct { diff --git a/storage/sealing/sealing.go b/extern/storage-sealing/sealing.go similarity index 94% rename from storage/sealing/sealing.go rename to extern/storage-sealing/sealing.go index 04c7830f4..0d243453e 100644 --- a/storage/sealing/sealing.go +++ b/extern/storage-sealing/sealing.go @@ -15,8 +15,8 @@ import ( "github.com/filecoin-project/go-address" padreader "github.com/filecoin-project/go-padreader" statemachine "github.com/filecoin-project/go-statemachine" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -59,7 +59,7 @@ type Sealing struct { maddr address.Address - sealer sector.SectorManager + sealer sectorstorage.SectorManager sectors *statemachine.StateGroup sc SectorIDCounter verif ffiwrapper.Verifier @@ -90,7 +90,7 @@ type UnsealedSectorInfo struct { pieceSizes []abi.UnpaddedPieceSize } -func New(api SealingAPI, fc FeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sector.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, pcp PreCommitPolicy, gsd GetSealingDelayFunc) *Sealing { +func New(api SealingAPI, fc FeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sectorstorage.SectorManager, sc SectorIDCounter, verif ffiwrapper.Verifier, pcp PreCommitPolicy, gsd GetSealingDelayFunc) *Sealing { s := &Sealing{ api: api, feeCfg: fc, @@ -174,7 +174,7 @@ func (m *Sealing) AddPieceToAnySector(ctx context.Context, size abi.UnpaddedPiec // Caller should hold m.unsealedInfoMap.mux func (m *Sealing) addPiece(ctx context.Context, sectorID abi.SectorNumber, size abi.UnpaddedPieceSize, r io.Reader, di *DealInfo) error { log.Infof("Adding piece to sector %d", sectorID) - ppi, err := m.sealer.AddPiece(sector.WithPriority(ctx, DealSectorPriority), m.minerSector(sectorID), m.unsealedInfoMap.infos[sectorID].pieceSizes, size, r) + ppi, err := m.sealer.AddPiece(sectorstorage.WithPriority(ctx, DealSectorPriority), m.minerSector(sectorID), m.unsealedInfoMap.infos[sectorID].pieceSizes, size, r) if err != nil { return xerrors.Errorf("writing piece: %w", err) } diff --git a/storage/sealing/sector_state.go b/extern/storage-sealing/sector_state.go similarity index 100% rename from storage/sealing/sector_state.go rename to extern/storage-sealing/sector_state.go diff --git a/storage/sealing/states_failed.go b/extern/storage-sealing/states_failed.go similarity index 100% rename from storage/sealing/states_failed.go rename to extern/storage-sealing/states_failed.go diff --git a/storage/sealing/states_proving.go b/extern/storage-sealing/states_proving.go similarity index 100% rename from storage/sealing/states_proving.go rename to extern/storage-sealing/states_proving.go diff --git a/storage/sealing/states_sealing.go b/extern/storage-sealing/states_sealing.go similarity index 100% rename from storage/sealing/states_sealing.go rename to extern/storage-sealing/states_sealing.go diff --git a/storage/sealing/types.go b/extern/storage-sealing/types.go similarity index 97% rename from storage/sealing/types.go rename to extern/storage-sealing/types.go index ad2f5d459..a76414f0a 100644 --- a/storage/sealing/types.go +++ b/extern/storage-sealing/types.go @@ -7,12 +7,13 @@ import ( "github.com/ipfs/go-cid" - "github.com/filecoin-project/lotus/storage/sector" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-actors/actors/runtime/exitcode" "github.com/filecoin-project/specs-storage/storage" + + "github.com/filecoin-project/lotus/extern/sector-storage" ) // Piece is a tuple of piece and deal info @@ -137,7 +138,7 @@ func (t *SectorInfo) sealingCtx(ctx context.Context) context.Context { // we need sealed sooner if t.hasDeals() { - return sector.WithPriority(ctx, DealSectorPriority) + return sectorstorage.WithPriority(ctx, DealSectorPriority) } return ctx diff --git a/storage/sealing/types_test.go b/extern/storage-sealing/types_test.go similarity index 100% rename from storage/sealing/types_test.go rename to extern/storage-sealing/types_test.go diff --git a/storage/sealing/upgrade_queue.go b/extern/storage-sealing/upgrade_queue.go similarity index 100% rename from storage/sealing/upgrade_queue.go rename to extern/storage-sealing/upgrade_queue.go diff --git a/storage/sealing/utils.go b/extern/storage-sealing/utils.go similarity index 100% rename from storage/sealing/utils.go rename to extern/storage-sealing/utils.go diff --git a/storage/sealing/utils_test.go b/extern/storage-sealing/utils_test.go similarity index 100% rename from storage/sealing/utils_test.go rename to extern/storage-sealing/utils_test.go diff --git a/lib/rpcenc/reader.go b/lib/rpcenc/reader.go index 439f9c318..9f59fe7c8 100644 --- a/lib/rpcenc/reader.go +++ b/lib/rpcenc/reader.go @@ -19,7 +19,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/lib/rpcenc/reader_test.go b/lib/rpcenc/reader_test.go index a30d81b10..a9c9a9389 100644 --- a/lib/rpcenc/reader_test.go +++ b/lib/rpcenc/reader_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" ) type ReaderHandler struct { diff --git a/markets/retrievaladapter/provider.go b/markets/retrievaladapter/provider.go index f21b50d55..d130e8009 100644 --- a/markets/retrievaladapter/provider.go +++ b/markets/retrievaladapter/provider.go @@ -6,9 +6,9 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/retrievalmarket" @@ -21,13 +21,13 @@ import ( type retrievalProviderNode struct { miner *storage.Miner - sealer sector.SectorManager + sealer sectorstorage.SectorManager full api.FullNode } // NewRetrievalProviderNode returns a new node adapter for a retrieval provider that talks to the // Lotus Node -func NewRetrievalProviderNode(miner *storage.Miner, sealer sector.SectorManager, full api.FullNode) retrievalmarket.RetrievalProviderNode { +func NewRetrievalProviderNode(miner *storage.Miner, sealer sectorstorage.SectorManager, full api.FullNode) retrievalmarket.RetrievalProviderNode { return &retrievalProviderNode{miner, sealer, full} } diff --git a/markets/storageadapter/provider.go b/markets/storageadapter/provider.go index e14a419dd..9bbf6e826 100644 --- a/markets/storageadapter/provider.go +++ b/markets/storageadapter/provider.go @@ -28,10 +28,10 @@ import ( "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/events/state" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/markets/utils" "github.com/filecoin-project/lotus/node/modules/dtypes" - "github.com/filecoin-project/lotus/storage/sealing" "github.com/filecoin-project/lotus/storage/sectorblocks" ) diff --git a/node/builder.go b/node/builder.go index 5d9af760b..01800a844 100644 --- a/node/builder.go +++ b/node/builder.go @@ -40,6 +40,10 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/wallet" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/lib/blockstore" "github.com/filecoin-project/lotus/lib/peermgr" _ "github.com/filecoin-project/lotus/lib/sigs/bls" @@ -60,10 +64,6 @@ import ( "github.com/filecoin-project/lotus/paychmgr" "github.com/filecoin-project/lotus/paychmgr/settler" "github.com/filecoin-project/lotus/storage" - "github.com/filecoin-project/lotus/storage/sealing" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/lotus/storage/sectorblocks" ) @@ -281,7 +281,7 @@ func Online() Option { // miner ApplyIf(func(s *Settings) bool { return s.nodeType == repo.StorageMiner }, Override(new(api.Common), From(new(common.CommonAPI))), - Override(new(sector.StorageAuth), modules.StorageAuth), + Override(new(sectorstorage.StorageAuth), modules.StorageAuth), Override(new(*stores.Index), stores.NewIndex), Override(new(stores.SectorIndex), From(new(*stores.Index))), @@ -290,11 +290,11 @@ func Online() Option { Override(new(*ffiwrapper.Config), modules.ProofsConfig), Override(new(stores.LocalStorage), From(new(repo.LockedRepo))), Override(new(sealing.SectorIDCounter), modules.SectorIDCounter), - Override(new(*sector.Manager), modules.SectorStorage), + Override(new(*sectorstorage.Manager), modules.SectorStorage), Override(new(ffiwrapper.Verifier), ffiwrapper.ProofVerifier), - Override(new(sector.SectorManager), From(new(*sector.Manager))), - Override(new(storage2.Prover), From(new(sector.SectorManager))), + Override(new(sectorstorage.SectorManager), From(new(*sectorstorage.Manager))), + Override(new(storage2.Prover), From(new(sectorstorage.SectorManager))), Override(new(*sectorblocks.SectorBlocks), sectorblocks.NewSectorBlocks), Override(new(*storage.Miner), modules.StorageMiner(config.DefaultStorageMiner().Fees)), @@ -369,10 +369,10 @@ func ConfigCommon(cfg *config.Common) Option { Override(SetApiEndpointKey, func(lr repo.LockedRepo, e dtypes.APIEndpoint) error { return lr.SetAPIEndpoint(e) }), - Override(new(sector.URLs), func(e dtypes.APIEndpoint) (sector.URLs, error) { + Override(new(sectorstorage.URLs), func(e dtypes.APIEndpoint) (sectorstorage.URLs, error) { ip := cfg.API.RemoteListenAddress - var urls sector.URLs + var urls sectorstorage.URLs urls = append(urls, "http://"+ip+"/remote") // TODO: This makes no assumptions, and probably could... return urls, nil }), @@ -430,7 +430,7 @@ func ConfigStorageMiner(c interface{}) Option { Override(new(dtypes.DealFilter), modules.BasicDealFilter(dealfilter.CliDealFilter(cfg.Dealmaking.Filter))), ), - Override(new(sector.SealerConfig), cfg.Storage), + Override(new(sectorstorage.SealerConfig), cfg.Storage), Override(new(*storage.Miner), modules.StorageMiner(cfg.Fees)), ) } diff --git a/node/config/def.go b/node/config/def.go index cd5da8d26..bfa4c64f1 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -7,7 +7,7 @@ import ( "github.com/ipfs/go-cid" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/extern/sector-storage" ) // Common is common config between full node and miner @@ -31,7 +31,7 @@ type StorageMiner struct { Common Dealmaking DealmakingConfig - Storage sector.SealerConfig + Storage sectorstorage.SealerConfig Fees MinerFeeConfig SealingDelay Duration @@ -131,7 +131,7 @@ func DefaultStorageMiner() *StorageMiner { cfg := &StorageMiner{ Common: defCommon(), - Storage: sector.SealerConfig{ + Storage: sectorstorage.SealerConfig{ AllowPreCommit1: true, AllowPreCommit2: true, AllowCommit: true, diff --git a/node/config/storage.go b/node/config/storage.go index 239806a57..68170ee2f 100644 --- a/node/config/storage.go +++ b/node/config/storage.go @@ -8,7 +8,7 @@ import ( "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" ) func StorageFromFile(path string, def *stores.StorageConfig) (*stores.StorageConfig, error) { diff --git a/node/impl/client/client.go b/node/impl/client/client.go index b8ab59375..c80955bca 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -38,8 +38,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" marketevents "github.com/filecoin-project/lotus/markets/loggers" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" diff --git a/node/impl/full/state.go b/node/impl/full/state.go index 498e67c5d..ceea2e813 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -15,7 +15,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" diff --git a/node/impl/remoteworker.go b/node/impl/remoteworker.go index 278474e6b..4b0f2e099 100644 --- a/node/impl/remoteworker.go +++ b/node/impl/remoteworker.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/client" - "github.com/filecoin-project/lotus/storage/sector" + "github.com/filecoin-project/lotus/extern/sector-storage" ) type remoteWorker struct { @@ -46,4 +46,4 @@ func (r *remoteWorker) Close() error { return nil } -var _ sector.Worker = &remoteWorker{} +var _ sectorstorage.Worker = &remoteWorker{} diff --git a/node/impl/storminer.go b/node/impl/storminer.go index 6add843c2..9df12d379 100644 --- a/node/impl/storminer.go +++ b/node/impl/storminer.go @@ -8,7 +8,6 @@ import ( "strconv" "time" - "github.com/filecoin-project/lotus/storage/sector/fsutil" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/ipfs/go-cid" "golang.org/x/xerrors" @@ -18,13 +17,15 @@ import ( retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket" storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-jsonrpc/auth" - "github.com/filecoin-project/lotus/storage/sealing" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/stores" - "github.com/filecoin-project/lotus/storage/sector/storiface" "github.com/filecoin-project/specs-actors/actors/abi" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/storiface" + "github.com/filecoin-project/lotus/extern/storage-sealing" + "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/apistruct" "github.com/filecoin-project/lotus/chain/types" @@ -47,8 +48,8 @@ type StorageMinerAPI struct { Miner *storage.Miner BlockMiner *miner.Miner Full api.FullNode - StorageMgr *sector.Manager `optional:"true"` - IStorageMgr sector.SectorManager + StorageMgr *sectorstorage.Manager `optional:"true"` + IStorageMgr sectorstorage.SectorManager *stores.Index ConsiderOnlineStorageDealsConfigFunc dtypes.ConsiderOnlineStorageDealsConfigFunc diff --git a/node/modules/chain.go b/node/modules/chain.go index 941eed1b0..e121e4772 100644 --- a/node/modules/chain.go +++ b/node/modules/chain.go @@ -16,7 +16,7 @@ import ( "go.uber.org/fx" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/chain" "github.com/filecoin-project/lotus/chain/beacon" diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index 073b6c42a..ed7b21c60 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -42,12 +42,13 @@ import ( "github.com/filecoin-project/go-multistore" paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-storedcounter" - "github.com/filecoin-project/lotus/storage/sealing" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/stores" "github.com/filecoin-project/specs-actors/actors/abi" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" + "github.com/filecoin-project/lotus/extern/storage-sealing" + lapi "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/gen" @@ -140,8 +141,8 @@ func SectorIDCounter(ds dtypes.MetadataDS) sealing.SectorIDCounter { return &sidsc{sc} } -func StorageMiner(fc config.MinerFeeConfig) func(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h host.Host, ds dtypes.MetadataDS, sealer sector.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc) (*storage.Miner, error) { - return func(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h host.Host, ds dtypes.MetadataDS, sealer sector.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc) (*storage.Miner, error) { +func StorageMiner(fc config.MinerFeeConfig) func(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h host.Host, ds dtypes.MetadataDS, sealer sectorstorage.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc) (*storage.Miner, error) { + return func(mctx helpers.MetricsCtx, lc fx.Lifecycle, api lapi.FullNode, h host.Host, ds dtypes.MetadataDS, sealer sectorstorage.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc) (*storage.Miner, error) { maddr, err := minerAddrFromDS(ds) if err != nil { return nil, err @@ -440,7 +441,7 @@ func StorageProvider(minerAddress dtypes.MinerAddress, } // RetrievalProvider creates a new retrieval provider attached to the provider blockstore -func RetrievalProvider(h host.Host, miner *storage.Miner, sealer sector.SectorManager, full lapi.FullNode, ds dtypes.MetadataDS, pieceStore dtypes.ProviderPieceStore, mds dtypes.StagingMultiDstore, dt dtypes.ProviderDataTransfer, onlineOk dtypes.ConsiderOnlineRetrievalDealsConfigFunc, offlineOk dtypes.ConsiderOfflineRetrievalDealsConfigFunc) (retrievalmarket.RetrievalProvider, error) { +func RetrievalProvider(h host.Host, miner *storage.Miner, sealer sectorstorage.SectorManager, full lapi.FullNode, ds dtypes.MetadataDS, pieceStore dtypes.ProviderPieceStore, mds dtypes.StagingMultiDstore, dt dtypes.ProviderDataTransfer, onlineOk dtypes.ConsiderOnlineRetrievalDealsConfigFunc, offlineOk dtypes.ConsiderOfflineRetrievalDealsConfigFunc) (retrievalmarket.RetrievalProvider, error) { adapter := retrievaladapter.NewRetrievalProviderNode(miner, sealer, full) maddr, err := minerAddrFromDS(ds) @@ -476,10 +477,10 @@ func RetrievalProvider(h host.Host, miner *storage.Miner, sealer sector.SectorMa return retrievalimpl.NewProvider(maddr, adapter, netwk, pieceStore, mds, dt, namespace.Wrap(ds, datastore.NewKey("/retrievals/provider")), opt) } -func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, ls stores.LocalStorage, si stores.SectorIndex, cfg *ffiwrapper.Config, sc sector.SealerConfig, urls sector.URLs, sa sector.StorageAuth) (*sector.Manager, error) { +func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, ls stores.LocalStorage, si stores.SectorIndex, cfg *ffiwrapper.Config, sc sectorstorage.SealerConfig, urls sectorstorage.URLs, sa sectorstorage.StorageAuth) (*sectorstorage.Manager, error) { ctx := helpers.LifecycleCtx(mctx, lc) - sst, err := sector.New(ctx, ls, si, cfg, sc, urls, sa) + sst, err := sectorstorage.New(ctx, ls, si, cfg, sc, urls, sa) if err != nil { return nil, err } @@ -491,7 +492,7 @@ func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, ls stores.LocalStor return sst, nil } -func StorageAuth(ctx helpers.MetricsCtx, ca lapi.Common) (sector.StorageAuth, error) { +func StorageAuth(ctx helpers.MetricsCtx, ca lapi.Common) (sectorstorage.StorageAuth, error) { token, err := ca.AuthNew(ctx, []auth.Permission{"admin"}) if err != nil { return nil, xerrors.Errorf("creating storage auth header: %w", err) @@ -499,7 +500,7 @@ func StorageAuth(ctx helpers.MetricsCtx, ca lapi.Common) (sector.StorageAuth, er headers := http.Header{} headers.Add("Authorization", "Bearer "+string(token)) - return sector.StorageAuth(headers), nil + return sectorstorage.StorageAuth(headers), nil } func NewConsiderOnlineStorageDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOnlineStorageDealsConfigFunc, error) { diff --git a/node/node_test.go b/node/node_test.go index 20eb6504f..38a068135 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -13,7 +13,6 @@ import ( "github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/storage/mockstorage" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" "github.com/filecoin-project/go-storedcounter" "github.com/ipfs/go-datastore" @@ -42,14 +41,15 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/cmd/lotus-seed/seed" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/mock" "github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/miner" "github.com/filecoin-project/lotus/node" "github.com/filecoin-project/lotus/node/modules" modtest "github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/repo" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/mock" ) func init() { @@ -422,11 +422,11 @@ func mockSbBuilder(t *testing.T, nFull int, storage []test.StorageMiner) ([]test } storers[i] = testStorageNode(ctx, t, genms[i].Worker, maddrs[i], pidKeys[i], f, mn, node.Options( - node.Override(new(sector.SectorManager), func() (sector.SectorManager, error) { + node.Override(new(sectorstorage.SectorManager), func() (sectorstorage.SectorManager, error) { return mock.NewMockSectorMgr(build.DefaultSectorSize(), sectors), nil }), node.Override(new(ffiwrapper.Verifier), mock.MockVerifier), - node.Unset(new(*sector.Manager)), + node.Unset(new(*sectorstorage.Manager)), )) } diff --git a/node/repo/fsrepo.go b/node/repo/fsrepo.go index c55a04c58..14085d4ac 100644 --- a/node/repo/fsrepo.go +++ b/node/repo/fsrepo.go @@ -20,8 +20,8 @@ import ( "github.com/multiformats/go-multiaddr" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/node/config" diff --git a/node/repo/interface.go b/node/repo/interface.go index 331f83028..c25bcb534 100644 --- a/node/repo/interface.go +++ b/node/repo/interface.go @@ -6,8 +6,8 @@ import ( "github.com/ipfs/go-datastore" "github.com/multiformats/go-multiaddr" - "github.com/filecoin-project/lotus/storage/sector/fsutil" - "github.com/filecoin-project/lotus/storage/sector/stores" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/chain/types" ) diff --git a/node/repo/memrepo.go b/node/repo/memrepo.go index 082970dc6..34e3637eb 100644 --- a/node/repo/memrepo.go +++ b/node/repo/memrepo.go @@ -14,11 +14,11 @@ import ( "github.com/multiformats/go-multiaddr" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/storage/sector/fsutil" + "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/node/config" - "github.com/filecoin-project/lotus/storage/sector/stores" ) type MemRepo struct { diff --git a/storage/adapter_events.go b/storage/adapter_events.go index f89deea3a..ee320c361 100644 --- a/storage/adapter_events.go +++ b/storage/adapter_events.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" ) var _ sealing.Events = new(EventsAdapter) diff --git a/storage/adapter_storage_miner.go b/storage/adapter_storage_miner.go index a692b4b62..ebba0fcbd 100644 --- a/storage/adapter_storage_miner.go +++ b/storage/adapter_storage_miner.go @@ -23,7 +23,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" ) var _ sealing.SealingAPI = new(SealingAPIAdapter) diff --git a/storage/miner.go b/storage/miner.go index 2b1ab4f36..91a36617f 100644 --- a/storage/miner.go +++ b/storage/miner.go @@ -12,8 +12,8 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/storage/sector" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-actors/actors/crypto" @@ -24,9 +24,9 @@ import ( "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/gen" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/modules/dtypes" - "github.com/filecoin-project/lotus/storage/sealing" ) var log = logging.Logger("storageminer") @@ -35,7 +35,7 @@ type Miner struct { api storageMinerApi feeCfg config.MinerFeeConfig h host.Host - sealer sector.SectorManager + sealer sectorstorage.SectorManager ds datastore.Batching sc sealing.SectorIDCounter verif ffiwrapper.Verifier @@ -84,7 +84,7 @@ type storageMinerApi interface { WalletHas(context.Context, address.Address) (bool, error) } -func NewMiner(api storageMinerApi, maddr, worker address.Address, h host.Host, ds datastore.Batching, sealer sector.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc, feeCfg config.MinerFeeConfig) (*Miner, error) { +func NewMiner(api storageMinerApi, maddr, worker address.Address, h host.Host, ds datastore.Batching, sealer sectorstorage.SectorManager, sc sealing.SectorIDCounter, verif ffiwrapper.Verifier, gsd dtypes.GetSealingDelayFunc, feeCfg config.MinerFeeConfig) (*Miner, error) { m := &Miner{ api: api, feeCfg: feeCfg, diff --git a/storage/mockstorage/preseal.go b/storage/mockstorage/preseal.go index 22672c602..50810a4b2 100644 --- a/storage/mockstorage/preseal.go +++ b/storage/mockstorage/preseal.go @@ -5,7 +5,7 @@ import ( "github.com/filecoin-project/go-address" commcid "github.com/filecoin-project/go-fil-commcid" - "github.com/filecoin-project/lotus/storage/sector/mock" + "github.com/filecoin-project/lotus/extern/sector-storage/mock" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -13,9 +13,9 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet" + "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" + "github.com/filecoin-project/lotus/extern/sector-storage/zerocomm" "github.com/filecoin-project/lotus/genesis" - "github.com/filecoin-project/lotus/storage/sector/ffiwrapper" - "github.com/filecoin-project/lotus/storage/sector/zerocomm" ) func PreSeal(ssize abi.SectorSize, maddr address.Address, sectors int) (*genesis.Miner, *types.KeyInfo, error) { diff --git a/storage/sealing.go b/storage/sealing.go index 964e3d266..2fb02fa8e 100644 --- a/storage/sealing.go +++ b/storage/sealing.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" ) // TODO: refactor this to be direct somehow diff --git a/storage/sector/Makefile b/storage/sector/Makefile deleted file mode 100644 index 7b8d49683..000000000 --- a/storage/sector/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -all: build -.PHONY: all - -SUBMODULES= - -FFI_PATH:=./extern/filecoin-ffi/ -FFI_DEPS:=.install-filcrypto -FFI_DEPS:=$(addprefix $(FFI_PATH),$(FFI_DEPS)) - -$(FFI_DEPS): .filecoin-build ; - -.filecoin-build: $(FFI_PATH) - $(MAKE) -C $(FFI_PATH) $(FFI_DEPS:$(FFI_PATH)%=%) - @touch $@ - -.update-modules: - git submodule update --init --recursive - @touch $@ - -test: .update-modules .filecoin-build - go test -v ./... -.PHONY: test -SUBMODULES+=test - -build: $(SUBMODULES) - -clean: - rm -f .filecoin-build - rm -f .update-modules diff --git a/storage/sectorblocks/blocks.go b/storage/sectorblocks/blocks.go index 49031b6f1..f2e5fc42f 100644 --- a/storage/sectorblocks/blocks.go +++ b/storage/sectorblocks/blocks.go @@ -15,7 +15,7 @@ import ( "golang.org/x/xerrors" cborutil "github.com/filecoin-project/go-cbor-util" - "github.com/filecoin-project/lotus/storage/sealing" + "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/lotus/api" diff --git a/storage/wdpost_run.go b/storage/wdpost_run.go index dff0fc9fe..8d61f5c9f 100644 --- a/storage/wdpost_run.go +++ b/storage/wdpost_run.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "errors" - "github.com/filecoin-project/lotus/api" "time" "github.com/filecoin-project/go-bitfield" @@ -17,6 +16,7 @@ import ( "go.opencensus.io/trace" "golang.org/x/xerrors" + "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/types" diff --git a/storage/wdpost_sched.go b/storage/wdpost_sched.go index 6ecdd5f29..97eb8caa6 100644 --- a/storage/wdpost_sched.go +++ b/storage/wdpost_sched.go @@ -2,14 +2,11 @@ package storage import ( "context" - "github.com/filecoin-project/lotus/node/config" "time" - "go.opencensus.io/trace" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/storage/sector" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-storage/storage" @@ -18,6 +15,10 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/extern/sector-storage" + "github.com/filecoin-project/lotus/node/config" + + "go.opencensus.io/trace" ) const StartConfidence = 4 // TODO: config @@ -26,7 +27,7 @@ type WindowPoStScheduler struct { api storageMinerApi feeCfg config.MinerFeeConfig prover storage.Prover - faultTracker sector.FaultTracker + faultTracker sectorstorage.FaultTracker proofType abi.RegisteredPoStProof partitionSectors uint64 @@ -43,7 +44,7 @@ type WindowPoStScheduler struct { //failLk sync.Mutex } -func NewWindowedPoStScheduler(api storageMinerApi, fc config.MinerFeeConfig, sb storage.Prover, ft sector.FaultTracker, actor address.Address, worker address.Address) (*WindowPoStScheduler, error) { +func NewWindowedPoStScheduler(api storageMinerApi, fc config.MinerFeeConfig, sb storage.Prover, ft sectorstorage.FaultTracker, actor address.Address, worker address.Address) (*WindowPoStScheduler, error) { mi, err := api.StateMinerInfo(context.TODO(), actor, types.EmptyTSK) if err != nil { return nil, xerrors.Errorf("getting sector size: %w", err) From c3c6fda9d58b157c69e2cc42c2620b15c3d9317e Mon Sep 17 00:00:00 2001 From: austinabell Date: Mon, 17 Aug 2020 09:32:47 -0400 Subject: [PATCH 22/37] Remove unnecessary miner state load for checking slashed --- chain/stmgr/utils.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index 8c9cfc792..1474829a2 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -272,14 +272,8 @@ func StateMinerInfo(ctx context.Context, sm *StateManager, ts *types.TipSet, mad } func GetMinerSlashed(ctx context.Context, sm *StateManager, ts *types.TipSet, maddr address.Address) (bool, error) { - var mas miner.State - _, err := sm.LoadActorState(ctx, maddr, &mas, ts) - if err != nil { - return false, xerrors.Errorf("(get miner slashed) failed to load miner actor state") - } - var spas power.State - _, err = sm.LoadActorState(ctx, builtin.StoragePowerActorAddr, &spas, ts) + _, err := sm.LoadActorState(ctx, builtin.StoragePowerActorAddr, &spas, ts) if err != nil { return false, xerrors.Errorf("(get miner slashed) failed to load power actor state") } From 862bafc63adbdb55b0561f7163801029ddef6969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Mon, 17 Aug 2020 14:39:33 +0100 Subject: [PATCH 23/37] fix lint errors. --- api/test/deals.go | 2 +- api/test/window_post.go | 2 +- cmd/lotus-seal-worker/main.go | 2 +- cmd/lotus-seal-worker/rpc.go | 2 +- cmd/lotus-storage-miner/info.go | 2 +- cmd/lotus-storage-miner/init.go | 4 ++-- extern/storage-sealing/gen/main.go | 2 +- extern/storage-sealing/precommit_policy_test.go | 2 +- extern/storage-sealing/sealing.go | 2 +- extern/storage-sealing/types.go | 2 +- lib/rpcenc/reader.go | 2 +- lib/rpcenc/reader_test.go | 2 +- markets/retrievaladapter/provider.go | 2 +- markets/storageadapter/provider.go | 2 +- node/builder.go | 4 ++-- node/config/def.go | 2 +- node/impl/remoteworker.go | 2 +- node/impl/storminer.go | 4 ++-- node/modules/storageminer.go | 4 ++-- node/node_test.go | 2 +- storage/adapter_events.go | 2 +- storage/adapter_storage_miner.go | 2 +- storage/miner.go | 4 ++-- storage/sealing.go | 2 +- storage/sectorblocks/blocks.go | 2 +- storage/wdpost_sched.go | 2 +- 26 files changed, 31 insertions(+), 31 deletions(-) diff --git a/api/test/deals.go b/api/test/deals.go index d29c6473a..f30b5b8ac 100644 --- a/api/test/deals.go +++ b/api/test/deals.go @@ -22,7 +22,7 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/miner" dag "github.com/ipfs/go-merkledag" dstest "github.com/ipfs/go-merkledag/test" diff --git a/api/test/window_post.go b/api/test/window_post.go index a22f78904..2c7913d91 100644 --- a/api/test/window_post.go +++ b/api/test/window_post.go @@ -13,7 +13,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/extern/sector-storage/mock" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/specs-actors/actors/abi" miner2 "github.com/filecoin-project/specs-actors/actors/builtin/miner" diff --git a/cmd/lotus-seal-worker/main.go b/cmd/lotus-seal-worker/main.go index 8113067ca..9e3ec607a 100644 --- a/cmd/lotus-seal-worker/main.go +++ b/cmd/lotus-seal-worker/main.go @@ -27,7 +27,7 @@ import ( "github.com/filecoin-project/lotus/api/apistruct" "github.com/filecoin-project/lotus/build" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/extern/sector-storage/stores" diff --git a/cmd/lotus-seal-worker/rpc.go b/cmd/lotus-seal-worker/rpc.go index ec3bccad5..b8508ccf2 100644 --- a/cmd/lotus-seal-worker/rpc.go +++ b/cmd/lotus-seal-worker/rpc.go @@ -5,7 +5,7 @@ import ( "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/build" ) diff --git a/cmd/lotus-storage-miner/info.go b/cmd/lotus-storage-miner/info.go index f8a5c0476..22cf8916a 100644 --- a/cmd/lotus-storage-miner/info.go +++ b/cmd/lotus-storage-miner/info.go @@ -11,7 +11,7 @@ import ( "github.com/urfave/cli/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/specs-actors/actors/builtin/miner" "github.com/filecoin-project/specs-actors/actors/builtin/power" diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index f5810d6d9..71cf294b9 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -25,7 +25,7 @@ import ( "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" paramfetch "github.com/filecoin-project/go-paramfetch" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/specs-actors/actors/abi" @@ -41,7 +41,7 @@ import ( "github.com/filecoin-project/lotus/chain/gen/slashfilter" "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/miner" "github.com/filecoin-project/lotus/node/modules" diff --git a/extern/storage-sealing/gen/main.go b/extern/storage-sealing/gen/main.go index 295199fc2..97c2bacd5 100644 --- a/extern/storage-sealing/gen/main.go +++ b/extern/storage-sealing/gen/main.go @@ -6,7 +6,7 @@ import ( gen "github.com/whyrusleeping/cbor-gen" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" ) func main() { diff --git a/extern/storage-sealing/precommit_policy_test.go b/extern/storage-sealing/precommit_policy_test.go index 9fd56b77e..9f9267d65 100644 --- a/extern/storage-sealing/precommit_policy_test.go +++ b/extern/storage-sealing/precommit_policy_test.go @@ -11,7 +11,7 @@ import ( commcid "github.com/filecoin-project/go-fil-commcid" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" ) type fakeChain struct { diff --git a/extern/storage-sealing/sealing.go b/extern/storage-sealing/sealing.go index 0d243453e..eca387da3 100644 --- a/extern/storage-sealing/sealing.go +++ b/extern/storage-sealing/sealing.go @@ -15,7 +15,7 @@ import ( "github.com/filecoin-project/go-address" padreader "github.com/filecoin-project/go-padreader" statemachine "github.com/filecoin-project/go-statemachine" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" diff --git a/extern/storage-sealing/types.go b/extern/storage-sealing/types.go index a76414f0a..45993bb82 100644 --- a/extern/storage-sealing/types.go +++ b/extern/storage-sealing/types.go @@ -13,7 +13,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/runtime/exitcode" "github.com/filecoin-project/specs-storage/storage" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" ) // Piece is a tuple of piece and deal info diff --git a/lib/rpcenc/reader.go b/lib/rpcenc/reader.go index 9f59fe7c8..ffb13577f 100644 --- a/lib/rpcenc/reader.go +++ b/lib/rpcenc/reader.go @@ -19,7 +19,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/specs-actors/actors/abi" ) diff --git a/lib/rpcenc/reader_test.go b/lib/rpcenc/reader_test.go index a9c9a9389..d33bbbd26 100644 --- a/lib/rpcenc/reader_test.go +++ b/lib/rpcenc/reader_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" ) type ReaderHandler struct { diff --git a/markets/retrievaladapter/provider.go b/markets/retrievaladapter/provider.go index d130e8009..f22a31ccc 100644 --- a/markets/retrievaladapter/provider.go +++ b/markets/retrievaladapter/provider.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage" diff --git a/markets/storageadapter/provider.go b/markets/storageadapter/provider.go index 9bbf6e826..baca363dd 100644 --- a/markets/storageadapter/provider.go +++ b/markets/storageadapter/provider.go @@ -28,7 +28,7 @@ import ( "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/events/state" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/markets/utils" "github.com/filecoin-project/lotus/node/modules/dtypes" diff --git a/node/builder.go b/node/builder.go index 01800a844..7f1247084 100644 --- a/node/builder.go +++ b/node/builder.go @@ -40,10 +40,10 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/wallet" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/extern/sector-storage/stores" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/lib/blockstore" "github.com/filecoin-project/lotus/lib/peermgr" _ "github.com/filecoin-project/lotus/lib/sigs/bls" diff --git a/node/config/def.go b/node/config/def.go index bfa4c64f1..4331d2472 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -7,7 +7,7 @@ import ( "github.com/ipfs/go-cid" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" ) // Common is common config between full node and miner diff --git a/node/impl/remoteworker.go b/node/impl/remoteworker.go index 4b0f2e099..f46f7206a 100644 --- a/node/impl/remoteworker.go +++ b/node/impl/remoteworker.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/client" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" ) type remoteWorker struct { diff --git a/node/impl/storminer.go b/node/impl/storminer.go index 9df12d379..e302f7051 100644 --- a/node/impl/storminer.go +++ b/node/impl/storminer.go @@ -19,12 +19,12 @@ import ( "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/extern/sector-storage/storiface" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/apistruct" diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index ed7b21c60..7aec09482 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -44,10 +44,10 @@ import ( "github.com/filecoin-project/go-storedcounter" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/extern/sector-storage/stores" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" lapi "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" diff --git a/node/node_test.go b/node/node_test.go index 38a068135..770ce1f5b 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -41,7 +41,7 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/cmd/lotus-seed/seed" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/extern/sector-storage/mock" "github.com/filecoin-project/lotus/genesis" diff --git a/storage/adapter_events.go b/storage/adapter_events.go index ee320c361..42622e855 100644 --- a/storage/adapter_events.go +++ b/storage/adapter_events.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" ) var _ sealing.Events = new(EventsAdapter) diff --git a/storage/adapter_storage_miner.go b/storage/adapter_storage_miner.go index ebba0fcbd..8881e599e 100644 --- a/storage/adapter_storage_miner.go +++ b/storage/adapter_storage_miner.go @@ -23,7 +23,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" ) var _ sealing.SealingAPI = new(SealingAPIAdapter) diff --git a/storage/miner.go b/storage/miner.go index 91a36617f..f8a6691f4 100644 --- a/storage/miner.go +++ b/storage/miner.go @@ -12,7 +12,7 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/miner" @@ -24,7 +24,7 @@ import ( "github.com/filecoin-project/lotus/chain/events" "github.com/filecoin-project/lotus/chain/gen" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/modules/dtypes" ) diff --git a/storage/sealing.go b/storage/sealing.go index 2fb02fa8e..5360a1186 100644 --- a/storage/sealing.go +++ b/storage/sealing.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" ) // TODO: refactor this to be direct somehow diff --git a/storage/sectorblocks/blocks.go b/storage/sectorblocks/blocks.go index f2e5fc42f..5bfafe263 100644 --- a/storage/sectorblocks/blocks.go +++ b/storage/sectorblocks/blocks.go @@ -15,7 +15,7 @@ import ( "golang.org/x/xerrors" cborutil "github.com/filecoin-project/go-cbor-util" - "github.com/filecoin-project/lotus/extern/storage-sealing" + sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/lotus/api" diff --git a/storage/wdpost_sched.go b/storage/wdpost_sched.go index 97eb8caa6..dc21f38c0 100644 --- a/storage/wdpost_sched.go +++ b/storage/wdpost_sched.go @@ -15,7 +15,7 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/extern/sector-storage" + sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage" "github.com/filecoin-project/lotus/node/config" "go.opencensus.io/trace" From 0b498d25f65903a7343e948e2276dbe275958c74 Mon Sep 17 00:00:00 2001 From: Mike Greenberg Date: Thu, 13 Aug 2020 22:59:30 -0400 Subject: [PATCH 24/37] fix(chainwatch): Actor code are human readable --- cmd/lotus-chainwatch/processor/common_actors.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cmd/lotus-chainwatch/processor/common_actors.go b/cmd/lotus-chainwatch/processor/common_actors.go index 5264a48c8..698badcce 100644 --- a/cmd/lotus-chainwatch/processor/common_actors.go +++ b/cmd/lotus-chainwatch/processor/common_actors.go @@ -8,8 +8,6 @@ import ( "golang.org/x/sync/errgroup" "golang.org/x/xerrors" - "github.com/ipfs/go-cid" - "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/chain/events/state" "github.com/filecoin-project/lotus/chain/types" @@ -17,6 +15,8 @@ import ( "github.com/filecoin-project/specs-actors/actors/builtin" _init "github.com/filecoin-project/specs-actors/actors/builtin/init" "github.com/filecoin-project/specs-actors/actors/util/adt" + "github.com/ipfs/go-cid" + "github.com/multiformats/go-multihash" typegen "github.com/whyrusleeping/cbor-gen" ) @@ -243,9 +243,13 @@ func (p *Processor) storeActorHeads(actors map[cid.Cid]ActorTips) error { } for code, actTips := range actors { + actorName := code.String() + if s, err := multihash.Decode(code.Hash()); err != nil { + actorName = string(s.Digest) + } for _, actorInfo := range actTips { for _, a := range actorInfo { - if _, err := stmt.Exec(a.addr.String(), code.String(), a.act.Head.String(), a.act.Nonce, a.act.Balance.String(), a.stateroot.String()); err != nil { + if _, err := stmt.Exec(a.addr.String(), actorName, a.act.Head.String(), a.act.Nonce, a.act.Balance.String(), a.stateroot.String()); err != nil { return err } } @@ -285,9 +289,13 @@ func (p *Processor) storeActorStates(actors map[cid.Cid]ActorTips) error { } for code, actTips := range actors { + actorName := code.String() + if s, err := multihash.Decode(code.Hash()); err != nil { + actorName = string(s.Digest) + } for _, actorInfo := range actTips { for _, a := range actorInfo { - if _, err := stmt.Exec(a.act.Head.String(), code.String(), a.state); err != nil { + if _, err := stmt.Exec(a.act.Head.String(), actorName, a.state); err != nil { return err } } From b37a39588e36a15e9e0cb0619b4bf2c647299aa9 Mon Sep 17 00:00:00 2001 From: Mike Greenberg Date: Mon, 17 Aug 2020 11:31:59 -0400 Subject: [PATCH 25/37] feat(chainwatch): Add full version to help/startup log via build param --- Makefile | 2 +- cmd/lotus-chainwatch/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0ef3c2264..2383585b5 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,7 @@ BINS+=lotus-fountain lotus-chainwatch: rm -f lotus-chainwatch - go build -o lotus-chainwatch ./cmd/lotus-chainwatch + go build $(GOFLAGS) -o lotus-chainwatch ./cmd/lotus-chainwatch .PHONY: lotus-chainwatch BINS+=lotus-chainwatch diff --git a/cmd/lotus-chainwatch/main.go b/cmd/lotus-chainwatch/main.go index bcea3193d..b230d9cae 100644 --- a/cmd/lotus-chainwatch/main.go +++ b/cmd/lotus-chainwatch/main.go @@ -14,7 +14,7 @@ func main() { if err := logging.SetLogLevel("*", "info"); err != nil { log.Fatal(err) } - log.Info("Starting chainwatch") + log.Info("Starting chainwatch", " v", build.UserVersion()) app := &cli.App{ Name: "lotus-chainwatch", From f31473c4cf667ff517421bb0d3cdef49b12d2499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 17 Aug 2020 17:34:56 +0200 Subject: [PATCH 26/37] Update jsonrpc to fix sealing sched hangs --- api/client/client.go | 5 +++-- cli/cmd.go | 4 ++-- cmd/lotus-seal-worker/main.go | 4 +++- go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/api/client/client.go b/api/client/client.go index 02fb7c775..b55d6bca4 100644 --- a/api/client/client.go +++ b/api/client/client.go @@ -39,7 +39,7 @@ func NewFullNodeRPC(addr string, requestHeader http.Header) (api.FullNode, jsonr } // NewStorageMinerRPC creates a new http jsonrpc client for miner -func NewStorageMinerRPC(addr string, requestHeader http.Header) (api.StorageMiner, jsonrpc.ClientCloser, error) { +func NewStorageMinerRPC(addr string, requestHeader http.Header, opts ...jsonrpc.Option) (api.StorageMiner, jsonrpc.ClientCloser, error) { var res apistruct.StorageMinerStruct closer, err := jsonrpc.NewMergeClient(addr, "Filecoin", []interface{}{ @@ -47,6 +47,7 @@ func NewStorageMinerRPC(addr string, requestHeader http.Header) (api.StorageMine &res.Internal, }, requestHeader, + opts..., ) return &res, closer, err @@ -75,7 +76,7 @@ func NewWorkerRPC(addr string, requestHeader http.Header) (api.WorkerAPI, jsonrp requestHeader, rpcenc.ReaderParamEncoder(u.String()), jsonrpc.WithNoReconnect(), - jsonrpc.WithWriteTimeout(30*time.Second), + jsonrpc.WithTimeout(30*time.Second), ) return &res, closer, err diff --git a/cli/cmd.go b/cli/cmd.go index a201af2e9..22b95089d 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -198,13 +198,13 @@ func GetFullNodeAPI(ctx *cli.Context) (api.FullNode, jsonrpc.ClientCloser, error return client.NewFullNodeRPC(addr, headers) } -func GetStorageMinerAPI(ctx *cli.Context) (api.StorageMiner, jsonrpc.ClientCloser, error) { +func GetStorageMinerAPI(ctx *cli.Context, opts ...jsonrpc.Option) (api.StorageMiner, jsonrpc.ClientCloser, error) { addr, headers, err := GetRawAPI(ctx, repo.StorageMiner) if err != nil { return nil, nil, err } - return client.NewStorageMinerRPC(addr, headers) + return client.NewStorageMinerRPC(addr, headers, opts...) } func DaemonContext(cctx *cli.Context) context.Context { diff --git a/cmd/lotus-seal-worker/main.go b/cmd/lotus-seal-worker/main.go index 128862e0d..2e6833921 100644 --- a/cmd/lotus-seal-worker/main.go +++ b/cmd/lotus-seal-worker/main.go @@ -164,7 +164,9 @@ var runCmd = &cli.Command{ var closer func() var err error for { - nodeApi, closer, err = lcli.GetStorageMinerAPI(cctx) + nodeApi, closer, err = lcli.GetStorageMinerAPI(cctx, + jsonrpc.WithNoReconnect(), + jsonrpc.WithTimeout(30*time.Second)) if err == nil { break } diff --git a/go.mod b/go.mod index 8f4e9fc16..f0689f5d3 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/filecoin-project/go-data-transfer v0.6.1 github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f github.com/filecoin-project/go-fil-markets v0.5.6 - github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200814233340-494a301dc59c + github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0 github.com/filecoin-project/go-multistore v0.0.3 github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 diff --git a/go.sum b/go.sum index 2eab0cce0..4ce33885e 100644 --- a/go.sum +++ b/go.sum @@ -242,8 +242,8 @@ github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1 github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-markets v0.5.6 h1:WmBbV0qBU4NvLJ64xROpzrKUbkZxZqszZiEiCGmCEIY= github.com/filecoin-project/go-fil-markets v0.5.6/go.mod h1:SJApXAKr5jyGpbzDEOhvemui0pih7hhT8r2MXJxCP1E= -github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200814233340-494a301dc59c h1:4HGPNCqGbTdhAdu/9yCbrTVpokWHWHATPBlML7Uhh98= -github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200814233340-494a301dc59c/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0 h1:/GT3V+3f+H5w5odb7LcCWJ1zPw8H8m9TsGQcU0cGSHo= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI= github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= From 80fef50b90d7c780d0cb7bef277da0e9c3ca80f9 Mon Sep 17 00:00:00 2001 From: Mike Greenberg Date: Mon, 17 Aug 2020 12:22:34 -0400 Subject: [PATCH 27/37] feat(chainwatch): Include detailed economic data per epoch --- cmd/lotus-chainwatch/syncer/sync.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cmd/lotus-chainwatch/syncer/sync.go b/cmd/lotus-chainwatch/syncer/sync.go index 81cd9e269..5e559b42a 100644 --- a/cmd/lotus-chainwatch/syncer/sync.go +++ b/cmd/lotus-chainwatch/syncer/sync.go @@ -46,7 +46,11 @@ create table if not exists chain_economics ( parent_state_root text not null constraint chain_economics_pk primary key, - circulating_fil text not null + circulating_fil text not null, + vested_fil text not null, + mined_fil text not null, + burnt_fil text not null, + locked_fil text not null ); create table if not exists block_cids @@ -283,12 +287,16 @@ func (s *Syncer) storeCirculatingSupply(ctx context.Context, tipset *types.TipSe return err } - ceInsert := `insert into chain_economics (parent_state_root, circulating_fil) values ('%s', '%s');` + ceInsert := `insert into chain_economics (parent_state_root, circulating_fil, vested_fil, mined_fil, burnt_fil, locked_fil)` + + `values ('%s', '%s', '%s', '%s', '%s', '%s');` if _, err := s.db.Exec(fmt.Sprintf(ceInsert, tipset.ParentState().String(), - // TODO: Include all the details maybe? supply.FilCirculating.String(), + supply.FilVested.String(), + supply.FilMined.String(), + supply.FilBurnt.String(), + supply.FilLocked.String(), )); err != nil { return xerrors.Errorf("insert circulating supply for tipset (%s): %w", tipset.Key().String(), err) } From 1f016262cd2a7f8bb7c98c44c92a8e18d1f884ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Mon, 17 Aug 2020 17:21:33 +0100 Subject: [PATCH 28/37] readd int64 cast + nolint directive. --- extern/sector-storage/fsutil/filesize_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/sector-storage/fsutil/filesize_unix.go b/extern/sector-storage/fsutil/filesize_unix.go index 23732013b..500e54386 100644 --- a/extern/sector-storage/fsutil/filesize_unix.go +++ b/extern/sector-storage/fsutil/filesize_unix.go @@ -24,6 +24,6 @@ func FileSize(path string) (SizeInfo, error) { // NOTE: stat.Blocks is in 512B blocks, NOT in stat.Blksize // See https://www.gnu.org/software/libc/manual/html_node/Attribute-Meanings.html return SizeInfo{ - stat.Blocks * 512, // NOTE: int64 cast is needed on osx + int64(stat.Blocks) * 512, // nolint NOTE: int64 cast is needed on osx }, nil } From a66e202f0214fd802e3ee7b9ff612d7af8e0ce67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 17 Aug 2020 09:11:47 +0200 Subject: [PATCH 29/37] fsm: Fix panic on missing precommit info --- extern/storage-sealing/states_sealing.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extern/storage-sealing/states_sealing.go b/extern/storage-sealing/states_sealing.go index 3f3336b9a..2178ce0b4 100644 --- a/extern/storage-sealing/states_sealing.go +++ b/extern/storage-sealing/states_sealing.go @@ -321,11 +321,6 @@ func (m *Sealing) handleCommitting(ctx statemachine.Context, sector SectorInfo) return nil } - collateral, err := m.api.StateMinerInitialPledgeCollateral(ctx.Context(), m.maddr, *sector.PreCommitInfo, tok) - if err != nil { - return xerrors.Errorf("getting initial pledge collateral: %w", err) - } - pci, err := m.api.StateSectorPreCommitInfo(ctx.Context(), m.maddr, sector.SectorNumber, tok) if err != nil { return xerrors.Errorf("getting precommit info: %w", err) @@ -334,6 +329,11 @@ func (m *Sealing) handleCommitting(ctx statemachine.Context, sector SectorInfo) return ctx.Send(SectorCommitFailed{error: xerrors.Errorf("precommit info not found on chain")}) } + collateral, err := m.api.StateMinerInitialPledgeCollateral(ctx.Context(), m.maddr, pci.Info, tok) + if err != nil { + return xerrors.Errorf("getting initial pledge collateral: %w", err) + } + collateral = big.Sub(collateral, pci.PreCommitDeposit) if collateral.LessThan(big.Zero()) { collateral = big.Zero() From bb79af7721a0278e680f94bf256d1ed987d19a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 17 Aug 2020 09:35:22 +0200 Subject: [PATCH 30/37] fsm: Recover from errors from VerifySeal in checkCommit --- extern/storage-sealing/checks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/storage-sealing/checks.go b/extern/storage-sealing/checks.go index a86953d08..95ef101fa 100644 --- a/extern/storage-sealing/checks.go +++ b/extern/storage-sealing/checks.go @@ -155,7 +155,7 @@ func (m *Sealing) checkCommit(ctx context.Context, si SectorInfo, proof []byte, UnsealedCID: *si.CommD, }) if err != nil { - return xerrors.Errorf("verify seal: %w", err) + return &ErrInvalidProof{xerrors.Errorf("verify seal: %w", err)} } if !ok { return &ErrInvalidProof{xerrors.New("invalid proof (compute error?)")} From ca552cf83be13b3ea9c2a973a26b8f5d77db49d8 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 17 Aug 2020 21:03:08 +0300 Subject: [PATCH 31/37] deduplicate some block validation logic --- chain/sub/incoming.go | 58 +++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/chain/sub/incoming.go b/chain/sub/incoming.go index d65794aea..8bc8cce0e 100644 --- a/chain/sub/incoming.go +++ b/chain/sub/incoming.go @@ -264,25 +264,10 @@ func (bv *BlockValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub bv.flagPeer(pid) } - // make sure the block can be decoded - blk, err := types.DecodeBlockMsg(msg.GetData()) + blk, what, err := bv.decodeAndCheckBlock(msg) if err != nil { log.Error("got invalid block over pubsub: ", err) - recordFailure("invalid") - return pubsub.ValidationReject - } - - // check the message limit constraints - if len(blk.BlsMessages)+len(blk.SecpkMessages) > build.BlockMessageLimit { - log.Warnf("received block with too many messages over pubsub") - recordFailure("too_many_messages") - return pubsub.ValidationReject - } - - // make sure we have a signature - if blk.Header.BlockSig == nil { - log.Warnf("received block without a signature over pubsub") - recordFailure("missing_signature") + recordFailure(what) return pubsub.ValidationReject } @@ -342,29 +327,14 @@ func (bv *BlockValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub func (bv *BlockValidator) validateLocalBlock(ctx context.Context, msg *pubsub.Message) pubsub.ValidationResult { stats.Record(ctx, metrics.BlockPublished.M(1)) - // do some lightweight validation for local blocks - blk, err := types.DecodeBlockMsg(msg.GetData()) + blk, what, err := bv.decodeAndCheckBlock(msg) if err != nil { - log.Warnf("error decoding local block: %s", err) + log.Errorf("got invalid local block: %s", err) + ctx, _ = tag.New(ctx, tag.Insert(metrics.FailureType, what)) stats.Record(ctx, metrics.BlockValidationFailure.M(1)) return pubsub.ValidationIgnore } - if len(blk.BlsMessages)+len(blk.SecpkMessages) > build.BlockMessageLimit { - log.Warnf("local block with too many messages: %d", len(blk.BlsMessages)+len(blk.SecpkMessages)) - stats.Record(ctx, metrics.BlockValidationFailure.M(1)) - return pubsub.ValidationIgnore - } - - // make sure we have a signature - if blk.Header.BlockSig == nil { - log.Warn("local block without a signature") - stats.Record(ctx, metrics.BlockValidationFailure.M(1)) - return pubsub.ValidationIgnore - } - - // Note we don't actually validate that signature as this is a slow process - if count := bv.recvBlocks.add(blk.Header.Cid()); count > 0 { log.Warnf("local block has been seen %d times; ignoring", count) return pubsub.ValidationIgnore @@ -375,6 +345,24 @@ func (bv *BlockValidator) validateLocalBlock(ctx context.Context, msg *pubsub.Me return pubsub.ValidationAccept } +func (bv *BlockValidator) decodeAndCheckBlock(msg *pubsub.Message) (*types.BlockMsg, string, error) { + blk, err := types.DecodeBlockMsg(msg.GetData()) + if err != nil { + return nil, "invalid", xerrors.Errorf("error decoding block: %w", err) + } + + if count := len(blk.BlsMessages) + len(blk.SecpkMessages); count > build.BlockMessageLimit { + return nil, "too_many_messages", fmt.Errorf("block contains too many messages (%d)", count) + } + + // make sure we have a signature + if blk.Header.BlockSig == nil { + return nil, "missing_signature", fmt.Errorf("block without a signature") + } + + return blk, "", nil +} + func (bv *BlockValidator) isChainNearSynced() bool { ts := bv.chain.GetHeaviestTipSet() timestamp := ts.MinTimestamp() From 5ace7479ad0bb7e7e107729239ce14453aabaf03 Mon Sep 17 00:00:00 2001 From: Ingar Shu Date: Mon, 17 Aug 2020 11:17:46 -0700 Subject: [PATCH 32/37] Don't try to output nil channel values --- cli/client.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/client.go b/cli/client.go index 41f0f8f8f..c0d5972b0 100644 --- a/cli/client.go +++ b/cli/client.go @@ -854,15 +854,15 @@ var clientRetrieveCmd = &cli.Command{ for { select { - case evt, chOpen := <-updates: - fmt.Printf("> Recv: %s, Paid %s, %s (%s)\n", - types.SizeStr(types.NewInt(evt.BytesReceived)), - types.FIL(evt.FundsSpent), - retrievalmarket.ClientEvents[evt.Event], - retrievalmarket.DealStatuses[evt.Status], - ) - - if !chOpen { + case evt, ok := <-updates: + if ok { + fmt.Printf("> Recv: %s, Paid %s, %s (%s)\n", + types.SizeStr(types.NewInt(evt.BytesReceived)), + types.FIL(evt.FundsSpent), + retrievalmarket.ClientEvents[evt.Event], + retrievalmarket.DealStatuses[evt.Status], + ) + } else { fmt.Println("Success") return nil } From 7fbbf23e5a623f1aed3da79d12b774d835c0ab3d Mon Sep 17 00:00:00 2001 From: Ingar Shu Date: Mon, 17 Aug 2020 14:20:04 -0700 Subject: [PATCH 33/37] Initialize FundsSpent to zero in RetrievalEvent --- node/impl/client/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/impl/client/client.go b/node/impl/client/client.go index c80955bca..f930c4bd4 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -6,6 +6,7 @@ import ( "io" "os" + "github.com/filecoin-project/specs-actors/actors/abi/big" "golang.org/x/xerrors" "github.com/ipfs/go-blockservice" @@ -413,7 +414,7 @@ func (a *API) clientRetrieve(ctx context.Context, order api.RetrievalOrder, ref if e != nil { errStr = e.Error() } - events <- marketevents.RetrievalEvent{Err: errStr} + events <- marketevents.RetrievalEvent{Err: errStr, FundsSpent: big.Zero()} } if order.MinerPeer.ID == "" { From cb71386ed9a520d3ef6aeaca9e691d7251f67adf Mon Sep 17 00:00:00 2001 From: Ingar Shu Date: Mon, 17 Aug 2020 14:38:50 -0700 Subject: [PATCH 34/37] Don't send finishing event if there is no error --- node/impl/client/client.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/node/impl/client/client.go b/node/impl/client/client.go index f930c4bd4..70cd770f4 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -410,11 +410,9 @@ func (a *API) clientRetrieve(ctx context.Context, order api.RetrievalOrder, ref defer close(events) finish := func(e error) { - errStr := "" if e != nil { - errStr = e.Error() + events <- marketevents.RetrievalEvent{Err: e.Error(), FundsSpent: big.Zero()} } - events <- marketevents.RetrievalEvent{Err: errStr, FundsSpent: big.Zero()} } if order.MinerPeer.ID == "" { From ef8b9eae93bf81e4b1694053e4c8707fb85c6345 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Mon, 17 Aug 2020 17:29:26 -0700 Subject: [PATCH 35/37] add lotus keygen utility --- cmd/lotus-keygen/main.go | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 cmd/lotus-keygen/main.go diff --git a/cmd/lotus-keygen/main.go b/cmd/lotus-keygen/main.go new file mode 100644 index 000000000..d4c7a2548 --- /dev/null +++ b/cmd/lotus-keygen/main.go @@ -0,0 +1,76 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + "github.com/filecoin-project/lotus/chain/wallet" + _ "github.com/filecoin-project/lotus/lib/sigs/bls" + _ "github.com/filecoin-project/lotus/lib/sigs/secp" + "github.com/filecoin-project/specs-actors/actors/crypto" + "github.com/urfave/cli/v2" +) + +func main() { + + app := cli.NewApp() + app.Flags = []cli.Flag{ + &cli.StringFlag{ + Name: "type", + Aliases: []string{"t"}, + Value: "bls", + Usage: "specify key type to generate (bls or secp256k1)", + }, + } + app.Action = func(cctx *cli.Context) error { + memks := wallet.NewMemKeyStore() + w, err := wallet.NewWallet(memks) + if err != nil { + return err + } + + var kt crypto.SigType + switch cctx.String("type") { + case "bls": + kt = crypto.SigTypeBLS + case "secp256k1": + kt = crypto.SigTypeSecp256k1 + default: + return fmt.Errorf("unrecognized key type: %q", cctx.String("type")) + } + + kaddr, err := w.GenerateKey(kt) + if err != nil { + return err + } + + ki, err := w.Export(kaddr) + if err != nil { + return err + } + + fi, err := os.Create(fmt.Sprintf("%s.key", kaddr)) + if err != nil { + return err + } + defer fi.Close() + + b, err := json.Marshal(ki) + if err != nil { + return err + } + + if _, err := fi.Write(b); err != nil { + return fmt.Errorf("failed to write key info to file: %w", err) + } + + fmt.Println("Generated new key: ", kaddr) + return nil + } + + if err := app.Run(os.Args); err != nil { + fmt.Println(err) + os.Exit(1) + } +} From 01b5118a0861a40d0c8a737d0ea624253a8d2f29 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Mon, 17 Aug 2020 20:53:02 -0400 Subject: [PATCH 36/37] Add a CLI method to set peerid --- cmd/lotus-storage-miner/actor.go | 69 +++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/cmd/lotus-storage-miner/actor.go b/cmd/lotus-storage-miner/actor.go index 21d09b5ac..70df1446a 100644 --- a/cmd/lotus-storage-miner/actor.go +++ b/cmd/lotus-storage-miner/actor.go @@ -3,6 +3,7 @@ package main import ( "fmt" "github.com/filecoin-project/specs-actors/actors/builtin" + "github.com/libp2p/go-libp2p-core/peer" "golang.org/x/xerrors" ma "github.com/multiformats/go-multiaddr" @@ -22,6 +23,7 @@ var actorCmd = &cli.Command{ Subcommands: []*cli.Command{ actorSetAddrsCmd, actorWithdrawCmd, + actorSetPeeridCmd, }, } @@ -82,7 +84,7 @@ var actorSetAddrsCmd = &cli.Command{ From: minfo.Worker, Value: types.NewInt(0), GasLimit: gasLimit, - Method: 18, + Method: builtin.MethodsMiner.ChangeMultiaddrs, Params: params, }, nil) if err != nil { @@ -95,6 +97,71 @@ var actorSetAddrsCmd = &cli.Command{ }, } +var actorSetPeeridCmd = &cli.Command{ + Name: "set-peer-id", + Usage: "set the peer id of your miner", + Flags: []cli.Flag{ + &cli.Int64Flag{ + Name: "gas-limit", + Usage: "set gas limit", + Value: 0, + }, + }, + Action: func(cctx *cli.Context) error { + nodeAPI, closer, err := lcli.GetStorageMinerAPI(cctx) + if err != nil { + return err + } + defer closer() + + api, acloser, err := lcli.GetFullNodeAPI(cctx) + if err != nil { + return err + } + defer acloser() + + ctx := lcli.ReqContext(cctx) + + pid, err := peer.IDFromString(cctx.Args().Get(0)) + if err != nil { + return fmt.Errorf("failed to parse input as a peerId: %w", err) + } + + maddr, err := nodeAPI.ActorAddress(ctx) + if err != nil { + return err + } + + minfo, err := api.StateMinerInfo(ctx, maddr, types.EmptyTSK) + if err != nil { + return err + } + + params, err := actors.SerializeParams(&miner.ChangePeerIDParams{NewID: abi.PeerID(pid)}) + if err != nil { + return err + } + + gasLimit := cctx.Int64("gas-limit") + + smsg, err := api.MpoolPushMessage(ctx, &types.Message{ + To: maddr, + From: minfo.Worker, + Value: types.NewInt(0), + GasLimit: gasLimit, + Method: builtin.MethodsMiner.ChangePeerID, + Params: params, + }, nil) + if err != nil { + return err + } + + fmt.Printf("Requested peerid change in message %s\n", smsg.Cid()) + return nil + + }, +} + var actorWithdrawCmd = &cli.Command{ Name: "withdraw", Usage: "withdraw available balance", From 9db478fd2eb34ff1d2f6a0af2f552097addca89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 18 Aug 2020 02:58:54 +0200 Subject: [PATCH 37/37] Bump version --- build/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/version.go b/build/version.go index 2657853e4..de4102f5c 100644 --- a/build/version.go +++ b/build/version.go @@ -25,7 +25,7 @@ func buildType() string { } // BuildVersion is the local build version, set by build system -const BuildVersion = "0.4.5" +const BuildVersion = "0.4.6" func UserVersion() string { return BuildVersion + buildType() + CurrentCommit