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

feat: markets: Integrate index ingest protocol and retrieve by any CID #7313

Merged
merged 113 commits into from Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
662c516
feat: retrieve from any cid (not just root cid)
dirkmc Sep 10, 2021
053317e
test for retrieval by any cid
aarshkshah1992 Sep 17, 2021
4d87f16
better comparision in test
aarshkshah1992 Sep 17, 2021
e309293
fix: lint fixes
dirkmc Sep 17, 2021
3c37078
fix: dagstore wrapper test
dirkmc Sep 17, 2021
189f5f8
fix deals test
aarshkshah1992 Sep 20, 2021
025d8eb
feat: include TestDealRetrieveByAnyCid in CI
dirkmc Sep 20, 2021
588d6ec
fix: docs-gen
dirkmc Sep 20, 2021
a633f93
upgrade go modules
nonsense Nov 12, 2021
627d4fb
wip: storage miner index provider
dirkmc Nov 10, 2021
bfee669
update go mod and inject store the hash index in dagstore
aarshkshah1992 Nov 17, 2021
caf3cfa
Merge branch 'feat/cid-to-piece-idx' into feat/indexer-provider
aarshkshah1992 Nov 17, 2021
f8c675b
green tests
aarshkshah1992 Nov 17, 2021
d196c23
fix lint
aarshkshah1992 Nov 17, 2021
8d3017f
make gen should work
aarshkshah1992 Nov 17, 2021
21e27b8
Merge pull request #7622 from filecoin-project/feat/indexer-provider
aarshkshah1992 Nov 17, 2021
5013082
feat: CLI command to announce deal to indexers
dirkmc Nov 17, 2021
60fe55c
fix lint and gen
aarshkshah1992 Nov 17, 2021
599a6bf
fix: err message
dirkmc Nov 17, 2021
a4fd3de
Merge pull request #7634 from filecoin-project/feat/cli-announce-index
dirkmc Nov 17, 2021
5454aeb
CLI tools for the DAGStore inverted index (#7361)
nonsense Nov 17, 2021
7655e66
integrate store-the-hash
aarshkshah1992 Nov 18, 2021
780c403
Upgrade to the latest indexer dependencies
masih Dec 2, 2021
43cde48
Upgrade go-legs to a version with debugging features
masih Dec 9, 2021
6b7b979
Set default index provider ingest config values
masih Dec 13, 2021
a51b08e
feat: add IndexerProvider AnnounceAddress config
dirkmc Dec 13, 2021
edfc2c2
Merge remote-tracking branch 'origin/main' into feat/cid-to-piece-idx
aarshkshah1992 Jan 12, 2022
21a8f71
compiles
aarshkshah1992 Jan 12, 2022
dec79c7
fix compilation
aarshkshah1992 Jan 12, 2022
64bf3fc
update index provider dep
aarshkshah1992 Jan 12, 2022
3a52f05
green ci
aarshkshah1992 Jan 12, 2022
05afaf6
make gen
aarshkshah1992 Jan 12, 2022
b9d3585
get tests working
aarshkshah1992 Jan 12, 2022
07c842d
lotus soup green
aarshkshah1992 Jan 12, 2022
051d993
update markets
aarshkshah1992 Jan 12, 2022
8c8652e
add a new cli
aarshkshah1992 Jan 12, 2022
b780a64
send markets multiaddrs to the engine
aarshkshah1992 Jan 13, 2022
8459d75
update index provider config
aarshkshah1992 Jan 13, 2022
9e40e24
deps update
aarshkshah1992 Jan 19, 2022
9ee9400
Merge remote-tracking branch 'origin/master' into feat/cid-to-piece-idx
aarshkshah1992 Jan 20, 2022
b8bf2af
upgrade on master
aarshkshah1992 Jan 20, 2022
7508d96
fix lint
aarshkshah1992 Jan 20, 2022
9e2d46b
Merge remote-tracking branch 'origin/master' into feat/cid-to-piece-idx
aarshkshah1992 Jan 23, 2022
8d062bc
update index provider
aarshkshah1992 Jan 24, 2022
5da2995
Upgrade to `index-provider` v0.2.3
masih Jan 25, 2022
4dd93e5
update deps
aarshkshah1992 Jan 26, 2022
211ad16
update markets deps
aarshkshah1992 Jan 26, 2022
5d72ebe
Upgrade `index-provider` and update topic name
masih Jan 27, 2022
ad348c8
Upgrade to the latest index provider
masih Feb 1, 2022
db5e4da
add fullnodeApi to StorageProvider
nonsense Feb 2, 2022
f9b63c5
add idxProvHost to StorageProvider
nonsense Feb 2, 2022
2790cf3
change fullnodeApi to listen addrs
nonsense Feb 2, 2022
79403f1
fix autogenerated docs
nonsense Feb 2, 2022
03dd33d
upgrade go-fil-markets
nonsense Feb 2, 2022
faa3a79
use NetAddrListener iface
nonsense Feb 2, 2022
c3d41d4
upgrade go-fil-markets
nonsense Feb 2, 2022
2353775
Clarify the purpose of `MaxSimultaneousTransfers` config
masih Feb 3, 2022
575e6ad
Rename `IndexerProvider` to `IndexProvider` and add more docs
masih Feb 3, 2022
6ef0c38
Fix typos in default miner config
masih Feb 3, 2022
20fc5ff
fixing tests
nonsense Feb 3, 2022
595ad44
refactor indexprovider libp2p host connection to fullnode with meshcr…
nonsense Feb 3, 2022
bb62357
go mod tidy
nonsense Feb 3, 2022
dde2ab5
fixup
nonsense Feb 3, 2022
b6b5046
upgrade go-fil-markets
nonsense Feb 3, 2022
7247f8e
add net protect api methods
willscott Feb 3, 2022
f4af6b6
Merge pull request #8021 from filecoin-project/willscott/net-protect-api
jennijuju Feb 3, 2022
c084130
Lotus chain nodes relay indexer pubsub messages
gammazero Feb 3, 2022
3ecf478
Merge pull request #8026 from gammazero/feat/cid-to-piece-idx
aarshkshah1992 Feb 4, 2022
4691b2b
changes to the indexer message relay PR
aarshkshah1992 Feb 4, 2022
e155eb9
Merge pull request #8016 from filecoin-project/nonsense/add-fullnode-api
aarshkshah1992 Feb 4, 2022
ca46a79
protect full node connection
aarshkshah1992 Feb 4, 2022
daac7f2
fix lint
aarshkshah1992 Feb 4, 2022
eb82961
changes to mesh creation code
aarshkshah1992 Feb 4, 2022
399a1af
Merge remote-tracking branch 'origin/master' into feat/cid-to-piece-idx
aarshkshah1992 Feb 8, 2022
1dc6a2f
Add indexer pubsub message authentication and rate limiting
gammazero Feb 8, 2022
b280582
Pass to validator the interfaces needed to get miner info
gammazero Feb 8, 2022
cc61650
Upgrade to latest `index-provider` and set miner ID as extra gossip data
masih Feb 8, 2022
a62e027
review changes
gammazero Feb 9, 2022
3ff209d
Add replay rejection
gammazero Feb 9, 2022
681ce94
Correctly handle seqno check
gammazero Feb 10, 2022
9481fa0
Use new indexer pubsub message encoding
gammazero Feb 10, 2022
f0accce
Upgrade `index-provider` and go-fil-markets to latest
masih Feb 10, 2022
3f3d61b
Service creation takes interface, not implementation
gammazero Feb 10, 2022
1e37185
Ignore, not regect, indexer messages from self.
gammazero Feb 10, 2022
b72cd90
Add indexer message scoring
gammazero Feb 10, 2022
eedcf91
change scoring based on review
gammazero Feb 10, 2022
c1b2080
spelling in comment
gammazero Feb 10, 2022
296eab3
Merge pull request #8045 from gammazero/feat/cid-to-piece-idx
willscott Feb 10, 2022
7e7844f
Fix log message formatting when instantiating index provider
masih Feb 11, 2022
b47cde7
Decode gossip extra data as []bytes
masih Feb 11, 2022
230b855
Override `testnetnet` to `mainnet` in indexer ingest topic
masih Feb 11, 2022
59351c8
Add `lotus net` CLI command to add/remove/list protected peers
masih Feb 11, 2022
1bf7e6a
Fix `gen-check`
masih Feb 11, 2022
f15a1ed
Protect index provider peer ID before connecting to full node
masih Feb 15, 2022
031bfaf
Update to the head of go-fil-markets#673
masih Feb 15, 2022
2ebc111
Use the same host and datatransfer as markets for index provider
masih Feb 16, 2022
a09f386
Remove redundant `IndexProvider` config now that host is shared
masih Feb 16, 2022
e3f5b7c
update dagstore top level index db
aarshkshah1992 Feb 18, 2022
3fd83e9
dagstore size bloating fix
aarshkshah1992 Feb 21, 2022
c3b406c
Update indexing and markets dependencies
masih Feb 23, 2022
b802ddb
Upgrade dependency to markets
masih Feb 23, 2022
77a954c
Merge branch 'master' into feat/cid-to-piece-idx
ZenGround0 Feb 28, 2022
769b0f3
Address review comments
masih Mar 2, 2022
963caf2
Fix `gen-check`
masih Mar 2, 2022
444a2bf
Integrate the latest index-provider with config to disable announcements
masih Mar 2, 2022
aacc246
Merge branch 'master' into feat/cid-to-piece-idx
masih Mar 2, 2022
eb83001
Fix wrong ffi commit
masih Mar 2, 2022
a52b4b7
gomod: Use latest cbor-gen
magik6k Mar 2, 2022
8cf6f24
Upgrade `go-fil-markets` to include index provider metadata changes
masih Mar 3, 2022
1bb6518
Upgrade to go-path `v0.2.1` and remove `replace` directive
masih Mar 3, 2022
7dcfeee
use old go-path
magik6k Mar 3, 2022
28d751b
mod tidy
magik6k Mar 3, 2022
4c8015c
Update deps in lotus-soup mod and remove replace directive
masih Mar 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .circleci/config.yml
Expand Up @@ -785,6 +785,11 @@ workflows:
suite: itest-deals_512mb
target: "./itests/deals_512mb_test.go"

- test:
name: test-itest-deals_anycid
suite: itest-deals_anycid
target: "./itests/deals_anycid_test.go"

- test:
name: test-itest-deals_concurrent
suite: itest-deals_concurrent
Expand Down
4 changes: 4 additions & 0 deletions api/api_net.go
Expand Up @@ -51,6 +51,10 @@ type Net interface {
NetBlockRemove(ctx context.Context, acl NetBlockList) error //perm:admin
NetBlockList(ctx context.Context) (NetBlockList, error) //perm:read

NetProtectAdd(ctx context.Context, acl []peer.ID) error //perm:admin
NetProtectRemove(ctx context.Context, acl []peer.ID) error //perm:admin
NetProtectList(ctx context.Context) ([]peer.ID, error) //perm:read

// ResourceManager API
NetStat(ctx context.Context, scope string) (NetStat, error) //perm:read
NetLimit(ctx context.Context, scope string) (NetLimit, error) //perm:read
Expand Down
13 changes: 13 additions & 0 deletions api/api_storage.go
Expand Up @@ -219,6 +219,19 @@ type StorageMiner interface {
// DagstoreGC runs garbage collection on the DAG store.
DagstoreGC(ctx context.Context) ([]DagstoreShardResult, error) //perm:admin

// IndexerAnnounceDeal informs indexer nodes that a new deal was received,
// so they can download its index
IndexerAnnounceDeal(ctx context.Context, proposalCid cid.Cid) error //perm:admin

// IndexerAnnounceAllDeals informs the indexer nodes aboutall active deals.
IndexerAnnounceAllDeals(ctx context.Context) error //perm:admin

// DagstorePieceIndexSize returns the size of the piece index.
DagstorePieceIndexSize(ctx context.Context) (int64, error) //perm:admin

// DagstoreLookupPieces returns information about shards that contain the given CID.
DagstoreLookupPieces(ctx context.Context, cid cid.Cid) ([]DagstoreShardInfo, error) //perm:admin

// RuntimeSubsystems returns the subsystems that are enabled
// in this instance.
RuntimeSubsystems(ctx context.Context) (MinerSubsystems, error) //perm:read
Expand Down
43 changes: 43 additions & 0 deletions api/mocks/mock_full.go

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

91 changes: 91 additions & 0 deletions api/proxy_gen.go

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

43 changes: 43 additions & 0 deletions api/v0api/v0mocks/mock_full.go

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

Binary file modified build/openrpc/full.json.gz
Binary file not shown.
Binary file modified build/openrpc/miner.json.gz
Binary file not shown.
Binary file modified build/openrpc/worker.json.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions build/params_shared_funcs.go
Expand Up @@ -13,6 +13,9 @@ import (

func BlocksTopic(netName dtypes.NetworkName) string { return "/fil/blocks/" + string(netName) }
func MessagesTopic(netName dtypes.NetworkName) string { return "/fil/msgs/" + string(netName) }
func IndexerIngestTopic(netName dtypes.NetworkName) string {
return "/indexer/ingest/" + string(netName)
}
func DhtProtocolName(netName dtypes.NetworkName) protocol.ID {
return protocol.ID("/fil/kad/" + string(netName))
}
Expand Down
21 changes: 21 additions & 0 deletions chain/sub/incoming.go
Expand Up @@ -444,3 +444,24 @@ func recordFailure(ctx context.Context, metric *stats.Int64Measure, failureType
)
stats.Record(ctx, metric.M(1))
}

type IndexerMessageValidator struct {
self peer.ID
}

func NewIndexerMessageValidator(self peer.ID) *IndexerMessageValidator {
return &IndexerMessageValidator{self: self}
}

func (v *IndexerMessageValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub.Message) pubsub.ValidationResult {
// This chain-node should not be publishing its own messages. These are
// relayed from miner-nodes or index publishers. If a node appears to be
// local, reject it.
if pid == v.self {
log.Warnf("refusing to relay indexer message from self")
stats.Record(ctx, metrics.IndexerMessageValidationFailure.M(1))
return pubsub.ValidationReject
}
stats.Record(ctx, metrics.IndexerMessageValidationSuccess.M(1))
return pubsub.ValidationAccept
}