Skip to content

Commit e419bcf

Browse files
authored
Move storiface into Curio (#183)
* temp: replace lotus to local * move storiface to Curio * fix build * don't refer to storiface2 * make gen * make remote path test happy * cleanup storiface
1 parent 5f6156a commit e419bcf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1887
-258
lines changed

api/api_curio.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import (
88
"github.com/filecoin-project/go-address"
99
"github.com/filecoin-project/go-state-types/abi"
1010

11+
storiface "github.com/filecoin-project/curio/lib/storiface"
12+
1113
"github.com/filecoin-project/lotus/api"
1214
lpiece "github.com/filecoin-project/lotus/storage/pipeline/piece"
1315
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
14-
"github.com/filecoin-project/lotus/storage/sealer/storiface"
1516
)
1617

1718
type Curio interface {

api/proxy_gen.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/curio/guidedsetup/cbor_gen.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/curio/guidedsetup/shared.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ import (
2626
"github.com/filecoin-project/curio/deps"
2727
"github.com/filecoin-project/curio/deps/config"
2828
"github.com/filecoin-project/curio/harmony/harmonydb"
29+
"github.com/filecoin-project/curio/lib/storiface"
2930
"github.com/filecoin-project/curio/lib/types/sector"
3031

3132
"github.com/filecoin-project/lotus/chain/types"
3233
"github.com/filecoin-project/lotus/node/repo"
33-
"github.com/filecoin-project/lotus/storage/sealer/storiface"
3434
)
3535

3636
const (

cmd/curio/rpc/rpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"github.com/filecoin-project/curio/lib/metrics"
3434
"github.com/filecoin-project/curio/lib/paths"
3535
"github.com/filecoin-project/curio/lib/repo"
36+
storiface "github.com/filecoin-project/curio/lib/storiface"
3637
"github.com/filecoin-project/curio/web"
3738

3839
lapi "github.com/filecoin-project/lotus/api"
@@ -42,7 +43,6 @@ import (
4243
"github.com/filecoin-project/lotus/metrics/proxy"
4344
"github.com/filecoin-project/lotus/storage/pipeline/piece"
4445
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
45-
"github.com/filecoin-project/lotus/storage/sealer/storiface"
4646
)
4747

4848
const metaFile = "sectorstore.json"

cmd/curio/storage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ import (
2020

2121
"github.com/filecoin-project/curio/cmd/curio/rpc"
2222
"github.com/filecoin-project/curio/lib/reqcontext"
23+
storiface "github.com/filecoin-project/curio/lib/storiface"
2324

2425
"github.com/filecoin-project/lotus/chain/types"
2526
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
26-
"github.com/filecoin-project/lotus/storage/sealer/storiface"
2727
)
2828

2929
var storageCmd = &cli.Command{
@@ -438,7 +438,7 @@ var storageFindCmd = &cli.Command{
438438
}
439439

440440
sectorTypes := []storiface.SectorFileType{
441-
storiface.FTUnsealed, storiface.FTSealed, storiface.FTCache, storiface.FTUpdate, storiface.FTUpdateCache,
441+
storiface.FTUnsealed, storiface.FTSealed, storiface.FTCache, storiface.FTUpdate, storiface.FTUpdateCache, storiface.FTPiece,
442442
}
443443

444444
byId := make(map[storiface.ID]*storedSector)

cmd/curio/tasks/tasks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"github.com/filecoin-project/curio/lib/multictladdr"
3131
"github.com/filecoin-project/curio/lib/paths"
3232
"github.com/filecoin-project/curio/lib/slotmgr"
33+
"github.com/filecoin-project/curio/lib/storiface"
3334
"github.com/filecoin-project/curio/tasks/gc"
3435
"github.com/filecoin-project/curio/tasks/message"
3536
"github.com/filecoin-project/curio/tasks/metadata"
@@ -44,7 +45,6 @@ import (
4445
"github.com/filecoin-project/lotus/lib/lazy"
4546
"github.com/filecoin-project/lotus/lib/result"
4647
"github.com/filecoin-project/lotus/node/modules/dtypes"
47-
"github.com/filecoin-project/lotus/storage/sealer/storiface"
4848
)
4949

5050
var log = logging.Logger("curio/deps")

deps/deps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import (
3838
"github.com/filecoin-project/curio/lib/multictladdr"
3939
"github.com/filecoin-project/curio/lib/paths"
4040
"github.com/filecoin-project/curio/lib/repo"
41+
"github.com/filecoin-project/curio/lib/storiface"
4142

4243
lapi "github.com/filecoin-project/lotus/api"
4344
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
@@ -46,7 +47,6 @@ import (
4647
lrepo "github.com/filecoin-project/lotus/node/repo"
4748
"github.com/filecoin-project/lotus/storage/sealer"
4849
"github.com/filecoin-project/lotus/storage/sealer/ffiwrapper"
49-
"github.com/filecoin-project/lotus/storage/sealer/storiface"
5050
)
5151

5252
var log = logging.Logger("curio/deps")

go.mod

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ require (
1919
github.com/filecoin-project/go-address v1.1.0
2020
github.com/filecoin-project/go-bitfield v0.2.4
2121
github.com/filecoin-project/go-cbor-util v0.0.1
22-
github.com/filecoin-project/go-commp-utils v0.1.3
23-
github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082a837
22+
github.com/filecoin-project/go-commp-utils v0.1.4
23+
github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20240802040721-2a04ffc8ffe8
2424
github.com/filecoin-project/go-fil-commcid v0.1.0
2525
github.com/filecoin-project/go-jsonrpc v0.6.1-0.20240820160949-2cfe810e5d2f
2626
github.com/filecoin-project/go-padreader v0.0.1
@@ -66,18 +66,18 @@ require (
6666
github.com/snadrus/must v0.0.0-20240605044437-98cedd57f8eb
6767
github.com/stretchr/testify v1.9.0
6868
github.com/urfave/cli/v2 v2.25.5
69-
github.com/whyrusleeping/cbor-gen v0.1.1
69+
github.com/whyrusleeping/cbor-gen v0.1.2
7070
github.com/yugabyte/pgx/v5 v5.5.3-yb-2
7171
go.opencensus.io v0.24.0
7272
go.uber.org/multierr v1.11.0
7373
go.uber.org/zap v1.27.0
7474
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
7575
golang.org/x/net v0.26.0
7676
golang.org/x/sync v0.7.0
77-
golang.org/x/sys v0.21.0
77+
golang.org/x/sys v0.23.0
7878
golang.org/x/text v0.16.0
7979
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
80-
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028
80+
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9
8181
)
8282

8383
require (
@@ -124,11 +124,11 @@ require (
124124
github.com/filecoin-project/go-amt-ipld/v3 v3.1.0 // indirect
125125
github.com/filecoin-project/go-amt-ipld/v4 v4.3.0 // indirect
126126
github.com/filecoin-project/go-clock v0.1.0 // indirect
127-
github.com/filecoin-project/go-crypto v0.0.1 // indirect
128-
github.com/filecoin-project/go-f3 v0.0.7 // indirect
127+
github.com/filecoin-project/go-crypto v0.1.0 // indirect
128+
github.com/filecoin-project/go-f3 v0.2.0 // indirect
129129
github.com/filecoin-project/go-hamt-ipld v0.1.5 // indirect
130130
github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 // indirect
131-
github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 // indirect
131+
github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0 // indirect
132132
github.com/filecoin-project/go-paramfetch v0.0.4 // indirect
133133
github.com/filecoin-project/go-statemachine v1.0.3 // indirect
134134
github.com/filecoin-project/go-storedcounter v0.1.0 // indirect
@@ -190,7 +190,6 @@ require (
190190
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
191191
github.com/ipld/go-ipld-prime v0.21.0 // indirect
192192
github.com/ipni/go-libipni v0.0.8 // indirect
193-
github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 // indirect
194193
github.com/jackc/pgpassfile v1.0.0 // indirect
195194
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
196195
github.com/jackc/puddle/v2 v2.2.1 // indirect
@@ -201,9 +200,9 @@ require (
201200
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect
202201
github.com/josharian/intern v1.0.0 // indirect
203202
github.com/jpillora/backoff v1.0.0 // indirect
204-
github.com/kilic/bls12-381 v0.1.0 // indirect
205-
github.com/klauspost/compress v1.17.8 // indirect
206-
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
203+
github.com/kilic/bls12-381 v0.1.1-0.20220929213557-ca162e8a70f4 // indirect
204+
github.com/klauspost/compress v1.17.9 // indirect
205+
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
207206
github.com/koron/go-ssdp v0.0.4 // indirect
208207
github.com/libp2p/go-cidranger v1.1.0 // indirect
209208
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
@@ -295,6 +294,8 @@ require (
295294
github.com/zondax/ledger-filecoin-go v0.11.1 // indirect
296295
github.com/zondax/ledger-go v0.14.3 // indirect
297296
github.com/zyedidia/generic v1.2.1 // indirect
297+
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
298+
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
298299
go.opentelemetry.io/otel v1.28.0 // indirect
299300
go.opentelemetry.io/otel/bridge/opencensus v1.28.0 // indirect
300301
go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect
@@ -308,9 +309,9 @@ require (
308309
go.uber.org/fx v1.22.1 // indirect
309310
go.uber.org/mock v0.4.0 // indirect
310311
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
311-
golang.org/x/crypto v0.24.0 // indirect
312+
golang.org/x/crypto v0.25.0 // indirect
312313
golang.org/x/mod v0.17.0 // indirect
313-
golang.org/x/term v0.21.0 // indirect
314+
golang.org/x/term v0.22.0 // indirect
314315
golang.org/x/time v0.5.0 // indirect
315316
gonum.org/v1/gonum v0.15.0 // indirect
316317
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect

0 commit comments

Comments
 (0)