Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - Variables
 - func ConfigComment(t interface{}) ([]byte, error)
 - func ConfigUpdate(cfgCur, cfgDef interface{}, comment bool) ([]byte, error)
 - func FromFile(path string, def interface{}) (interface{}, error)
 - func FromReader(reader io.Reader, def interface{}) (interface{}, error)
 - func StorageFromFile(path string, def *stores.StorageConfig) (*stores.StorageConfig, error)
 - func StorageFromReader(reader io.Reader) (*stores.StorageConfig, error)
 - func WriteStorageFile(path string, config stores.StorageConfig) error
 - type Backup
 - type Boost
 - type Common
 - type DealmakingConfig
 - type DocField
 - type Duration
 - type LotusDealmakingConfig
 - type WalletsConfig
 
Constants ¶
      View Source
      
  
const ( // RetrievalPricingDefault configures the node to use the default retrieval pricing policy. RetrievalPricingDefaultMode = "default" // RetrievalPricingExternal configures the node to use the external retrieval pricing script // configured by the user. RetrievalPricingExternalMode = "external" )
Variables ¶
      View Source
      
  
    var DefaultDefaultMaxFee = types.MustParseFIL("0.07")
    
      View Source
      
  
    var DefaultSimultaneousTransfers = uint64(20)
    
      View Source
      
  
    var Doc = map[string][]DocField{ "Backup": []DocField{ { Name: "DisableMetadataLog", Type: "bool", Comment: `Note that in case of metadata corruption it might be much harder to recover your node if metadata log is disabled`, }, }, "Boost": []DocField{ { Name: "Storage", Type: "lotus_config.SealerConfig", Comment: ``, }, { Name: "SealerApiInfo", Type: "string", Comment: ``, }, { Name: "SectorIndexApiInfo", Type: "string", Comment: ``, }, { Name: "Dealmaking", Type: "DealmakingConfig", Comment: ``, }, { Name: "Wallets", Type: "WalletsConfig", Comment: ``, }, { Name: "LotusDealmaking", Type: "lotus_config.DealmakingConfig", Comment: `Lotus configs`, }, { Name: "LotusFees", Type: "lotus_config.MinerFeeConfig", Comment: ``, }, { Name: "DAGStore", Type: "lotus_config.DAGStoreConfig", Comment: ``, }, { Name: "IndexProvider", Type: "lotus_config.IndexProviderConfig", Comment: ``, }, }, "Common": []DocField{ { Name: "API", Type: "lotus_config.API", Comment: ``, }, { Name: "Backup", Type: "lotus_config.Backup", Comment: ``, }, { Name: "Libp2p", Type: "lotus_config.Libp2p", Comment: ``, }, { Name: "Pubsub", Type: "lotus_config.Pubsub", Comment: ``, }, }, "DealmakingConfig": []DocField{ { Name: "ConsiderOnlineStorageDeals", Type: "bool", Comment: `When enabled, the miner can accept online deals`, }, { Name: "ConsiderOfflineStorageDeals", Type: "bool", Comment: `When enabled, the miner can accept offline deals`, }, { Name: "ConsiderOnlineRetrievalDeals", Type: "bool", Comment: `When enabled, the miner can accept retrieval deals`, }, { Name: "ConsiderOfflineRetrievalDeals", Type: "bool", Comment: `When enabled, the miner can accept offline retrieval deals`, }, { Name: "ConsiderVerifiedStorageDeals", Type: "bool", Comment: `When enabled, the miner can accept verified deals`, }, { Name: "ConsiderUnverifiedStorageDeals", Type: "bool", Comment: `When enabled, the miner can accept unverified deals`, }, { Name: "PieceCidBlocklist", Type: "[]cid.Cid", Comment: `A list of Data CIDs to reject when making deals`, }, { Name: "ExpectedSealDuration", Type: "Duration", Comment: `Maximum expected amount of time getting the deal into a sealed sector will take This includes the time the deal will need to get transferred and published before being assigned to a sector`, }, { Name: "MaxDealStartDelay", Type: "Duration", Comment: `Maximum amount of time proposed deal StartEpoch can be in future`, }, { Name: "PublishMsgPeriod", Type: "Duration", Comment: `When a deal is ready to publish, the amount of time to wait for more deals to be ready to publish before publishing them all as a batch`, }, { Name: "PublishMsgMaxDealsPerMsg", Type: "uint64", Comment: `The maximum number of deals to include in a single PublishStorageDeals message`, }, { Name: "PublishMsgMaxFee", Type: "types.FIL", Comment: `The maximum network fees to pay when sending the PublishStorageDeals message`, }, { Name: "MaxProviderCollateralMultiplier", Type: "uint64", Comment: `The maximum collateral that the provider will put up against a deal, as a multiplier of the minimum collateral bound`, }, { Name: "MaxStagingDealsBytes", Type: "int64", Comment: `The maximum allowed disk usage size in bytes of staging deals not yet passed to the sealing node by the markets service. 0 is unlimited.`, }, { Name: "SimultaneousTransfersForStorage", Type: "uint64", Comment: `The maximum number of parallel online data transfers for storage deals`, }, { Name: "SimultaneousTransfersForRetrieval", Type: "uint64", Comment: `The maximum number of parallel online data transfers for retrieval deals`, }, { Name: "StartEpochSealingBuffer", Type: "uint64", Comment: `Minimum start epoch buffer to give time for sealing of sector with deal.`, }, { Name: "Filter", Type: "string", Comment: `A command used for fine-grained evaluation of storage deals see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details`, }, { Name: "RetrievalFilter", Type: "string", Comment: `A command used for fine-grained evaluation of retrieval deals see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details`, }, { Name: "RetrievalPricing", Type: "*lotus_config.RetrievalPricing", Comment: ``, }, }, "LotusDealmakingConfig": []DocField{ { Name: "PieceCidBlocklist", Type: "[]cid.Cid", Comment: `A list of Data CIDs to reject when making deals`, }, { Name: "ExpectedSealDuration", Type: "Duration", Comment: `Maximum expected amount of time getting the deal into a sealed sector will take This includes the time the deal will need to get transferred and published before being assigned to a sector`, }, { Name: "MaxDealStartDelay", Type: "Duration", Comment: `Maximum amount of time proposed deal StartEpoch can be in future`, }, { Name: "PublishMsgPeriod", Type: "Duration", Comment: `When a deal is ready to publish, the amount of time to wait for more deals to be ready to publish before publishing them all as a batch`, }, { Name: "MaxDealsPerPublishMsg", Type: "uint64", Comment: `The maximum number of deals to include in a single PublishStorageDeals message`, }, { Name: "MaxProviderCollateralMultiplier", Type: "uint64", Comment: `The maximum collateral that the provider will put up against a deal, as a multiplier of the minimum collateral bound`, }, { Name: "MaxStagingDealsBytes", Type: "int64", Comment: `The maximum allowed disk usage size in bytes of staging deals not yet passed to the sealing node by the markets service. 0 is unlimited.`, }, { Name: "SimultaneousTransfersForStorage", Type: "uint64", Comment: `The maximum number of parallel online data transfers for storage deals`, }, { Name: "SimultaneousTransfersForStoragePerClient", Type: "uint64", Comment: `The maximum number of simultaneous data transfers from any single client for storage deals. Unset by default (0), and values higher than SimultaneousTransfersForStorage will have no effect; i.e. the total number of simultaneous data transfers across all storage clients is bound by SimultaneousTransfersForStorage regardless of this number.`, }, { Name: "SimultaneousTransfersForRetrieval", Type: "uint64", Comment: `The maximum number of parallel online data transfers for retrieval deals`, }, { Name: "StartEpochSealingBuffer", Type: "uint64", Comment: `Minimum start epoch buffer to give time for sealing of sector with deal.`, }, { Name: "Filter", Type: "string", Comment: `A command used for fine-grained evaluation of storage deals see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details`, }, { Name: "RetrievalFilter", Type: "string", Comment: `A command used for fine-grained evaluation of retrieval deals see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details`, }, { Name: "RetrievalPricing", Type: "*lotus_config.RetrievalPricing", Comment: ``, }, }, "WalletsConfig": []DocField{ { Name: "Miner", Type: "string", Comment: `The "owner" address of the miner`, }, { Name: "PublishStorageDeals", Type: "string", Comment: `The wallet used to send PublishStorageDeals messages. Must be a control or worker address of the miner.`, }, { Name: "PledgeCollateral", Type: "string", Comment: `The wallet used as the source for pledge collateral`, }, }, }
      View Source
      
  var MaxTraversalLinks uint64 = 32 * (1 << 20)
    MaxTraversalLinks configures the maximum number of links to traverse in a DAG while calculating CommP and traversing a DAG with graphsync; invokes a budget on DAG depth and density.
Functions ¶
func ConfigComment ¶
func ConfigUpdate ¶
func FromFile ¶
FromFile loads config from a specified file overriding defaults specified in the def parameter. If file does not exist or is empty defaults are assumed.
func FromReader ¶
FromReader loads config from a reader instance.
func StorageFromFile ¶
func StorageFromFile(path string, def *stores.StorageConfig) (*stores.StorageConfig, error)
func StorageFromReader ¶
func StorageFromReader(reader io.Reader) (*stores.StorageConfig, error)
func WriteStorageFile ¶
func WriteStorageFile(path string, config stores.StorageConfig) error
Types ¶
type Backup ¶
type Backup struct {
	// When set to true disables metadata log (.lotus/kvlog). This can save disk
	// space by reducing metadata redundancy.
	//
	// Note that in case of metadata corruption it might be much harder to recover
	// your node if metadata log is disabled
	DisableMetadataLog bool
}
    type Boost ¶
type Boost struct {
	Common
	Storage            lotus_config.SealerConfig
	SealerApiInfo      string
	SectorIndexApiInfo string
	Dealmaking         DealmakingConfig
	Wallets            WalletsConfig
	// Lotus configs
	LotusDealmaking lotus_config.DealmakingConfig
	LotusFees       lotus_config.MinerFeeConfig
	DAGStore        lotus_config.DAGStoreConfig
	IndexProvider   lotus_config.IndexProviderConfig
}
    Boost is a boost service config
func DefaultBoost ¶
func DefaultBoost() *Boost
func (*Boost) GetDealmakingConfig ¶
func (b *Boost) GetDealmakingConfig() lotus_config.DealmakingConfig
func (*Boost) SetDealmakingConfig ¶
func (b *Boost) SetDealmakingConfig(other lotus_config.DealmakingConfig)
func (*Boost) StorageManager ¶
func (c *Boost) StorageManager() sectorstorage.Config
Convert boost config to sectorstorage.Config
type Common ¶
type Common struct {
	API    lotus_config.API
	Backup lotus_config.Backup
	Libp2p lotus_config.Libp2p
	Pubsub lotus_config.Pubsub
}
    Common is common config between full node and miner
type DealmakingConfig ¶
type DealmakingConfig struct {
	// When enabled, the miner can accept online deals
	ConsiderOnlineStorageDeals bool
	// When enabled, the miner can accept offline deals
	ConsiderOfflineStorageDeals bool
	// When enabled, the miner can accept retrieval deals
	ConsiderOnlineRetrievalDeals bool
	// When enabled, the miner can accept offline retrieval deals
	ConsiderOfflineRetrievalDeals bool
	// When enabled, the miner can accept verified deals
	ConsiderVerifiedStorageDeals bool
	// When enabled, the miner can accept unverified deals
	ConsiderUnverifiedStorageDeals bool
	// A list of Data CIDs to reject when making deals
	PieceCidBlocklist []cid.Cid
	// Maximum expected amount of time getting the deal into a sealed sector will take
	// This includes the time the deal will need to get transferred and published
	// before being assigned to a sector
	ExpectedSealDuration Duration
	// Maximum amount of time proposed deal StartEpoch can be in future
	MaxDealStartDelay Duration
	// When a deal is ready to publish, the amount of time to wait for more
	// deals to be ready to publish before publishing them all as a batch
	PublishMsgPeriod Duration
	// The maximum number of deals to include in a single PublishStorageDeals
	// message
	PublishMsgMaxDealsPerMsg uint64
	// The maximum network fees to pay when sending the PublishStorageDeals message
	PublishMsgMaxFee types.FIL
	// The maximum collateral that the provider will put up against a deal,
	// as a multiplier of the minimum collateral bound
	MaxProviderCollateralMultiplier uint64
	// The maximum allowed disk usage size in bytes of staging deals not yet
	// passed to the sealing node by the markets service. 0 is unlimited.
	MaxStagingDealsBytes int64
	// The maximum number of parallel online data transfers for storage deals
	SimultaneousTransfersForStorage uint64
	// The maximum number of parallel online data transfers for retrieval deals
	SimultaneousTransfersForRetrieval uint64
	// Minimum start epoch buffer to give time for sealing of sector with deal.
	StartEpochSealingBuffer uint64
	// A command used for fine-grained evaluation of storage deals
	// see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details
	Filter string
	// A command used for fine-grained evaluation of retrieval deals
	// see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details
	RetrievalFilter string
	RetrievalPricing *lotus_config.RetrievalPricing
}
    type Duration ¶
Duration is a wrapper type for time.Duration for decoding and encoding from/to TOML
func (Duration) MarshalText ¶
func (*Duration) UnmarshalText ¶
UnmarshalText implements interface for TOML decoding
type LotusDealmakingConfig ¶
type LotusDealmakingConfig struct {
	// A list of Data CIDs to reject when making deals
	PieceCidBlocklist []cid.Cid
	// Maximum expected amount of time getting the deal into a sealed sector will take
	// This includes the time the deal will need to get transferred and published
	// before being assigned to a sector
	ExpectedSealDuration Duration
	// Maximum amount of time proposed deal StartEpoch can be in future
	MaxDealStartDelay Duration
	// When a deal is ready to publish, the amount of time to wait for more
	// deals to be ready to publish before publishing them all as a batch
	PublishMsgPeriod Duration
	// The maximum number of deals to include in a single PublishStorageDeals
	// message
	MaxDealsPerPublishMsg uint64
	// The maximum collateral that the provider will put up against a deal,
	// as a multiplier of the minimum collateral bound
	MaxProviderCollateralMultiplier uint64
	// The maximum allowed disk usage size in bytes of staging deals not yet
	// passed to the sealing node by the markets service. 0 is unlimited.
	MaxStagingDealsBytes int64
	// The maximum number of parallel online data transfers for storage deals
	SimultaneousTransfersForStorage uint64
	// The maximum number of simultaneous data transfers from any single client
	// for storage deals.
	// Unset by default (0), and values higher than SimultaneousTransfersForStorage
	// will have no effect; i.e. the total number of simultaneous data transfers
	// across all storage clients is bound by SimultaneousTransfersForStorage
	// regardless of this number.
	SimultaneousTransfersForStoragePerClient uint64
	// The maximum number of parallel online data transfers for retrieval deals
	SimultaneousTransfersForRetrieval uint64
	// Minimum start epoch buffer to give time for sealing of sector with deal.
	StartEpochSealingBuffer uint64
	// A command used for fine-grained evaluation of storage deals
	// see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details
	Filter string
	// A command used for fine-grained evaluation of retrieval deals
	// see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details
	RetrievalFilter string
	RetrievalPricing *lotus_config.RetrievalPricing
}
    type WalletsConfig ¶
 Click to show internal directories. 
   Click to hide internal directories.