merged master
This commit is contained in:
@@ -134,8 +134,14 @@ func NewClientGraphsyncDataTransfer(lc fx.Lifecycle, h host.Host, gs dtypes.Grap
|
||||
|
||||
// data-transfer push / pull channel restart configuration:
|
||||
dtRestartConfig := dtimpl.ChannelRestartConfig(channelmonitor.Config{
|
||||
// Wait up to 2m for the other side to respond to an Open channel message
|
||||
AcceptTimeout: 2 * time.Minute,
|
||||
// Disable Accept and Complete timeouts until this issue is resolved:
|
||||
// https://github.com/filecoin-project/lotus/issues/6343#
|
||||
// Wait for the other side to respond to an Open channel message
|
||||
AcceptTimeout: 0,
|
||||
// Wait for the other side to send a Complete message once all
|
||||
// data has been sent / received
|
||||
CompleteTimeout: 0,
|
||||
|
||||
// When an error occurs, wait a little while until all related errors
|
||||
// have fired before sending a restart message
|
||||
RestartDebounce: 10 * time.Second,
|
||||
@@ -143,12 +149,6 @@ func NewClientGraphsyncDataTransfer(lc fx.Lifecycle, h host.Host, gs dtypes.Grap
|
||||
RestartBackoff: time.Minute,
|
||||
// After trying to restart 3 times, give up and fail the transfer
|
||||
MaxConsecutiveRestarts: 3,
|
||||
// After sending a restart message, the time to wait for the peer to
|
||||
// respond with an ack of the restart
|
||||
RestartAckTimeout: 30 * time.Second,
|
||||
// Wait up to 10m for the other side to send a Complete message once all
|
||||
// data has been sent / received
|
||||
CompleteTimeout: 10 * time.Minute,
|
||||
})
|
||||
dt, err := dtimpl.NewDataTransfer(dtDs, filepath.Join(r.Path(), "data-transfer"), net, transport, dtRestartConfig)
|
||||
if err != nil {
|
||||
|
||||
@@ -74,10 +74,12 @@ type ConsiderUnverifiedStorageDealsConfigFunc func() (bool, error)
|
||||
// disable or enable unverified storage deal acceptance.
|
||||
type SetConsiderUnverifiedStorageDealsConfigFunc func(bool) error
|
||||
|
||||
// SetSealingDelay sets how long a sector waits for more deals before sealing begins.
|
||||
// SetSealingConfigFunc is a function which is used to
|
||||
// sets the sealing config.
|
||||
type SetSealingConfigFunc func(sealiface.Config) error
|
||||
|
||||
// GetSealingDelay returns how long a sector waits for more deals before sealing begins.
|
||||
// GetSealingConfigFunc is a function which is used to
|
||||
// get the sealing config.
|
||||
type GetSealingConfigFunc func() (sealiface.Config, error)
|
||||
|
||||
// SetExpectedSealDurationFunc is a function which is used to set how long sealing is expected to take.
|
||||
|
||||
@@ -101,7 +101,7 @@ func GetParams(spt abi.RegisteredSealProof) error {
|
||||
}
|
||||
|
||||
// TODO: We should fetch the params for the actual proof type, not just based on the size.
|
||||
if err := paramfetch.GetParams(context.TODO(), build.ParametersJSON(), uint64(ssize)); err != nil {
|
||||
if err := paramfetch.GetParams(context.TODO(), build.ParametersJSON(), build.SrsJSON(), uint64(ssize)); err != nil {
|
||||
return xerrors.Errorf("fetching proof parameters: %w", err)
|
||||
}
|
||||
|
||||
@@ -204,6 +204,7 @@ type StorageMinerParams struct {
|
||||
Sealer sectorstorage.SectorManager
|
||||
SectorIDCounter sealing.SectorIDCounter
|
||||
Verifier ffiwrapper.Verifier
|
||||
Prover ffiwrapper.Prover
|
||||
GetSealingConfigFn dtypes.GetSealingConfigFunc
|
||||
Journal journal.Journal
|
||||
AddrSel *storage.AddressSelector
|
||||
@@ -220,6 +221,7 @@ func StorageMiner(fc config.MinerFeeConfig) func(params StorageMinerParams) (*st
|
||||
h = params.Host
|
||||
sc = params.SectorIDCounter
|
||||
verif = params.Verifier
|
||||
prover = params.Prover
|
||||
gsd = params.GetSealingConfigFn
|
||||
j = params.Journal
|
||||
as = params.AddrSel
|
||||
@@ -237,7 +239,7 @@ func StorageMiner(fc config.MinerFeeConfig) func(params StorageMinerParams) (*st
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sm, err := storage.NewMiner(api, maddr, h, ds, sealer, sc, verif, gsd, fc, j, as)
|
||||
sm, err := storage.NewMiner(api, maddr, h, ds, sealer, sc, verif, prover, gsd, fc, j, as)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -849,6 +851,22 @@ func NewSetSealConfigFunc(r repo.LockedRepo) (dtypes.SetSealingConfigFunc, error
|
||||
MaxSealingSectorsForDeals: cfg.MaxSealingSectorsForDeals,
|
||||
WaitDealsDelay: config.Duration(cfg.WaitDealsDelay),
|
||||
AlwaysKeepUnsealedCopy: cfg.AlwaysKeepUnsealedCopy,
|
||||
|
||||
BatchPreCommits: cfg.BatchPreCommits,
|
||||
MinPreCommitBatch: cfg.MinPreCommitBatch,
|
||||
MaxPreCommitBatch: cfg.MaxPreCommitBatch,
|
||||
PreCommitBatchWait: config.Duration(cfg.PreCommitBatchWait),
|
||||
PreCommitBatchSlack: config.Duration(cfg.PreCommitBatchSlack),
|
||||
|
||||
AggregateCommits: cfg.AggregateCommits,
|
||||
MinCommitBatch: cfg.MinCommitBatch,
|
||||
MaxCommitBatch: cfg.MaxCommitBatch,
|
||||
CommitBatchWait: config.Duration(cfg.CommitBatchWait),
|
||||
CommitBatchSlack: config.Duration(cfg.CommitBatchSlack),
|
||||
|
||||
TerminateBatchMax: cfg.TerminateBatchMax,
|
||||
TerminateBatchMin: cfg.TerminateBatchMin,
|
||||
TerminateBatchWait: config.Duration(cfg.TerminateBatchWait),
|
||||
}
|
||||
})
|
||||
return
|
||||
@@ -864,6 +882,22 @@ func NewGetSealConfigFunc(r repo.LockedRepo) (dtypes.GetSealingConfigFunc, error
|
||||
MaxSealingSectorsForDeals: cfg.Sealing.MaxSealingSectorsForDeals,
|
||||
WaitDealsDelay: time.Duration(cfg.Sealing.WaitDealsDelay),
|
||||
AlwaysKeepUnsealedCopy: cfg.Sealing.AlwaysKeepUnsealedCopy,
|
||||
|
||||
BatchPreCommits: cfg.Sealing.BatchPreCommits,
|
||||
MinPreCommitBatch: cfg.Sealing.MinPreCommitBatch,
|
||||
MaxPreCommitBatch: cfg.Sealing.MaxPreCommitBatch,
|
||||
PreCommitBatchWait: time.Duration(cfg.Sealing.PreCommitBatchWait),
|
||||
PreCommitBatchSlack: time.Duration(cfg.Sealing.PreCommitBatchSlack),
|
||||
|
||||
AggregateCommits: cfg.Sealing.AggregateCommits,
|
||||
MinCommitBatch: cfg.Sealing.MinCommitBatch,
|
||||
MaxCommitBatch: cfg.Sealing.MaxCommitBatch,
|
||||
CommitBatchWait: time.Duration(cfg.Sealing.CommitBatchWait),
|
||||
CommitBatchSlack: time.Duration(cfg.Sealing.CommitBatchSlack),
|
||||
|
||||
TerminateBatchMax: cfg.Sealing.TerminateBatchMax,
|
||||
TerminateBatchMin: cfg.Sealing.TerminateBatchMin,
|
||||
TerminateBatchWait: time.Duration(cfg.Sealing.TerminateBatchWait),
|
||||
}
|
||||
})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user