Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config UX improvements #6848

Merged
merged 11 commits into from
Jul 23, 2021
Merged

Config UX improvements #6848

merged 11 commits into from
Jul 23, 2021

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Jul 23, 2021

This PR:

  • Moves config types to a separate file
  • Adds codegen for docstring map
  • Adds docstring comments to default config
  • Adds lotus config default and lotus-miner config default commands to print up-to-date default config
  • Adds lotus config updated and lotus-miner config updated commands which print current node config with filled in, commented out default values (which might have been added in new node version)

Example miner 'updated' config output:

[API]
  # Binding address for the Lotus API
  #
  # type: string
  ListenAddress = "/ip4/10.x.x.x/tcp/2345/http"
  # type: string
  RemoteListenAddress = "10.x.x.x:2345"
  # type: Duration
  #Timeout = "30s"


[Backup]
  # Note that in case of metadata corruption it might be much harder to recover
  # your node if metadata log is disabled
  #
  # type: bool
  #DisableMetadataLog = false


[Libp2p]
  # Binding address for the libp2p host - 0 means random port.
  # Format: multiaddress; see https://multiformats.io/multiaddr/
  #
  # type: []string
  ListenAddresses = ["/ip4/0.0.0.0/tcp/x", "/ip6/::/tcp/0"]
  # Addresses to explicitally announce to other peers. If not specified,
  # all interface addresses are announced
  # Format: multiaddress
  #
  # type: []string
  AnnounceAddresses = ["/ip4/x.x.x.x/tcp/x"]
  # Addresses to not announce
  # Format: multiaddress
  #
  # type: []string
  #NoAnnounceAddresses = []

  # type: uint
  ConnMgrLow = 3500
  # type: uint
  ConnMgrHigh = 4800
  # type: Duration
  #ConnMgrGrace = "20s"


[Pubsub]
  # Run the node in bootstrap-node mode
  #
  # type: bool
  #Bootstrapper = false

  # type: string
  #RemoteTracer = "/dns4/pubsub-tracer.filecoin.io/tcp/4001/p2p/QmTd6UvR47vUidRNZ1ZKXHrAFhqTJAD27rKL9XYghEKgKX"


[Subsystems]
  # type: bool
  #EnableMining = true

  # type: bool
  #EnableSealing = true

  # type: bool
  #EnableSectorStorage = true

  # type: bool
  #EnableMarkets = true

  # type: string
  #SealerApiInfo = ""

  # type: string
  #SectorIndexApiInfo = ""


[Dealmaking]
  # When enabled, the miner can accept online deals
  #
  # type: bool
  #ConsiderOnlineStorageDeals = true

  # When enabled, the miner can accept offline deals
  #
  # type: bool
  ConsiderOfflineStorageDeals = false
  # When enabled, the miner can accept retrieval deals
  #
  # type: bool
  #ConsiderOnlineRetrievalDeals = true

  # When enabled, the miner can accept offline retrieval deals
  #
  # type: bool
  #ConsiderOfflineRetrievalDeals = true

  # When enabled, the miner can accept verified deals
  #
  # type: bool
  #ConsiderVerifiedStorageDeals = true

  # When enabled, the miner can accept unverified deals
  #
  # type: bool
  #ConsiderUnverifiedStorageDeals = true

  # A list of Data CIDs to reject when making deals
  #
  # type: []cid.Cid
  #PieceCidBlocklist = []

  # 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
  #
  # type: Duration
  ExpectedSealDuration = "23h59m0s"
  # Maximum amount of time proposed deal StartEpoch can be in future
  #
  # type: Duration
  #MaxDealStartDelay = "336h0m0s"

  # 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
  #
  # type: Duration
  PublishMsgPeriod = "20m0s"
  # The maximum number of deals to include in a single PublishStorageDeals
  # message
  #
  # type: uint64
  MaxDealsPerPublishMsg = 3
  # The maximum collateral that the provider will put up against a deal,
  # as a multiplier of the minimum collateral bound
  #
  # type: uint64
  #MaxProviderCollateralMultiplier = 2

  # The maximum number of parallel online data transfers (storage+retrieval)
  #
  # type: uint64
  SimultaneousTransfers = 2
  # A command used for fine-grained evaluation of storage deals
  # see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details
  #
  # type: string
  #Filter = ""

  # A command used for fine-grained evaluation of retrieval deals
  # see https://docs.filecoin.io/mine/lotus/miner-configuration/#using-filters-for-fine-grained-storage-and-retrieval-deal-acceptance for more details
  #
  # type: string
  #RetrievalFilter = ""

  [Dealmaking.RetrievalPricing]
    #Strategy = "default"

    [Dealmaking.RetrievalPricing.Default]
      #VerifiedDealsFreeTransfer = true

    [Dealmaking.RetrievalPricing.External]
      #Path = ""


[Sealing]
  # 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
  #
  # type: uint64
  #MaxWaitDealsSectors = 2

  # Upper bound on how many sectors can be sealing at the same time when creating new CC sectors (0 = unlimited)
  #
  # type: uint64
  MaxSealingSectors = 8
  # Upper bound on how many sectors can be sealing at the same time when creating new sectors with deals (0 = unlimited)
  #
  # type: uint64
  MaxSealingSectorsForDeals = 11
  # 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
  #
  # type: Duration
  WaitDealsDelay = "4h0m30s"
  # 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
  #
  # type: bool
  #AlwaysKeepUnsealedCopy = true

  # Run sector finalization before submitting sector proof to the chain
  #
  # type: bool
  FinalizeEarly = true
  # Whether to use available miner balance for sector collateral instead of sending it with each message
  #
  # type: bool
  #CollateralFromMinerBalance = false

  # Minimum available balance to keep in the miner actor before sending it with messages
  #
  # type: types.FIL
  #AvailableBalanceBuffer = "0 FIL"

  # Don't send collateral with messages even if there is no available balance in the miner actor
  #
  # type: bool
  #DisableCollateralFallback = false

  # enable / disable precommit batching (takes effect after nv13)
  #
  # type: bool
  #BatchPreCommits = true

  # maximum precommit batch size - batches will be sent immediately above this size
  #
  # type: int
  #MaxPreCommitBatch = 256

  # how long to wait before submitting a batch after crossing the minimum batch size
  #
  # type: Duration
  PreCommitBatchWait = "3h0m0s"
  # time buffer for forceful batch submission before sectors/deal in batch would start expiring
  #
  # type: Duration
  #PreCommitBatchSlack = "3h0m0s"

  # enable / disable commit aggregation (takes effect after nv13)
  #
  # type: bool
  #AggregateCommits = true

  # maximum batched commit size - batches will be sent immediately above this size
  #
  # type: int
  #MinCommitBatch = 4

  # type: int
  #MaxCommitBatch = 819

  # how long to wait before submitting a batch after crossing the minimum batch size
  #
  # type: Duration
  CommitBatchWait = "2h0m0s"
  # time buffer for forceful batch submission before sectors/deals in batch would start expiring
  #
  # type: Duration
  #CommitBatchSlack = "1h0m0s"

  # network BaseFee below which to stop doing commit aggregation, instead
  # submitting proofs to the chain individually
  #
  # type: types.FIL
  #AggregateAboveBaseFee = "0.00000000015 FIL"

  # type: uint64
  #TerminateBatchMax = 100

  # type: uint64
  #TerminateBatchMin = 1

  # type: Duration
  #TerminateBatchWait = "5m0s"


[Storage]
  ParallelFetchLimit = 2
  #AllowAddPiece = true

  AllowPreCommit1 = false
  AllowPreCommit2 = false
  AllowCommit = false
  AllowUnseal = false
  #ResourceFiltering = "hardware"


[Fees]
  # type: types.FIL
  MaxPreCommitGasFee = "0.04 FIL"
  # type: types.FIL
  MaxCommitGasFee = "0.15 FIL"
  # type: types.FIL
  #MaxTerminateGasFee = "0.5 FIL"

  # WindowPoSt is a high-value operation, so the default fee should be high.
  #
  # type: types.FIL
  MaxWindowPoStGasFee = "9.3 FIL"
  # type: types.FIL
  MaxPublishDealsFee = "0.5 FIL"
  # type: types.FIL
  MaxMarketBalanceAddFee = "0.5 FIL"
  [Fees.MaxPreCommitBatchGasFee]
    # type: types.FIL
    #Base = "0 FIL"

    # type: types.FIL
    #PerSector = "0.02 FIL"

  [Fees.MaxCommitBatchGasFee]
    # type: types.FIL
    #Base = "0 FIL"

    # type: types.FIL
    #PerSector = "0.03 FIL"


[Addresses]
  # Addresses to send PreCommit messages from
  #
  # type: []string
  PreCommitControl = ["f094247"]
  # Addresses to send Commit messages from
  #
  # type: []string
  CommitControl = ["f094246"]
  # type: []string
  #TerminateControl = []

  # type: []string
  #DealPublishControl = []

  # DisableOwnerFallback disables usage of the owner address for messages
  # sent automatically
  #
  # type: bool
  #DisableOwnerFallback = false

  # 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.
  #
  # type: bool
  #DisableWorkerFallback = false

@magik6k magik6k requested a review from a team as a code owner July 23, 2021 13:52
@magik6k magik6k added the area/ux Area: UX label Jul 23, 2021
@jennijuju
Copy link
Member

Omg 💙💙💙💙💙💙

@jennijuju
Copy link
Member

Even the comments 💙💙💙💙💙💙

@jennijuju jennijuju mentioned this pull request Jul 23, 2021
4 tasks
@magik6k magik6k enabled auto-merge July 23, 2021 17:25
@magik6k magik6k disabled auto-merge July 23, 2021 17:35
@magik6k magik6k merged commit 964df1a into master Jul 23, 2021
@magik6k magik6k deleted the feat/config-ux branch July 23, 2021 17:35
@magik6k magik6k mentioned this pull request Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Area: UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants