Skip to content

Commit 68ed494

Browse files
committed
Revert fip 0052
1 parent fa0dfdf commit 68ed494

File tree

8 files changed

+6
-18
lines changed

8 files changed

+6
-18
lines changed

chain/actors/policy/policy.go

-6
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,6 @@ func GetMaxSectorExpirationExtension() abi.ChainEpoch {
527527
return miner11.MaxSectorExpirationExtension
528528
}
529529

530-
func GetDefaultSectorExpirationExtension() abi.ChainEpoch {
531-
// Keep default at the previous max of 1.5 years rather than the current 3.5 years.
532-
// This way extension and pledge defaults do not subvert existing expectations.
533-
return miner10.MaxSectorExpirationExtension
534-
}
535-
536530
func GetMinSectorExpiration() abi.ChainEpoch {
537531
return miner11.MinSectorExpiration
538532
}

chain/actors/policy/policy.go.template

-6
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,6 @@ func GetMaxSectorExpirationExtension() abi.ChainEpoch {
223223
return miner{{.latestVersion}}.MaxSectorExpirationExtension
224224
}
225225

226-
func GetDefaultSectorExpirationExtension() abi.ChainEpoch {
227-
// Keep default at the previous max of 1.5 years rather than the current 3.5 years.
228-
// This way extension and pledge defaults do not subvert existing expectations.
229-
return miner10.MaxSectorExpirationExtension
230-
}
231-
232226
func GetMinSectorExpiration() abi.ChainEpoch {
233227
return miner{{.latestVersion}}.MinSectorExpiration
234228
}

chain/gen/genesis/miners.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
124124
sectorWeight []abi.StoragePower
125125
}, len(miners))
126126

127-
maxPeriods := policy.GetDefaultSectorExpirationExtension() / minertypes.WPoStProvingPeriod
127+
maxPeriods := policy.GetMaxSectorExpirationExtension() / minertypes.WPoStProvingPeriod
128128
rawPow, qaPow := big.NewInt(0), big.NewInt(0)
129129
for i, m := range miners {
130130
// Create miner through power actor

cmd/lotus-miner/sectors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ var sectorsCapacityCollateralCmd = &cli.Command{
16931693
return err
16941694
}
16951695

1696-
pci.Expiration = policy.GetDefaultSectorExpirationExtension() + h.Height()
1696+
pci.Expiration = policy.GetMaxSectorExpirationExtension() + h.Height()
16971697
}
16981698

16991699
pc, err := nApi.StateMinerInitialPledgeCollateral(ctx, maddr, pci, types.EmptyTSK)

documentation/en/default-lotus-miner-config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@
535535
#
536536
# type: Duration
537537
# env var: LOTUS_SEALING_COMMITTEDCAPACITYSECTORLIFETIME
538-
#CommittedCapacitySectorLifetime = "12960h0m0s"
538+
#CommittedCapacitySectorLifetime = "30672h0m0s"
539539

540540
# Period of time that a newly created sector will wait for more deals to be packed in to before it starts to seal.
541541
# Sectors which are fully filled will start sealing immediately

node/config/def.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func DefaultStorageMiner() *StorageMiner {
137137
// XXX snap deals wait deals slack if first
138138
PreCommitBatchSlack: Duration(3 * time.Hour), // time buffer for forceful batch submission before sectors/deals in batch would start expiring, higher value will lower the chances for message fail due to expiration
139139

140-
CommittedCapacitySectorLifetime: Duration(builtin.EpochDurationSeconds * uint64(policy.GetDefaultSectorExpirationExtension()) * uint64(time.Second)),
140+
CommittedCapacitySectorLifetime: Duration(builtin.EpochDurationSeconds * uint64(policy.GetMaxSectorExpirationExtension()) * uint64(time.Second)),
141141

142142
AggregateCommits: true,
143143
MinCommitBatch: miner5.MinAggregatedSectors, // per FIP13, we must have at least four proofs to aggregate, where 4 is the cross over point where aggregation wins out on single provecommit gas costs

storage/pipeline/precommit_policy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (p *BasicPreCommitPolicy) getCCSectorLifetime() (abi.ChainEpoch, error) {
114114
var ccLifetimeEpochs = abi.ChainEpoch(uint64(c.CommittedCapacitySectorLifetime.Seconds()) / builtin.EpochDurationSeconds)
115115
// if zero value in config, assume default sector extension
116116
if ccLifetimeEpochs == 0 {
117-
ccLifetimeEpochs = policy.GetDefaultSectorExpirationExtension()
117+
ccLifetimeEpochs = policy.GetMaxSectorExpirationExtension()
118118
}
119119

120120
if minExpiration := abi.ChainEpoch(miner.MinSectorExpiration); ccLifetimeEpochs < minExpiration {

storage/pipeline/precommit_policy_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func TestBasicPolicyEmptySector(t *testing.T) {
6868
require.NoError(t, err)
6969

7070
// as set when there are no deal pieces
71-
expected := h + policy.GetDefaultSectorExpirationExtension() - pBuffer
71+
expected := h + policy.GetMaxSectorExpirationExtension() - pBuffer
7272
assert.Equal(t, int(expected), int(exp))
7373
}
7474

0 commit comments

Comments
 (0)