This commit is contained in:
Anton Evangelatov 2022-02-03 15:53:30 +01:00
commit dde2ab59ae
5 changed files with 28 additions and 24 deletions

View File

@ -273,23 +273,25 @@
# env var: LOTUS_INDEXPROVIDER_PUBLISHERKIND # env var: LOTUS_INDEXPROVIDER_PUBLISHERKIND
#PublisherKind = "dtsync" #PublisherKind = "dtsync"
# Binding address for the libp2p host - 0 means random port. # Binding address for the libp2p host contacted by indexer nodes to sync the list of advertised
# Format: multiaddress; see https://multiformats.io/multiaddr/ # multihashes. Note that when port is set to 0 a random port is generated at runtime and may be
# different on every restart. The format of the strings specified must conform to multiaddress;
# see https://multiformats.io/multiaddr/
# #
# type: []string # type: []string
# env var: LOTUS_INDEXPROVIDER_LISTENADDRESSES # env var: LOTUS_INDEXPROVIDER_LISTENADDRESSES
#ListenAddresses = ["/ip4/0.0.0.0/tcp/0", "/ip6/::/tcp/0"] #ListenAddresses = ["/ip4/0.0.0.0/tcp/0", "/ip6/::/tcp/0"]
# Addresses to explicitly announce to other peers. If not specified, # The address the endpoints at which the data associated to the advertised
# all interface addresses are announced # multihashes can be retrieved. If not specified, the ListenAddresses are used instead. The format
# Format: multiaddress # of the strings specified must conform to multiaddress; see https://multiformats.io/multiaddr/
# #
# type: []string # type: []string
# env var: LOTUS_INDEXPROVIDER_ANNOUNCEADDRESSES # env var: LOTUS_INDEXPROVIDER_ANNOUNCEADDRESSES
#AnnounceAddresses = [] #AnnounceAddresses = []
# The maximum number of simultaneous data transfers between the indexers # The maximum number of simultaneous requests syncing the list of advertised multihashes between
# and the indexer provider # the indexers and the index provider.
# #
# type: uint64 # type: uint64
# env var: LOTUS_INDEXPROVIDER_MAXSIMULTANEOUSTRANSFERS # env var: LOTUS_INDEXPROVIDER_MAXSIMULTANEOUSTRANSFERS

View File

@ -363,23 +363,25 @@ see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-f
Name: "ListenAddresses", Name: "ListenAddresses",
Type: "[]string", Type: "[]string",
Comment: `Binding address for the libp2p host - 0 means random port. Comment: `Binding address for the libp2p host contacted by indexer nodes to sync the list of advertised
Format: multiaddress; see https://multiformats.io/multiaddr/`, multihashes. Note that when port is set to 0 a random port is generated at runtime and may be
different on every restart. The format of the strings specified must conform to multiaddress;
see https://multiformats.io/multiaddr/`,
}, },
{ {
Name: "AnnounceAddresses", Name: "AnnounceAddresses",
Type: "[]string", Type: "[]string",
Comment: `Addresses to explicitly announce to other peers. If not specified, Comment: `The address the endpoints at which the data associated to the advertised
all interface addresses are announced multihashes can be retrieved. If not specified, the ListenAddresses are used instead. The format
Format: multiaddress`, of the strings specified must conform to multiaddress; see https://multiformats.io/multiaddr/`,
}, },
{ {
Name: "MaxSimultaneousTransfers", Name: "MaxSimultaneousTransfers",
Type: "uint64", Type: "uint64",
Comment: `The maximum number of simultaneous data transfers between the indexers Comment: `The maximum number of simultaneous requests syncing the list of advertised multihashes between
and the indexer provider`, the indexers and the index provider.`,
}, },
}, },
"Libp2p": []DocField{ "Libp2p": []DocField{

View File

@ -164,17 +164,19 @@ type DealmakingConfig struct {
type IndexProviderConfig struct { type IndexProviderConfig struct {
config.Ingest config.Ingest
// Binding address for the libp2p host - 0 means random port. // Binding address for the libp2p host contacted by indexer nodes to sync the list of advertised
// Format: multiaddress; see https://multiformats.io/multiaddr/ // multihashes. Note that when port is set to 0 a random port is generated at runtime and may be
// different on every restart. The format of the strings specified must conform to multiaddress;
// see https://multiformats.io/multiaddr/
ListenAddresses []string ListenAddresses []string
// Addresses to explicitly announce to other peers. If not specified, // The address the endpoints at which the data associated to the advertised
// all interface addresses are announced // multihashes can be retrieved. If not specified, the ListenAddresses are used instead. The format
// Format: multiaddress // of the strings specified must conform to multiaddress; see https://multiformats.io/multiaddr/
AnnounceAddresses []string AnnounceAddresses []string
// The maximum number of simultaneous data transfers between the indexers // The maximum number of simultaneous requests syncing the list of advertised multihashes between
// and the indexer provider // the indexers and the index provider.
MaxSimultaneousTransfers uint64 MaxSimultaneousTransfers uint64
} }

View File

@ -623,8 +623,6 @@ func StorageProvider(minerAddress dtypes.MinerAddress,
address.Address(minerAddress), address.Address(minerAddress),
storedAsk, storedAsk,
meshCreator, meshCreator,
//fullnodeApi,
//idxProvHost,
opt, opt,
) )
} }

View File

@ -67,7 +67,7 @@ func IndexProviderHost(cfg config.IndexProviderConfig) func(IdxProv) (idxprov.Ho
func IndexProvider(cfg config.IndexProviderConfig) func(params IdxProv, marketHost host.Host, h idxprov.Host) (provider.Interface, error) { func IndexProvider(cfg config.IndexProviderConfig) func(params IdxProv, marketHost host.Host, h idxprov.Host) (provider.Interface, error) {
return func(args IdxProv, marketHost host.Host, h idxprov.Host) (provider.Interface, error) { return func(args IdxProv, marketHost host.Host, h idxprov.Host) (provider.Interface, error) {
ipds := namespace.Wrap(args.Datastore, datastore.NewKey("/indexer-provider")) ipds := namespace.Wrap(args.Datastore, datastore.NewKey("/index-provider"))
pkey := args.Peerstore.PrivKey(args.PeerID) pkey := args.Peerstore.PrivKey(args.PeerID)
if pkey == nil { if pkey == nil {