config

package
v1.28.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: Apache-2.0, MIT Imports: 30 Imported by: 38

Documentation

Index

Constants

View Source
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")
)

Variables

View Source
var Doc = map[string][]DocField{
	"API": {
		{
			Name: "ListenAddress",
			Type: "string",

			Comment: `Binding address for the Lotus API`,
		},
		{
			Name: "RemoteListenAddress",
			Type: "string",

			Comment: ``,
		},
		{
			Name: "Timeout",
			Type: "Duration",

			Comment: ``,
		},
	},
	"ApisConfig": {
		{
			Name: "ChainApiInfo",
			Type: "[]string",

			Comment: `ChainApiInfo is the API endpoint for the Lotus daemon.`,
		},
		{
			Name: "StorageRPCSecret",
			Type: "string",

			Comment: `RPC Secret for the storage subsystem.
If integrating with lotus-miner this must match the value from
cat ~/.lotusminer/keystore/MF2XI2BNNJ3XILLQOJUXMYLUMU | jq -r .PrivateKey`,
		},
	},
	"Backup": {
		{
			Name: "DisableMetadataLog",
			Type: "bool",

			Comment: `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`,
		},
	},
	"BatchFeeConfig": {
		{
			Name: "Base",
			Type: "types.FIL",

			Comment: ``,
		},
		{
			Name: "PerSector",
			Type: "types.FIL",

			Comment: ``,
		},
	},
	"Chainstore": {
		{
			Name: "EnableSplitstore",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "Splitstore",
			Type: "Splitstore",

			Comment: ``,
		},
	},
	"Common": {
		{
			Name: "API",
			Type: "API",

			Comment: ``,
		},
		{
			Name: "Backup",
			Type: "Backup",

			Comment: ``,
		},
		{
			Name: "Logging",
			Type: "Logging",

			Comment: ``,
		},
		{
			Name: "Libp2p",
			Type: "Libp2p",

			Comment: ``,
		},
		{
			Name: "Pubsub",
			Type: "Pubsub",

			Comment: ``,
		},
	},
	"DealmakingConfig": {
		{
			Name: "StartEpochSealingBuffer",
			Type: "uint64",

			Comment: `Minimum start epoch buffer to give time for sealing of sector with deal.`,
		},
	},
	"EventsConfig": {
		{
			Name: "DisableRealTimeFilterAPI",
			Type: "bool",

			Comment: `DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted.
The API is enabled when Fevm.EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag.`,
		},
		{
			Name: "DisableHistoricFilterAPI",
			Type: "bool",

			Comment: `DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events
that occurred in the past. HistoricFilterAPI maintains a queryable index of events.
The API is enabled when Fevm.EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag.`,
		},
		{
			Name: "EnableActorEventsAPI",
			Type: "bool",

			Comment: `EnableActorEventsAPI enables the Actor events API that enables clients to consume events
emitted by (smart contracts + built-in Actors).
This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be
disabled by setting their respective Disable* options.`,
		},
		{
			Name: "FilterTTL",
			Type: "Duration",

			Comment: `FilterTTL specifies the time to live for actor event filters. Filters that haven't been accessed longer than
this time become eligible for automatic deletion.`,
		},
		{
			Name: "MaxFilters",
			Type: "int",

			Comment: `MaxFilters specifies the maximum number of filters that may exist at any one time.`,
		},
		{
			Name: "MaxFilterResults",
			Type: "int",

			Comment: `MaxFilterResults specifies the maximum number of results that can be accumulated by an actor event filter.`,
		},
		{
			Name: "MaxFilterHeightRange",
			Type: "uint64",

			Comment: `MaxFilterHeightRange specifies the maximum range of heights that can be used in a filter (to avoid querying
the entire chain)`,
		},
		{
			Name: "DatabasePath",
			Type: "string",

			Comment: `DatabasePath is the full path to a sqlite database that will be used to index actor events to
support the historic filter APIs. If the database does not exist it will be created. The directory containing
the database must already exist and be writeable. If a relative path is provided here, sqlite treats it as
relative to the CWD (current working directory).`,
		},
	},
	"FaultReporterConfig": {
		{
			Name: "EnableConsensusFaultReporter",
			Type: "bool",

			Comment: `EnableConsensusFaultReporter controls whether the node will monitor and
report consensus faults. When enabled, the node will watch for malicious
behaviors like double-mining and parent grinding, and submit reports to the
network. This can earn reporter rewards, but is not guaranteed. Nodes should
enable fault reporting with care, as it may increase resource usage, and may
generate gas fees without earning rewards.`,
		},
		{
			Name: "ConsensusFaultReporterDataDir",
			Type: "string",

			Comment: `ConsensusFaultReporterDataDir is the path where fault reporter state will be
persisted. This directory should have adequate space and permissions for the
node process.`,
		},
		{
			Name: "ConsensusFaultReporterAddress",
			Type: "string",

			Comment: `ConsensusFaultReporterAddress is the wallet address used for submitting
ReportConsensusFault messages. It will pay for gas fees, and receive any
rewards. This address should have adequate funds to cover gas fees.`,
		},
	},
	"FeeConfig": {
		{
			Name: "DefaultMaxFee",
			Type: "types.FIL",

			Comment: ``,
		},
	},
	"FevmConfig": {
		{
			Name: "EnableEthRPC",
			Type: "bool",

			Comment: `EnableEthRPC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be disabled by config options above.`,
		},
		{
			Name: "EthTxHashMappingLifetimeDays",
			Type: "int",

			Comment: `EthTxHashMappingLifetimeDays the transaction hash lookup database will delete mappings that have been stored for more than x days
Set to 0 to keep all mappings`,
		},
		{
			Name: "Events",
			Type: "DeprecatedEvents",

			Comment: ``,
		},
	},
	"FullNode": {
		{
			Name: "Wallet",
			Type: "Wallet",

			Comment: ``,
		},
		{
			Name: "Fees",
			Type: "FeeConfig",

			Comment: ``,
		},
		{
			Name: "Chainstore",
			Type: "Chainstore",

			Comment: ``,
		},
		{
			Name: "Fevm",
			Type: "FevmConfig",

			Comment: ``,
		},
		{
			Name: "Events",
			Type: "EventsConfig",

			Comment: ``,
		},
		{
			Name: "Index",
			Type: "IndexConfig",

			Comment: ``,
		},
		{
			Name: "FaultReporter",
			Type: "FaultReporterConfig",

			Comment: ``,
		},
	},
	"HarmonyDB": {
		{
			Name: "Hosts",
			Type: "[]string",

			Comment: `HOSTS is a list of hostnames to nodes running YugabyteDB
in a cluster. Only 1 is required`,
		},
		{
			Name: "Username",
			Type: "string",

			Comment: `The Yugabyte server's username with full credentials to operate on Lotus' Database. Blank for default.`,
		},
		{
			Name: "Password",
			Type: "string",

			Comment: `The password for the related username. Blank for default.`,
		},
		{
			Name: "Database",
			Type: "string",

			Comment: `The database (logical partition) within Yugabyte. Blank for default.`,
		},
		{
			Name: "Port",
			Type: "string",

			Comment: `The port to find Yugabyte. Blank for default.`,
		},
	},
	"IndexConfig": {
		{
			Name: "EnableMsgIndex",
			Type: "bool",

			Comment: `EXPERIMENTAL FEATURE. USE WITH CAUTION
EnableMsgIndex enables indexing of messages on chain.`,
		},
	},
	"JournalConfig": {
		{
			Name: "DisabledEvents",
			Type: "string",

			Comment: `Events of the form: "system1:event1,system1:event2[,...]"`,
		},
	},
	"Libp2p": {
		{
			Name: "ListenAddresses",
			Type: "[]string",

			Comment: `Binding address for the libp2p host - 0 means random port.
Format: multiaddress; see https://multiformats.io/multiaddr/`,
		},
		{
			Name: "AnnounceAddresses",
			Type: "[]string",

			Comment: `Addresses to explicitally announce to other peers. If not specified,
all interface addresses are announced
Format: multiaddress`,
		},
		{
			Name: "NoAnnounceAddresses",
			Type: "[]string",

			Comment: `Addresses to not announce
Format: multiaddress`,
		},
		{
			Name: "BootstrapPeers",
			Type: "[]string",

			Comment: ``,
		},
		{
			Name: "ProtectedPeers",
			Type: "[]string",

			Comment: ``,
		},
		{
			Name: "DisableNatPortMap",
			Type: "bool",

			Comment: `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`,
		},
		{
			Name: "ConnMgrLow",
			Type: "uint",

			Comment: `ConnMgrLow is the number of connections that the basic connection manager
will trim down to.`,
		},
		{
			Name: "ConnMgrHigh",
			Type: "uint",

			Comment: `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.`,
		},
		{
			Name: "ConnMgrGrace",
			Type: "Duration",

			Comment: `ConnMgrGrace is a time duration that new connections are immune from being
closed by the connection manager.`,
		},
	},
	"Logging": {
		{
			Name: "SubsystemLevels",
			Type: "map[string]string",

			Comment: `SubsystemLevels specify per-subsystem log levels`,
		},
	},
	"MinerAddressConfig": {
		{
			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: "DealPublishControl",
			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.`,
		},
	},
	"MinerFeeConfig": {
		{
			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: "MaxMarketBalanceAddFee",
			Type: "types.FIL",

			Comment: ``,
		},
		{
			Name: "MaximizeWindowPoStFeeCap",
			Type: "bool",

			Comment: ``,
		},
	},
	"MinerSubsystemConfig": {
		{
			Name: "EnableMining",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "EnableSealing",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "EnableSectorStorage",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "EnableSectorIndexDB",
			Type: "bool",

			Comment: `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`,
		},
		{
			Name: "SealerApiInfo",
			Type: "string",

			Comment: ``,
		},
		{
			Name: "SectorIndexApiInfo",
			Type: "string",

			Comment: ``,
		},
		{
			Name: "DisableWindowPoSt",
			Type: "bool",

			Comment: `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.`,
		},
		{
			Name: "DisableWinningPoSt",
			Type: "bool",

			Comment: `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!`,
		},
	},
	"ProvingConfig": {
		{
			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
'lotus-miner proving compute window-post 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`,
		},
		{
			Name: "DisableBuiltinWindowPoSt",
			Type: "bool",

			Comment: `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'`,
		},
		{
			Name: "DisableBuiltinWinningPoSt",
			Type: "bool",

			Comment: `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.`,
		},
		{
			Name: "DisableWDPoStPreChecks",
			Type: "bool",

			Comment: `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'`,
		},
		{
			Name: "MaxPartitionsPerPoStMessage",
			Type: "int",

			Comment: `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`,
		},
		{
			Name: "MaxPartitionsPerRecoveryMessage",
			Type: "int",

			Comment: `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)`,
		},
		{
			Name: "SingleRecoveringPartitionPerPostMessage",
			Type: "bool",

			Comment: `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)`,
		},
	},
	"Pubsub": {
		{
			Name: "Bootstrapper",
			Type: "bool",

			Comment: `Run the node in bootstrap-node mode`,
		},
		{
			Name: "DirectPeers",
			Type: "[]string",

			Comment: `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...`,
		},
		{
			Name: "IPColocationWhitelist",
			Type: "[]string",

			Comment: ``,
		},
		{
			Name: "RemoteTracer",
			Type: "string",

			Comment: ``,
		},
		{
			Name: "JsonTracer",
			Type: "string",

			Comment: `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`,
		},
		{
			Name: "ElasticSearchTracer",
			Type: "string",

			Comment: `Connection string for elasticsearch instance.
If present tracer will save data to elasticsearch.
Format: https://<username>:<password>@<elasticsearch_url>:<port>/`,
		},
		{
			Name: "ElasticSearchIndex",
			Type: "string",

			Comment: `Name of elasticsearch index that will be used to save tracer data.
This property is used only if ElasticSearchTracer propery is set.`,
		},
		{
			Name: "TracerSourceAuth",
			Type: "string",

			Comment: `Auth token that will be passed with logs to elasticsearch - used for weighted peers score.`,
		},
	},
	"SealerConfig": {
		{
			Name: "ParallelFetchLimit",
			Type: "int",

			Comment: ``,
		},
		{
			Name: "AllowSectorDownload",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "AllowAddPiece",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "AllowPreCommit1",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "AllowPreCommit2",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "AllowCommit",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "AllowUnseal",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "AllowReplicaUpdate",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "AllowProveReplicaUpdate2",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "AllowRegenSectorKey",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "LocalWorkerName",
			Type: "string",

			Comment: `LocalWorkerName specifies a custom name for the builtin worker.
If set to an empty string (default) os hostname will be used`,
		},
		{
			Name: "Assigner",
			Type: "string",

			Comment: `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.`,
		},
		{
			Name: "DisallowRemoteFinalize",
			Type: "bool",

			Comment: `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]'`,
		},
		{
			Name: "ResourceFiltering",
			Type: "ResourceFilteringStrategy",

			Comment: `ResourceFiltering instructs the system which resource filtering strategy
to use when evaluating tasks against this worker. An empty value defaults
to "hardware".`,
		},
	},
	"SealingConfig": {
		{
			Name: "MaxWaitDealsSectors",
			Type: "uint64",

			Comment: `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`,
		},
		{
			Name: "MaxSealingSectors",
			Type: "uint64",

			Comment: `Upper bound on how many sectors can be sealing+upgrading at the same time when creating new CC sectors (0 = unlimited)`,
		},
		{
			Name: "MaxSealingSectorsForDeals",
			Type: "uint64",

			Comment: `Upper bound on how many sectors can be sealing+upgrading at the same time when creating new sectors with deals (0 = unlimited)`,
		},
		{
			Name: "PreferNewSectorsForDeals",
			Type: "bool",

			Comment: `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.`,
		},
		{
			Name: "MaxUpgradingSectors",
			Type: "uint64",

			Comment: `Upper bound on how many sectors can be sealing+upgrading at the same time when upgrading CC sectors with deals (0 = MaxSealingSectorsForDeals)`,
		},
		{
			Name: "MinUpgradeSectorExpiration",
			Type: "uint64",

			Comment: `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`,
		},
		{
			Name: "MinTargetUpgradeSectorExpiration",
			Type: "uint64",

			Comment: `DEPRECATED: Target expiration is no longer used`,
		},
		{
			Name: "CommittedCapacitySectorLifetime",
			Type: "Duration",

			Comment: `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).`,
		},
		{
			Name: "WaitDealsDelay",
			Type: "Duration",

			Comment: `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`,
		},
		{
			Name: "AlwaysKeepUnsealedCopy",
			Type: "bool",

			Comment: `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`,
		},
		{
			Name: "FinalizeEarly",
			Type: "bool",

			Comment: `Run sector finalization before submitting sector proof to the chain`,
		},
		{
			Name: "MakeNewSectorForDeals",
			Type: "bool",

			Comment: `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`,
		},
		{
			Name: "MakeCCSectorsAvailable",
			Type: "bool",

			Comment: `After sealing CC sectors, make them available for upgrading with deals`,
		},
		{
			Name: "CollateralFromMinerBalance",
			Type: "bool",

			Comment: `Whether to use available miner balance for sector collateral instead of sending it with each message`,
		},
		{
			Name: "AvailableBalanceBuffer",
			Type: "types.FIL",

			Comment: `Minimum available balance to keep in the miner actor before sending it with messages`,
		},
		{
			Name: "DisableCollateralFallback",
			Type: "bool",

			Comment: `Don't send collateral with messages even if there is no available balance in the miner actor`,
		},
		{
			Name: "MaxPreCommitBatch",
			Type: "int",

			Comment: `maximum precommit batch size - batches will be sent immediately above this size`,
		},
		{
			Name: "PreCommitBatchWait",
			Type: "Duration",

			Comment: `how long to wait before submitting a batch after crossing the minimum batch size`,
		},
		{
			Name: "PreCommitBatchSlack",
			Type: "Duration",

			Comment: `time buffer for forceful batch submission before sectors/deal in batch would start expiring`,
		},
		{
			Name: "AggregateCommits",
			Type: "bool",

			Comment: `enable / disable commit aggregation (takes effect after nv13)`,
		},
		{
			Name: "MinCommitBatch",
			Type: "int",

			Comment: `minimum batched commit size - batches above this size will eventually be sent on a timeout`,
		},
		{
			Name: "MaxCommitBatch",
			Type: "int",

			Comment: `maximum batched commit size - batches will be sent immediately above this size`,
		},
		{
			Name: "CommitBatchWait",
			Type: "Duration",

			Comment: `how long to wait before submitting a batch after crossing the minimum batch size`,
		},
		{
			Name: "CommitBatchSlack",
			Type: "Duration",

			Comment: `time buffer for forceful batch submission before sectors/deals in batch would start expiring`,
		},
		{
			Name: "BatchPreCommitAboveBaseFee",
			Type: "types.FIL",

			Comment: `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.`,
		},
		{
			Name: "AggregateAboveBaseFee",
			Type: "types.FIL",

			Comment: `network BaseFee below which to stop doing commit aggregation, instead
submitting proofs to the chain individually`,
		},
		{
			Name: "MaxSectorProveCommitsSubmittedPerEpoch",
			Type: "uint64",

			Comment: `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`,
		},
		{
			Name: "TerminateBatchMax",
			Type: "uint64",

			Comment: ``,
		},
		{
			Name: "TerminateBatchMin",
			Type: "uint64",

			Comment: ``,
		},
		{
			Name: "TerminateBatchWait",
			Type: "Duration",

			Comment: ``,
		},
		{
			Name: "UseSyntheticPoRep",
			Type: "bool",

			Comment: `UseSyntheticPoRep, when set to true, will reduce the amount of cache data held on disk after the completion of PreCommit 2 to 11GiB.`,
		},
		{
			Name: "RequireActivationSuccess",
			Type: "bool",

			Comment: `Whether to abort if any sector activation in a batch fails (newly sealed sectors, only with ProveCommitSectors3).`,
		},
		{
			Name: "RequireActivationSuccessUpdate",
			Type: "bool",

			Comment: `Whether to abort if any piece activation notification returns a non-zero exit code (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: "RequireNotificationSuccessUpdate",
			Type: "bool",

			Comment: `Whether to abort if any piece activation notification returns a non-zero exit code (updating sectors, only with ProveReplicaUpdates3).`,
		},
	},
	"Splitstore": {
		{
			Name: "ColdStoreType",
			Type: "string",

			Comment: `ColdStoreType specifies the type of the coldstore.
It can be "discard" (default) for discarding cold blocks, "messages" to store only messages or "universal" to store all chain state..`,
		},
		{
			Name: "HotStoreType",
			Type: "string",

			Comment: `HotStoreType specifies the type of the hotstore.
Only currently supported value is "badger".`,
		},
		{
			Name: "MarkSetType",
			Type: "string",

			Comment: `MarkSetType specifies the type of the markset.
It can be "map" for in memory marking or "badger" (default) for on-disk marking.`,
		},
		{
			Name: "HotStoreMessageRetention",
			Type: "uint64",

			Comment: `HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond
the compaction boundary; default is 0.`,
		},
		{
			Name: "HotStoreFullGCFrequency",
			Type: "uint64",

			Comment: `HotStoreFullGCFrequency specifies how often to perform a full (moving) GC on the hotstore.
A value of 0 disables, while a value 1 will do full GC in every compaction.
Default is 20 (about once a week).`,
		},
		{
			Name: "HotStoreMaxSpaceTarget",
			Type: "uint64",

			Comment: `HotStoreMaxSpaceTarget sets a target max disk size for the hotstore. Splitstore GC
will run moving GC if disk utilization gets within a threshold (150 GB) of the target.
Splitstore GC will NOT run moving GC if the total size of the move would get
within 50 GB of the target, and instead will run a more aggressive online GC.
If both HotStoreFullGCFrequency and HotStoreMaxSpaceTarget are set then splitstore
GC will trigger moving GC if either configuration condition is met.
A reasonable minimum is 2x fully GCed hotstore size + 50 G buffer.
At this minimum size moving GC happens every time, any smaller and moving GC won't
be able to run. In spring 2023 this minimum is ~550 GB.`,
		},
		{
			Name: "HotStoreMaxSpaceThreshold",
			Type: "uint64",

			Comment: `When HotStoreMaxSpaceTarget is set Moving GC will be triggered when total moving size
exceeds HotstoreMaxSpaceTarget - HotstoreMaxSpaceThreshold`,
		},
		{
			Name: "HotstoreMaxSpaceSafetyBuffer",
			Type: "uint64",

			Comment: `Safety buffer to prevent moving GC from overflowing disk when HotStoreMaxSpaceTarget
is set.  Moving GC will not occur when total moving size exceeds
HotstoreMaxSpaceTarget - HotstoreMaxSpaceSafetyBuffer`,
		},
	},
	"StorageMiner": {
		{
			Name: "Subsystems",
			Type: "MinerSubsystemConfig",

			Comment: ``,
		},
		{
			Name: "Dealmaking",
			Type: "DealmakingConfig",

			Comment: ``,
		},
		{
			Name: "Proving",
			Type: "ProvingConfig",

			Comment: ``,
		},
		{
			Name: "Sealing",
			Type: "SealingConfig",

			Comment: ``,
		},
		{
			Name: "Storage",
			Type: "SealerConfig",

			Comment: ``,
		},
		{
			Name: "Fees",
			Type: "MinerFeeConfig",

			Comment: ``,
		},
		{
			Name: "Addresses",
			Type: "MinerAddressConfig",

			Comment: ``,
		},
		{
			Name: "HarmonyDB",
			Type: "HarmonyDB",

			Comment: ``,
		},
	},
	"Wallet": {
		{
			Name: "RemoteBackend",
			Type: "string",

			Comment: ``,
		},
		{
			Name: "EnableLedger",
			Type: "bool",

			Comment: ``,
		},
		{
			Name: "DisableLocal",
			Type: "bool",

			Comment: ``,
		},
	},
}

Functions

func ConfigComment

func ConfigComment(t interface{}) ([]byte, error)

func ConfigUpdate added in v1.11.1

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 added in v1.1.3

func DefaultDefaultMaxFee() types.FIL

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 added in v1.23.0

func MatchEnableSplitstoreField(s string) bool

Match the EnableSplitstore field

func NoDefaultForSplitstoreTransition added in v1.23.0

func NoDefaultForSplitstoreTransition() error

func StorageFromFile added in v0.3.0

func StorageFromFile(path string, def *storiface.StorageConfig) (*storiface.StorageConfig, error)

func StorageFromReader added in v0.3.0

func StorageFromReader(reader io.Reader) (*storiface.StorageConfig, error)

func ValidateSplitstoreSet added in v1.23.0

func ValidateSplitstoreSet(cfgRaw string) error

func WriteStorageFile added in v0.3.0

func WriteStorageFile(filePath string, config storiface.StorageConfig) error

Types

type API

type API struct {
	// Binding address for the Lotus API
	ListenAddress       string
	RemoteListenAddress string
	Timeout             Duration
}

API contains configs for API endpoint

type ApisConfig added in v1.25.2

type ApisConfig struct {
	// ChainApiInfo is the API endpoint for the Lotus daemon.
	ChainApiInfo []string

	// RPC Secret for the storage subsystem.
	// If integrating with lotus-miner this must match the value from
	// cat ~/.lotusminer/keystore/MF2XI2BNNJ3XILLQOJUXMYLUMU | jq -r .PrivateKey
	StorageRPCSecret string
}

type Backup added in v1.5.1

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 BatchFeeConfig added in v1.10.0

type BatchFeeConfig struct {
	Base      types.FIL
	PerSector types.FIL
}

func (*BatchFeeConfig) FeeForSectors added in v1.10.0

func (b *BatchFeeConfig) FeeForSectors(nSectors int) abi.TokenAmount

type Chainstore added in v1.5.1

type Chainstore struct {
	EnableSplitstore bool
	Splitstore       Splitstore
}

type Common

type Common struct {
	API     API
	Backup  Backup
	Logging Logging
	Libp2p  Libp2p
	Pubsub  Pubsub
}

Common is common config between full node and miner

type DealmakingConfig added in v0.4.0

type DealmakingConfig struct {
	// Minimum start epoch buffer to give time for sealing of sector with deal.
	StartEpochSealingBuffer uint64
}

type DealmakingConfiger added in v1.15.2

type DealmakingConfiger interface {
	GetDealmakingConfig() DealmakingConfig
	SetDealmakingConfig(DealmakingConfig)
}

type DeprecatedEvents added in v1.26.0

type DeprecatedEvents struct {
	// DisableRealTimeFilterAPI is DEPRECATED and will be removed in a future release. Use Events.DisableRealTimeFilterAPI instead.
	DisableRealTimeFilterAPI bool `moved:"Events.DisableRealTimeFilterAPI" toml:"DisableRealTimeFilterAPI,omitempty"`

	// DisableHistoricFilterAPI is DEPRECATED and will be removed in a future release. Use Events.DisableHistoricFilterAPI instead.
	DisableHistoricFilterAPI bool `moved:"Events.DisableHistoricFilterAPI" toml:"DisableHistoricFilterAPI,omitempty"`

	// FilterTTL is DEPRECATED and will be removed in a future release. Use Events.FilterTTL instead.
	FilterTTL Duration `moved:"Events.FilterTTL" toml:"FilterTTL,omitzero"`

	// MaxFilters is DEPRECATED and will be removed in a future release. Use Events.MaxFilters instead.
	MaxFilters int `moved:"Events.MaxFilters" toml:"MaxFilters,omitzero"`

	// MaxFilterResults is DEPRECATED and will be removed in a future release. Use Events.MaxFilterResults instead.
	MaxFilterResults int `moved:"Events.MaxFilterResults" toml:"MaxFilterResults,omitzero"`

	// MaxFilterHeightRange is DEPRECATED and will be removed in a future release. Use Events.MaxFilterHeightRange instead.
	MaxFilterHeightRange uint64 `moved:"Events.MaxFilterHeightRange" toml:"MaxFilterHeightRange,omitzero"`

	// DatabasePath is DEPRECATED and will be removed in a future release. Use Events.DatabasePath instead.
	DatabasePath string `moved:"Events.DatabasePath" toml:"DatabasePath,omitempty"`
}

type DocField added in v1.11.1

type DocField struct {
	Name    string
	Type    string
	Comment string
}

type Duration

type Duration time.Duration

Duration is a wrapper type for time.Duration for decoding and encoding from/to TOML

func (Duration) MarshalText

func (dur Duration) MarshalText() ([]byte, error)

func (*Duration) UnmarshalText

func (dur *Duration) UnmarshalText(text []byte) error

UnmarshalText implements interface for TOML decoding

type EventsConfig added in v1.26.0

type EventsConfig struct {
	// DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted.
	// The API is enabled when Fevm.EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag.
	DisableRealTimeFilterAPI bool

	// DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events
	// that occurred in the past. HistoricFilterAPI maintains a queryable index of events.
	// The API is enabled when Fevm.EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag.
	DisableHistoricFilterAPI bool

	// EnableActorEventsAPI enables the Actor events API that enables clients to consume events
	// emitted by (smart contracts + built-in Actors).
	// This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be
	// disabled by setting their respective Disable* options.
	EnableActorEventsAPI bool

	// FilterTTL specifies the time to live for actor event filters. Filters that haven't been accessed longer than
	// this time become eligible for automatic deletion.
	FilterTTL Duration

	// MaxFilters specifies the maximum number of filters that may exist at any one time.
	MaxFilters int

	// MaxFilterResults specifies the maximum number of results that can be accumulated by an actor event filter.
	MaxFilterResults int

	// MaxFilterHeightRange specifies the maximum range of heights that can be used in a filter (to avoid querying
	// the entire chain)
	MaxFilterHeightRange uint64

	// DatabasePath is the full path to a sqlite database that will be used to index actor events to
	// support the historic filter APIs. If the database does not exist it will be created. The directory containing
	// the database must already exist and be writeable. If a relative path is provided here, sqlite treats it as
	// relative to the CWD (current working directory).
	DatabasePath string
}

type FaultReporterConfig added in v1.23.3

type FaultReporterConfig struct {
	// EnableConsensusFaultReporter controls whether the node will monitor and
	// report consensus faults. When enabled, the node will watch for malicious
	// behaviors like double-mining and parent grinding, and submit reports to the
	// network. This can earn reporter rewards, but is not guaranteed. Nodes should
	// enable fault reporting with care, as it may increase resource usage, and may
	// generate gas fees without earning rewards.
	EnableConsensusFaultReporter bool

	// ConsensusFaultReporterDataDir is the path where fault reporter state will be
	// persisted. This directory should have adequate space and permissions for the
	// node process.
	ConsensusFaultReporterDataDir string

	// ConsensusFaultReporterAddress is the wallet address used for submitting
	// ReportConsensusFault messages. It will pay for gas fees, and receive any
	// rewards. This address should have adequate funds to cover gas fees.
	ConsensusFaultReporterAddress string
}

type FeeConfig added in v1.1.3

type FeeConfig struct {
	DefaultMaxFee types.FIL
}

type FevmConfig added in v1.20.0

type FevmConfig struct {
	// EnableEthRPC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
	// This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be disabled by config options above.
	EnableEthRPC bool

	// EthTxHashMappingLifetimeDays the transaction hash lookup database will delete mappings that have been stored for more than x days
	// Set to 0 to keep all mappings
	EthTxHashMappingLifetimeDays int

	Events DeprecatedEvents `toml:"Events,omitempty"`
}

type FullNode

type FullNode struct {
	Common
	Wallet        Wallet
	Fees          FeeConfig
	Chainstore    Chainstore
	Fevm          FevmConfig
	Events        EventsConfig
	Index         IndexConfig
	FaultReporter FaultReporterConfig
}

FullNode is a full node config

func DefaultFullNode

func DefaultFullNode() *FullNode

DefaultFullNode returns the default config

type HarmonyDB added in v1.25.2

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 IndexConfig added in v1.23.1

type IndexConfig struct {
	// EXPERIMENTAL FEATURE. USE WITH CAUTION
	// EnableMsgIndex enables indexing of messages on chain.
	EnableMsgIndex bool
}

type JournalConfig added in v1.25.2

type JournalConfig struct {
	//Events of the form: "system1:event1,system1:event2[,...]"
	DisabledEvents string
}

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 added in v1.23.0

type LoadCfgOpt func(opts *cfgLoadOpts) error

func SetCanFallbackOnDefault added in v1.23.0

func SetCanFallbackOnDefault(f func() error) LoadCfgOpt

func SetDefault added in v1.23.0

func SetDefault(f func() (interface{}, error)) LoadCfgOpt

func SetValidate added in v1.23.0

func SetValidate(f func(string) error) LoadCfgOpt

func SetWarningWriter added in v1.26.0

func SetWarningWriter(w io.Writer) LoadCfgOpt

type Logging added in v1.15.1

type Logging struct {
	// SubsystemLevels specify per-subsystem log levels
	SubsystemLevels map[string]string
}

Logging is the logging system config

type MinerAddressConfig added in v1.2.3

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 added in v0.5.0

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 added in v1.11.1

type MinerSubsystemConfig struct {
	EnableMining        bool
	EnableSealing       bool
	EnableSectorStorage 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 ProvingConfig added in v1.15.2

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 added in v0.3.0

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 added in v1.19.0

type ResourceFilteringStrategy string

ResourceFilteringStrategy is an enum indicating the kinds of resource filtering strategies that can be configured for workers.

type SealerConfig added in v1.15.2

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 added in v0.5.0

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 SealingConfiger added in v1.15.2

type SealingConfiger interface {
	GetSealingConfig() SealingConfig
	SetSealingConfig(SealingConfig)
}

type Splitstore added in v1.5.1

type Splitstore struct {
	// ColdStoreType specifies the type of the coldstore.
	// It can be "discard" (default) for discarding cold blocks, "messages" to store only messages or "universal" to store all chain state..
	ColdStoreType string
	// HotStoreType specifies the type of the hotstore.
	// Only currently supported value is "badger".
	HotStoreType string
	// MarkSetType specifies the type of the markset.
	// It can be "map" for in memory marking or "badger" (default) for on-disk marking.
	MarkSetType string

	// HotStoreMessageRetention specifies the retention policy for messages, in finalities beyond
	// the compaction boundary; default is 0.
	HotStoreMessageRetention uint64
	// HotStoreFullGCFrequency specifies how often to perform a full (moving) GC on the hotstore.
	// A value of 0 disables, while a value 1 will do full GC in every compaction.
	// Default is 20 (about once a week).
	HotStoreFullGCFrequency uint64
	// HotStoreMaxSpaceTarget sets a target max disk size for the hotstore. Splitstore GC
	// will run moving GC if disk utilization gets within a threshold (150 GB) of the target.
	// Splitstore GC will NOT run moving GC if the total size of the move would get
	// within 50 GB of the target, and instead will run a more aggressive online GC.
	// If both HotStoreFullGCFrequency and HotStoreMaxSpaceTarget are set then splitstore
	// GC will trigger moving GC if either configuration condition is met.
	// A reasonable minimum is 2x fully GCed hotstore size + 50 G buffer.
	// At this minimum size moving GC happens every time, any smaller and moving GC won't
	// be able to run. In spring 2023 this minimum is ~550 GB.
	HotStoreMaxSpaceTarget uint64

	// When HotStoreMaxSpaceTarget is set Moving GC will be triggered when total moving size
	// exceeds HotstoreMaxSpaceTarget - HotstoreMaxSpaceThreshold
	HotStoreMaxSpaceThreshold uint64

	// Safety buffer to prevent moving GC from overflowing disk when HotStoreMaxSpaceTarget
	// is set.  Moving GC will not occur when total moving size exceeds
	// HotstoreMaxSpaceTarget - HotstoreMaxSpaceSafetyBuffer
	HotstoreMaxSpaceSafetyBuffer uint64
}

type StorageMiner

type StorageMiner struct {
	Common

	Subsystems MinerSubsystemConfig
	Dealmaking DealmakingConfig
	Proving    ProvingConfig
	Sealing    SealingConfig
	Storage    SealerConfig
	Fees       MinerFeeConfig
	Addresses  MinerAddressConfig
	HarmonyDB  HarmonyDB
}

StorageMiner is a miner config

func DefaultStorageMiner

func DefaultStorageMiner() *StorageMiner

func (*StorageMiner) GetDealmakingConfig added in v1.15.2

func (c *StorageMiner) GetDealmakingConfig() DealmakingConfig

func (*StorageMiner) GetSealingConfig added in v1.15.2

func (c *StorageMiner) GetSealingConfig() SealingConfig

func (*StorageMiner) SetDealmakingConfig added in v1.15.2

func (c *StorageMiner) SetDealmakingConfig(other DealmakingConfig)

func (*StorageMiner) SetSealingConfig added in v1.15.2

func (c *StorageMiner) SetSealingConfig(other SealingConfig)

type UpdateCfgOpt added in v1.23.0

type UpdateCfgOpt func(opts *cfgUpdateOpts) error

UpdateCfgOpt is a functional option for updating the config

func Commented added in v1.23.0

func Commented(commented bool) UpdateCfgOpt

func DefaultKeepUncommented added in v1.23.0

func DefaultKeepUncommented() UpdateCfgOpt

func KeepUncommented added in v1.23.0

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 added in v1.25.2

func NoEnv() UpdateCfgOpt

type Wallet added in v0.9.1

type Wallet struct {
	RemoteBackend string
	EnableLedger  bool
	DisableLocal  bool
}

// Full Node

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL