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
Connect index provider host to full node #675
Connect index provider host to full node #675
Conversation
go func() { | ||
for { | ||
select { | ||
case <-time.After(time.Minute): | ||
if err := p.connectIndexProviderToFullNode(ctx); err != nil { | ||
log.Errorf("failed to connect index provider host with the full node: %s", err) | ||
} | ||
case <-ctx.Done(): | ||
return | ||
} | ||
} | ||
}() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT this is a responsibility of the libp2p connection manager (i.e. protected peers
). Are we sure that we need this piece of code, and it is not redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Anton, this is to ensure we keep connecting if something goes wrong and the full node disconnects us. It's just there for safety. If we already have a connection to the full node, this will be a no-op as it dosen't create another connection.
* feat: retrieve by any CID (not just root CID) * feat: fix tests * fix: TestHandleQueryStream * fix: integration tests * Publish indexing records to the Network Indexer using the reference provider (#647) * reference prov integration * Apply suggestions from code review Co-authored-by: dirkmc <dirkmdev@gmail.com> * move provider callback to start * fix: lint Co-authored-by: dirkmc <dirkmdev@gmail.com> * fix conflict * update dagstore and disable flaky * refactor: use index-provider instead of indexer-reference-provider * update to latest data-transfer and index-provider * announce all deals to the indexer * update go mods * update deps * lint: fix imports * update dagstore to tagged ver * update provider * update deps * update deps * log advertisement cid for announcement and update deps * update deps * more logging for announcement * better logic to announce all deals to network indexer * Connect index provider host to full node (#675) * add fullnodeApi to Provider * add idxProvHost * connect to full node before making announcement * fix compilation Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com> * fix imports * log connection * use NetAddrListener iface (#676) * use NetAddrListener iface * fix compilation * fix imports Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com> * remove libp2p host connect in favour of mesh creator interface (#678) * remove libp2p host connect in favour of mesh creator interface * update test harness * Upgrade to `index-provider` `v.0.3.0` Upgrade to the latest `index-provider` which includes two main changes: 1. update to go-legs message format 2. cache eviction bug fix * log failure to connect to full node without returning it * update dagstore * Use the latest tagged release for dagstore dependency Depend on a concrete tagged release of dagstore that contains fixes to dagstore repo bloat. * Upgrade to latest indexing dependencies * Run `go mod tidy` Co-authored-by: Dirk McCormick <dirkmdev@gmail.com> Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com> Co-authored-by: Masih H. Derkani <m@derkani.org>
Ensure the index provider host is connected to the full node so that it's a part of the gossipsub mesh.