Fixup merge

This commit is contained in:
Aayush Rajasekaran 2022-04-11 20:45:13 -04:00
parent 0dcad9cc18
commit 656a33863f
6 changed files with 47 additions and 49 deletions

View File

@ -5,7 +5,7 @@ import (
"context" "context"
"time" "time"
cid "github.com/ipfs/go-cid/_rsrch/cidiface" "github.com/ipfs/go-cid"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/actors/policy"

View File

@ -7,7 +7,7 @@ import (
"net/http" "net/http"
"sync" "sync"
"github.com/filecoin-project/go-ds-versioning/pkg/statestore" "github.com/filecoin-project/go-statestore"
"github.com/hashicorp/go-multierror" "github.com/hashicorp/go-multierror"
"github.com/mitchellh/go-homedir" "github.com/mitchellh/go-homedir"

View File

@ -5,7 +5,9 @@ import (
"sort" "sort"
"time" "time"
cid "github.com/ipfs/go-cid/_rsrch/cidiface" "github.com/filecoin-project/go-padreader"
"github.com/filecoin-project/go-statemachine"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"

View File

@ -6,7 +6,10 @@ import (
"sync" "sync"
"time" "time"
cid "github.com/ipfs/go-cid/_rsrch/cidiface" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
"github.com/ipfs/go-datastore/namespace" "github.com/ipfs/go-datastore/namespace"
logging "github.com/ipfs/go-log/v2" logging "github.com/ipfs/go-log/v2"
@ -17,7 +20,7 @@ import (
"github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/dline"
"github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/go-state-types/network"
statemachine "github.com/filecoin-project/go-statemachine" "github.com/filecoin-project/go-statemachine"
"github.com/filecoin-project/specs-storage/storage" "github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api"
@ -180,8 +183,6 @@ func New(mctx context.Context, api SealingAPI, fc config.MinerFeeConfig, events
available: map[abi.SectorID]struct{}{}, available: map[abi.SectorID]struct{}{},
available: map[abi.SectorID]struct{}{},
notifee: notifee, notifee: notifee,
addrSel: as, addrSel: as,

View File

@ -135,21 +135,6 @@ func (m *Sealing) handleProvingSector(ctx statemachine.Context, sector SectorInf
delete(m.available, m.minerSectorID(sector.SectorNumber)) delete(m.available, m.minerSectorID(sector.SectorNumber))
m.inputLk.Unlock() m.inputLk.Unlock()
cfg, err := m.getConfig()
if err != nil {
return xerrors.Errorf("getting sealing config: %w", err)
}
// TODO: Watch termination
// TODO: Auto-extend if set
return nil
}
func (m *Sealing) handleAvailableSector(ctx statemachine.Context, sector SectorInfo) error {
m.inputLk.Lock()
m.available[m.minerSectorID(sector.SectorNumber)] = struct{}{}
m.inputLk.Unlock()
// TODO: Watch termination // TODO: Watch termination
// TODO: Auto-extend if set // TODO: Auto-extend if set

View File

@ -5,9 +5,17 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"net/http"
"os"
"path/filepath"
"strings" "strings"
"time" "time"
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-paramfetch"
"github.com/filecoin-project/go-statestore"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-storedcounter" "github.com/filecoin-project/go-storedcounter"
"github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore"
@ -971,37 +979,39 @@ func NewSetSealConfigFunc(r repo.LockedRepo) (dtypes.SetSealingConfigFunc, error
func ToSealingConfig(dealmakingCfg config.DealmakingConfig, sealingCfg config.SealingConfig) sealiface.Config { func ToSealingConfig(dealmakingCfg config.DealmakingConfig, sealingCfg config.SealingConfig) sealiface.Config {
return sealiface.Config{ return sealiface.Config{
MaxWaitDealsSectors: cfg.Sealing.MaxWaitDealsSectors, MaxWaitDealsSectors: sealingCfg.MaxWaitDealsSectors,
MaxSealingSectors: cfg.Sealing.MaxSealingSectors, MaxSealingSectors: sealingCfg.MaxSealingSectors,
MaxSealingSectorsForDeals: cfg.Sealing.MaxSealingSectorsForDeals, MaxSealingSectorsForDeals: sealingCfg.MaxSealingSectorsForDeals,
StartEpochSealingBuffer: abi.ChainEpoch(cfg.Dealmaking.StartEpochSealingBuffer), PreferNewSectorsForDeals: sealingCfg.PreferNewSectorsForDeals,
MakeNewSectorForDeals: cfg.Sealing.MakeNewSectorForDeals, MaxUpgradingSectors: sealingCfg.MaxUpgradingSectors,
CommittedCapacitySectorLifetime: time.Duration(cfg.Sealing.CommittedCapacitySectorLifetime), StartEpochSealingBuffer: abi.ChainEpoch(dealmakingCfg.StartEpochSealingBuffer),
WaitDealsDelay: time.Duration(cfg.Sealing.WaitDealsDelay), MakeNewSectorForDeals: sealingCfg.MakeNewSectorForDeals,
MakeCCSectorsAvailable: cfg.Sealing.MakeCCSectorsAvailable, CommittedCapacitySectorLifetime: time.Duration(sealingCfg.CommittedCapacitySectorLifetime),
AlwaysKeepUnsealedCopy: cfg.Sealing.AlwaysKeepUnsealedCopy, WaitDealsDelay: time.Duration(sealingCfg.WaitDealsDelay),
FinalizeEarly: cfg.Sealing.FinalizeEarly, MakeCCSectorsAvailable: sealingCfg.MakeCCSectorsAvailable,
AlwaysKeepUnsealedCopy: sealingCfg.AlwaysKeepUnsealedCopy,
FinalizeEarly: sealingCfg.FinalizeEarly,
CollateralFromMinerBalance: cfg.Sealing.CollateralFromMinerBalance, CollateralFromMinerBalance: sealingCfg.CollateralFromMinerBalance,
AvailableBalanceBuffer: types.BigInt(cfg.Sealing.AvailableBalanceBuffer), AvailableBalanceBuffer: types.BigInt(sealingCfg.AvailableBalanceBuffer),
DisableCollateralFallback: cfg.Sealing.DisableCollateralFallback, DisableCollateralFallback: sealingCfg.DisableCollateralFallback,
BatchPreCommits: cfg.Sealing.BatchPreCommits, BatchPreCommits: sealingCfg.BatchPreCommits,
MaxPreCommitBatch: cfg.Sealing.MaxPreCommitBatch, MaxPreCommitBatch: sealingCfg.MaxPreCommitBatch,
PreCommitBatchWait: time.Duration(cfg.Sealing.PreCommitBatchWait), PreCommitBatchWait: time.Duration(sealingCfg.PreCommitBatchWait),
PreCommitBatchSlack: time.Duration(cfg.Sealing.PreCommitBatchSlack), PreCommitBatchSlack: time.Duration(sealingCfg.PreCommitBatchSlack),
AggregateCommits: cfg.Sealing.AggregateCommits, AggregateCommits: sealingCfg.AggregateCommits,
MinCommitBatch: cfg.Sealing.MinCommitBatch, MinCommitBatch: sealingCfg.MinCommitBatch,
MaxCommitBatch: cfg.Sealing.MaxCommitBatch, MaxCommitBatch: sealingCfg.MaxCommitBatch,
CommitBatchWait: time.Duration(cfg.Sealing.CommitBatchWait), CommitBatchWait: time.Duration(sealingCfg.CommitBatchWait),
CommitBatchSlack: time.Duration(cfg.Sealing.CommitBatchSlack), CommitBatchSlack: time.Duration(sealingCfg.CommitBatchSlack),
AggregateAboveBaseFee: types.BigInt(cfg.Sealing.AggregateAboveBaseFee), AggregateAboveBaseFee: types.BigInt(sealingCfg.AggregateAboveBaseFee),
BatchPreCommitAboveBaseFee: types.BigInt(cfg.Sealing.BatchPreCommitAboveBaseFee), BatchPreCommitAboveBaseFee: types.BigInt(sealingCfg.BatchPreCommitAboveBaseFee),
TerminateBatchMax: cfg.Sealing.TerminateBatchMax, TerminateBatchMax: sealingCfg.TerminateBatchMax,
TerminateBatchMin: cfg.Sealing.TerminateBatchMin, TerminateBatchMin: sealingCfg.TerminateBatchMin,
TerminateBatchWait: time.Duration(cfg.Sealing.TerminateBatchWait), TerminateBatchWait: time.Duration(sealingCfg.TerminateBatchWait),
} }
} }