Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: storage refactors part 1 #8858

Merged
merged 15 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ workflows:
- test:
go-test-flags: "-run=TestMulticoreSDR"
suite: multicore-sdr-check
target: "./extern/sector-storage/ffiwrapper"
target: "./storage/sealer/ffiwrapper"
proofs-log-test: "1"
- test-conformance:
suite: conformance
Expand Down
2 changes: 1 addition & 1 deletion .circleci/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ workflows:
- test:
go-test-flags: "-run=TestMulticoreSDR"
suite: multicore-sdr-check
target: "./extern/sector-storage/ffiwrapper"
target: "./storage/sealer/ffiwrapper"
proofs-log-test: "1"
- test-conformance:
suite: conformance
Expand Down
2 changes: 1 addition & 1 deletion api/api_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"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/peer"
"github.com/libp2p/go-libp2p-core/protocol"
Expand Down
6 changes: 3 additions & 3 deletions api/api_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/extern/storage-sealing/sealiface"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
)

// MODIFYING THE API INTERFACE
Expand Down
4 changes: 2 additions & 2 deletions api/api_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/specs-storage/storage"

"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
)

// MODIFYING THE API INTERFACE
Expand Down
8 changes: 4 additions & 4 deletions api/docgen/docgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
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-jsonrpc/auth"
"github.com/filecoin-project/go-state-types/abi"
Expand All @@ -39,11 +39,11 @@ import (
"github.com/filecoin-project/lotus/api/v0api"
"github.com/filecoin-project/lotus/build"
"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/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{}{
Expand Down
12 changes: 6 additions & 6 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package api
import (
"fmt"

xerrors "golang.org/x/xerrors"
"golang.org/x/xerrors"
)

type Version uint32
Expand Down
2 changes: 1 addition & 1 deletion blockstore/badger/blockstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"github.com/stretchr/testify/require"
"golang.org/x/sync/errgroup"

Expand Down
2 changes: 1 addition & 1 deletion blockstore/blockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package blockstore
import (
"context"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
blockstore "github.com/ipfs/go-ipfs-blockstore"
logging "github.com/ipfs/go-log/v2"
Expand Down
2 changes: 1 addition & 1 deletion blockstore/discard.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
)

var _ Blockstore = (*discardstore)(nil)
Expand Down
2 changes: 1 addition & 1 deletion blockstore/idstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors"
)
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"os"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors"
)
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/coldset.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"os"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)

Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"time"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"go.uber.org/multierr"
"golang.org/x/xerrors"
)
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/markset.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package splitstore
import (
"errors"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)

Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/markset_badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"go.uber.org/zap"
"golang.org/x/xerrors"
)
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/markset_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"sync"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)

Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/markset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package splitstore
import (
"testing"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"github.com/multiformats/go-multihash"
)

Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/splitstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
dstore "github.com/ipfs/go-datastore"
logging "github.com/ipfs/go-log/v2"
"go.opencensus.io/stats"
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/splitstore_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sync/atomic"
"time"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"

bstore "github.com/filecoin-project/lotus/blockstore"
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/splitstore_compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
cbg "github.com/whyrusleeping/cbor-gen"
"go.opencensus.io/stats"
"golang.org/x/sync/errgroup"
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/splitstore_expose.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"

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"
)
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/splitstore_reify.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync/atomic"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)

Expand Down
4 changes: 2 additions & 2 deletions blockstore/splitstore/splitstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"time"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
datastore "github.com/ipfs/go-datastore"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
dssync "github.com/ipfs/go-datastore/sync"
logging "github.com/ipfs/go-log/v2"
mh "github.com/multiformats/go-multihash"
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/splitstore_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package splitstore
import (
"encoding/binary"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors"

Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/splitstore_warmup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"

"github.com/filecoin-project/go-state-types/abi"
Expand Down
2 changes: 1 addition & 1 deletion blockstore/splitstore/visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package splitstore
import (
"sync"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
)

// ObjectVisitor is an interface for deduplicating objects during walks
Expand Down
2 changes: 1 addition & 1 deletion chain/actors/adt/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

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 {
Expand Down
2 changes: 1 addition & 1 deletion chain/actors/builtin/paych/actor.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/filecoin-project/go-address"
"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"
ipldcbor "github.com/ipfs/go-ipld-cbor"

Expand Down
2 changes: 1 addition & 1 deletion chain/actors/builtin/paych/paych.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/filecoin-project/go-address"
"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"
"github.com/filecoin-project/go-state-types/cbor"
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
Expand Down
2 changes: 1 addition & 1 deletion chain/actors/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"sync"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor"
"golang.org/x/xerrors"

Expand Down
2 changes: 1 addition & 1 deletion chain/consensus/filcns/filecoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ import (
"github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types"
"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/sigs"
"github.com/filecoin-project/lotus/metrics"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
)

var log = logging.Logger("fil-consensus")
Expand Down
2 changes: 1 addition & 1 deletion chain/exchange/peer_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sync"
"time"

host "github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"go.uber.org/fx"

Expand Down
2 changes: 1 addition & 1 deletion chain/gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ 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/journal"
"github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
)

const msgsPerBlock = 20
Expand Down
4 changes: 2 additions & 2 deletions chain/gen/genesis/miners.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import (
"github.com/filecoin-project/lotus/chain/store"
"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/chain/wallet/key"
"github.com/filecoin-project/lotus/genesis"
"github.com/filecoin-project/lotus/lib/sigs"
)
Expand Down Expand Up @@ -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)
}

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 {
return cid.Undef, fmt.Errorf("failed to sign proposal: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion chain/state/statetree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ipfs/go-cid"
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"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"

Expand Down
Loading