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

Remove support for data-transfer/graphsync #2567

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion command/gc/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func daemonAction(cctx *cli.Context) error {
reaper.WithDatastoreDir(dsDir),
reaper.WithDatastoreTempDir(dsTmpDir),
reaper.WithPCache(pc),
reaper.WithTopicName(cfg.Ingest.PubSubTopic),
reaper.WithHttpTimeout(time.Duration(cfg.Ingest.HttpSyncTimeout)),
reaper.WithSyncSegmentSize(cctx.Int("sync-segment-size")),
)
Expand Down
1 change: 0 additions & 1 deletion command/gc/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ func providerAction(cctx *cli.Context) error {
reaper.WithEntriesFromPublisher(cctx.Bool("ents-from-pub")),
reaper.WithPCache(pc),
reaper.WithSegmentSize(cctx.Int("segment-size")),
reaper.WithTopicName(cfg.Ingest.PubSubTopic),
reaper.WithHttpTimeout(time.Duration(cfg.Ingest.HttpSyncTimeout)),
reaper.WithSyncSegmentSize(cctx.Int("sync-segment-size")),
)
Expand Down
14 changes: 0 additions & 14 deletions config/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ type Ingest struct {
// recent advertisement, set this to 1. A value of 0, the default, means
// unlimited depth.
FirstSyncDepth int
// GsMaxInRequests is the maximum number of incoming in-progress graphsync
// requests. Default is 1024.
GsMaxInRequests uint64
// GsMaxOutRequests is the maximum number of outgoing in-progress graphsync
// requests. Default is 1024.
GsMaxOutRequests uint64
// HttpSyncRetryMax sets the maximum number of times HTTP sync requests
// should be retried. A value of zero, the default, means no retry.
HttpSyncRetryMax int
Expand Down Expand Up @@ -97,8 +91,6 @@ func NewIngest() Ingest {
AdvertisementDepthLimit: 33554432,
AdvertisementMirror: NewMirror(),
EntriesDepthLimit: 65536,
GsMaxInRequests: 1024,
GsMaxOutRequests: 1024,
HttpSyncRetryWaitMax: Duration(30 * time.Second),
HttpSyncRetryWaitMin: Duration(1 * time.Second),
HttpSyncTimeout: Duration(10 * time.Second),
Expand All @@ -122,12 +114,6 @@ func (c *Ingest) populateUnset() {
if c.EntriesDepthLimit == 0 {
c.EntriesDepthLimit = def.EntriesDepthLimit
}
if c.GsMaxInRequests == 0 {
c.GsMaxInRequests = def.GsMaxInRequests
}
if c.GsMaxOutRequests == 0 {
c.GsMaxOutRequests = def.GsMaxOutRequests
}
if c.HttpSyncRetryWaitMax == 0 {
c.HttpSyncRetryWaitMax = def.HttpSyncRetryWaitMax
}
Expand Down
7 changes: 2 additions & 5 deletions config/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ func NewLogging() Logging {
return Logging{
Level: "info",
Loggers: map[string]string{
"basichost": "warn",
"bootstrap": "warn",
"dt_graphsync": "warn",
"dt-impl": "warn",
"graphsync": "warn",
"basichost": "warn",
"bootstrap": "warn",
},
}
}
Expand Down
5 changes: 1 addition & 4 deletions deploy/manifests/base/storetheindex-single/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@
"Level": "info",
"Loggers": {
"basichost": "warn",
"bootstrap": "warn",
"dt-impl": "warn",
"dt_graphsync": "warn",
"graphsync": "warn"
"bootstrap": "warn"
}
},
"Peering": {
Expand Down
5 changes: 1 addition & 4 deletions deploy/manifests/base/storetheindex/indexer-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ data:
"Level": "info",
"Loggers": {
"basichost": "warn",
"bootstrap": "warn",
"dt-impl": "warn",
"dt_graphsync": "warn",
"graphsync": "warn"
"bootstrap": "warn"
}
},
"Peering": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@
"Level": "info",
"Loggers": {
"basichost": "warn",
"bootstrap": "warn",
"dt-impl": "warn",
"dt_graphsync": "warn",
"graphsync": "warn"
"bootstrap": "warn"
}
},
"Peering": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ spec:
spec:
serviceAccountName: storetheindex
# Wait at most 3 minutes for storetheindex process to exit.
# This value used to be 10 minutes which we hit every time the shutdown took longer than 3 minutes.
# The most likely cause for this is lingering GraphSync syncs which do not clear after 10 minutes of wait,
# hence no point to wait that long.
terminationGracePeriodSeconds: 180
containers:
- name: indexer
Expand Down
12 changes: 1 addition & 11 deletions e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ func TestEndToEndWithAllProviderTypes(t *testing.T) {
t.Run("Libp2pWithHTTPProvider", func(t *testing.T) {
testEndToEndWithReferenceProvider(t, "libp2phttp")
})

// Test with publisher running dtsync over libp2p.
t.Run("DTSyncProvider", func(t *testing.T) {
testEndToEndWithReferenceProvider(t, "dtsync")
})
}

func testEndToEndWithReferenceProvider(t *testing.T, publisherProto string) {
Expand Down Expand Up @@ -99,13 +94,10 @@ func testEndToEndWithReferenceProvider(t *testing.T, publisherProto string) {

// install index-provider
switch publisherProto {
case "dtsync":
// Install index-provider that supports dtsync.
rnr.Run(ctx, "go", "install", "github.com/ipni/index-provider/cmd/provider@v0.13.6")
case "libp2p", "libp2phttp", "http":
rnr.Run(ctx, "go", "install", "github.com/ipni/index-provider/cmd/provider@latest")
default:
panic("providerProto must be one of: libp2phttp, http, dtsync")
panic("providerProto must be one of: libp2p, libp2phttp, http")
}
// install dhstore
rnr.Run(ctx, "go", "install", "-tags", "nofdb", "github.com/ipni/dhstore/cmd/dhstore@latest")
Expand All @@ -118,8 +110,6 @@ func testEndToEndWithReferenceProvider(t *testing.T, publisherProto string) {

// initialize index-provider
switch publisherProto {
case "dtsync":
rnr.Run(ctx, provider, "init")
case "http":
rnr.Run(ctx, provider, "init", "--pubkind=http")
case "libp2p":
Expand Down
12 changes: 0 additions & 12 deletions gc/reaper/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const (
defaultHttpTimeout = 10 * time.Second
defaultSegmentSize = 16384
defaultSyncSegSize = 4096
defaultTopic = "/indexer/ingest/mainnet"
)

type config struct {
Expand All @@ -31,7 +30,6 @@ type config struct {
pcache *pcache.ProviderCache
segmentSize int
syncSegSize int
topic string
}

// Option is a function that sets a value in a config.
Expand All @@ -46,7 +44,6 @@ func getOpts(opts []Option) (config, error) {
httpTimeout: defaultHttpTimeout,
segmentSize: defaultSegmentSize,
syncSegSize: defaultSyncSegSize,
topic: defaultTopic,
}

for i, opt := range opts {
Expand Down Expand Up @@ -158,15 +155,6 @@ func WithSyncSegmentSize(size int) Option {
}
}

// WithTopicName sets the topic name on which the provider announces advertised
// content. Defaults to '/indexer/ingest/mainnet'.
func WithTopicName(topic string) Option {
return func(c *config) error {
c.topic = topic
return nil
}
}

// WithEntriesDepthLimit sets the depth limit when syncing an
// advertisement entries chain. Setting to 0 means no limit.
func WithEntriesDepthLimit(depthLimit int64) Option {
Expand Down
4 changes: 1 addition & 3 deletions gc/reaper/reaper.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ type Reaper struct {
stats GCStats
statsMutex sync.Mutex
syncSegSize int
topic string
}

type scythe struct {
Expand Down Expand Up @@ -193,7 +192,6 @@ func New(idxr indexer.Interface, fileStore filestore.Interface, options ...Optio
pcache: opts.pcache,
segmentSize: opts.segmentSize,
syncSegSize: opts.syncSegSize,
topic: opts.topic,
}, nil
}

Expand Down Expand Up @@ -616,7 +614,7 @@ func (r *Reaper) makeSubscriber(dstoreTmp datastore.Batching) (*dagsync.Subscrib
}, nil
}

return dagsync.NewSubscriber(r.host, dstoreTmp, linksys, r.topic,
return dagsync.NewSubscriber(r.host, linksys,
dagsync.HttpTimeout(r.httpTimeout),
dagsync.SegmentDepthLimit(int64(r.syncSegSize)))
}
Expand Down
5 changes: 0 additions & 5 deletions gc/reaper/reaper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
"github.com/stretchr/testify/require"
)

const testTopic = "/indexer/ingest/test"

var pid1, pid2, pid3 peer.ID
var adCid cid.Cid

Expand Down Expand Up @@ -68,7 +66,6 @@ func TestReaper(t *testing.T) {
reaper.WithDatastoreDir(dsDir),
reaper.WithDatastoreTempDir(dsTmpDir),
reaper.WithPCache(pc),
reaper.WithTopicName(testTopic),
)
require.NoError(t, err)
defer gc.Close()
Expand All @@ -94,7 +91,6 @@ func TestReaper(t *testing.T) {
reaper.WithDatastoreTempDir(dsTmpDir),
reaper.WithDeleteNotFound(true),
reaper.WithPCache(pc),
reaper.WithTopicName(testTopic),
)
require.NoError(t, err)
defer gc2.Close()
Expand All @@ -116,7 +112,6 @@ func TestReaper(t *testing.T) {
reaper.WithDatastoreTempDir(dsTmpDir),
reaper.WithDeleteNotFound(true),
reaper.WithPCache(pc),
reaper.WithTopicName(testTopic),
)
require.NoError(t, err)

Expand Down
14 changes: 1 addition & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/ipld/go-ipld-prime v0.21.0
github.com/ipld/go-ipld-prime/storage/dsadapter v0.0.0-20230102063945-1a409dc236dd
github.com/ipni/go-indexer-core v0.8.16
github.com/ipni/go-libipni v0.5.22
github.com/ipni/go-libipni v0.6.10
github.com/libp2p/go-libp2p v0.36.1
github.com/libp2p/go-msgio v0.3.0
github.com/mitchellh/go-homedir v1.1.0
Expand Down Expand Up @@ -65,7 +65,6 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.18.3 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bep/debounce v1.2.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
Expand All @@ -84,11 +83,6 @@ require (
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/elastic/gosigar v0.14.3 // indirect
github.com/filecoin-project/go-cbor-util v0.0.1 // indirect
github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc8 // indirect
github.com/filecoin-project/go-ds-versioning v0.1.2 // indirect
github.com/filecoin-project/go-statemachine v1.0.2 // indirect
github.com/filecoin-project/go-statestore v0.2.0 // indirect
github.com/flynn/noise v1.1.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
Expand All @@ -107,8 +101,6 @@ require (
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hannahhoward/cbor-gen-for v0.0.0-20230214144701-5d17c9d5243c // indirect
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand All @@ -119,14 +111,12 @@ require (
github.com/ipfs/bbloom v0.0.4 // indirect
github.com/ipfs/go-block-format v0.2.0 // indirect
github.com/ipfs/go-blockservice v0.5.2 // indirect
github.com/ipfs/go-graphsync v0.17.0 // indirect
github.com/ipfs/go-ipfs-blockstore v1.3.1 // indirect
github.com/ipfs/go-ipfs-chunker v0.0.5 // indirect
github.com/ipfs/go-ipfs-ds-help v1.1.1 // indirect
github.com/ipfs/go-ipfs-exchange-interface v0.2.1 // indirect
github.com/ipfs/go-ipfs-files v0.3.0 // indirect
github.com/ipfs/go-ipfs-posinfo v0.0.1 // indirect
github.com/ipfs/go-ipfs-pq v0.0.3 // indirect
github.com/ipfs/go-ipfs-util v0.0.3 // indirect
github.com/ipfs/go-ipld-cbor v0.1.0 // indirect
github.com/ipfs/go-ipld-format v0.6.0 // indirect
Expand All @@ -135,15 +125,13 @@ require (
github.com/ipfs/go-log v1.0.5 // indirect
github.com/ipfs/go-merkledag v0.11.0 // indirect
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
github.com/ipfs/go-peertaskqueue v0.8.1 // indirect
github.com/ipfs/go-unixfs v0.4.5 // indirect
github.com/ipfs/go-verifcid v0.0.3 // indirect
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect
Expand Down
Loading
Loading