Skip to content

Commit

Permalink
Merge branch 'main' into feat/market
Browse files Browse the repository at this point in the history
  • Loading branch information
LexLuthr committed Dec 23, 2024
2 parents 47c08af + b895bac commit 699a87d
Show file tree
Hide file tree
Showing 14 changed files with 267 additions and 127 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ executors:
golang:
docker:
# Must match GO_VERSION_MIN in project root
- image: cimg/go:1.22.3
- image: cimg/go:1.22.8
resource_class: medium+
golang-2xl:
docker:
# Must match GO_VERSION_MIN in project root
- image: cimg/go:1.22.3
- image: cimg/go:1.22.8
resource_class: 2xlarge
ubuntu:
docker:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
GO_VERSION: 1.22.3
GO_VERSION: 1.22.8

jobs:
ci-lint:
Expand Down
2 changes: 1 addition & 1 deletion GO_VERSION_MIN
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.3
1.22.8
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ BINS+=curio

sptool: $(BUILD_DEPS)
rm -f sptool
$(GOCC) build $(GOFLAGS) -o sptool ./cmd/sptool
$(GOCC) build $(GOFLAGS) -tags "$(CURIO_TAGS)" -o sptool ./cmd/sptool
.PHONY: sptool
BINS+=sptool

Expand Down
1 change: 1 addition & 0 deletions cmd/curio/guidedsetup/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ func SaveConfigToLayerMigrateSectors(db *harmonydb.DB, minerRepoPath, chainApiIn
}

// Express as new toml to avoid adding StorageRPCSecret in more than 1 layer
curioCfg.Apis.StorageRPCSecret = ""
ct := &bytes.Buffer{}
if err = toml.NewEncoder(ct).Encode(curioCfg); err != nil {
return minerAddress, err
Expand Down
24 changes: 24 additions & 0 deletions cmd/curio/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ over time
Name: "allow-to",
Usage: "path groups allowed to pull data from this path (allow all if not specified)",
},
&cli.StringSliceFlag{
Name: "allow-types",
Usage: "file types to allow storing in this path",
},
&cli.StringSliceFlag{
Name: "deny-types",
Usage: "file types to deny storing in this path",
},
},
Action: func(cctx *cli.Context) error {
minerApi, closer, err := rpc.GetCurioAPI(cctx)
Expand Down Expand Up @@ -126,6 +134,19 @@ over time
}
}

for _, t := range cctx.StringSlice("allow-types") {
_, err := storiface.TypeFromString(t)
if err != nil {
return xerrors.Errorf("parsing allow-types: %w", err)
}
}
for _, t := range cctx.StringSlice("deny-types") {
_, err := storiface.TypeFromString(t)
if err != nil {
return xerrors.Errorf("parsing deny-types: %w", err)
}
}

cfg := storiface.LocalStorageMeta{
ID: storiface.ID(uuid.New().String()),
Weight: cctx.Uint64("weight"),
Expand All @@ -134,6 +155,9 @@ over time
MaxStorage: uint64(maxStor),
Groups: cctx.StringSlice("groups"),
AllowTo: cctx.StringSlice("allow-to"),

AllowTypes: cctx.StringSlice("allow-types"),
DenyTypes: cctx.StringSlice("deny-types"),
}

if !(cfg.CanStore || cfg.CanSeal) {
Expand Down
18 changes: 10 additions & 8 deletions documentation/en/curio-cli/curio.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,16 @@ DESCRIPTION:
OPTIONS:
--init initialize the path first (default: false)
--weight value (for init) path weight (default: 10)
--seal (for init) use path for sealing (default: false)
--store (for init) use path for long-term storage (default: false)
--max-storage value (for init) limit storage space for sectors (expensive for very large paths!)
--groups value [ --groups value ] path group names
--allow-to value [ --allow-to value ] path groups allowed to pull data from this path (allow all if not specified)
--help, -h show help
--init initialize the path first (default: false)
--weight value (for init) path weight (default: 10)
--seal (for init) use path for sealing (default: false)
--store (for init) use path for long-term storage (default: false)
--max-storage value (for init) limit storage space for sectors (expensive for very large paths!)
--groups value [ --groups value ] path group names
--allow-to value [ --allow-to value ] path groups allowed to pull data from this path (allow all if not specified)
--allow-types value [ --allow-types value ] file types to allow storing in this path
--deny-types value [ --deny-types value ] file types to deny storing in this path
--help, -h show help
```

#### curio cli storage detach
Expand Down
76 changes: 39 additions & 37 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/filecoin-project/curio

go 1.22.3
go 1.22.7

toolchain go1.22.8

require (
contrib.go.opencensus.io/exporter/prometheus v0.4.2
Expand All @@ -17,21 +19,21 @@ require (
github.com/elastic/go-sysinfo v1.7.0
github.com/etclabscore/go-openrpc-reflect v0.0.36
github.com/fatih/color v1.16.0
github.com/filecoin-project/filecoin-ffi v1.30.0
github.com/filecoin-project/filecoin-ffi v1.31.0
github.com/filecoin-project/go-address v1.2.0
github.com/filecoin-project/go-bitfield v0.2.4
github.com/filecoin-project/go-cbor-util v0.0.1
github.com/filecoin-project/go-commp-utils v0.1.4
github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20240802040721-2a04ffc8ffe8
github.com/filecoin-project/go-commp-utils/v2 v2.1.0
github.com/filecoin-project/go-f3 v0.7.2
github.com/filecoin-project/go-f3 v0.7.3
github.com/filecoin-project/go-fil-commcid v0.2.0
github.com/filecoin-project/go-fil-commp-hashhash v0.2.0
github.com/filecoin-project/go-jsonrpc v0.6.1-0.20240820160949-2cfe810e5d2f
github.com/filecoin-project/go-jsonrpc v0.7.0
github.com/filecoin-project/go-padreader v0.0.1
github.com/filecoin-project/go-state-types v0.15.0
github.com/filecoin-project/go-state-types v0.16.0-rc1
github.com/filecoin-project/go-statestore v0.2.0
github.com/filecoin-project/lotus v1.30.0
github.com/filecoin-project/lotus v1.32.0-rc1
github.com/filecoin-project/specs-actors/v2 v2.3.6
github.com/filecoin-project/specs-actors/v5 v5.0.6
github.com/filecoin-project/specs-actors/v6 v6.0.2
Expand Down Expand Up @@ -70,7 +72,7 @@ require (
github.com/jellydator/ttlcache/v2 v2.11.1
github.com/kelseyhightower/envconfig v1.4.0
github.com/libp2p/go-buffer-pool v0.1.0
github.com/libp2p/go-libp2p v0.36.3
github.com/libp2p/go-libp2p v0.37.2
github.com/manifoldco/promptui v0.9.0
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1
github.com/minio/sha256-simd v1.0.1
Expand All @@ -81,28 +83,28 @@ require (
github.com/multiformats/go-varint v0.0.7
github.com/open-rpc/meta-schema v0.0.0-20201029221707-1b72ef2ea333
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.20.0
github.com/prometheus/client_golang v1.20.5
github.com/puzpuzpuz/xsync/v2 v2.4.0
github.com/raulk/clock v1.1.0
github.com/samber/lo v1.39.0
github.com/sirupsen/logrus v1.9.2
github.com/snadrus/must v0.0.0-20240605044437-98cedd57f8eb
github.com/stretchr/testify v1.9.0
github.com/triplewz/poseidon v0.0.2-0.20240407130934-5265fab9d889
github.com/stretchr/testify v1.10.0
github.com/triplewz/poseidon v0.0.2
github.com/urfave/cli/v2 v2.27.4
github.com/whyrusleeping/cbor-gen v0.2.0
github.com/yugabyte/gocql v1.6.0-yb-1
github.com/yugabyte/pgx/v5 v5.5.3-yb-2
go.opencensus.io v0.24.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.28.0
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e
golang.org/x/net v0.29.0
golang.org/x/sync v0.8.0
golang.org/x/sys v0.26.0
golang.org/x/text v0.19.0
golang.org/x/tools v0.24.0
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/net v0.30.0
golang.org/x/sync v0.9.0
golang.org/x/sys v0.27.0
golang.org/x/text v0.20.0
golang.org/x/tools v0.26.0
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da
)

Expand Down Expand Up @@ -188,7 +190,7 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
github.com/google/pprof v0.0.0-20241017200806-017d972448fc // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand Down Expand Up @@ -232,11 +234,11 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/kilic/bls12-381 v0.1.1-0.20220929213557-ca162e8a70f4 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/libp2p/go-cidranger v1.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.2.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect
github.com/libp2p/go-libp2p-kad-dht v0.25.2 // indirect
github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect
Expand Down Expand Up @@ -266,22 +268,22 @@ require (
github.com/muesli/termenv v0.15.2 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/multiformats/go-multiaddr-dns v0.4.0 // indirect
github.com/multiformats/go-multiaddr-dns v0.4.1 // indirect
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multistream v0.5.0 // indirect
github.com/multiformats/go-multistream v0.6.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nikkolasg/hexjson v0.1.0 // indirect
github.com/nkovacs/streamquote v1.0.0 // indirect
github.com/onsi/ginkgo/v2 v2.20.0 // indirect
github.com/onsi/ginkgo/v2 v2.20.2 // indirect
github.com/opencontainers/runtime-spec v1.2.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 // indirect
github.com/pion/datachannel v1.5.8 // indirect
github.com/pion/datachannel v1.5.9 // indirect
github.com/pion/dtls/v2 v2.2.12 // indirect
github.com/pion/ice/v2 v2.3.34 // indirect
github.com/pion/interceptor v0.1.30 // indirect
github.com/pion/ice/v2 v2.3.36 // indirect
github.com/pion/interceptor v0.1.37 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns v0.0.12 // indirect
github.com/pion/randutil v0.1.0 // indirect
Expand All @@ -293,16 +295,16 @@ require (
github.com/pion/stun v0.6.1 // indirect
github.com/pion/transport/v2 v2.2.10 // indirect
github.com/pion/turn/v2 v2.1.6 // indirect
github.com/pion/webrtc/v3 v3.3.0 // indirect
github.com/pion/webrtc/v3 v3.3.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polydawn/refmt v0.89.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/common v0.60.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/prometheus/statsd_exporter v0.22.7 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/quic-go v0.46.0 // indirect
github.com/quic-go/webtransport-go v0.8.0 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/quic-go/quic-go v0.48.2 // indirect
github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
Expand All @@ -320,7 +322,7 @@ require (
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/wlynxg/anet v0.0.4 // indirect
github.com/wlynxg/anet v0.0.5 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-filecoin-go v0.11.1 // indirect
Expand All @@ -339,16 +341,16 @@ require (
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/dig v1.18.0 // indirect
go.uber.org/fx v1.22.2 // indirect
go.uber.org/mock v0.4.0 // indirect
go.uber.org/fx v1.23.0 // indirect
go.uber.org/mock v0.5.0 // indirect
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/term v0.26.0 // indirect
golang.org/x/time v0.5.0 // indirect
gonum.org/v1/gonum v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 699a87d

Please sign in to comment.