config: Fix doc finding logic
This commit is contained in:
parent
4757b014bc
commit
3f4973cb41
@ -109,8 +109,8 @@ var Doc = map[string][]DocField{
|
|||||||
|
|
||||||
for _, f := range typ {
|
for _, f := range typ {
|
||||||
fmt.Println("\t\t{")
|
fmt.Println("\t\t{")
|
||||||
fmt.Printf("\t\t\tName: \"%s\",\n", f.Name)
|
fmt.Printf("\t\t\tName: \"%s\",\n", f.Name)
|
||||||
fmt.Printf("\t\t\tType: \"%s\",\n", f.Type)
|
fmt.Printf("\t\t\tType: \"%s\",\n", f.Type)
|
||||||
fmt.Printf("\t\t\tComment: `%s`,\n", f.Comment)
|
fmt.Printf("\t\t\tComment: `%s`,\n", f.Comment)
|
||||||
fmt.Println("\t\t},")
|
fmt.Println("\t\t},")
|
||||||
}
|
}
|
||||||
|
@ -11,304 +11,304 @@ type DocField struct {
|
|||||||
var Doc = map[string][]DocField{
|
var Doc = map[string][]DocField{
|
||||||
"API": []DocField{
|
"API": []DocField{
|
||||||
{
|
{
|
||||||
Name: "ListenAddress",
|
Name: "ListenAddress",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: `Binding address for the Lotus API`,
|
Comment: `Binding address for the Lotus API`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "RemoteListenAddress",
|
Name: "RemoteListenAddress",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Timeout",
|
Name: "Timeout",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Backup": []DocField{
|
"Backup": []DocField{
|
||||||
{
|
{
|
||||||
Name: "DisableMetadataLog",
|
Name: "DisableMetadataLog",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"BatchFeeConfig": []DocField{
|
"BatchFeeConfig": []DocField{
|
||||||
{
|
{
|
||||||
Name: "Base",
|
Name: "Base",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "PerSector",
|
Name: "PerSector",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Chainstore": []DocField{
|
"Chainstore": []DocField{
|
||||||
{
|
{
|
||||||
Name: "EnableSplitstore",
|
Name: "EnableSplitstore",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Splitstore",
|
Name: "Splitstore",
|
||||||
Type: "Splitstore",
|
Type: "Splitstore",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Client": []DocField{
|
"Client": []DocField{
|
||||||
{
|
{
|
||||||
Name: "UseIpfs",
|
Name: "UseIpfs",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "IpfsOnlineMode",
|
Name: "IpfsOnlineMode",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "IpfsMAddr",
|
Name: "IpfsMAddr",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "IpfsUseForRetrieval",
|
Name: "IpfsUseForRetrieval",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "SimultaneousTransfers",
|
Name: "SimultaneousTransfers",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Common": []DocField{
|
"Common": []DocField{
|
||||||
{
|
{
|
||||||
Name: "API",
|
Name: "API",
|
||||||
Type: "API",
|
Type: "API",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Backup",
|
Name: "Backup",
|
||||||
Type: "Backup",
|
Type: "Backup",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Libp2p",
|
Name: "Libp2p",
|
||||||
Type: "Libp2p",
|
Type: "Libp2p",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Pubsub",
|
Name: "Pubsub",
|
||||||
Type: "Pubsub",
|
Type: "Pubsub",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"DealmakingConfig": []DocField{
|
"DealmakingConfig": []DocField{
|
||||||
{
|
{
|
||||||
Name: "ConsiderOnlineStorageDeals",
|
Name: "ConsiderOnlineStorageDeals",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ConsiderOfflineStorageDeals",
|
Name: "ConsiderOfflineStorageDeals",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ConsiderOnlineRetrievalDeals",
|
Name: "ConsiderOnlineRetrievalDeals",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ConsiderOfflineRetrievalDeals",
|
Name: "ConsiderOfflineRetrievalDeals",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ConsiderVerifiedStorageDeals",
|
Name: "ConsiderVerifiedStorageDeals",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ConsiderUnverifiedStorageDeals",
|
Name: "ConsiderUnverifiedStorageDeals",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "PieceCidBlocklist",
|
Name: "PieceCidBlocklist",
|
||||||
Type: "[]cid.Cid",
|
Type: "[]cid.Cid",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ExpectedSealDuration",
|
Name: "ExpectedSealDuration",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxDealStartDelay",
|
Name: "MaxDealStartDelay",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: `Maximum amount of time proposed deal StartEpoch can be in future`,
|
Comment: `Maximum amount of time proposed deal StartEpoch can be in future`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "PublishMsgPeriod",
|
Name: "PublishMsgPeriod",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: `The amount of time to wait for more deals to arrive before
|
Comment: `The amount of time to wait for more deals to arrive before
|
||||||
publishing`,
|
publishing`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxDealsPerPublishMsg",
|
Name: "MaxDealsPerPublishMsg",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: `The maximum number of deals to include in a single PublishStorageDeals
|
Comment: `The maximum number of deals to include in a single PublishStorageDeals
|
||||||
message`,
|
message`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxProviderCollateralMultiplier",
|
Name: "MaxProviderCollateralMultiplier",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: `The maximum collateral that the provider will put up against a deal,
|
Comment: `The maximum collateral that the provider will put up against a deal,
|
||||||
as a multiplier of the minimum collateral bound`,
|
as a multiplier of the minimum collateral bound`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "SimultaneousTransfers",
|
Name: "SimultaneousTransfers",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: `The maximum number of parallel online data transfers (storage+retrieval)`,
|
Comment: `The maximum number of parallel online data transfers (storage+retrieval)`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Filter",
|
Name: "Filter",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "RetrievalFilter",
|
Name: "RetrievalFilter",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "RetrievalPricing",
|
Name: "RetrievalPricing",
|
||||||
Type: "*RetrievalPricing",
|
Type: "*RetrievalPricing",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"FeeConfig": []DocField{
|
"FeeConfig": []DocField{
|
||||||
{
|
{
|
||||||
Name: "DefaultMaxFee",
|
Name: "DefaultMaxFee",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"FullNode": []DocField{
|
"FullNode": []DocField{
|
||||||
{
|
{
|
||||||
Name: "Client",
|
Name: "Client",
|
||||||
Type: "Client",
|
Type: "Client",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Metrics",
|
Name: "Metrics",
|
||||||
Type: "Metrics",
|
Type: "Metrics",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Wallet",
|
Name: "Wallet",
|
||||||
Type: "Wallet",
|
Type: "Wallet",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Fees",
|
Name: "Fees",
|
||||||
Type: "FeeConfig",
|
Type: "FeeConfig",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Chainstore",
|
Name: "Chainstore",
|
||||||
Type: "Chainstore",
|
Type: "Chainstore",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Libp2p": []DocField{
|
"Libp2p": []DocField{
|
||||||
{
|
{
|
||||||
Name: "ListenAddresses",
|
Name: "ListenAddresses",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "AnnounceAddresses",
|
Name: "AnnounceAddresses",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "NoAnnounceAddresses",
|
Name: "NoAnnounceAddresses",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "BootstrapPeers",
|
Name: "BootstrapPeers",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ProtectedPeers",
|
Name: "ProtectedPeers",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ConnMgrLow",
|
Name: "ConnMgrLow",
|
||||||
Type: "uint",
|
Type: "uint",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ConnMgrHigh",
|
Name: "ConnMgrHigh",
|
||||||
Type: "uint",
|
Type: "uint",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ConnMgrGrace",
|
Name: "ConnMgrGrace",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Metrics": []DocField{
|
"Metrics": []DocField{
|
||||||
{
|
{
|
||||||
Name: "Nickname",
|
Name: "Nickname",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "HeadNotifs",
|
Name: "HeadNotifs",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"MinerAddressConfig": []DocField{
|
"MinerAddressConfig": []DocField{
|
||||||
{
|
{
|
||||||
Name: "PreCommitControl",
|
Name: "PreCommitControl",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "CommitControl",
|
Name: "CommitControl",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "TerminateControl",
|
Name: "TerminateControl",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "DealPublishControl",
|
Name: "DealPublishControl",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "DisableOwnerFallback",
|
Name: "DisableOwnerFallback",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: `DisableOwnerFallback disables usage of the owner address for messages
|
Comment: `DisableOwnerFallback disables usage of the owner address for messages
|
||||||
sent automatically`,
|
sent automatically`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "DisableWorkerFallback",
|
Name: "DisableWorkerFallback",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: `DisableWorkerFallback disables usage of the worker address for messages
|
Comment: `DisableWorkerFallback disables usage of the worker address for messages
|
||||||
sent automatically, if control addresses are configured.
|
sent automatically, if control addresses are configured.
|
||||||
A control address that doesn't have enough funds will still be chosen
|
A control address that doesn't have enough funds will still be chosen
|
||||||
@ -317,121 +317,121 @@ over the worker address if this flag is set.`,
|
|||||||
},
|
},
|
||||||
"MinerFeeConfig": []DocField{
|
"MinerFeeConfig": []DocField{
|
||||||
{
|
{
|
||||||
Name: "MaxPreCommitGasFee",
|
Name: "MaxPreCommitGasFee",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxCommitGasFee",
|
Name: "MaxCommitGasFee",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxPreCommitBatchGasFee",
|
Name: "MaxPreCommitBatchGasFee",
|
||||||
Type: "BatchFeeConfig",
|
Type: "BatchFeeConfig",
|
||||||
Comment: `maxBatchFee = maxBase + maxPerSector * nSectors`,
|
Comment: `maxBatchFee = maxBase + maxPerSector * nSectors`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxCommitBatchGasFee",
|
Name: "MaxCommitBatchGasFee",
|
||||||
Type: "BatchFeeConfig",
|
Type: "BatchFeeConfig",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxTerminateGasFee",
|
Name: "MaxTerminateGasFee",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxWindowPoStGasFee",
|
Name: "MaxWindowPoStGasFee",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxPublishDealsFee",
|
Name: "MaxPublishDealsFee",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxMarketBalanceAddFee",
|
Name: "MaxMarketBalanceAddFee",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"MinerSubsystemConfig": []DocField{
|
"MinerSubsystemConfig": []DocField{
|
||||||
{
|
{
|
||||||
Name: "EnableMining",
|
Name: "EnableMining",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "EnableSealing",
|
Name: "EnableSealing",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "EnableSectorStorage",
|
Name: "EnableSectorStorage",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "EnableMarkets",
|
Name: "EnableMarkets",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "SealerApiInfo",
|
Name: "SealerApiInfo",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "SectorIndexApiInfo",
|
Name: "SectorIndexApiInfo",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Pubsub": []DocField{
|
"Pubsub": []DocField{
|
||||||
{
|
{
|
||||||
Name: "Bootstrapper",
|
Name: "Bootstrapper",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "DirectPeers",
|
Name: "DirectPeers",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "IPColocationWhitelist",
|
Name: "IPColocationWhitelist",
|
||||||
Type: "[]string",
|
Type: "[]string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "RemoteTracer",
|
Name: "RemoteTracer",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"RetrievalPricing": []DocField{
|
"RetrievalPricing": []DocField{
|
||||||
{
|
{
|
||||||
Name: "Strategy",
|
Name: "Strategy",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Default",
|
Name: "Default",
|
||||||
Type: "*RetrievalPricingDefault",
|
Type: "*RetrievalPricingDefault",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "External",
|
Name: "External",
|
||||||
Type: "*RetrievalPricingExternal",
|
Type: "*RetrievalPricingExternal",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"RetrievalPricingDefault": []DocField{
|
"RetrievalPricingDefault": []DocField{
|
||||||
{
|
{
|
||||||
Name: "VerifiedDealsFreeTransfer",
|
Name: "VerifiedDealsFreeTransfer",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: `VerifiedDealsFreeTransfer configures zero fees for data transfer for a retrieval deal
|
Comment: `VerifiedDealsFreeTransfer configures zero fees for data transfer for a retrieval deal
|
||||||
of a payloadCid that belongs to a verified storage deal.
|
of a payloadCid that belongs to a verified storage deal.
|
||||||
This parameter is ONLY applicable if the retrieval pricing policy strategy has been configured to "default".
|
This parameter is ONLY applicable if the retrieval pricing policy strategy has been configured to "default".
|
||||||
@ -440,193 +440,193 @@ default value is true`,
|
|||||||
},
|
},
|
||||||
"RetrievalPricingExternal": []DocField{
|
"RetrievalPricingExternal": []DocField{
|
||||||
{
|
{
|
||||||
Name: "Path",
|
Name: "Path",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: `Path of the external script that will be run to price a retrieval deal.
|
Comment: `Path of the external script that will be run to price a retrieval deal.
|
||||||
This parameter is ONLY applicable if the retrieval pricing policy strategy has been configured to "external".`,
|
This parameter is ONLY applicable if the retrieval pricing policy strategy has been configured to "external".`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"SealingConfig": []DocField{
|
"SealingConfig": []DocField{
|
||||||
{
|
{
|
||||||
Name: "MaxWaitDealsSectors",
|
Name: "MaxWaitDealsSectors",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: `0 = no limit`,
|
Comment: `0 = no limit`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxSealingSectors",
|
Name: "MaxSealingSectors",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: `includes failed, 0 = no limit`,
|
Comment: `includes failed, 0 = no limit`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxSealingSectorsForDeals",
|
Name: "MaxSealingSectorsForDeals",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: `includes failed, 0 = no limit`,
|
Comment: `includes failed, 0 = no limit`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "WaitDealsDelay",
|
Name: "WaitDealsDelay",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "AlwaysKeepUnsealedCopy",
|
Name: "AlwaysKeepUnsealedCopy",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "FinalizeEarly",
|
Name: "FinalizeEarly",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: `Run sector finalization before submitting sector proof to the chain`,
|
Comment: `Run sector finalization before submitting sector proof to the chain`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "CollateralFromMinerBalance",
|
Name: "CollateralFromMinerBalance",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: `Whether to use available miner balance for sector collateral instead of sending it with each message`,
|
Comment: `Whether to use available miner balance for sector collateral instead of sending it with each message`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "AvailableBalanceBuffer",
|
Name: "AvailableBalanceBuffer",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: `Minimum available balance to keep in the miner actor before sending it with messages`,
|
Comment: `Minimum available balance to keep in the miner actor before sending it with messages`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "DisableCollateralFallback",
|
Name: "DisableCollateralFallback",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: `Don't send collateral with messages even if there is no available balance in the miner actor`,
|
Comment: `Don't send collateral with messages even if there is no available balance in the miner actor`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "BatchPreCommits",
|
Name: "BatchPreCommits",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: `enable / disable precommit batching (takes effect after nv13)`,
|
Comment: `enable / disable precommit batching (takes effect after nv13)`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxPreCommitBatch",
|
Name: "MaxPreCommitBatch",
|
||||||
Type: "int",
|
Type: "int",
|
||||||
Comment: `maximum precommit batch size - batches will be sent immediately above this size`,
|
Comment: `maximum precommit batch size - batches will be sent immediately above this size`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "PreCommitBatchWait",
|
Name: "PreCommitBatchWait",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: `how long to wait before submitting a batch after crossing the minimum batch size`,
|
Comment: `how long to wait before submitting a batch after crossing the minimum batch size`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "PreCommitBatchSlack",
|
Name: "PreCommitBatchSlack",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: `time buffer for forceful batch submission before sectors/deal in batch would start expiring`,
|
Comment: `time buffer for forceful batch submission before sectors/deal in batch would start expiring`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "AggregateCommits",
|
Name: "AggregateCommits",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: `enable / disable commit aggregation (takes effect after nv13)`,
|
Comment: `enable / disable commit aggregation (takes effect after nv13)`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MinCommitBatch",
|
Name: "MinCommitBatch",
|
||||||
Type: "int",
|
Type: "int",
|
||||||
Comment: `maximum batched commit size - batches will be sent immediately above this size`,
|
Comment: `maximum batched commit size - batches will be sent immediately above this size`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MaxCommitBatch",
|
Name: "MaxCommitBatch",
|
||||||
Type: "int",
|
Type: "int",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "CommitBatchWait",
|
Name: "CommitBatchWait",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: `how long to wait before submitting a batch after crossing the minimum batch size`,
|
Comment: `how long to wait before submitting a batch after crossing the minimum batch size`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "CommitBatchSlack",
|
Name: "CommitBatchSlack",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: `time buffer for forceful batch submission before sectors/deals in batch would start expiring`,
|
Comment: `time buffer for forceful batch submission before sectors/deals in batch would start expiring`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "AggregateAboveBaseFee",
|
Name: "AggregateAboveBaseFee",
|
||||||
Type: "types.FIL",
|
Type: "types.FIL",
|
||||||
Comment: `network BaseFee below which to stop doing commit aggregation, instead
|
Comment: `network BaseFee below which to stop doing commit aggregation, instead
|
||||||
submitting proofs to the chain individually`,
|
submitting proofs to the chain individually`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "TerminateBatchMax",
|
Name: "TerminateBatchMax",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "TerminateBatchMin",
|
Name: "TerminateBatchMin",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "TerminateBatchWait",
|
Name: "TerminateBatchWait",
|
||||||
Type: "Duration",
|
Type: "Duration",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Splitstore": []DocField{
|
"Splitstore": []DocField{
|
||||||
{
|
{
|
||||||
Name: "ColdStoreType",
|
Name: "ColdStoreType",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "HotStoreType",
|
Name: "HotStoreType",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MarkSetType",
|
Name: "MarkSetType",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "HotStoreMessageRetention",
|
Name: "HotStoreMessageRetention",
|
||||||
Type: "uint64",
|
Type: "uint64",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"StorageMiner": []DocField{
|
"StorageMiner": []DocField{
|
||||||
{
|
{
|
||||||
Name: "Subsystems",
|
Name: "Subsystems",
|
||||||
Type: "MinerSubsystemConfig",
|
Type: "MinerSubsystemConfig",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Dealmaking",
|
Name: "Dealmaking",
|
||||||
Type: "DealmakingConfig",
|
Type: "DealmakingConfig",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Sealing",
|
Name: "Sealing",
|
||||||
Type: "SealingConfig",
|
Type: "SealingConfig",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Storage",
|
Name: "Storage",
|
||||||
Type: "sectorstorage.SealerConfig",
|
Type: "sectorstorage.SealerConfig",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Fees",
|
Name: "Fees",
|
||||||
Type: "MinerFeeConfig",
|
Type: "MinerFeeConfig",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Addresses",
|
Name: "Addresses",
|
||||||
Type: "MinerAddressConfig",
|
Type: "MinerAddressConfig",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Wallet": []DocField{
|
"Wallet": []DocField{
|
||||||
{
|
{
|
||||||
Name: "RemoteBackend",
|
Name: "RemoteBackend",
|
||||||
Type: "string",
|
Type: "string",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "EnableLedger",
|
Name: "EnableLedger",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "DisableLocal",
|
Name: "DisableLocal",
|
||||||
Type: "bool",
|
Type: "bool",
|
||||||
Comment: ``,
|
Comment: ``,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
44
node/config/doc_util.go
Normal file
44
node/config/doc_util.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
func findDoc(root interface{}, section, name string) *DocField {
|
||||||
|
rt := fmt.Sprintf("%T", root)[len("*config."):]
|
||||||
|
|
||||||
|
doc := findDocSect(rt, section, name)
|
||||||
|
if doc != nil {
|
||||||
|
return doc
|
||||||
|
}
|
||||||
|
|
||||||
|
return findDocSect("Common", section, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
func findDocSect(root string, section, name string) *DocField {
|
||||||
|
path := strings.Split(section, ".")
|
||||||
|
|
||||||
|
docSection := Doc[root]
|
||||||
|
for _, e := range path {
|
||||||
|
if docSection == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, field := range docSection {
|
||||||
|
if field.Name == e {
|
||||||
|
docSection = Doc[field.Type]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, df := range docSection {
|
||||||
|
if df.Name == name {
|
||||||
|
return &df
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
@ -86,7 +86,7 @@ func ConfigUpdate(cfgCur, cfgDef interface{}, comment bool) ([]byte, error) {
|
|||||||
nodeLines := strings.Split(nodeStr, "\n")
|
nodeLines := strings.Split(nodeStr, "\n")
|
||||||
var outLines []string
|
var outLines []string
|
||||||
|
|
||||||
sectionRx := regexp.MustCompile(`[\[.]([^.]+)]`)
|
sectionRx := regexp.MustCompile(`\[(.+)]`)
|
||||||
var section string
|
var section string
|
||||||
|
|
||||||
for i, line := range nodeLines {
|
for i, line := range nodeLines {
|
||||||
@ -106,30 +106,24 @@ func ConfigUpdate(cfgCur, cfgDef interface{}, comment bool) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pad := strings.Repeat(" ", len(line) - len(strings.TrimLeftFunc(line, unicode.IsSpace)))
|
pad := strings.Repeat(" ", len(line)-len(strings.TrimLeftFunc(line, unicode.IsSpace)))
|
||||||
|
|
||||||
// see if we have docs for this field
|
// see if we have docs for this field
|
||||||
{
|
{
|
||||||
lf := strings.Fields(line)
|
lf := strings.Fields(line)
|
||||||
if len(lf) > 1 {
|
if len(lf) > 1 {
|
||||||
var doc *DocField
|
doc := findDoc(cfgCur, section, lf[0])
|
||||||
for _, df := range Doc[section] {
|
|
||||||
if df.Name == lf[0] {
|
|
||||||
doc = &df
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if doc != nil {
|
if doc != nil {
|
||||||
// found docfield, emit doc comment
|
// found docfield, emit doc comment
|
||||||
if len(doc.Comment) > 0 {
|
if len(doc.Comment) > 0 {
|
||||||
for _, docLine := range strings.Split(doc.Comment, "\n") {
|
for _, docLine := range strings.Split(doc.Comment, "\n") {
|
||||||
outLines = append(outLines, pad + "# " + docLine)
|
outLines = append(outLines, pad+"# "+docLine)
|
||||||
}
|
}
|
||||||
outLines = append(outLines, pad + "#")
|
outLines = append(outLines, pad+"#")
|
||||||
}
|
}
|
||||||
|
|
||||||
outLines = append(outLines, pad + "# type: " + doc.Type)
|
outLines = append(outLines, pad+"# type: "+doc.Type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user