reasonable max value for initial sector expiration

This commit is contained in:
He Weidong 2021-07-14 11:52:18 +08:00
parent ee20d30480
commit ef6620ad8e

View File

@ -311,9 +311,9 @@ func (m *Sealing) preCommitParams(ctx statemachine.Context, sector SectorInfo) (
msd := policy.GetMaxProveCommitDuration(actors.VersionForNetwork(nv), sector.SectorType) msd := policy.GetMaxProveCommitDuration(actors.VersionForNetwork(nv), sector.SectorType)
// Assume: both precommit msg & commit msg land on chain as late as possible if minExpiration := height + msd + miner.MinSectorExpiration + 10; expiration < minExpiration {
minExpiration := sector.TicketEpoch + policy.MaxPreCommitRandomnessLookback + msd + miner.MinSectorExpiration expiration = minExpiration
if expiration < minExpiration { }
// Assume: both precommit msg & commit msg land on chain as early as possible // Assume: both precommit msg & commit msg land on chain as early as possible
maxExpiration := height + policy.GetPreCommitChallengeDelay() + policy.GetMaxSectorExpirationExtension() maxExpiration := height + policy.GetPreCommitChallengeDelay() + policy.GetMaxSectorExpirationExtension()