Merge branch 'filecoin-project:master' into master

This commit is contained in:
kaola526 2022-06-16 09:17:02 +08:00 committed by GitHub
commit 4ae3d61b76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
304 changed files with 987 additions and 1010 deletions

View File

@ -992,7 +992,7 @@ workflows:
- test: - test:
go-test-flags: "-run=TestMulticoreSDR" go-test-flags: "-run=TestMulticoreSDR"
suite: multicore-sdr-check suite: multicore-sdr-check
target: "./extern/sector-storage/ffiwrapper" target: "./storage/sealer/ffiwrapper"
proofs-log-test: "1" proofs-log-test: "1"
- test-conformance: - test-conformance:
suite: conformance suite: conformance

View File

@ -782,7 +782,7 @@ workflows:
- test: - test:
go-test-flags: "-run=TestMulticoreSDR" go-test-flags: "-run=TestMulticoreSDR"
suite: multicore-sdr-check suite: multicore-sdr-check
target: "./extern/sector-storage/ffiwrapper" target: "./storage/sealer/ffiwrapper"
proofs-log-test: "1" proofs-log-test: "1"
- test-conformance: - test-conformance:
suite: conformance suite: conformance

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"time" "time"
metrics "github.com/libp2p/go-libp2p-core/metrics" "github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/protocol" "github.com/libp2p/go-libp2p-core/protocol"

View File

@ -22,9 +22,9 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil" "github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/extern/storage-sealing/sealiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
// MODIFYING THE API INTERFACE // MODIFYING THE API INTERFACE

View File

@ -10,8 +10,8 @@ import (
"github.com/filecoin-project/go-state-types/proof" "github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
// MODIFYING THE API INTERFACE // MODIFYING THE API INTERFACE

View File

@ -27,7 +27,7 @@ import (
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-bitfield"
datatransfer "github.com/filecoin-project/go-data-transfer" datatransfer "github.com/filecoin-project/go-data-transfer"
filestore "github.com/filecoin-project/go-fil-markets/filestore" "github.com/filecoin-project/go-fil-markets/filestore"
"github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
@ -39,11 +39,11 @@ import (
"github.com/filecoin-project/lotus/api/v0api" "github.com/filecoin-project/lotus/api/v0api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports" "github.com/filecoin-project/lotus/node/repo/imports"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var ExampleValues = map[reflect.Type]interface{}{ var ExampleValues = map[reflect.Type]interface{}{

View File

@ -10,11 +10,11 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
metrics "github.com/libp2p/go-libp2p-core/metrics" "github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/protocol" "github.com/libp2p/go-libp2p-core/protocol"
xerrors "golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield" "github.com/filecoin-project/go-bitfield"
@ -36,13 +36,13 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/actors/builtin"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner" lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"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/storiface"
"github.com/filecoin-project/lotus/extern/storage-sealing/sealiface"
"github.com/filecoin-project/lotus/journal/alerting" "github.com/filecoin-project/lotus/journal/alerting"
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports" "github.com/filecoin-project/lotus/node/repo/imports"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var ErrNotSupported = xerrors.New("method not supported") var ErrNotSupported = xerrors.New("method not supported")

View File

@ -3,7 +3,7 @@ package api
import ( import (
"fmt" "fmt"
xerrors "golang.org/x/xerrors" "golang.org/x/xerrors"
) )
type Version uint32 type Version uint32

View File

@ -11,7 +11,7 @@ import (
"testing" "testing"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"

View File

@ -3,7 +3,7 @@ package blockstore
import ( import (
"context" "context"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore" ds "github.com/ipfs/go-datastore"
blockstore "github.com/ipfs/go-ipfs-blockstore" blockstore "github.com/ipfs/go-ipfs-blockstore"
logging "github.com/ipfs/go-log/v2" logging "github.com/ipfs/go-log/v2"

View File

@ -5,7 +5,7 @@ import (
"io" "io"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
) )
var _ Blockstore = (*discardstore)(nil) var _ Blockstore = (*discardstore)(nil)

View File

@ -5,7 +5,7 @@ import (
"io" "io"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash" mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors" "golang.org/x/xerrors"
) )

View File

@ -5,7 +5,7 @@ import (
"io" "io"
"os" "os"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash" mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors" "golang.org/x/xerrors"
) )

View File

@ -5,7 +5,7 @@ import (
"io" "io"
"os" "os"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
) )

View File

@ -13,7 +13,7 @@ import (
"time" "time"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"go.uber.org/multierr" "go.uber.org/multierr"
"golang.org/x/xerrors" "golang.org/x/xerrors"
) )

View File

@ -3,7 +3,7 @@ package splitstore
import ( import (
"errors" "errors"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
) )

View File

@ -8,7 +8,7 @@ import (
"github.com/dgraph-io/badger/v2" "github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options" "github.com/dgraph-io/badger/v2/options"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"go.uber.org/zap" "go.uber.org/zap"
"golang.org/x/xerrors" "golang.org/x/xerrors"
) )

View File

@ -7,7 +7,7 @@ import (
"path/filepath" "path/filepath"
"sync" "sync"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
) )

View File

@ -4,7 +4,7 @@ package splitstore
import ( import (
"testing" "testing"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/multiformats/go-multihash" "github.com/multiformats/go-multihash"
) )

View File

@ -9,7 +9,7 @@ import (
"time" "time"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
dstore "github.com/ipfs/go-datastore" dstore "github.com/ipfs/go-datastore"
logging "github.com/ipfs/go-log/v2" logging "github.com/ipfs/go-log/v2"
"go.opencensus.io/stats" "go.opencensus.io/stats"

View File

@ -8,7 +8,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
bstore "github.com/filecoin-project/lotus/blockstore" bstore "github.com/filecoin-project/lotus/blockstore"

View File

@ -11,7 +11,7 @@ import (
"time" "time"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
cbg "github.com/whyrusleeping/cbor-gen" cbg "github.com/whyrusleeping/cbor-gen"
"go.opencensus.io/stats" "go.opencensus.io/stats"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"

View File

@ -5,7 +5,7 @@ import (
"errors" "errors"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
bstore "github.com/filecoin-project/lotus/blockstore" bstore "github.com/filecoin-project/lotus/blockstore"
) )

View File

@ -6,7 +6,7 @@ import (
"sync/atomic" "sync/atomic"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
) )

View File

@ -12,8 +12,8 @@ import (
"time" "time"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
datastore "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore"
dssync "github.com/ipfs/go-datastore/sync" dssync "github.com/ipfs/go-datastore/sync"
logging "github.com/ipfs/go-log/v2" logging "github.com/ipfs/go-log/v2"
mh "github.com/multiformats/go-multihash" mh "github.com/multiformats/go-multihash"

View File

@ -3,7 +3,7 @@ package splitstore
import ( import (
"encoding/binary" "encoding/binary"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash" mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors" "golang.org/x/xerrors"

View File

@ -6,7 +6,7 @@ import (
"time" "time"
blocks "github.com/ipfs/go-block-format" blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"

View File

@ -3,7 +3,7 @@ package splitstore
import ( import (
"sync" "sync"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
) )
// ObjectVisitor is an interface for deduplicating objects during walks // ObjectVisitor is an interface for deduplicating objects during walks

View File

@ -5,7 +5,7 @@ import (
cbor "github.com/ipfs/go-ipld-cbor" cbor "github.com/ipfs/go-ipld-cbor"
adt "github.com/filecoin-project/specs-actors/actors/util/adt" "github.com/filecoin-project/specs-actors/actors/util/adt"
) )
type Store interface { type Store interface {

View File

@ -8,7 +8,7 @@ import (
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
big "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/cbor" "github.com/filecoin-project/go-state-types/cbor"
ipldcbor "github.com/ipfs/go-ipld-cbor" ipldcbor "github.com/ipfs/go-ipld-cbor"

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
big "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/big"
paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych" paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/cbor" "github.com/filecoin-project/go-state-types/cbor"
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"

View File

@ -5,7 +5,7 @@ import (
"strings" "strings"
"sync" "sync"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor" cbor "github.com/ipfs/go-ipld-cbor"
"golang.org/x/xerrors" "golang.org/x/xerrors"

View File

@ -39,10 +39,10 @@ import (
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/lib/async" "github.com/filecoin-project/lotus/lib/async"
"github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/lib/sigs"
"github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/metrics"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var log = logging.Logger("fil-consensus") var log = logging.Logger("fil-consensus")

View File

@ -8,7 +8,7 @@ import (
"sync" "sync"
"time" "time"
host "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peer"
"go.uber.org/fx" "go.uber.org/fx"

View File

@ -40,10 +40,10 @@ import (
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/chain/wallet"
"github.com/filecoin-project/lotus/cmd/lotus-seed/seed" "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/genesis"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
const msgsPerBlock = 20 const msgsPerBlock = 20

View File

@ -47,7 +47,7 @@ import (
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/chain/wallet/key"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/lib/sigs"
) )
@ -240,7 +240,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
return cid.Undef, fmt.Errorf("failed to marshal proposal: %w", err) return cid.Undef, fmt.Errorf("failed to marshal proposal: %w", err)
} }
sig, err := sigs.Sign(wallet.ActSigType(preseal.DealClientKey.Type), preseal.DealClientKey.PrivateKey, buf) sig, err := sigs.Sign(key.ActSigType(preseal.DealClientKey.Type), preseal.DealClientKey.PrivateKey, buf)
if err != nil { if err != nil {
return cid.Undef, fmt.Errorf("failed to sign proposal: %w", err) return cid.Undef, fmt.Errorf("failed to sign proposal: %w", err)
} }

View File

@ -9,7 +9,7 @@ import (
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor" cbor "github.com/ipfs/go-ipld-cbor"
address "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/go-state-types/network"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"

View File

@ -5,7 +5,7 @@ import (
"context" "context"
"os" "os"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
@ -26,7 +26,7 @@ import (
"github.com/filecoin-project/lotus/chain/rand" "github.com/filecoin-project/lotus/chain/rand"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
func GetMinerWorkerRaw(ctx context.Context, sm *StateManager, st cid.Cid, maddr address.Address) (address.Address, error) { func GetMinerWorkerRaw(ctx context.Context, sm *StateManager, st cid.Cid, maddr address.Address) (address.Address, error) {

View File

@ -6,7 +6,7 @@ import (
"context" "context"
"testing" "testing"
datastore "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore"
syncds "github.com/ipfs/go-datastore/sync" syncds "github.com/ipfs/go-datastore/sync"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View File

@ -7,7 +7,7 @@ import (
"io" "io"
"testing" "testing"
datastore "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/crypto"

View File

@ -12,14 +12,14 @@ import (
bserv "github.com/ipfs/go-blockservice" bserv "github.com/ipfs/go-blockservice"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log/v2" logging "github.com/ipfs/go-log/v2"
connmgr "github.com/libp2p/go-libp2p-core/connmgr" "github.com/libp2p/go-libp2p-core/connmgr"
"github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peer"
pubsub "github.com/libp2p/go-libp2p-pubsub" pubsub "github.com/libp2p/go-libp2p-pubsub"
"go.opencensus.io/stats" "go.opencensus.io/stats"
"go.opencensus.io/tag" "go.opencensus.io/tag"
"golang.org/x/xerrors" "golang.org/x/xerrors"
address "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-legs/dtsync" "github.com/filecoin-project/go-legs/dtsync"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"

View File

@ -9,7 +9,7 @@ import (
"sync" "sync"
"time" "time"
peer "github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peer"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"

View File

@ -7,7 +7,7 @@ import (
block "github.com/ipfs/go-block-format" block "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/minio/blake2b-simd" "github.com/minio/blake2b-simd"
xerrors "golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"

View File

@ -8,7 +8,7 @@ import (
"reflect" "reflect"
"testing" "testing"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"

View File

@ -7,7 +7,7 @@ import (
block "github.com/ipfs/go-block-format" block "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
xerrors "golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"

View File

@ -1,7 +1,7 @@
package types package types
import ( import (
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
cbg "github.com/whyrusleeping/cbor-gen" cbg "github.com/whyrusleeping/cbor-gen"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"

View File

@ -26,8 +26,8 @@ import (
"github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/chain/state" "github.com/filecoin-project/lotus/chain/state"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/lib/sigs"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
func init() { func init() {

View File

@ -8,7 +8,7 @@ import (
"time" "time"
block "github.com/ipfs/go-block-format" block "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor" cbor "github.com/ipfs/go-ipld-cbor"
logging "github.com/ipfs/go-log/v2" logging "github.com/ipfs/go-log/v2"
mh "github.com/multiformats/go-multihash" mh "github.com/multiformats/go-multihash"

View File

@ -1,4 +1,4 @@
package wallet package key
import ( import (
"golang.org/x/xerrors" "golang.org/x/xerrors"

View File

@ -14,6 +14,7 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet/key"
"github.com/filecoin-project/lotus/lib/sigs" "github.com/filecoin-project/lotus/lib/sigs"
_ "github.com/filecoin-project/lotus/lib/sigs/bls" // enable bls signatures _ "github.com/filecoin-project/lotus/lib/sigs/bls" // enable bls signatures
_ "github.com/filecoin-project/lotus/lib/sigs/secp" // enable secp signatures _ "github.com/filecoin-project/lotus/lib/sigs/secp" // enable secp signatures
@ -28,7 +29,7 @@ const (
) )
type LocalWallet struct { type LocalWallet struct {
keys map[address.Address]*Key keys map[address.Address]*key.Key
keystore types.KeyStore keystore types.KeyStore
lk sync.Mutex lk sync.Mutex
@ -41,15 +42,15 @@ type Default interface {
func NewWallet(keystore types.KeyStore) (*LocalWallet, error) { func NewWallet(keystore types.KeyStore) (*LocalWallet, error) {
w := &LocalWallet{ w := &LocalWallet{
keys: make(map[address.Address]*Key), keys: make(map[address.Address]*key.Key),
keystore: keystore, keystore: keystore,
} }
return w, nil return w, nil
} }
func KeyWallet(keys ...*Key) *LocalWallet { func KeyWallet(keys ...*key.Key) *LocalWallet {
m := make(map[address.Address]*Key) m := make(map[address.Address]*key.Key)
for _, key := range keys { for _, key := range keys {
m[key.Address] = key m[key.Address] = key
} }
@ -68,10 +69,10 @@ func (w *LocalWallet) WalletSign(ctx context.Context, addr address.Address, msg
return nil, xerrors.Errorf("signing using key '%s': %w", addr.String(), types.ErrKeyInfoNotFound) return nil, xerrors.Errorf("signing using key '%s': %w", addr.String(), types.ErrKeyInfoNotFound)
} }
return sigs.Sign(ActSigType(ki.Type), ki.PrivateKey, msg) return sigs.Sign(key.ActSigType(ki.Type), ki.PrivateKey, msg)
} }
func (w *LocalWallet) findKey(addr address.Address) (*Key, error) { func (w *LocalWallet) findKey(addr address.Address) (*key.Key, error) {
w.lk.Lock() w.lk.Lock()
defer w.lk.Unlock() defer w.lk.Unlock()
@ -91,7 +92,7 @@ func (w *LocalWallet) findKey(addr address.Address) (*Key, error) {
} }
return nil, xerrors.Errorf("getting from keystore: %w", err) return nil, xerrors.Errorf("getting from keystore: %w", err)
} }
k, err = NewKey(ki) k, err = key.NewKey(ki)
if err != nil { if err != nil {
return nil, xerrors.Errorf("decoding from keystore: %w", err) return nil, xerrors.Errorf("decoding from keystore: %w", err)
} }
@ -149,7 +150,7 @@ func (w *LocalWallet) WalletImport(ctx context.Context, ki *types.KeyInfo) (addr
w.lk.Lock() w.lk.Lock()
defer w.lk.Unlock() defer w.lk.Unlock()
k, err := NewKey(*ki) k, err := key.NewKey(*ki)
if err != nil { if err != nil {
return address.Undef, xerrors.Errorf("failed to make key: %w", err) return address.Undef, xerrors.Errorf("failed to make key: %w", err)
} }
@ -203,7 +204,7 @@ func (w *LocalWallet) GetDefault() (address.Address, error) {
return address.Undef, xerrors.Errorf("failed to get default key: %w", err) return address.Undef, xerrors.Errorf("failed to get default key: %w", err)
} }
k, err := NewKey(ki) k, err := key.NewKey(ki)
if err != nil { if err != nil {
return address.Undef, xerrors.Errorf("failed to read default key from keystore: %w", err) return address.Undef, xerrors.Errorf("failed to read default key from keystore: %w", err)
} }
@ -237,7 +238,7 @@ func (w *LocalWallet) WalletNew(ctx context.Context, typ types.KeyType) (address
w.lk.Lock() w.lk.Lock()
defer w.lk.Unlock() defer w.lk.Unlock()
k, err := GenerateKey(typ) k, err := key.GenerateKey(typ)
if err != nil { if err != nil {
return address.Undef, err return address.Undef, err
} }

View File

@ -16,7 +16,7 @@ import (
"strings" "strings"
"time" "time"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
cbg "github.com/whyrusleeping/cbor-gen" cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors" "golang.org/x/xerrors"
@ -38,7 +38,7 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/consensus/filcns" "github.com/filecoin-project/lotus/chain/consensus/filcns"
types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
) )
var ChainCmd = &cli.Command{ var ChainCmd = &cli.Command{

View File

@ -11,7 +11,7 @@ import (
"testing" "testing"
"github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
@ -19,7 +19,7 @@ import (
"github.com/filecoin-project/specs-actors/v7/actors/builtin" "github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/mock" "github.com/filecoin-project/lotus/chain/types/mock"
) )

View File

@ -7,7 +7,7 @@ import (
"sort" "sort"
"strconv" "strconv"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golang.org/x/xerrors" "golang.org/x/xerrors"

View File

@ -7,7 +7,7 @@ import (
"github.com/Kubuxu/imtui" "github.com/Kubuxu/imtui"
"github.com/gdamore/tcell/v2" "github.com/gdamore/tcell/v2"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golang.org/x/xerrors" "golang.org/x/xerrors"
@ -17,7 +17,7 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/messagepool" "github.com/filecoin-project/lotus/chain/messagepool"
types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
) )
var mpoolManage = &cli.Command{ var mpoolManage = &cli.Command{

View File

@ -10,7 +10,7 @@ import (
"strconv" "strconv"
"text/tabwriter" "text/tabwriter"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor" cbor "github.com/ipfs/go-ipld-cbor"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
cbg "github.com/whyrusleeping/cbor-gen" cbg "github.com/whyrusleeping/cbor-gen"

View File

@ -15,7 +15,7 @@ import (
"github.com/fatih/color" "github.com/fatih/color"
"github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peer"
protocol "github.com/libp2p/go-libp2p-core/protocol" "github.com/libp2p/go-libp2p-core/protocol"
"github.com/multiformats/go-multiaddr" "github.com/multiformats/go-multiaddr"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golang.org/x/xerrors" "golang.org/x/xerrors"

View File

@ -5,7 +5,7 @@ import (
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golang.org/x/xerrors" "golang.org/x/xerrors"
paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
) )

View File

@ -6,7 +6,7 @@ import (
"bytes" "bytes"
"testing" "testing"
gomock "github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
ucli "github.com/urfave/cli/v2" ucli "github.com/urfave/cli/v2"
@ -14,7 +14,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
) )
func mustAddr(a address.Address, err error) address.Address { func mustAddr(a address.Address, err error) address.Address {

View File

@ -9,7 +9,7 @@ import (
"github.com/Kubuxu/imtui" "github.com/Kubuxu/imtui"
"github.com/gdamore/tcell/v2" "github.com/gdamore/tcell/v2"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golang.org/x/xerrors" "golang.org/x/xerrors"
@ -18,7 +18,7 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
) )
func InteractiveSend(ctx context.Context, cctx *cli.Context, srv ServicesAPI, func InteractiveSend(ctx context.Context, cctx *cli.Context, srv ServicesAPI,

View File

@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"reflect" "reflect"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
cbg "github.com/whyrusleeping/cbor-gen" cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors" "golang.org/x/xerrors"
@ -18,7 +18,7 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/consensus/filcns" "github.com/filecoin-project/lotus/chain/consensus/filcns"
types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
) )
//go:generate go run github.com/golang/mock/mockgen -destination=servicesmock_test.go -package=cli -self_package github.com/filecoin-project/lotus/cli . ServicesAPI //go:generate go run github.com/golang/mock/mockgen -destination=servicesmock_test.go -package=cli -self_package github.com/filecoin-project/lotus/cli . ServicesAPI

View File

@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"testing" "testing"
gomock "github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
@ -15,8 +15,8 @@ import (
"github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
mocks "github.com/filecoin-project/lotus/api/mocks" "github.com/filecoin-project/lotus/api/mocks"
types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
) )
type markerKeyType struct{} type markerKeyType struct{}

View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"time" "time"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"

View File

@ -20,7 +20,7 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types" apitypes "github.com/filecoin-project/lotus/api/types"
types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
) )
func TestWalletNew(t *testing.T) { func TestWalletNew(t *testing.T) {

View File

@ -12,7 +12,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
prooftypes "github.com/filecoin-project/go-state-types/proof" prooftypes "github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
type cachingVerifier struct { type cachingVerifier struct {

View File

@ -40,10 +40,10 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
_ "github.com/filecoin-project/lotus/lib/sigs/bls" _ "github.com/filecoin-project/lotus/lib/sigs/bls"
_ "github.com/filecoin-project/lotus/lib/sigs/secp" _ "github.com/filecoin-project/lotus/lib/sigs/secp"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
type TipSetExec struct { type TipSetExec struct {

View File

@ -19,7 +19,7 @@ import (
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
prooftypes "github.com/filecoin-project/go-state-types/proof" prooftypes "github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
@ -29,10 +29,10 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"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/storiface"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("lotus-bench") var log = logging.Logger("lotus-bench")

View File

@ -24,8 +24,8 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var simpleCmd = &cli.Command{ var simpleCmd = &cli.Command{

View File

@ -8,7 +8,7 @@ import (
"syscall" "syscall"
"time" "time"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log/v2" logging "github.com/ipfs/go-log/v2"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"

View File

@ -4,7 +4,7 @@ package main
import ( import (
"testing" "testing"
cid "github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash" mh "github.com/multiformats/go-multihash"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View File

@ -33,9 +33,9 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin/reward" "github.com/filecoin-project/lotus/chain/actors/builtin/reward"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/journal/alerting" "github.com/filecoin-project/lotus/journal/alerting"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
) )
var infoCmd = &cli.Command{ var infoCmd = &cli.Command{

View File

@ -25,7 +25,7 @@ import (
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
cborutil "github.com/filecoin-project/go-cbor-util" cborutil "github.com/filecoin-project/go-cbor-util"
paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/builtin"
@ -46,11 +46,6 @@ import (
"github.com/filecoin-project/lotus/chain/gen/slashfilter" "github.com/filecoin-project/lotus/chain/gen/slashfilter"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
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/sector-storage/storiface"
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/journal/fsjournal" "github.com/filecoin-project/lotus/journal/fsjournal"
@ -59,6 +54,11 @@ import (
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage" "github.com/filecoin-project/lotus/storage"
"github.com/filecoin-project/lotus/storage/paths"
pipeline "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var initCmd = &cli.Command{ var initCmd = &cli.Command{
@ -213,7 +213,7 @@ var initCmd = &cli.Command{
return err return err
} }
var localPaths []stores.LocalPath var localPaths []paths.LocalPath
if pssb := cctx.StringSlice("pre-sealed-sectors"); len(pssb) != 0 { if pssb := cctx.StringSlice("pre-sealed-sectors"); len(pssb) != 0 {
log.Infof("Setting up storage config with presealed sectors: %v", pssb) log.Infof("Setting up storage config with presealed sectors: %v", pssb)
@ -223,14 +223,14 @@ var initCmd = &cli.Command{
if err != nil { if err != nil {
return err return err
} }
localPaths = append(localPaths, stores.LocalPath{ localPaths = append(localPaths, paths.LocalPath{
Path: psp, Path: psp,
}) })
} }
} }
if !cctx.Bool("no-local-storage") { if !cctx.Bool("no-local-storage") {
b, err := json.MarshalIndent(&stores.LocalStorageMeta{ b, err := json.MarshalIndent(&paths.LocalStorageMeta{
ID: storiface.ID(uuid.New().String()), ID: storiface.ID(uuid.New().String()),
Weight: 10, Weight: 10,
CanSeal: true, CanSeal: true,
@ -244,12 +244,12 @@ var initCmd = &cli.Command{
return xerrors.Errorf("persisting storage metadata (%s): %w", filepath.Join(lr.Path(), "sectorstore.json"), err) return xerrors.Errorf("persisting storage metadata (%s): %w", filepath.Join(lr.Path(), "sectorstore.json"), err)
} }
localPaths = append(localPaths, stores.LocalPath{ localPaths = append(localPaths, paths.LocalPath{
Path: lr.Path(), Path: lr.Path(),
}) })
} }
if err := lr.SetStorage(func(sc *stores.StorageConfig) { if err := lr.SetStorage(func(sc *paths.StorageConfig) {
sc.StoragePaths = append(sc.StoragePaths, localPaths...) sc.StoragePaths = append(sc.StoragePaths, localPaths...)
}); err != nil { }); err != nil {
return xerrors.Errorf("set storage config: %w", err) return xerrors.Errorf("set storage config: %w", err)
@ -303,7 +303,7 @@ func migratePreSealMeta(ctx context.Context, api v1api.FullNode, metadata string
maxSectorID := abi.SectorNumber(0) maxSectorID := abi.SectorNumber(0)
for _, sector := range meta.Sectors { for _, sector := range meta.Sectors {
sectorKey := datastore.NewKey(sealing.SectorStorePrefix).ChildString(fmt.Sprint(sector.SectorID)) sectorKey := datastore.NewKey(pipeline.SectorStorePrefix).ChildString(fmt.Sprint(sector.SectorID))
dealID, err := findMarketDealID(ctx, api, sector.Deal) dealID, err := findMarketDealID(ctx, api, sector.Deal)
if err != nil { if err != nil {
@ -312,10 +312,10 @@ func migratePreSealMeta(ctx context.Context, api v1api.FullNode, metadata string
commD := sector.CommD commD := sector.CommD
commR := sector.CommR commR := sector.CommR
info := &sealing.SectorInfo{ info := &pipeline.SectorInfo{
State: sealing.Proving, State: pipeline.Proving,
SectorNumber: sector.SectorID, SectorNumber: sector.SectorID,
Pieces: []sealing.Piece{ Pieces: []pipeline.Piece{
{ {
Piece: abi.PieceInfo{ Piece: abi.PieceInfo{
Size: abi.PaddedPieceSize(meta.SectorSize), Size: abi.PaddedPieceSize(meta.SectorSize),
@ -458,15 +458,15 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api v1api.FullNode
wsts := statestore.New(namespace.Wrap(mds, modules.WorkerCallsPrefix)) wsts := statestore.New(namespace.Wrap(mds, modules.WorkerCallsPrefix))
smsts := statestore.New(namespace.Wrap(mds, modules.ManagerWorkPrefix)) smsts := statestore.New(namespace.Wrap(mds, modules.ManagerWorkPrefix))
si := stores.NewIndex() si := paths.NewIndex()
lstor, err := stores.NewLocal(ctx, lr, si, nil) lstor, err := paths.NewLocal(ctx, lr, si, nil)
if err != nil { if err != nil {
return err return err
} }
stor := stores.NewRemote(lstor, si, http.Header(sa), 10, &stores.DefaultPartialFileHandler{}) stor := paths.NewRemote(lstor, si, http.Header(sa), 10, &paths.DefaultPartialFileHandler{})
smgr, err := sectorstorage.New(ctx, lstor, stor, lr, si, sectorstorage.Config{ smgr, err := sealer.New(ctx, lstor, stor, lr, si, sealer.Config{
ParallelFetchLimit: 10, ParallelFetchLimit: 10,
AllowAddPiece: true, AllowAddPiece: true,
AllowPreCommit1: true, AllowPreCommit1: true,

View File

@ -24,10 +24,10 @@ import (
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/lib/backupds" "github.com/filecoin-project/lotus/lib/backupds"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/paths"
) )
var restoreCmd = &cli.Command{ var restoreCmd = &cli.Command{
@ -52,7 +52,7 @@ var restoreCmd = &cli.Command{
ctx := lcli.ReqContext(cctx) ctx := lcli.ReqContext(cctx)
log.Info("Initializing lotus miner using a backup") log.Info("Initializing lotus miner using a backup")
var storageCfg *stores.StorageConfig var storageCfg *paths.StorageConfig
if cctx.IsSet("storage-config") { if cctx.IsSet("storage-config") {
cf, err := homedir.Expand(cctx.String("storage-config")) cf, err := homedir.Expand(cctx.String("storage-config"))
if err != nil { if err != nil {
@ -64,7 +64,7 @@ var restoreCmd = &cli.Command{
return xerrors.Errorf("reading storage config: %w", err) return xerrors.Errorf("reading storage config: %w", err)
} }
storageCfg = &stores.StorageConfig{} storageCfg = &paths.StorageConfig{}
err = json.Unmarshal(cfb, storageCfg) err = json.Unmarshal(cfb, storageCfg)
if err != nil { if err != nil {
return xerrors.Errorf("cannot unmarshal json for storage config: %w", err) return xerrors.Errorf("cannot unmarshal json for storage config: %w", err)
@ -95,7 +95,7 @@ var restoreCmd = &cli.Command{
}, },
} }
func restore(ctx context.Context, cctx *cli.Context, targetPath string, strConfig *stores.StorageConfig, manageConfig func(*config.StorageMiner) error, after func(api lapi.FullNode, addr address.Address, peerid peer.ID, mi api.MinerInfo) error) error { func restore(ctx context.Context, cctx *cli.Context, targetPath string, strConfig *paths.StorageConfig, manageConfig func(*config.StorageMiner) error, after func(api lapi.FullNode, addr address.Address, peerid peer.ID, mi api.MinerInfo) error) error {
if cctx.Args().Len() != 1 { if cctx.Args().Len() != 1 {
return xerrors.Errorf("expected 1 argument") return xerrors.Errorf("expected 1 argument")
} }
@ -214,7 +214,7 @@ func restore(ctx context.Context, cctx *cli.Context, targetPath string, strConfi
if strConfig != nil { if strConfig != nil {
log.Info("Restoring storage path config") log.Info("Restoring storage path config")
err = lr.SetStorage(func(scfg *stores.StorageConfig) { err = lr.SetStorage(func(scfg *paths.StorageConfig) {
*scfg = *strConfig *scfg = *strConfig
}) })
if err != nil { if err != nil {
@ -223,8 +223,8 @@ func restore(ctx context.Context, cctx *cli.Context, targetPath string, strConfi
} else { } else {
log.Warn("--storage-config NOT SET. NO SECTOR PATHS WILL BE CONFIGURED") log.Warn("--storage-config NOT SET. NO SECTOR PATHS WILL BE CONFIGURED")
// setting empty config to allow miner to be started // setting empty config to allow miner to be started
if err := lr.SetStorage(func(sc *stores.StorageConfig) { if err := lr.SetStorage(func(sc *paths.StorageConfig) {
sc.StoragePaths = append(sc.StoragePaths, stores.LocalPath{}) sc.StoragePaths = append(sc.StoragePaths, paths.LocalPath{})
}); err != nil { }); err != nil {
return xerrors.Errorf("set storage config: %w", err) return xerrors.Errorf("set storage config: %w", err)
} }

View File

@ -16,8 +16,8 @@ import (
"github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/api/client"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
cliutil "github.com/filecoin-project/lotus/cli/util" cliutil "github.com/filecoin-project/lotus/cli/util"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/storage/paths"
) )
const ( const (
@ -78,7 +78,7 @@ var serviceCmd = &cli.Command{
return xerrors.Errorf("please provide Lotus markets repo path via flag %s", FlagMarketsRepo) return xerrors.Errorf("please provide Lotus markets repo path via flag %s", FlagMarketsRepo)
} }
if err := restore(ctx, cctx, repoPath, &stores.StorageConfig{}, func(cfg *config.StorageMiner) error { if err := restore(ctx, cctx, repoPath, &paths.StorageConfig{}, func(cfg *config.StorageMiner) error {
cfg.Subsystems.EnableMarkets = es.Contains(MarketsService) cfg.Subsystems.EnableMarkets = es.Contains(MarketsService)
cfg.Subsystems.EnableMining = false cfg.Subsystems.EnableMining = false
cfg.Subsystems.EnableSealing = false cfg.Subsystems.EnableSealing = false

View File

@ -21,7 +21,7 @@ import (
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var provingCmd = &cli.Command{ var provingCmd = &cli.Command{

View File

@ -24,9 +24,9 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/lib/httpreader" "github.com/filecoin-project/lotus/lib/httpreader"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var sealingCmd = &cli.Command{ var sealingCmd = &cli.Command{

View File

@ -32,8 +32,8 @@ import (
"github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/lib/tablewriter" "github.com/filecoin-project/lotus/lib/tablewriter"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
) )
var sectorsCmd = &cli.Command{ var sectorsCmd = &cli.Command{

View File

@ -27,11 +27,11 @@ import (
"github.com/filecoin-project/lotus/api/v0api" "github.com/filecoin-project/lotus/api/v0api"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"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"
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/lib/tablewriter" "github.com/filecoin-project/lotus/lib/tablewriter"
"github.com/filecoin-project/lotus/storage/paths"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
const metaFile = "sectorstore.json" const metaFile = "sectorstore.json"
@ -145,7 +145,7 @@ over time
} }
} }
cfg := &stores.LocalStorageMeta{ cfg := &paths.LocalStorageMeta{
ID: storiface.ID(uuid.New().String()), ID: storiface.ID(uuid.New().String()),
Weight: cctx.Uint64("weight"), Weight: cctx.Uint64("weight"),
CanSeal: cctx.Bool("seal"), CanSeal: cctx.Bool("seal"),

View File

@ -25,10 +25,10 @@ import (
genesis2 "github.com/filecoin-project/lotus/chain/gen/genesis" genesis2 "github.com/filecoin-project/lotus/chain/gen/genesis"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/modules/testing"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var genesisCmd = &cli.Command{ var genesisCmd = &cli.Command{

View File

@ -26,17 +26,17 @@ import (
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/chain/wallet/key"
"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/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/genesis" "github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/storage/paths"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper/basicfs"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("preseal") var log = logging.Logger("preseal")
func PreSeal(maddr address.Address, spt abi.RegisteredSealProof, offset abi.SectorNumber, sectors int, sbroot string, preimage []byte, key *types.KeyInfo, fakeSectors bool) (*genesis.Miner, *types.KeyInfo, error) { func PreSeal(maddr address.Address, spt abi.RegisteredSealProof, offset abi.SectorNumber, sectors int, sbroot string, preimage []byte, ki *types.KeyInfo, fakeSectors bool) (*genesis.Miner, *types.KeyInfo, error) {
mid, err := address.IDFromAddress(maddr) mid, err := address.IDFromAddress(maddr)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
@ -84,14 +84,14 @@ func PreSeal(maddr address.Address, spt abi.RegisteredSealProof, offset abi.Sect
sealedSectors = append(sealedSectors, preseal) sealedSectors = append(sealedSectors, preseal)
} }
var minerAddr *wallet.Key var minerAddr *key.Key
if key != nil { if ki != nil {
minerAddr, err = wallet.NewKey(*key) minerAddr, err = key.NewKey(*ki)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
} else { } else {
minerAddr, err = wallet.GenerateKey(types.KTBLS) minerAddr, err = key.GenerateKey(types.KTBLS)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
@ -127,7 +127,7 @@ func PreSeal(maddr address.Address, spt abi.RegisteredSealProof, offset abi.Sect
} }
{ {
b, err := json.MarshalIndent(&stores.LocalStorageMeta{ b, err := json.MarshalIndent(&paths.LocalStorageMeta{
ID: storiface.ID(uuid.New().String()), ID: storiface.ID(uuid.New().String()),
Weight: 0, // read-only Weight: 0, // read-only
CanSeal: false, CanSeal: false,
@ -249,7 +249,7 @@ func WriteGenesisMiner(maddr address.Address, sbroot string, gm *genesis.Miner,
return nil return nil
} }
func createDeals(m *genesis.Miner, k *wallet.Key, maddr address.Address, ssize abi.SectorSize) error { func createDeals(m *genesis.Miner, k *key.Key, maddr address.Address, ssize abi.SectorSize) error {
for i, sector := range m.Sectors { for i, sector := range m.Sectors {
label, err := market8.NewLabelFromString(fmt.Sprintf("%d", i)) label, err := market8.NewLabelFromString(fmt.Sprintf("%d", i))
if err != nil { if err != nil {

View File

@ -40,8 +40,8 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
type accountInfo struct { type accountInfo struct {

View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
blake2b "github.com/minio/blake2b-simd" "github.com/minio/blake2b-simd"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/fr32" "github.com/filecoin-project/lotus/storage/sealer/fr32"
) )
var fr32Cmd = &cli.Command{ var fr32Cmd = &cli.Command{

View File

@ -21,6 +21,7 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet" "github.com/filecoin-project/lotus/chain/wallet"
"github.com/filecoin-project/lotus/chain/wallet/key"
_ "github.com/filecoin-project/lotus/lib/sigs/bls" _ "github.com/filecoin-project/lotus/lib/sigs/bls"
_ "github.com/filecoin-project/lotus/lib/sigs/secp" _ "github.com/filecoin-project/lotus/lib/sigs/secp"
"github.com/filecoin-project/lotus/node/modules" "github.com/filecoin-project/lotus/node/modules"
@ -317,7 +318,7 @@ var keyinfoInfoCmd = &cli.Command{
case types.KTSecp256k1, types.KTBLS: case types.KTSecp256k1, types.KTBLS:
kio.Type = keyInfo.Type kio.Type = keyInfo.Type
key, err := wallet.NewKey(keyInfo) key, err := key.NewKey(keyInfo)
if err != nil { if err != nil {
return err return err
} }
@ -402,7 +403,7 @@ var keyinfoNewCmd = &cli.Command{
break break
case types.KTSecp256k1, types.KTBLS: case types.KTSecp256k1, types.KTBLS:
key, err := wallet.GenerateKey(keyType) key, err := key.GenerateKey(keyType)
if err != nil { if err != nil {
return err return err
} }

View File

@ -77,7 +77,7 @@ func main() {
app := &cli.App{ app := &cli.App{
Name: "lotus-shed", Name: "lotus-shed",
Usage: "A place for all the lotus tools", Usage: "A place for all the lotus tools",
Version: build.BuildVersion, Version: build.UserVersion(),
Commands: local, Commands: local,
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{

View File

@ -16,8 +16,8 @@ import (
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var migrationsCmd = &cli.Command{ var migrationsCmd = &cli.Command{

View File

@ -5,7 +5,7 @@ import (
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golang.org/x/xerrors" "golang.org/x/xerrors"
paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"

View File

@ -15,10 +15,10 @@ import (
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
tutils "github.com/filecoin-project/specs-actors/v5/support/testing" tutils "github.com/filecoin-project/specs-actors/v5/support/testing"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
// Ideally, we'd use extern/sector-storage/mock. Unfortunately, those mocks are a bit _too_ accurate // Ideally, we'd use extern/sealer/mock. Unfortunately, those mocks are a bit _too_ accurate
// and would force us to load sector info for window post proofs. // and would force us to load sector info for window post proofs.
const ( const (

View File

@ -10,7 +10,7 @@ import (
"contrib.go.opencensus.io/exporter/prometheus" "contrib.go.opencensus.io/exporter/prometheus"
logging "github.com/ipfs/go-log/v2" logging "github.com/ipfs/go-log/v2"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
stats "go.opencensus.io/stats" "go.opencensus.io/stats"
"go.opencensus.io/stats/view" "go.opencensus.io/stats/view"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
) )
var infoCmd = &cli.Command{ var infoCmd = &cli.Command{

View File

@ -22,7 +22,7 @@ import (
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/go-jsonrpc/auth"
paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/go-statestore" "github.com/filecoin-project/go-statestore"
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
@ -30,15 +30,15 @@ import (
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
cliutil "github.com/filecoin-project/lotus/cli/util" cliutil "github.com/filecoin-project/lotus/cli/util"
"github.com/filecoin-project/lotus/cmd/lotus-worker/sealworker" "github.com/filecoin-project/lotus/cmd/lotus-worker/sealworker"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"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/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/lib/lotuslog"
"github.com/filecoin-project/lotus/lib/ulimit" "github.com/filecoin-project/lotus/lib/ulimit"
"github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/metrics"
"github.com/filecoin-project/lotus/node/modules" "github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/paths"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var log = logging.Logger("main") var log = logging.Logger("main")
@ -384,10 +384,10 @@ var runCmd = &cli.Command{
return err return err
} }
var localPaths []stores.LocalPath var localPaths []paths.LocalPath
if !cctx.Bool("no-local-storage") { if !cctx.Bool("no-local-storage") {
b, err := json.MarshalIndent(&stores.LocalStorageMeta{ b, err := json.MarshalIndent(&paths.LocalStorageMeta{
ID: storiface.ID(uuid.New().String()), ID: storiface.ID(uuid.New().String()),
Weight: 10, Weight: 10,
CanSeal: true, CanSeal: true,
@ -401,12 +401,12 @@ var runCmd = &cli.Command{
return xerrors.Errorf("persisting storage metadata (%s): %w", filepath.Join(lr.Path(), "sectorstore.json"), err) return xerrors.Errorf("persisting storage metadata (%s): %w", filepath.Join(lr.Path(), "sectorstore.json"), err)
} }
localPaths = append(localPaths, stores.LocalPath{ localPaths = append(localPaths, paths.LocalPath{
Path: lr.Path(), Path: lr.Path(),
}) })
} }
if err := lr.SetStorage(func(sc *stores.StorageConfig) { if err := lr.SetStorage(func(sc *paths.StorageConfig) {
sc.StoragePaths = append(sc.StoragePaths, localPaths...) sc.StoragePaths = append(sc.StoragePaths, localPaths...)
}); err != nil { }); err != nil {
return xerrors.Errorf("set storage config: %w", err) return xerrors.Errorf("set storage config: %w", err)
@ -456,7 +456,7 @@ var runCmd = &cli.Command{
} }
} }
localStore, err := stores.NewLocal(ctx, lr, nodeApi, []string{"http://" + address + "/remote"}) localStore, err := paths.NewLocal(ctx, lr, nodeApi, []string{"http://" + address + "/remote"})
if err != nil { if err != nil {
return err return err
} }
@ -467,10 +467,10 @@ var runCmd = &cli.Command{
return xerrors.Errorf("could not get api info: %w", err) return xerrors.Errorf("could not get api info: %w", err)
} }
remote := stores.NewRemote(localStore, nodeApi, sminfo.AuthHeader(), cctx.Int("parallel-fetch-limit"), remote := paths.NewRemote(localStore, nodeApi, sminfo.AuthHeader(), cctx.Int("parallel-fetch-limit"),
&stores.DefaultPartialFileHandler{}) &paths.DefaultPartialFileHandler{})
fh := &stores.FetchHandler{Local: localStore, PfHandler: &stores.DefaultPartialFileHandler{}} fh := &paths.FetchHandler{Local: localStore, PfHandler: &paths.DefaultPartialFileHandler{}}
remoteHandler := func(w http.ResponseWriter, r *http.Request) { remoteHandler := func(w http.ResponseWriter, r *http.Request) {
if !auth.HasPerm(r.Context(), nil, api.PermAdmin) { if !auth.HasPerm(r.Context(), nil, api.PermAdmin) {
w.WriteHeader(401) w.WriteHeader(401)
@ -486,7 +486,7 @@ var runCmd = &cli.Command{
wsts := statestore.New(namespace.Wrap(ds, modules.WorkerCallsPrefix)) wsts := statestore.New(namespace.Wrap(ds, modules.WorkerCallsPrefix))
workerApi := &sealworker.Worker{ workerApi := &sealworker.Worker{
LocalWorker: sectorstorage.NewLocalWorker(sectorstorage.WorkerConfig{ LocalWorker: sealer.NewLocalWorker(sealer.WorkerConfig{
TaskTypes: taskTypes, TaskTypes: taskTypes,
NoSwap: cctx.Bool("no-swap"), NoSwap: cctx.Bool("no-swap"),
MaxParallelChallengeReads: cctx.Int("post-parallel-reads"), MaxParallelChallengeReads: cctx.Int("post-parallel-reads"),
@ -561,7 +561,7 @@ var runCmd = &cli.Command{
} }
go func() { go func() {
heartbeats := time.NewTicker(stores.HeartbeatInterval) heartbeats := time.NewTicker(paths.HeartbeatInterval)
defer heartbeats.Stop() defer heartbeats.Stop()
var redeclareStorage bool var redeclareStorage bool

View File

@ -7,7 +7,7 @@ import (
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
var resourcesCmd = &cli.Command{ var resourcesCmd = &cli.Command{

View File

@ -16,11 +16,11 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types" apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/lib/rpcenc" "github.com/filecoin-project/lotus/lib/rpcenc"
"github.com/filecoin-project/lotus/metrics/proxy" "github.com/filecoin-project/lotus/metrics/proxy"
"github.com/filecoin-project/lotus/storage/paths"
"github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permission, error), remote http.HandlerFunc, a api.Worker, permissioned bool) http.Handler { func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permission, error), remote http.HandlerFunc, a api.Worker, permissioned bool) http.Handler {
@ -53,10 +53,10 @@ func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permiss
} }
type Worker struct { type Worker struct {
*sectorstorage.LocalWorker *sealer.LocalWorker
LocalStore *stores.Local LocalStore *paths.Local
Storage stores.LocalStorage Storage paths.LocalStorage
disabled int64 disabled int64
} }
@ -75,8 +75,8 @@ func (w *Worker) StorageAddLocal(ctx context.Context, path string) error {
return xerrors.Errorf("opening local path: %w", err) return xerrors.Errorf("opening local path: %w", err)
} }
if err := w.Storage.SetStorage(func(sc *stores.StorageConfig) { if err := w.Storage.SetStorage(func(sc *paths.StorageConfig) {
sc.StoragePaths = append(sc.StoragePaths, stores.LocalPath{Path: path}) sc.StoragePaths = append(sc.StoragePaths, paths.LocalPath{Path: path})
}); err != nil { }); err != nil {
return xerrors.Errorf("get storage config: %w", err) return xerrors.Errorf("get storage config: %w", err)
} }

View File

@ -13,8 +13,8 @@ import (
"golang.org/x/xerrors" "golang.org/x/xerrors"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/stores" "github.com/filecoin-project/lotus/storage/paths"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface" "github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
const metaFile = "sectorstore.json" const metaFile = "sectorstore.json"
@ -101,7 +101,7 @@ var storageAttachCmd = &cli.Command{
} }
} }
cfg := &stores.LocalStorageMeta{ cfg := &paths.LocalStorageMeta{
ID: storiface.ID(uuid.New().String()), ID: storiface.ID(uuid.New().String()),
Weight: cctx.Uint64("weight"), Weight: cctx.Uint64("weight"),
CanSeal: cctx.Bool("seal"), CanSeal: cctx.Bool("seal"),

View File

@ -9,7 +9,7 @@ import (
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
) )
var tasksCmd = &cli.Command{ var tasksCmd = &cli.Command{

View File

@ -28,7 +28,7 @@ import (
"gopkg.in/cheggaaa/pb.v1" "gopkg.in/cheggaaa/pb.v1"
"github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-jsonrpc"
paramfetch "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
@ -38,7 +38,6 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
lcli "github.com/filecoin-project/lotus/cli" lcli "github.com/filecoin-project/lotus/cli"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
"github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/journal/fsjournal" "github.com/filecoin-project/lotus/journal/fsjournal"
"github.com/filecoin-project/lotus/lib/peermgr" "github.com/filecoin-project/lotus/lib/peermgr"
@ -49,6 +48,7 @@ import (
"github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/modules/testing" "github.com/filecoin-project/lotus/node/modules/testing"
"github.com/filecoin-project/lotus/node/repo" "github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
const ( const (

View File

@ -11,14 +11,14 @@ import (
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/exitcode"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
mock2 "github.com/filecoin-project/specs-actors/v2/support/mock" "github.com/filecoin-project/specs-actors/v2/support/mock"
atesting2 "github.com/filecoin-project/specs-actors/v2/support/testing" atesting2 "github.com/filecoin-project/specs-actors/v2/support/testing"
) )
func TestSingleton(t *testing.T) { func TestSingleton(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_BUILDER_001 //stm: @CHAIN_ACTOR_CHAOS_BUILDER_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -33,7 +33,7 @@ func TestSingleton(t *testing.T) {
func TestCallerValidationNone(t *testing.T) { func TestCallerValidationNone(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_CALLER_VALIDATION_001 //stm: @CHAIN_ACTOR_CHAOS_CALLER_VALIDATION_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -46,7 +46,7 @@ func TestCallerValidationIs(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_CALLER_VALIDATION_001 //stm: @CHAIN_ACTOR_CHAOS_CALLER_VALIDATION_001
caller := atesting2.NewIDAddr(t, 100) caller := atesting2.NewIDAddr(t, 100)
receiver := atesting2.NewIDAddr(t, 101) receiver := atesting2.NewIDAddr(t, 101)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
rt.SetCaller(caller, builtin2.AccountActorCodeID) rt.SetCaller(caller, builtin2.AccountActorCodeID)
@ -76,7 +76,7 @@ func TestCallerValidationType(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_CALLER_VALIDATION_001 //stm: @CHAIN_ACTOR_CHAOS_CALLER_VALIDATION_001
caller := atesting2.NewIDAddr(t, 100) caller := atesting2.NewIDAddr(t, 100)
receiver := atesting2.NewIDAddr(t, 101) receiver := atesting2.NewIDAddr(t, 101)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
rt.SetCaller(caller, builtin2.AccountActorCodeID) rt.SetCaller(caller, builtin2.AccountActorCodeID)
@ -102,7 +102,7 @@ func TestCallerValidationType(t *testing.T) {
func TestCallerValidationInvalidBranch(t *testing.T) { func TestCallerValidationInvalidBranch(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_CALLER_VALIDATION_001 //stm: @CHAIN_ACTOR_CHAOS_CALLER_VALIDATION_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -117,7 +117,7 @@ func TestDeleteActor(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_CREATE_ACTOR_001 //stm: @CHAIN_ACTOR_CHAOS_CREATE_ACTOR_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
beneficiary := atesting2.NewIDAddr(t, 101) beneficiary := atesting2.NewIDAddr(t, 101)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -131,7 +131,7 @@ func TestDeleteActor(t *testing.T) {
func TestMutateStateInTransaction(t *testing.T) { func TestMutateStateInTransaction(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_CREATE_STATE_001, @CHAIN_ACTOR_CHAOS_MUTATE_STATE_001 //stm: @CHAIN_ACTOR_CHAOS_CREATE_STATE_001, @CHAIN_ACTOR_CHAOS_MUTATE_STATE_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -159,7 +159,7 @@ func TestMutateStateInTransaction(t *testing.T) {
func TestMutateStateAfterTransaction(t *testing.T) { func TestMutateStateAfterTransaction(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_CREATE_STATE_001, @CHAIN_ACTOR_CHAOS_MUTATE_STATE_001 //stm: @CHAIN_ACTOR_CHAOS_CREATE_STATE_001, @CHAIN_ACTOR_CHAOS_MUTATE_STATE_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -194,7 +194,7 @@ func TestMutateStateAfterTransaction(t *testing.T) {
func TestMutateStateReadonly(t *testing.T) { func TestMutateStateReadonly(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_CREATE_STATE_001, @CHAIN_ACTOR_CHAOS_MUTATE_STATE_001 //stm: @CHAIN_ACTOR_CHAOS_CREATE_STATE_001, @CHAIN_ACTOR_CHAOS_MUTATE_STATE_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -229,7 +229,7 @@ func TestMutateStateReadonly(t *testing.T) {
func TestMutateStateInvalidBranch(t *testing.T) { func TestMutateStateInvalidBranch(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_MUTATE_STATE_001 //stm: @CHAIN_ACTOR_CHAOS_MUTATE_STATE_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -244,7 +244,7 @@ func TestMutateStateInvalidBranch(t *testing.T) {
func TestAbortWith(t *testing.T) { func TestAbortWith(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_ABORT_WITH_001 //stm: @CHAIN_ACTOR_CHAOS_ABORT_WITH_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -263,7 +263,7 @@ func TestAbortWith(t *testing.T) {
func TestAbortWithUncontrolled(t *testing.T) { func TestAbortWithUncontrolled(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_ABORT_WITH_001 //stm: @CHAIN_ACTOR_CHAOS_ABORT_WITH_001
receiver := atesting2.NewIDAddr(t, 100) receiver := atesting2.NewIDAddr(t, 100)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
rt := builder.Build(t) rt := builder.Build(t)
var a Actor var a Actor
@ -282,7 +282,7 @@ func TestInspectRuntime(t *testing.T) {
//stm: @CHAIN_ACTOR_CHAOS_INSPECT_RUNTIME_001, @CHAIN_ACTOR_CHAOS_CREATE_STATE_001 //stm: @CHAIN_ACTOR_CHAOS_INSPECT_RUNTIME_001, @CHAIN_ACTOR_CHAOS_CREATE_STATE_001
caller := atesting2.NewIDAddr(t, 100) caller := atesting2.NewIDAddr(t, 100)
receiver := atesting2.NewIDAddr(t, 101) receiver := atesting2.NewIDAddr(t, 101)
builder := mock2.NewBuilder(context.Background(), receiver) builder := mock.NewBuilder(context.Background(), receiver)
var a Actor var a Actor

View File

@ -25,9 +25,9 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/conformance/chaos" "github.com/filecoin-project/lotus/conformance/chaos"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
_ "github.com/filecoin-project/lotus/lib/sigs/bls" // enable bls signatures _ "github.com/filecoin-project/lotus/lib/sigs/bls" // enable bls signatures
_ "github.com/filecoin-project/lotus/lib/sigs/secp" // enable secp signatures _ "github.com/filecoin-project/lotus/lib/sigs/secp" // enable secp signatures
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
) )
var ( var (

View File

@ -562,7 +562,7 @@
# to use when evaluating tasks against this worker. An empty value defaults # to use when evaluating tasks against this worker. An empty value defaults
# to "hardware". # to "hardware".
# #
# type: sectorstorage.ResourceFilteringStrategy # type: sealer.ResourceFilteringStrategy
# env var: LOTUS_STORAGE_RESOURCEFILTERING # env var: LOTUS_STORAGE_RESOURCEFILTERING
#ResourceFiltering = "hardware" #ResourceFiltering = "hardware"

View File

@ -1,9 +0,0 @@
package mock
func CommDR(in []byte) (out [32]byte) {
for i, b := range in {
out[i] = ^b
}
return out
}

View File

@ -12,10 +12,10 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
"github.com/filecoin-project/lotus/cmd/lotus-shed/shedgen" "github.com/filecoin-project/lotus/cmd/lotus-shed/shedgen"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/node/hello" "github.com/filecoin-project/lotus/node/hello"
"github.com/filecoin-project/lotus/paychmgr" "github.com/filecoin-project/lotus/paychmgr"
sectorstorage "github.com/filecoin-project/lotus/storage/sealer"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
) )
func main() { func main() {
@ -99,7 +99,7 @@ func main() {
os.Exit(1) os.Exit(1)
} }
err = gen.WriteMapEncodersToFile("./extern/sector-storage/storiface/cbor_gen.go", "storiface", err = gen.WriteMapEncodersToFile("./storage/sealer/storiface/cbor_gen.go", "storiface",
storiface.CallID{}, storiface.CallID{},
) )
if err != nil { if err != nil {
@ -107,7 +107,7 @@ func main() {
os.Exit(1) os.Exit(1)
} }
err = gen.WriteMapEncodersToFile("./extern/sector-storage/cbor_gen.go", "sectorstorage", err = gen.WriteMapEncodersToFile("./storage/sealer/cbor_gen.go", "sealer",
sectorstorage.Call{}, sectorstorage.Call{},
sectorstorage.WorkState{}, sectorstorage.WorkState{},
sectorstorage.WorkID{}, sectorstorage.WorkID{},

Some files were not shown because too many files have changed in this diff Show More