Integrate the latest index-provider with config to disable announcements
Integrate the latest `index-provider` and reflect the changes to engine configuration. Note that this commit disables announcements of indices on the network by default as requested for initial merge to master. Introduce dedicated index provider configuration parameters with documentation and defaults that match the defaults in index-provider. Re-generate code as needed.
This commit is contained in:
+5
-2
@@ -11,7 +11,6 @@ import (
|
||||
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
"github.com/filecoin-project/go-state-types/big"
|
||||
ipconfig "github.com/filecoin-project/index-provider/config"
|
||||
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
||||
@@ -185,7 +184,11 @@ func DefaultStorageMiner() *StorageMiner {
|
||||
},
|
||||
|
||||
IndexProvider: IndexProviderConfig{
|
||||
Ingest: ipconfig.NewIngest(),
|
||||
Enable: false,
|
||||
EntriesCacheCapacity: 1024,
|
||||
EntriesChunkSize: 16384,
|
||||
TopicName: "/indexer/ingest/mainnet",
|
||||
PurgeCacheOnStart: false,
|
||||
},
|
||||
|
||||
Subsystems: MinerSubsystemConfig{
|
||||
|
||||
@@ -366,6 +366,49 @@ see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-f
|
||||
Comment: ``,
|
||||
},
|
||||
},
|
||||
"IndexProviderConfig": []DocField{
|
||||
{
|
||||
Name: "Enable",
|
||||
Type: "bool",
|
||||
|
||||
Comment: `Enable set whether to enable indexing announcement to the network and expose endpoints that
|
||||
allow indexer nodes to process announcements. Disabled by default.`,
|
||||
},
|
||||
{
|
||||
Name: "EntriesCacheCapacity",
|
||||
Type: "int",
|
||||
|
||||
Comment: `EntriesCacheCapacity sets the maximum capacity to use for caching the indexing advertisement
|
||||
entries. Defaults to 1024 if not specified. The cache is evicted using LRU policy. The
|
||||
maximum storage used by the cache is a factor of EntriesCacheCapacity, EntriesChunkSize and
|
||||
the length of multihashes being advertised. For example, advertising 128-bit long multihashes
|
||||
with the default EntriesCacheCapacity, and EntriesChunkSize means the cache size can grow to
|
||||
256MiB when full.`,
|
||||
},
|
||||
{
|
||||
Name: "EntriesChunkSize",
|
||||
Type: "int",
|
||||
|
||||
Comment: `EntriesChunkSize sets the maximum number of multihashes to include in a single entries chunk.
|
||||
Defaults to 16384 if not specified. Note that chunks are chained together for indexing
|
||||
advertisements that include more multihashes than the configured EntriesChunkSize.`,
|
||||
},
|
||||
{
|
||||
Name: "TopicName",
|
||||
Type: "string",
|
||||
|
||||
Comment: `TopicName sets the topic name on which the changes to the advertised content are announced.
|
||||
Defaults to '/indexer/ingest/mainnet' if not specified.`,
|
||||
},
|
||||
{
|
||||
Name: "PurgeCacheOnStart",
|
||||
Type: "bool",
|
||||
|
||||
Comment: `PurgeCacheOnStart sets whether to clear any cached entries chunks when the provider engine
|
||||
starts. By default, the cache is rehydrated from previously cached entries stored in
|
||||
datastore if any is present.`,
|
||||
},
|
||||
},
|
||||
"Libp2p": []DocField{
|
||||
{
|
||||
Name: "ListenAddresses",
|
||||
|
||||
+26
-3
@@ -3,8 +3,6 @@ package config
|
||||
import (
|
||||
"github.com/ipfs/go-cid"
|
||||
|
||||
"github.com/filecoin-project/index-provider/config"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
|
||||
)
|
||||
@@ -166,7 +164,32 @@ type DealmakingConfig struct {
|
||||
}
|
||||
|
||||
type IndexProviderConfig struct {
|
||||
config.Ingest
|
||||
|
||||
// Enable set whether to enable indexing announcement to the network and expose endpoints that
|
||||
// allow indexer nodes to process announcements. Disabled by default.
|
||||
Enable bool
|
||||
|
||||
// EntriesCacheCapacity sets the maximum capacity to use for caching the indexing advertisement
|
||||
// entries. Defaults to 1024 if not specified. The cache is evicted using LRU policy. The
|
||||
// maximum storage used by the cache is a factor of EntriesCacheCapacity, EntriesChunkSize and
|
||||
// the length of multihashes being advertised. For example, advertising 128-bit long multihashes
|
||||
// with the default EntriesCacheCapacity, and EntriesChunkSize means the cache size can grow to
|
||||
// 256MiB when full.
|
||||
EntriesCacheCapacity int
|
||||
|
||||
// EntriesChunkSize sets the maximum number of multihashes to include in a single entries chunk.
|
||||
// Defaults to 16384 if not specified. Note that chunks are chained together for indexing
|
||||
// advertisements that include more multihashes than the configured EntriesChunkSize.
|
||||
EntriesChunkSize int
|
||||
|
||||
// TopicName sets the topic name on which the changes to the advertised content are announced.
|
||||
// Defaults to '/indexer/ingest/mainnet' if not specified.
|
||||
TopicName string
|
||||
|
||||
// PurgeCacheOnStart sets whether to clear any cached entries chunks when the provider engine
|
||||
// starts. By default, the cache is rehydrated from previously cached entries stored in
|
||||
// datastore if any is present.
|
||||
PurgeCacheOnStart bool
|
||||
}
|
||||
|
||||
type RetrievalPricing struct {
|
||||
|
||||
Reference in New Issue
Block a user