Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigComment(t interface{}) ([]byte, error)
- func ConfigUpdate(cfgCur, cfgDef interface{}, opts ...UpdateCfgOpt) ([]byte, error)
- func DefaultDefaultMaxFee() types.FIL
- func FromFile(path string, opts ...LoadCfgOpt) (interface{}, error)
- func FromReader(reader io.Reader, def interface{}, opts ...LoadCfgOpt) (interface{}, error)
- func MatchEnableSplitstoreField(s string) bool
- func NoDefaultForSplitstoreTransition() error
- func ValidateSplitstoreSet(cfgRaw string) error
- type API
- type ApisConfig
- type Backup
- type BatchFeeConfig
- type Common
- type CurioAddresses
- type CurioAlertingConfig
- type CurioConfig
- type CurioFees
- type CurioIngestConfig
- type CurioProvingConfig
- type CurioSealConfig
- type CurioSubsystemsConfig
- type DAGStoreConfig
- type DealmakingConfig
- type DocField
- type Duration
- type HarmonyDB
- type IndexProviderConfig
- type Libp2p
- type LoadCfgOpt
- type Logging
- type MinerAddressConfig
- type MinerFeeConfig
- type MinerSubsystemConfig
- type PagerDutyConfig
- type PrometheusAlertManagerConfig
- type ProvingConfig
- type Pubsub
- type ResourceFilteringStrategy
- type RetrievalPricing
- type RetrievalPricingDefault
- type RetrievalPricingExternal
- type SealerConfig
- type SealingConfig
- type SlackWebhookConfig
- type StorageMiner
- type UpdateCfgOpt
Constants ¶
const ( // ResourceFilteringHardware specifies that available hardware resources // should be evaluated when scheduling a task against the worker. ResourceFilteringHardware = ResourceFilteringStrategy("hardware") // ResourceFilteringDisabled disables resource filtering against this // worker. The scheduler may assign any task to this worker. ResourceFilteringDisabled = ResourceFilteringStrategy("disabled") )
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 ¶
var DefaultSimultaneousTransfers = uint64(20)
var Doc = map[string][]DocField{
"ApisConfig": {
{
Name: "ChainApiInfo",
Type: "[]string",
Comment: `ChainApiInfo is the API endpoint for the Lotus daemon.`,
},
{
Name: "StorageRPCSecret",
Type: "string",
Comment: `Chain API auth secret for the Curio nodes to use.`,
},
},
"BatchFeeConfig": {
{
Name: "Base",
Type: "types.FIL",
Comment: ``,
},
{
Name: "PerSector",
Type: "types.FIL",
Comment: ``,
},
},
"CurioAddresses": {
{
Name: "PreCommitControl",
Type: "[]string",
Comment: `Addresses to send PreCommit messages from`,
},
{
Name: "CommitControl",
Type: "[]string",
Comment: `Addresses to send Commit messages from`,
},
{
Name: "TerminateControl",
Type: "[]string",
Comment: ``,
},
{
Name: "DisableOwnerFallback",
Type: "bool",
Comment: `DisableOwnerFallback disables usage of the owner address for messages
sent automatically`,
},
{
Name: "DisableWorkerFallback",
Type: "bool",
Comment: `DisableWorkerFallback disables usage of the worker address for messages
sent automatically, if control addresses are configured.
A control address that doesn't have enough funds will still be chosen
over the worker address if this flag is set.`,
},
{
Name: "MinerAddresses",
Type: "[]string",
Comment: `MinerAddresses are the addresses of the miner actors to use for sending messages`,
},
},
"CurioAlertingConfig": {
{
Name: "MinimumWalletBalance",
Type: "types.FIL",
Comment: `MinimumWalletBalance is the minimum balance all active wallets. If the balance is below this value, an
alerts will be triggered for the wallet`,
},
{
Name: "PagerDuty",
Type: "PagerDutyConfig",
Comment: `PagerDutyConfig is the configuration for the PagerDuty alerting integration.`,
},
{
Name: "PrometheusAlertManager",
Type: "PrometheusAlertManagerConfig",
Comment: `PrometheusAlertManagerConfig is the configuration for the Prometheus AlertManager alerting integration.`,
},
{
Name: "SlackWebhook",
Type: "SlackWebhookConfig",
Comment: `SlackWebhookConfig is a configuration type for Slack webhook integration.`,
},
},
"CurioConfig": {
{
Name: "Subsystems",
Type: "CurioSubsystemsConfig",
Comment: ``,
},
{
Name: "Fees",
Type: "CurioFees",
Comment: ``,
},
{
Name: "Addresses",
Type: "[]CurioAddresses",
Comment: `Addresses of wallets per MinerAddress (one of the fields).`,
},
{
Name: "Proving",
Type: "CurioProvingConfig",
Comment: ``,
},
{
Name: "Ingest",
Type: "CurioIngestConfig",
Comment: ``,
},
{
Name: "Seal",
Type: "CurioSealConfig",
Comment: ``,
},
{
Name: "Apis",
Type: "ApisConfig",
Comment: ``,
},
{
Name: "Alerting",
Type: "CurioAlertingConfig",
Comment: ``,
},
},
"CurioFees": {
{
Name: "DefaultMaxFee",
Type: "types.FIL",
Comment: ``,
},
{
Name: "MaxPreCommitGasFee",
Type: "types.FIL",
Comment: ``,
},
{
Name: "MaxCommitGasFee",
Type: "types.FIL",
Comment: ``,
},
{
Name: "MaxPreCommitBatchGasFee",
Type: "BatchFeeConfig",
Comment: `maxBatchFee = maxBase + maxPerSector * nSectors`,
},
{
Name: "MaxCommitBatchGasFee",
Type: "BatchFeeConfig",
Comment: ``,
},
{
Name: "MaxTerminateGasFee",
Type: "types.FIL",
Comment: ``,
},
{
Name: "MaxWindowPoStGasFee",
Type: "types.FIL",
Comment: `WindowPoSt is a high-value operation, so the default fee should be high.`,
},
{
Name: "MaxPublishDealsFee",
Type: "types.FIL",
Comment: ``,
},
{
Name: "CollateralFromMinerBalance",
Type: "bool",
Comment: `Whether to use available miner balance for sector collateral instead of sending it with each message`,
},
{
Name: "DisableCollateralFallback",
Type: "bool",
Comment: `Don't send collateral with messages even if there is no available balance in the miner actor`,
},
},
"CurioIngestConfig": {
{
Name: "MaxQueueDealSector",
Type: "int",
Comment: `Maximum number of sectors that can be queued waiting for deals to start processing.
0 = unlimited
Note: This mechanism will delay taking deal data from markets, providing backpressure to the market subsystem.
The DealSector queue includes deals which are ready to enter the sealing pipeline but are not yet part of it -
size of this queue will also impact the maximum number of ParkPiece tasks which can run concurrently.
DealSector queue is the first queue in the sealing pipeline, meaning that it should be used as the primary backpressure mechanism.`,
},
{
Name: "MaxQueueSDR",
Type: "int",
Comment: `Maximum number of sectors that can be queued waiting for SDR to start processing.
0 = unlimited
Note: This mechanism will delay taking deal data from markets, providing backpressure to the market subsystem.
The SDR queue includes deals which are in the process of entering the sealing pipeline. In case of the SDR tasks it is
possible that this queue grows more than this limit(CC sectors), the backpressure is only applied to sectors
entering the pipeline.
Only applies to PoRep pipeline (DoSnap = false)`,
},
{
Name: "MaxQueueTrees",
Type: "int",
Comment: `Maximum number of sectors that can be queued waiting for SDRTrees to start processing.
0 = unlimited
Note: This mechanism will delay taking deal data from markets, providing backpressure to the market subsystem.
In case of the trees tasks it is possible that this queue grows more than this limit, the backpressure is only
applied to sectors entering the pipeline.
Only applies to PoRep pipeline (DoSnap = false)`,
},
{
Name: "MaxQueuePoRep",
Type: "int",
Comment: `Maximum number of sectors that can be queued waiting for PoRep to start processing.
0 = unlimited
Note: This mechanism will delay taking deal data from markets, providing backpressure to the market subsystem.
Like with the trees tasks, it is possible that this queue grows more than this limit, the backpressure is only
applied to sectors entering the pipeline.
Only applies to PoRep pipeline (DoSnap = false)`,
},
{
Name: "MaxQueueSnapEncode",
Type: "int",
Comment: `MaxQueueSnapEncode is the maximum number of sectors that can be queued waiting for UpdateEncode to start processing.
0 means unlimited.
This applies backpressure to the market subsystem by delaying the ingestion of deal data.
Only applies to the Snap Deals pipeline (DoSnap = true).`,
},
{
Name: "MaxQueueSnapProve",
Type: "int",
Comment: `MaxQueueSnapProve is the maximum number of sectors that can be queued waiting for UpdateProve to start processing.
0 means unlimited.
This applies backpressure to the market subsystem by delaying the ingestion of deal data.
Only applies to the Snap Deals pipeline (DoSnap = true).`,
},
{
Name: "MaxDealWaitTime",
Type: "Duration",
Comment: `Maximum time an open deal sector should wait for more deal before it starts sealing`,
},
{
Name: "DoSnap",
Type: "bool",
Comment: `DoSnap enables the snap deal process for deals ingested by this instance. Unlike in lotus-miner there is no
fallback to porep when no sectors are available to snap into. When enabled all deals will be snap deals.`,
},
},
"CurioProvingConfig": {
{
Name: "ParallelCheckLimit",
Type: "int",
Comment: `Maximum number of sector checks to run in parallel. (0 = unlimited)
WARNING: Setting this value too high may make the node crash by running out of stack
WARNING: Setting this value too low may make sector challenge reading much slower, resulting in failed PoSt due
to late submission.
After changing this option, confirm that the new value works in your setup by invoking
'curio test wd task 0'`,
},
{
Name: "SingleCheckTimeout",
Type: "Duration",
Comment: `Maximum amount of time a proving pre-check can take for a sector. If the check times out the sector will be skipped
WARNING: Setting this value too low risks in sectors being skipped even though they are accessible, just reading the
test challenge took longer than this timeout
WARNING: Setting this value too high risks missing PoSt deadline in case IO operations related to this sector are
blocked (e.g. in case of disconnected NFS mount)`,
},
{
Name: "PartitionCheckTimeout",
Type: "Duration",
Comment: `Maximum amount of time a proving pre-check can take for an entire partition. If the check times out, sectors in
the partition which didn't get checked on time will be skipped
WARNING: Setting this value too low risks in sectors being skipped even though they are accessible, just reading the
test challenge took longer than this timeout
WARNING: Setting this value too high risks missing PoSt deadline in case IO operations related to this partition are
blocked or slow`,
},
},
"CurioSealConfig": {
{
Name: "BatchSealSectorSize",
Type: "string",
Comment: `BatchSealSectorSize Allows setting the sector size supported by the batch seal task.
Can be any value as long as it is "32GiB".`,
},
{
Name: "BatchSealBatchSize",
Type: "int",
Comment: `Number of sectors in a seal batch. Depends on hardware and supraseal configuration.`,
},
{
Name: "BatchSealPipelines",
Type: "int",
Comment: `Number of parallel pipelines. Can be 1 or 2. Depends on available raw block storage`,
},
{
Name: "SingleHasherPerThread",
Type: "bool",
Comment: `SingleHasherPerThread is a compatibility flag for older CPUs. Zen3 and later supports two sectors per thread.
Set to false for older CPUs (Zen 2 and before).`,
},
{
Name: "LayerNVMEDevices",
Type: "[]string",
Comment: `LayerNVMEDevices is a list of pcie device addresses that should be used for SDR layer storage.
The required storage is 11 * BatchSealBatchSize * BatchSealSectorSize * BatchSealPipelines
Total Read IOPS for optimal performance should be 10M+.
The devices MUST be NVMe devices, not used for anything else. Any data on the devices will be lost!
It's recommend to define these settings in a per-machine layer, as the devices are machine-specific.
Example: ["0000:01:00.0", "0000:01:00.1"]`,
},
},
"CurioSubsystemsConfig": {
{
Name: "EnableWindowPost",
Type: "bool",
Comment: `EnableWindowPost enables window post to be executed on this curio instance. Each machine in the cluster
with WindowPoSt enabled will also participate in the window post scheduler. It is possible to have multiple
machines with WindowPoSt enabled which will provide redundancy, and in case of multiple partitions per deadline,
will allow for parallel processing of partitions.
It is possible to have instances handling both WindowPoSt and WinningPoSt, which can provide redundancy without
the need for additional machines. In setups like this it is generally recommended to run
partitionsPerDeadline+1 machines.`,
},
{
Name: "WindowPostMaxTasks",
Type: "int",
Comment: ``,
},
{
Name: "EnableWinningPost",
Type: "bool",
Comment: `EnableWinningPost enables winning post to be executed on this curio instance.
Each machine in the cluster with WinningPoSt enabled will also participate in the winning post scheduler.
It is possible to mix machines with WindowPoSt and WinningPoSt enabled, for details see the EnableWindowPost
documentation.`,
},
{
Name: "WinningPostMaxTasks",
Type: "int",
Comment: ``,
},
{
Name: "EnableParkPiece",
Type: "bool",
Comment: `EnableParkPiece enables the "piece parking" task to run on this node. This task is responsible for fetching
pieces from the network and storing them in the storage subsystem until sectors are sealed. This task is
only applicable when integrating with boost, and should be enabled on nodes which will hold deal data
from boost until sectors containing the related pieces have the TreeD/TreeR constructed.
Note that future Curio implementations will have a separate task type for fetching pieces from the internet.`,
},
{
Name: "ParkPieceMaxTasks",
Type: "int",
Comment: ``,
},
{
Name: "EnableSealSDR",
Type: "bool",
Comment: `EnableSealSDR enables SDR tasks to run. SDR is the long sequential computation
creating 11 layer files in sector cache directory.
SDR is the first task in the sealing pipeline. It's inputs are just the hash of the
unsealed data (CommD), sector number, miner id, and the seal proof type.
It's outputs are the 11 layer files in the sector cache directory.
In lotus-miner this was run as part of PreCommit1.`,
},
{
Name: "SealSDRMaxTasks",
Type: "int",
Comment: `The maximum amount of SDR tasks that can run simultaneously. Note that the maximum number of tasks will
also be bounded by resources available on the machine.`,
},
{
Name: "SealSDRMinTasks",
Type: "int",
Comment: `The maximum amount of SDR tasks that need to be queued before the system will start accepting new tasks.
The main purpose of this setting is to allow for enough tasks to accumulate for batch sealing. When batch sealing
nodes are present in the cluster, this value should be set to batch_size+1 to allow for the batch sealing node to
fill up the batch.
This setting can also be used to give priority to other nodes in the cluster by setting this value to a higher
value on the nodes which should have less priority.`,
},
{
Name: "EnableSealSDRTrees",
Type: "bool",
Comment: `EnableSealSDRTrees enables the SDR pipeline tree-building task to run.
This task handles encoding of unsealed data into last sdr layer and building
of TreeR, TreeC and TreeD.
This task runs after SDR
TreeD is first computed with optional input of unsealed data
TreeR is computed from replica, which is first computed as field
addition of the last SDR layer and the bottom layer of TreeD (which is the unsealed data)
TreeC is computed from the 11 SDR layers
The 3 trees will later be used to compute the PoRep proof.
In case of SyntheticPoRep challenges for PoRep will be pre-generated at this step, and trees and layers
will be dropped. SyntheticPoRep works by pre-generating a very large set of challenges (~30GiB on disk)
then using a small subset of them for the actual PoRep computation. This allows for significant scratch space
saving between PreCommit and PoRep generation at the expense of more computation (generating challenges in this step)
In lotus-miner this was run as part of PreCommit2 (TreeD was run in PreCommit1).
Note that nodes with SDRTrees enabled will also answer to Finalize tasks,
which just remove unneeded tree data after PoRep is computed.`,
},
{
Name: "SealSDRTreesMaxTasks",
Type: "int",
Comment: `The maximum amount of SealSDRTrees tasks that can run simultaneously. Note that the maximum number of tasks will
also be bounded by resources available on the machine.`,
},
{
Name: "FinalizeMaxTasks",
Type: "int",
Comment: `FinalizeMaxTasks is the maximum amount of finalize tasks that can run simultaneously.
The finalize task is enabled on all machines which also handle SDRTrees tasks. Finalize ALWAYS runs on whichever
machine holds sector cache files, as it removes unneeded tree data after PoRep is computed.
Finalize will run in parallel with the SubmitCommitMsg task.`,
},
{
Name: "EnableSendPrecommitMsg",
Type: "bool",
Comment: `EnableSendPrecommitMsg enables the sending of precommit messages to the chain
from this curio instance.
This runs after SDRTrees and uses the output CommD / CommR (roots of TreeD / TreeR) for the message`,
},
{
Name: "EnablePoRepProof",
Type: "bool",
Comment: `EnablePoRepProof enables the computation of the porep proof
This task runs after interactive-porep seed becomes available, which happens 150 epochs (75min) after the
precommit message lands on chain. This task should run on a machine with a GPU. Vanilla PoRep proofs are
requested from the machine which holds sector cache files which most likely is the machine which ran the SDRTrees
task.
In lotus-miner this was Commit1 / Commit2`,
},
{
Name: "PoRepProofMaxTasks",
Type: "int",
Comment: `The maximum amount of PoRepProof tasks that can run simultaneously. Note that the maximum number of tasks will
also be bounded by resources available on the machine.`,
},
{
Name: "EnableSendCommitMsg",
Type: "bool",
Comment: `EnableSendCommitMsg enables the sending of commit messages to the chain
from this curio instance.`,
},
{
Name: "RequireActivationSuccess",
Type: "bool",
Comment: `Whether to abort if any sector activation in a batch fails (newly sealed sectors, only with ProveCommitSectors3).`,
},
{
Name: "RequireNotificationSuccess",
Type: "bool",
Comment: `Whether to abort if any sector activation in a batch fails (updating sectors, only with ProveReplicaUpdates3).`,
},
{
Name: "EnableMoveStorage",
Type: "bool",
Comment: `EnableMoveStorage enables the move-into-long-term-storage task to run on this curio instance.
This tasks should only be enabled on nodes with long-term storage.
The MoveStorage task is the last task in the sealing pipeline. It moves the sealed sector data from the
SDRTrees machine into long-term storage. This task runs after the Finalize task.`,
},
{
Name: "NoUnsealedDecode",
Type: "bool",
Comment: `NoUnsealedDecode disables the decoding sector data on this node. Normally data encoding is enabled by default on
storage nodes with the MoveStorage task enabled. Setting this option to true means that unsealed data for sectors
will not be stored on this node`,
},
{
Name: "MoveStorageMaxTasks",
Type: "int",
Comment: `The maximum amount of MoveStorage tasks that can run simultaneously. Note that the maximum number of tasks will
also be bounded by resources available on the machine. It is recommended that this value is set to a number which
uses all available network (or disk) bandwidth on the machine without causing bottlenecks.`,
},
{
Name: "EnableUpdateEncode",
Type: "bool",
Comment: `EnableUpdateEncode enables the encoding step of the SnapDeal process on this curio instance.
This step involves encoding the data into the sector and computing updated TreeR (uses gpu).`,
},
{
Name: "EnableUpdateProve",
Type: "bool",
Comment: `EnableUpdateProve enables the proving step of the SnapDeal process on this curio instance.
This step generates the snark proof for the updated sector.`,
},
{
Name: "EnableUpdateSubmit",
Type: "bool",
Comment: `EnableUpdateSubmit enables the submission of SnapDeal proofs to the blockchain from this curio instance.
This step submits the generated proofs to the chain.`,
},
{
Name: "UpdateEncodeMaxTasks",
Type: "int",
Comment: `UpdateEncodeMaxTasks sets the maximum number of concurrent SnapDeal encoding tasks that can run on this instance.`,
},
{
Name: "UpdateProveMaxTasks",
Type: "int",
Comment: `UpdateProveMaxTasks sets the maximum number of concurrent SnapDeal proving tasks that can run on this instance.`,
},
{
Name: "EnableCommP",
Type: "bool",
Comment: `EnableCommP enabled the commP task on te node. CommP is calculated before sending PublishDealMessage for a Mk12
deal, and when checking sector data with 'curio unseal check'.`,
},
{
Name: "BoostAdapters",
Type: "[]string",
Comment: `BoostAdapters is a list of tuples of miner address and port/ip to listen for market (e.g. boost) requests.
This interface is compatible with the lotus-miner RPC, implementing a subset needed for storage market operations.
Strings should be in the format "actor:ip:port". IP cannot be 0.0.0.0. We recommend using a private IP.
Example: "f0123:127.0.0.1:32100". Multiple addresses can be specified.
When a market node like boost gives Curio's market RPC a deal to placing into a sector, Curio will first store the
deal data in a temporary location "Piece Park" before assigning it to a sector. This requires that at least one
node in the cluster has the EnableParkPiece option enabled and has sufficient scratch space to store the deal data.
This is different from lotus-miner which stored the deal data into an "unsealed" sector as soon as the deal was
received. Deal data in PiecePark is accessed when the sector TreeD and TreeR are computed, but isn't needed for
the initial SDR layers computation. Pieces in PiecePark are removed after all sectors referencing the piece are
sealed.
To get API info for boost configuration run 'curio market rpc-info'
NOTE: All deal data will flow through this service, so it should be placed on a machine running boost or on
a machine which handles ParkPiece tasks.`,
},
{
Name: "EnableWebGui",
Type: "bool",
Comment: `EnableWebGui enables the web GUI on this curio instance. The UI has minimal local overhead, but it should
only need to be run on a single machine in the cluster.`,
},
{
Name: "GuiAddress",
Type: "string",
Comment: `The address that should listen for Web GUI requests.`,
},
{
Name: "UseSyntheticPoRep",
Type: "bool",
Comment: `UseSyntheticPoRep enables the synthetic PoRep for all new sectors. When set to true, will reduce the amount of
cache data held on disk after the completion of TreeRC task to 11GiB.`,
},
{
Name: "SyntheticPoRepMaxTasks",
Type: "int",
Comment: `The maximum amount of SyntheticPoRep tasks that can run simultaneously. Note that the maximum number of tasks will
also be bounded by resources available on the machine.`,
},
{
Name: "EnableBatchSeal",
Type: "bool",
Comment: `Batch Seal`,
},
},
"Duration time.Duration": {
{
Name: "func",
Type: "(dur",
Comment: ``,
},
{
Name: "d",
Type: ":=",
Comment: ``,
},
{
Name: "return",
Type: "[]byte(d.String()),",
Comment: ``,
},
},
"PagerDutyConfig": {
{
Name: "Enable",
Type: "bool",
Comment: `Enable is a flag to enable or disable the PagerDuty integration.`,
},
{
Name: "PagerDutyEventURL",
Type: "string",
Comment: `PagerDutyEventURL is URL for PagerDuty.com Events API v2 URL. Events sent to this API URL are ultimately
routed to a PagerDuty.com service and processed.
The default is sufficient for integration with the stock commercial PagerDuty.com company's service.`,
},
{
Name: "PageDutyIntegrationKey",
Type: "string",
Comment: `PageDutyIntegrationKey is the integration key for a PagerDuty.com service. You can find this unique service
identifier in the integration page for the service.`,
},
},
"PrometheusAlertManagerConfig": {
{
Name: "Enable",
Type: "bool",
Comment: `Enable is a flag to enable or disable the Prometheus AlertManager integration.`,
},
{
Name: "AlertManagerURL",
Type: "string",
Comment: `AlertManagerURL is the URL for the Prometheus AlertManager API v2 URL.`,
},
},
"SlackWebhookConfig": {
{
Name: "Enable",
Type: "bool",
Comment: `Enable is a flag to enable or disable the Prometheus AlertManager integration.`,
},
{
Name: "WebHookURL",
Type: "string",
Comment: `WebHookURL is the URL for the URL for slack Webhook.
Example: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX`,
},
},
}
Functions ¶
func ConfigComment ¶
func ConfigUpdate ¶
func ConfigUpdate(cfgCur, cfgDef interface{}, opts ...UpdateCfgOpt) ([]byte, error)
ConfigUpdate takes in a config and a default config and optionally comments out default values
func DefaultDefaultMaxFee ¶
func FromFile ¶
func FromFile(path string, opts ...LoadCfgOpt) (interface{}, error)
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 ¶
func FromReader(reader io.Reader, def interface{}, opts ...LoadCfgOpt) (interface{}, error)
FromReader loads config from a reader instance.
func MatchEnableSplitstoreField ¶
Match the EnableSplitstore field
func NoDefaultForSplitstoreTransition ¶
func NoDefaultForSplitstoreTransition() error
func ValidateSplitstoreSet ¶
Types ¶
type API ¶
type API struct { // Binding address for the Binary's API ListenAddress string RemoteListenAddress string Timeout Duration }
API contains configs for API endpoint
type ApisConfig ¶
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 CurioAddresses ¶
type CurioAddresses struct { // Addresses to send PreCommit messages from PreCommitControl []string // Addresses to send Commit messages from CommitControl []string TerminateControl []string // DisableOwnerFallback disables usage of the owner address for messages // sent automatically DisableOwnerFallback bool // DisableWorkerFallback disables usage of the worker address for messages // sent automatically, if control addresses are configured. // A control address that doesn't have enough funds will still be chosen // over the worker address if this flag is set. DisableWorkerFallback bool // MinerAddresses are the addresses of the miner actors to use for sending messages MinerAddresses []string }
type CurioAlertingConfig ¶ added in v1.22.1
type CurioAlertingConfig struct { // MinimumWalletBalance is the minimum balance all active wallets. If the balance is below this value, an // alerts will be triggered for the wallet MinimumWalletBalance types.FIL // PagerDutyConfig is the configuration for the PagerDuty alerting integration. PagerDuty PagerDutyConfig // PrometheusAlertManagerConfig is the configuration for the Prometheus AlertManager alerting integration. PrometheusAlertManager PrometheusAlertManagerConfig // SlackWebhookConfig is a configuration type for Slack webhook integration. SlackWebhook SlackWebhookConfig }
type CurioConfig ¶
type CurioConfig struct { Subsystems CurioSubsystemsConfig Fees CurioFees // Addresses of wallets per MinerAddress (one of the fields). Addresses []CurioAddresses Proving CurioProvingConfig Ingest CurioIngestConfig Seal CurioSealConfig Apis ApisConfig Alerting CurioAlertingConfig }
func DefaultCurioConfig ¶
func DefaultCurioConfig() *CurioConfig
type CurioFees ¶
type CurioFees struct { DefaultMaxFee types.FIL MaxPreCommitGasFee types.FIL MaxCommitGasFee types.FIL // maxBatchFee = maxBase + maxPerSector * nSectors MaxPreCommitBatchGasFee BatchFeeConfig MaxCommitBatchGasFee BatchFeeConfig MaxTerminateGasFee types.FIL // WindowPoSt is a high-value operation, so the default fee should be high. MaxWindowPoStGasFee types.FIL MaxPublishDealsFee types.FIL // Whether to use available miner balance for sector collateral instead of sending it with each message CollateralFromMinerBalance bool // Don't send collateral with messages even if there is no available balance in the miner actor DisableCollateralFallback bool }
type CurioIngestConfig ¶
type CurioIngestConfig struct { // Maximum number of sectors that can be queued waiting for deals to start processing. // 0 = unlimited // Note: This mechanism will delay taking deal data from markets, providing backpressure to the market subsystem. // The DealSector queue includes deals which are ready to enter the sealing pipeline but are not yet part of it - // size of this queue will also impact the maximum number of ParkPiece tasks which can run concurrently. // DealSector queue is the first queue in the sealing pipeline, meaning that it should be used as the primary backpressure mechanism. MaxQueueDealSector int // Maximum number of sectors that can be queued waiting for SDR to start processing. // 0 = unlimited // Note: This mechanism will delay taking deal data from markets, providing backpressure to the market subsystem. // The SDR queue includes deals which are in the process of entering the sealing pipeline. In case of the SDR tasks it is // possible that this queue grows more than this limit(CC sectors), the backpressure is only applied to sectors // entering the pipeline. // Only applies to PoRep pipeline (DoSnap = false) MaxQueueSDR int // Maximum number of sectors that can be queued waiting for SDRTrees to start processing. // 0 = unlimited // Note: This mechanism will delay taking deal data from markets, providing backpressure to the market subsystem. // In case of the trees tasks it is possible that this queue grows more than this limit, the backpressure is only // applied to sectors entering the pipeline. // Only applies to PoRep pipeline (DoSnap = false) MaxQueueTrees int // Maximum number of sectors that can be queued waiting for PoRep to start processing. // 0 = unlimited // Note: This mechanism will delay taking deal data from markets, providing backpressure to the market subsystem. // Like with the trees tasks, it is possible that this queue grows more than this limit, the backpressure is only // applied to sectors entering the pipeline. // Only applies to PoRep pipeline (DoSnap = false) MaxQueuePoRep int // MaxQueueSnapEncode is the maximum number of sectors that can be queued waiting for UpdateEncode to start processing. // 0 means unlimited. // This applies backpressure to the market subsystem by delaying the ingestion of deal data. // Only applies to the Snap Deals pipeline (DoSnap = true). MaxQueueSnapEncode int // MaxQueueSnapProve is the maximum number of sectors that can be queued waiting for UpdateProve to start processing. // 0 means unlimited. // This applies backpressure to the market subsystem by delaying the ingestion of deal data. // Only applies to the Snap Deals pipeline (DoSnap = true). MaxQueueSnapProve int // Maximum time an open deal sector should wait for more deal before it starts sealing MaxDealWaitTime Duration // DoSnap enables the snap deal process for deals ingested by this instance. Unlike in lotus-miner there is no // fallback to porep when no sectors are available to snap into. When enabled all deals will be snap deals. DoSnap bool }
type CurioProvingConfig ¶
type CurioProvingConfig struct { // Maximum number of sector checks to run in parallel. (0 = unlimited) // // WARNING: Setting this value too high may make the node crash by running out of stack // WARNING: Setting this value too low may make sector challenge reading much slower, resulting in failed PoSt due // to late submission. // // After changing this option, confirm that the new value works in your setup by invoking // 'curio test wd task 0' ParallelCheckLimit int // Maximum amount of time a proving pre-check can take for a sector. If the check times out the sector will be skipped // // WARNING: Setting this value too low risks in sectors being skipped even though they are accessible, just reading the // test challenge took longer than this timeout // WARNING: Setting this value too high risks missing PoSt deadline in case IO operations related to this sector are // blocked (e.g. in case of disconnected NFS mount) SingleCheckTimeout Duration // Maximum amount of time a proving pre-check can take for an entire partition. If the check times out, sectors in // the partition which didn't get checked on time will be skipped // // WARNING: Setting this value too low risks in sectors being skipped even though they are accessible, just reading the // test challenge took longer than this timeout // WARNING: Setting this value too high risks missing PoSt deadline in case IO operations related to this partition are // blocked or slow PartitionCheckTimeout Duration }
type CurioSealConfig ¶ added in v1.23.1
type CurioSealConfig struct { // BatchSealSectorSize Allows setting the sector size supported by the batch seal task. // Can be any value as long as it is "32GiB". BatchSealSectorSize string // Number of sectors in a seal batch. Depends on hardware and supraseal configuration. BatchSealBatchSize int // Number of parallel pipelines. Can be 1 or 2. Depends on available raw block storage BatchSealPipelines int // SingleHasherPerThread is a compatibility flag for older CPUs. Zen3 and later supports two sectors per thread. // Set to false for older CPUs (Zen 2 and before). SingleHasherPerThread bool // LayerNVMEDevices is a list of pcie device addresses that should be used for SDR layer storage. // The required storage is 11 * BatchSealBatchSize * BatchSealSectorSize * BatchSealPipelines // Total Read IOPS for optimal performance should be 10M+. // The devices MUST be NVMe devices, not used for anything else. Any data on the devices will be lost! // // It's recommend to define these settings in a per-machine layer, as the devices are machine-specific. // // Example: ["0000:01:00.0", "0000:01:00.1"] LayerNVMEDevices []string }
type CurioSubsystemsConfig ¶
type CurioSubsystemsConfig struct { // EnableWindowPost enables window post to be executed on this curio instance. Each machine in the cluster // with WindowPoSt enabled will also participate in the window post scheduler. It is possible to have multiple // machines with WindowPoSt enabled which will provide redundancy, and in case of multiple partitions per deadline, // will allow for parallel processing of partitions. // // It is possible to have instances handling both WindowPoSt and WinningPoSt, which can provide redundancy without // the need for additional machines. In setups like this it is generally recommended to run // partitionsPerDeadline+1 machines. EnableWindowPost bool WindowPostMaxTasks int // EnableWinningPost enables winning post to be executed on this curio instance. // Each machine in the cluster with WinningPoSt enabled will also participate in the winning post scheduler. // It is possible to mix machines with WindowPoSt and WinningPoSt enabled, for details see the EnableWindowPost // documentation. EnableWinningPost bool WinningPostMaxTasks int // EnableParkPiece enables the "piece parking" task to run on this node. This task is responsible for fetching // pieces from the network and storing them in the storage subsystem until sectors are sealed. This task is // only applicable when integrating with boost, and should be enabled on nodes which will hold deal data // from boost until sectors containing the related pieces have the TreeD/TreeR constructed. // Note that future Curio implementations will have a separate task type for fetching pieces from the internet. EnableParkPiece bool ParkPieceMaxTasks int // EnableSealSDR enables SDR tasks to run. SDR is the long sequential computation // creating 11 layer files in sector cache directory. // // SDR is the first task in the sealing pipeline. It's inputs are just the hash of the // unsealed data (CommD), sector number, miner id, and the seal proof type. // It's outputs are the 11 layer files in the sector cache directory. // // In lotus-miner this was run as part of PreCommit1. EnableSealSDR bool // The maximum amount of SDR tasks that can run simultaneously. Note that the maximum number of tasks will // also be bounded by resources available on the machine. SealSDRMaxTasks int // The maximum amount of SDR tasks that need to be queued before the system will start accepting new tasks. // The main purpose of this setting is to allow for enough tasks to accumulate for batch sealing. When batch sealing // nodes are present in the cluster, this value should be set to batch_size+1 to allow for the batch sealing node to // fill up the batch. // This setting can also be used to give priority to other nodes in the cluster by setting this value to a higher // value on the nodes which should have less priority. SealSDRMinTasks int // EnableSealSDRTrees enables the SDR pipeline tree-building task to run. // This task handles encoding of unsealed data into last sdr layer and building // of TreeR, TreeC and TreeD. // // This task runs after SDR // TreeD is first computed with optional input of unsealed data // TreeR is computed from replica, which is first computed as field // addition of the last SDR layer and the bottom layer of TreeD (which is the unsealed data) // TreeC is computed from the 11 SDR layers // The 3 trees will later be used to compute the PoRep proof. // // In case of SyntheticPoRep challenges for PoRep will be pre-generated at this step, and trees and layers // will be dropped. SyntheticPoRep works by pre-generating a very large set of challenges (~30GiB on disk) // then using a small subset of them for the actual PoRep computation. This allows for significant scratch space // saving between PreCommit and PoRep generation at the expense of more computation (generating challenges in this step) // // In lotus-miner this was run as part of PreCommit2 (TreeD was run in PreCommit1). // Note that nodes with SDRTrees enabled will also answer to Finalize tasks, // which just remove unneeded tree data after PoRep is computed. EnableSealSDRTrees bool // The maximum amount of SealSDRTrees tasks that can run simultaneously. Note that the maximum number of tasks will // also be bounded by resources available on the machine. SealSDRTreesMaxTasks int // FinalizeMaxTasks is the maximum amount of finalize tasks that can run simultaneously. // The finalize task is enabled on all machines which also handle SDRTrees tasks. Finalize ALWAYS runs on whichever // machine holds sector cache files, as it removes unneeded tree data after PoRep is computed. // Finalize will run in parallel with the SubmitCommitMsg task. FinalizeMaxTasks int // EnableSendPrecommitMsg enables the sending of precommit messages to the chain // from this curio instance. // This runs after SDRTrees and uses the output CommD / CommR (roots of TreeD / TreeR) for the message EnableSendPrecommitMsg bool // EnablePoRepProof enables the computation of the porep proof // // This task runs after interactive-porep seed becomes available, which happens 150 epochs (75min) after the // precommit message lands on chain. This task should run on a machine with a GPU. Vanilla PoRep proofs are // requested from the machine which holds sector cache files which most likely is the machine which ran the SDRTrees // task. // // In lotus-miner this was Commit1 / Commit2 EnablePoRepProof bool // The maximum amount of PoRepProof tasks that can run simultaneously. Note that the maximum number of tasks will // also be bounded by resources available on the machine. PoRepProofMaxTasks int // EnableSendCommitMsg enables the sending of commit messages to the chain // from this curio instance. EnableSendCommitMsg bool // Whether to abort if any sector activation in a batch fails (newly sealed sectors, only with ProveCommitSectors3). RequireActivationSuccess bool // Whether to abort if any sector activation in a batch fails (updating sectors, only with ProveReplicaUpdates3). RequireNotificationSuccess bool // EnableMoveStorage enables the move-into-long-term-storage task to run on this curio instance. // This tasks should only be enabled on nodes with long-term storage. // // The MoveStorage task is the last task in the sealing pipeline. It moves the sealed sector data from the // SDRTrees machine into long-term storage. This task runs after the Finalize task. EnableMoveStorage bool // NoUnsealedDecode disables the decoding sector data on this node. Normally data encoding is enabled by default on // storage nodes with the MoveStorage task enabled. Setting this option to true means that unsealed data for sectors // will not be stored on this node NoUnsealedDecode bool // The maximum amount of MoveStorage tasks that can run simultaneously. Note that the maximum number of tasks will // also be bounded by resources available on the machine. It is recommended that this value is set to a number which // uses all available network (or disk) bandwidth on the machine without causing bottlenecks. MoveStorageMaxTasks int // EnableUpdateEncode enables the encoding step of the SnapDeal process on this curio instance. // This step involves encoding the data into the sector and computing updated TreeR (uses gpu). EnableUpdateEncode bool // EnableUpdateProve enables the proving step of the SnapDeal process on this curio instance. // This step generates the snark proof for the updated sector. EnableUpdateProve bool // EnableUpdateSubmit enables the submission of SnapDeal proofs to the blockchain from this curio instance. // This step submits the generated proofs to the chain. EnableUpdateSubmit bool // UpdateEncodeMaxTasks sets the maximum number of concurrent SnapDeal encoding tasks that can run on this instance. UpdateEncodeMaxTasks int // UpdateProveMaxTasks sets the maximum number of concurrent SnapDeal proving tasks that can run on this instance. UpdateProveMaxTasks int // EnableCommP enabled the commP task on te node. CommP is calculated before sending PublishDealMessage for a Mk12 // deal, and when checking sector data with 'curio unseal check'. EnableCommP bool // BoostAdapters is a list of tuples of miner address and port/ip to listen for market (e.g. boost) requests. // This interface is compatible with the lotus-miner RPC, implementing a subset needed for storage market operations. // Strings should be in the format "actor:ip:port". IP cannot be 0.0.0.0. We recommend using a private IP. // Example: "f0123:127.0.0.1:32100". Multiple addresses can be specified. // // When a market node like boost gives Curio's market RPC a deal to placing into a sector, Curio will first store the // deal data in a temporary location "Piece Park" before assigning it to a sector. This requires that at least one // node in the cluster has the EnableParkPiece option enabled and has sufficient scratch space to store the deal data. // This is different from lotus-miner which stored the deal data into an "unsealed" sector as soon as the deal was // received. Deal data in PiecePark is accessed when the sector TreeD and TreeR are computed, but isn't needed for // the initial SDR layers computation. Pieces in PiecePark are removed after all sectors referencing the piece are // sealed. // // To get API info for boost configuration run 'curio market rpc-info' // // NOTE: All deal data will flow through this service, so it should be placed on a machine running boost or on // a machine which handles ParkPiece tasks. BoostAdapters []string // EnableWebGui enables the web GUI on this curio instance. The UI has minimal local overhead, but it should // only need to be run on a single machine in the cluster. EnableWebGui bool // The address that should listen for Web GUI requests. GuiAddress string // UseSyntheticPoRep enables the synthetic PoRep for all new sectors. When set to true, will reduce the amount of // cache data held on disk after the completion of TreeRC task to 11GiB. UseSyntheticPoRep bool // The maximum amount of SyntheticPoRep tasks that can run simultaneously. Note that the maximum number of tasks will // also be bounded by resources available on the machine. SyntheticPoRepMaxTasks int // Batch Seal EnableBatchSeal bool }
type DAGStoreConfig ¶
type DAGStoreConfig struct { // Path to the dagstore root directory. This directory contains three // subdirectories, which can be symlinked to alternative locations if // need be: // - ./transients: caches unsealed deals that have been fetched from the // storage subsystem for serving retrievals. // - ./indices: stores shard indices. // - ./datastore: holds the KV store tracking the state of every shard // known to the DAG store. // Default value: <LOTUS_MARKETS_PATH>/dagstore (split deployment) or // <LOTUS_MINER_PATH>/dagstore (monolith deployment) RootDir string // The maximum amount of indexing jobs that can run simultaneously. // 0 means unlimited. // Default value: 5. MaxConcurrentIndex int // The maximum amount of unsealed deals that can be fetched simultaneously // from the storage subsystem. 0 means unlimited. // Default value: 0 (unlimited). MaxConcurrentReadyFetches int // The maximum amount of unseals that can be processed simultaneously // from the storage subsystem. 0 means unlimited. // Default value: 0 (unlimited). MaxConcurrentUnseals int // The maximum number of simultaneous inflight API calls to the storage // subsystem. // Default value: 100. MaxConcurrencyStorageCalls int // The time between calls to periodic dagstore GC, in time.Duration string // representation, e.g. 1m, 5m, 1h. // Default value: 1 minute. GCInterval Duration }
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 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://lotus.filecoin.io/storage-providers/advanced-configurations/market/#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://lotus.filecoin.io/storage-providers/advanced-configurations/market/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details RetrievalFilter string RetrievalPricing *RetrievalPricing }
type Duration ¶
Duration is a wrapper type for time.Duration for decoding and encoding from/to TOML
func (Duration) MarshalText ¶ added in v1.22.1
func (*Duration) UnmarshalText ¶
UnmarshalText implements interface for TOML decoding
type HarmonyDB ¶
type HarmonyDB struct { // HOSTS is a list of hostnames to nodes running YugabyteDB // in a cluster. Only 1 is required Hosts []string // The Yugabyte server's username with full credentials to operate on Lotus' Database. Blank for default. Username string // The password for the related username. Blank for default. Password string // The database (logical partition) within Yugabyte. Blank for default. Database string // The port to find Yugabyte. Blank for default. Port string }
type IndexProviderConfig ¶
type IndexProviderConfig struct { // Enable set whether to enable indexing announcement to the network and expose endpoints that // allow indexer nodes to process announcements. Enabled 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. // If not explicitly specified, the topic name is automatically inferred from the network name // in following format: '/indexer/ingest/<network-name>' // Defaults to empty, which implies the topic name is inferred from network name. 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 Libp2p ¶
type Libp2p struct { // Binding address for the libp2p host - 0 means random port. // Format: multiaddress; see https://multiformats.io/multiaddr/ ListenAddresses []string // Addresses to explicitally announce to other peers. If not specified, // all interface addresses are announced // Format: multiaddress AnnounceAddresses []string // Addresses to not announce // Format: multiaddress NoAnnounceAddresses []string BootstrapPeers []string ProtectedPeers []string // When not disabled (default), lotus asks NAT devices (e.g., routers), to // open up an external port and forward it to the port lotus is running on. // When this works (i.e., when your router supports NAT port forwarding), // it makes the local lotus node accessible from the public internet DisableNatPortMap bool // ConnMgrLow is the number of connections that the basic connection manager // will trim down to. ConnMgrLow uint // ConnMgrHigh is the number of connections that, when exceeded, will trigger // a connection GC operation. Note: protected/recently formed connections don't // count towards this limit. ConnMgrHigh uint // ConnMgrGrace is a time duration that new connections are immune from being // closed by the connection manager. ConnMgrGrace Duration }
Libp2p contains configs for libp2p
type LoadCfgOpt ¶
type LoadCfgOpt func(opts *cfgLoadOpts) error
func SetCanFallbackOnDefault ¶
func SetCanFallbackOnDefault(f func() error) LoadCfgOpt
func SetDefault ¶
func SetDefault(f func() (interface{}, error)) LoadCfgOpt
func SetValidate ¶
func SetValidate(f func(string) error) LoadCfgOpt
func SetWarningWriter ¶
func SetWarningWriter(w io.Writer) LoadCfgOpt
type Logging ¶
type Logging struct { // SubsystemLevels specify per-subsystem log levels SubsystemLevels map[string]string }
Logging is the logging system config
type MinerAddressConfig ¶
type MinerAddressConfig struct { // Addresses to send PreCommit messages from PreCommitControl []string // Addresses to send Commit messages from CommitControl []string TerminateControl []string DealPublishControl []string // DisableOwnerFallback disables usage of the owner address for messages // sent automatically DisableOwnerFallback bool // DisableWorkerFallback disables usage of the worker address for messages // sent automatically, if control addresses are configured. // A control address that doesn't have enough funds will still be chosen // over the worker address if this flag is set. DisableWorkerFallback bool }
type MinerFeeConfig ¶
type MinerFeeConfig struct { MaxPreCommitGasFee types.FIL MaxCommitGasFee types.FIL // maxBatchFee = maxBase + maxPerSector * nSectors MaxPreCommitBatchGasFee BatchFeeConfig MaxCommitBatchGasFee BatchFeeConfig MaxTerminateGasFee types.FIL // WindowPoSt is a high-value operation, so the default fee should be high. MaxWindowPoStGasFee types.FIL MaxPublishDealsFee types.FIL MaxMarketBalanceAddFee types.FIL MaximizeWindowPoStFeeCap bool }
type MinerSubsystemConfig ¶
type MinerSubsystemConfig struct { EnableMining bool EnableSealing bool EnableSectorStorage bool EnableMarkets bool // When enabled, the sector index will reside in an external database // as opposed to the local KV store in the miner process // This is useful to allow workers to bypass the lotus miner to access sector information EnableSectorIndexDB bool SealerApiInfo string // if EnableSealing == false SectorIndexApiInfo string // if EnableSectorStorage == false // When window post is enabled, the miner will automatically submit window post proofs // for all sectors that are eligible for window post // IF WINDOW POST IS DISABLED, THE MINER WILL NOT SUBMIT WINDOW POST PROOFS // THIS WILL RESULT IN FAULTS AND PENALTIES IF NO OTHER MECHANISM IS RUNNING // TO SUBMIT WINDOW POST PROOFS. // Note: This option is entirely disabling the window post scheduler, // not just the builtin PoSt computation like Proving.DisableBuiltinWindowPoSt. // This option will stop lotus-miner from performing any actions related // to window post, including scheduling, submitting proofs, and recovering // sectors. DisableWindowPoSt bool // When winning post is disabled, the miner process will NOT attempt to mine // blocks. This should only be set when there's an external process mining // blocks on behalf of the miner. // When disabled and no external block producers are configured, all potential // block rewards will be missed! DisableWinningPoSt bool }
type PagerDutyConfig ¶ added in v1.22.1
type PagerDutyConfig struct { // Enable is a flag to enable or disable the PagerDuty integration. Enable bool // PagerDutyEventURL is URL for PagerDuty.com Events API v2 URL. Events sent to this API URL are ultimately // routed to a PagerDuty.com service and processed. // The default is sufficient for integration with the stock commercial PagerDuty.com company's service. PagerDutyEventURL string // PageDutyIntegrationKey is the integration key for a PagerDuty.com service. You can find this unique service // identifier in the integration page for the service. PageDutyIntegrationKey string }
type PrometheusAlertManagerConfig ¶ added in v1.22.1
type ProvingConfig ¶
type ProvingConfig struct { // Maximum number of sector checks to run in parallel. (0 = unlimited) // // WARNING: Setting this value too high may make the node crash by running out of stack // WARNING: Setting this value too low may make sector challenge reading much slower, resulting in failed PoSt due // to late submission. // // After changing this option, confirm that the new value works in your setup by invoking // 'lotus-miner proving compute window-post 0' ParallelCheckLimit int // Maximum amount of time a proving pre-check can take for a sector. If the check times out the sector will be skipped // // WARNING: Setting this value too low risks in sectors being skipped even though they are accessible, just reading the // test challenge took longer than this timeout // WARNING: Setting this value too high risks missing PoSt deadline in case IO operations related to this sector are // blocked (e.g. in case of disconnected NFS mount) SingleCheckTimeout Duration // Maximum amount of time a proving pre-check can take for an entire partition. If the check times out, sectors in // the partition which didn't get checked on time will be skipped // // WARNING: Setting this value too low risks in sectors being skipped even though they are accessible, just reading the // test challenge took longer than this timeout // WARNING: Setting this value too high risks missing PoSt deadline in case IO operations related to this partition are // blocked or slow PartitionCheckTimeout Duration // Disable Window PoSt computation on the lotus-miner process even if no window PoSt workers are present. // // WARNING: If no windowPoSt workers are connected, window PoSt WILL FAIL resulting in faulty sectors which will need // to be recovered. Before enabling this option, make sure your PoSt workers work correctly. // // After changing this option, confirm that the new value works in your setup by invoking // 'lotus-miner proving compute window-post 0' DisableBuiltinWindowPoSt bool // Disable Winning PoSt computation on the lotus-miner process even if no winning PoSt workers are present. // // WARNING: If no WinningPoSt workers are connected, Winning PoSt WILL FAIL resulting in lost block rewards. // Before enabling this option, make sure your PoSt workers work correctly. DisableBuiltinWinningPoSt bool // Disable WindowPoSt provable sector readability checks. // // In normal operation, when preparing to compute WindowPoSt, lotus-miner will perform a round of reading challenges // from all sectors to confirm that those sectors can be proven. Challenges read in this process are discarded, as // we're only interested in checking that sector data can be read. // // When using builtin proof computation (no PoSt workers, and DisableBuiltinWindowPoSt is set to false), this process // can save a lot of time and compute resources in the case that some sectors are not readable - this is caused by // the builtin logic not skipping snark computation when some sectors need to be skipped. // // When using PoSt workers, this process is mostly redundant, with PoSt workers challenges will be read once, and // if challenges for some sectors aren't readable, those sectors will just get skipped. // // Disabling sector pre-checks will slightly reduce IO load when proving sectors, possibly resulting in shorter // time to produce window PoSt. In setups with good IO capabilities the effect of this option on proving time should // be negligible. // // NOTE: It likely is a bad idea to disable sector pre-checks in setups with no PoSt workers. // // NOTE: Even when this option is enabled, recovering sectors will be checked before recovery declaration message is // sent to the chain // // After changing this option, confirm that the new value works in your setup by invoking // 'lotus-miner proving compute window-post 0' DisableWDPoStPreChecks bool // Maximum number of partitions to prove in a single SubmitWindowPoSt messace. 0 = network limit (3 in nv21) // // A single partition may contain up to 2349 32GiB sectors, or 2300 64GiB sectors. // // // Note that setting this value lower may result in less efficient gas use - more messages will be sent, // to prove each deadline, resulting in more total gas use (but each message will have lower gas limit) // // Setting this value above the network limit has no effect MaxPartitionsPerPoStMessage int // In some cases when submitting DeclareFaultsRecovered messages, // there may be too many recoveries to fit in a BlockGasLimit. // In those cases it may be necessary to set this value to something low (eg 1); // Note that setting this value lower may result in less efficient gas use - more messages will be sent than needed, // resulting in more total gas use (but each message will have lower gas limit) MaxPartitionsPerRecoveryMessage int // Enable single partition per PoSt Message for partitions containing recovery sectors // // In cases when submitting PoSt messages which contain recovering sectors, the default network limit may still be // too high to fit in the block gas limit. In those cases, it becomes useful to only house the single partition // with recovering sectors in the post message // // Note that setting this value lower may result in less efficient gas use - more messages will be sent, // to prove each deadline, resulting in more total gas use (but each message will have lower gas limit) SingleRecoveringPartitionPerPostMessage bool }
type Pubsub ¶
type Pubsub struct { // Run the node in bootstrap-node mode Bootstrapper bool // DirectPeers specifies peers with direct peering agreements. These peers are // connected outside of the mesh, with all (valid) message unconditionally // forwarded to them. The router will maintain open connections to these peers. // Note that the peering agreement should be reciprocal with direct peers // symmetrically configured at both ends. // Type: Array of multiaddress peerinfo strings, must include peerid (/p2p/12D3K... DirectPeers []string IPColocationWhitelist []string RemoteTracer string // Path to file that will be used to output tracer content in JSON format. // If present tracer will save data to defined file. // Format: file path JsonTracer string // Connection string for elasticsearch instance. // If present tracer will save data to elasticsearch. // Format: https://<username>:<password>@<elasticsearch_url>:<port>/ ElasticSearchTracer string // Name of elasticsearch index that will be used to save tracer data. // This property is used only if ElasticSearchTracer propery is set. ElasticSearchIndex string // Auth token that will be passed with logs to elasticsearch - used for weighted peers score. TracerSourceAuth string }
type ResourceFilteringStrategy ¶
type ResourceFilteringStrategy string
ResourceFilteringStrategy is an enum indicating the kinds of resource filtering strategies that can be configured for workers.
type RetrievalPricing ¶
type RetrievalPricing struct { Strategy string // possible values: "default", "external" Default *RetrievalPricingDefault External *RetrievalPricingExternal }
type RetrievalPricingDefault ¶
type RetrievalPricingDefault struct { // VerifiedDealsFreeTransfer configures zero fees for data transfer for a retrieval 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". // default value is true VerifiedDealsFreeTransfer bool }
type RetrievalPricingExternal ¶
type RetrievalPricingExternal struct { // 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". Path string }
type SealerConfig ¶
type SealerConfig struct { ParallelFetchLimit int AllowSectorDownload bool AllowAddPiece bool AllowPreCommit1 bool AllowPreCommit2 bool AllowCommit bool AllowUnseal bool AllowReplicaUpdate bool AllowProveReplicaUpdate2 bool AllowRegenSectorKey bool // LocalWorkerName specifies a custom name for the builtin worker. // If set to an empty string (default) os hostname will be used LocalWorkerName string // Assigner specifies the worker assigner to use when scheduling tasks. // "utilization" (default) - assign tasks to workers with lowest utilization. // "spread" - assign tasks to as many distinct workers as possible. Assigner string // DisallowRemoteFinalize when set to true will force all Finalize tasks to // run on workers with local access to both long-term storage and the sealing // path containing the sector. // -- // WARNING: Only set this if all workers have access to long-term storage // paths. If this flag is enabled, and there are workers without long-term // storage access, sectors will not be moved from them, and Finalize tasks // will appear to be stuck. // -- // If you see stuck Finalize tasks after enabling this setting, check // 'lotus-miner sealing sched-diag' and 'lotus-miner storage find [sector num]' DisallowRemoteFinalize bool // ResourceFiltering instructs the system which resource filtering strategy // to use when evaluating tasks against this worker. An empty value defaults // to "hardware". ResourceFiltering ResourceFilteringStrategy }
type SealingConfig ¶
type SealingConfig struct { // Upper bound on how many sectors can be waiting for more deals to be packed in it before it begins sealing at any given time. // If the miner is accepting multiple deals in parallel, up to MaxWaitDealsSectors of new sectors will be created. // If more than MaxWaitDealsSectors deals are accepted in parallel, only MaxWaitDealsSectors deals will be processed in parallel // Note that setting this number too high in relation to deal ingestion rate may result in poor sector packing efficiency // 0 = no limit MaxWaitDealsSectors uint64 // Upper bound on how many sectors can be sealing+upgrading at the same time when creating new CC sectors (0 = unlimited) MaxSealingSectors uint64 // Upper bound on how many sectors can be sealing+upgrading at the same time when creating new sectors with deals (0 = unlimited) MaxSealingSectorsForDeals uint64 // Prefer creating new sectors even if there are sectors Available for upgrading. // This setting combined with MaxUpgradingSectors set to a value higher than MaxSealingSectorsForDeals makes it // possible to use fast sector upgrades to handle high volumes of storage deals, while still using the simple sealing // flow when the volume of storage deals is lower. PreferNewSectorsForDeals bool // Upper bound on how many sectors can be sealing+upgrading at the same time when upgrading CC sectors with deals (0 = MaxSealingSectorsForDeals) MaxUpgradingSectors uint64 // When set to a non-zero value, minimum number of epochs until sector expiration required for sectors to be considered // for upgrades (0 = DealMinDuration = 180 days = 518400 epochs) // // Note that if all deals waiting in the input queue have lifetimes longer than this value, upgrade sectors will be // required to have expiration of at least the soonest-ending deal MinUpgradeSectorExpiration uint64 // DEPRECATED: Target expiration is no longer used MinTargetUpgradeSectorExpiration uint64 // CommittedCapacitySectorLifetime is the duration a Committed Capacity (CC) sector will // live before it must be extended or converted into sector containing deals before it is // terminated. Value must be between 180-1278 days (1278 in nv21, 540 before nv21). CommittedCapacitySectorLifetime Duration // Period of time that a newly created sector will wait for more deals to be packed in to before it starts to seal. // Sectors which are fully filled will start sealing immediately WaitDealsDelay Duration // Whether to keep unsealed copies of deal data regardless of whether the client requested that. This lets the miner // avoid the relatively high cost of unsealing the data later, at the cost of more storage space AlwaysKeepUnsealedCopy bool // Run sector finalization before submitting sector proof to the chain FinalizeEarly bool // Whether new sectors are created to pack incoming deals // When this is set to false no new sectors will be created for sealing incoming deals // This is useful for forcing all deals to be assigned as snap deals to sectors marked for upgrade MakeNewSectorForDeals bool // After sealing CC sectors, make them available for upgrading with deals MakeCCSectorsAvailable bool // Whether to use available miner balance for sector collateral instead of sending it with each message CollateralFromMinerBalance bool // Minimum available balance to keep in the miner actor before sending it with messages AvailableBalanceBuffer types.FIL // Don't send collateral with messages even if there is no available balance in the miner actor DisableCollateralFallback bool // maximum precommit batch size - batches will be sent immediately above this size MaxPreCommitBatch int // how long to wait before submitting a batch after crossing the minimum batch size PreCommitBatchWait Duration // time buffer for forceful batch submission before sectors/deal in batch would start expiring PreCommitBatchSlack Duration // enable / disable commit aggregation (takes effect after nv13) AggregateCommits bool // minimum batched commit size - batches above this size will eventually be sent on a timeout MinCommitBatch int // maximum batched commit size - batches will be sent immediately above this size MaxCommitBatch int // how long to wait before submitting a batch after crossing the minimum batch size CommitBatchWait Duration // time buffer for forceful batch submission before sectors/deals in batch would start expiring CommitBatchSlack Duration // network BaseFee below which to stop doing precommit batching, instead // sending precommit messages to the chain individually. When the basefee is // below this threshold, precommit messages will get sent out immediately. BatchPreCommitAboveBaseFee types.FIL // network BaseFee below which to stop doing commit aggregation, instead // submitting proofs to the chain individually AggregateAboveBaseFee types.FIL // When submitting several sector prove commit messages simultaneously, this option allows you to // stagger the number of prove commits submitted per epoch // This is done because gas estimates for ProveCommits are non deterministic and increasing as a large // number of sectors get committed within the same epoch resulting in occasionally failed msgs. // Submitting a smaller number of prove commits per epoch would reduce the possibility of failed msgs MaxSectorProveCommitsSubmittedPerEpoch uint64 TerminateBatchMax uint64 TerminateBatchMin uint64 TerminateBatchWait Duration // UseSyntheticPoRep, when set to true, will reduce the amount of cache data held on disk after the completion of PreCommit 2 to 11GiB. UseSyntheticPoRep bool // Whether to abort if any sector activation in a batch fails (newly sealed sectors, only with ProveCommitSectors3). RequireActivationSuccess bool // Whether to abort if any piece activation notification returns a non-zero exit code (newly sealed sectors, only with ProveCommitSectors3). RequireActivationSuccessUpdate bool // Whether to abort if any sector activation in a batch fails (updating sectors, only with ProveReplicaUpdates3). RequireNotificationSuccess bool // Whether to abort if any piece activation notification returns a non-zero exit code (updating sectors, only with ProveReplicaUpdates3). RequireNotificationSuccessUpdate bool }
type SlackWebhookConfig ¶ added in v1.23.0
type SlackWebhookConfig struct { // Enable is a flag to enable or disable the Prometheus AlertManager integration. Enable bool // WebHookURL is the URL for the URL for slack Webhook. // Example: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX WebHookURL string }
type StorageMiner ¶
type StorageMiner struct { Common Subsystems MinerSubsystemConfig Dealmaking DealmakingConfig IndexProvider IndexProviderConfig Proving ProvingConfig Sealing SealingConfig Storage SealerConfig Fees MinerFeeConfig Addresses MinerAddressConfig DAGStore DAGStoreConfig HarmonyDB HarmonyDB }
StorageMiner is a miner config
func DefaultStorageMiner ¶
func DefaultStorageMiner() *StorageMiner
type UpdateCfgOpt ¶
type UpdateCfgOpt func(opts *cfgUpdateOpts) error
UpdateCfgOpt is a functional option for updating the config
func Commented ¶
func Commented(commented bool) UpdateCfgOpt
func DefaultKeepUncommented ¶
func DefaultKeepUncommented() UpdateCfgOpt
func KeepUncommented ¶
func KeepUncommented(f func(string) bool) UpdateCfgOpt
KeepUncommented sets a function for matching default valeus that should remain uncommented during a config update that comments out default values.
func NoEnv ¶
func NoEnv() UpdateCfgOpt