Commit Graph

7 Commits

Author SHA1 Message Date
Łukasz Magiera
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
Masih H. Derkani
2ebc111b70 Use the same host and datatransfer as markets for index provider
Remove the bespoke instantiation of libp2p host and datatransfer manager
for index provider and reuse the existing instances used by markets.

The rationale for reuse is the following:
 1. Separation of host introduces a discovery problem, where without
    gossipsub the index provider endpoint will not be discoverable.
    Using the same host as markets would mean the chain can be used to
    discover addresses, putting less empassis on criticality of
    gossipsub considering its set-up cost and lack of message delivery
    guarantees.

 2. Only a single instance of graphsync/datatransfer can be instantiated
    per libp2p host; therefore, if the host is shared, so should
    datatransfer manager.

 3. it is not clear if the assumptions under which separation was
    decided still hold.
2022-02-16 13:46:44 +00:00
Masih H. Derkani
f15a1edbf2 Protect index provider peer ID before connecting to full node
Add the peer ID of index provider host to the list of protected peers
before connecting to full node. Otherwise, it is possible for the
connection to be reset by full node before we reach the line that adds
the ID to list of protected peers via JsonRPC API.

Relates to:
 - https://github.com/filecoin-project/index-provider/issues/177
2022-02-15 11:49:29 +00:00
Aarsh Shah
eb8296120b changes to mesh creation code 2022-02-04 13:58:47 +04:00
Aarsh Shah
daac7f2988 fix lint 2022-02-04 13:55:26 +04:00
Aarsh Shah
ca46a79144 protect full node connection 2022-02-04 13:04:07 +04:00
Anton Evangelatov
595ad44ee7 refactor indexprovider libp2p host connection to fullnode with meshcreator 2022-02-03 15:44:18 +01:00