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
#PublisherKind = "dtsync"
# Binding address for the libp2p host - 0 means random port.
# Format: multiaddress; see https://multiformats.io/multiaddr/
# Binding address for the libp2p host contacted by indexer nodes to sync the list of advertised
# 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
# env var: LOTUS_INDEXPROVIDER_LISTENADDRESSES
#ListenAddresses = ["/ip4/0.0.0.0/tcp/0", "/ip6/::/tcp/0"]
# Addresses to explicitly announce to other peers. If not specified,
# all interface addresses are announced
# Format: multiaddress
# The address the endpoints at which the data associated to the advertised
# multihashes can be retrieved. If not specified, the ListenAddresses are used instead. The format
# of the strings specified must conform to multiaddress; see https://multiformats.io/multiaddr/
#
# type: []string
# env var: LOTUS_INDEXPROVIDER_ANNOUNCEADDRESSES
#AnnounceAddresses = []
# The maximum number of simultaneous data transfers between the indexers
# and the indexer provider
# The maximum number of simultaneous requests syncing the list of advertised multihashes between
# the indexers and the index provider.
#
# type: uint64
# 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",
Type: "[]string",
Comment: `Binding address for the libp2p host - 0 means random port.
Format: multiaddress; see https://multiformats.io/multiaddr/`,
Comment: `Binding address for the libp2p host contacted by indexer nodes to sync the list of advertised
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",
Type: "[]string",
Comment: `Addresses to explicitly announce to other peers. If not specified,
all interface addresses are announced
Format: multiaddress`,
Comment: `The address the endpoints at which the data associated to the advertised
multihashes can be retrieved. If not specified, the ListenAddresses are used instead. The format
of the strings specified must conform to multiaddress; see https://multiformats.io/multiaddr/`,
},
{
Name: "MaxSimultaneousTransfers",
Type: "uint64",
Comment: `The maximum number of simultaneous data transfers between the indexers
and the indexer provider`,
Comment: `The maximum number of simultaneous requests syncing the list of advertised multihashes between
the indexers and the index provider.`,
},
},
"Libp2p": []DocField{

View File

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

View File

@ -623,8 +623,6 @@ func StorageProvider(minerAddress dtypes.MinerAddress,
address.Address(minerAddress),
storedAsk,
meshCreator,
//fullnodeApi,
//idxProvHost,
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) {
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)
if pkey == nil {