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

Feat/expedite nv19 #10681

Merged
merged 11 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/params_butterfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const UpgradeSkyrHeight = -19
const UpgradeSharkHeight = -20
const UpgradeHyggeHeight = -21

const UpgradeLightningHeight = 360
const UpgradeLightningHeight = 50

const UpgradeThunderHeight = UpgradeLightningHeight + 360

Expand Down
8 changes: 4 additions & 4 deletions build/params_calibnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ const UpgradeSharkHeight = 16800 // 6 days after genesis
// 2023-02-21T16:30:00Z
const UpgradeHyggeHeight = 322354

// 2023-04-20T16:30:00Z
const UpgradeLightningHeight = 489394
// 2023-04-20T14:00:00Z
ZenGround0 marked this conversation as resolved.
Show resolved Hide resolved
const UpgradeLightningHeight = 489154

// 2023-04-24T16:30:00Z
const UpgradeThunderHeight = UpgradeLightningHeight + 11520
// 2023-04-21T16:00:00Z
const UpgradeThunderHeight = UpgradeLightningHeight + 3120

var SupportedProofTypes = []abi.RegisteredSealProof{
abi.RegisteredSealProof_StackedDrg32GiBV1,
Expand Down
6 changes: 0 additions & 6 deletions chain/actors/policy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,6 @@ func GetMaxSectorExpirationExtension() abi.ChainEpoch {
return miner11.MaxSectorExpirationExtension
}

func GetDefaultSectorExpirationExtension() abi.ChainEpoch {
// Keep default at the previous max of 1.5 years rather than the current 3.5 years.
// This way extension and pledge defaults do not subvert existing expectations.
return miner10.MaxSectorExpirationExtension
}

func GetMinSectorExpiration() abi.ChainEpoch {
return miner11.MinSectorExpiration
}
Expand Down
6 changes: 0 additions & 6 deletions chain/actors/policy/policy.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@ func GetMaxSectorExpirationExtension() abi.ChainEpoch {
return miner{{.latestVersion}}.MaxSectorExpirationExtension
}

func GetDefaultSectorExpirationExtension() abi.ChainEpoch {
// Keep default at the previous max of 1.5 years rather than the current 3.5 years.
// This way extension and pledge defaults do not subvert existing expectations.
return miner10.MaxSectorExpirationExtension
}

func GetMinSectorExpiration() abi.ChainEpoch {
return miner{{.latestVersion}}.MinSectorExpiration
}
Expand Down
11 changes: 3 additions & 8 deletions chain/consensus/filcns/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,9 @@ func DefaultUpgradeSchedule() stmgr.UpgradeSchedule {
Migration: UpgradeActorsV11,
PreMigrations: []stmgr.PreMigration{{
PreMigration: PreUpgradeActorsV11,
StartWithin: 240,
DontStartWithin: 60,
StopWithin: 20,
}, {
PreMigration: PreUpgradeActorsV11,
StartWithin: 15,
DontStartWithin: 10,
StopWithin: 5,
StartWithin: 120,
DontStartWithin: 15,
StopWithin: 10,
}},
Expensive: true,
}, {
Expand Down
2 changes: 1 addition & 1 deletion chain/gen/genesis/miners.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
sectorWeight []abi.StoragePower
}, len(miners))

maxPeriods := policy.GetDefaultSectorExpirationExtension() / minertypes.WPoStProvingPeriod
maxPeriods := policy.GetMaxSectorExpirationExtension() / minertypes.WPoStProvingPeriod
rawPow, qaPow := big.NewInt(0), big.NewInt(0)
for i, m := range miners {
// Create miner through power actor
Expand Down
2 changes: 1 addition & 1 deletion cmd/lotus-miner/sectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ var sectorsCapacityCollateralCmd = &cli.Command{
return err
}

pci.Expiration = policy.GetDefaultSectorExpirationExtension() + h.Height()
pci.Expiration = policy.GetMaxSectorExpirationExtension() + h.Height()
}

pc, err := nApi.StateMinerInitialPledgeCollateral(ctx, maddr, pci, types.EmptyTSK)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
github.com/filecoin-project/go-legs v0.4.4
github.com/filecoin-project/go-padreader v0.0.1
github.com/filecoin-project/go-paramfetch v0.0.4
github.com/filecoin-project/go-state-types v0.11.0-rc1
github.com/filecoin-project/go-state-types v0.11.0-rc2
github.com/filecoin-project/go-statemachine v1.0.3
github.com/filecoin-project/go-statestore v0.2.0
github.com/filecoin-project/go-storedcounter v0.1.0
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go
github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.11.0-rc1 h1:UvifFHZ+S/jbshCjRHgAUuZ1qAEyeItsNywh2tsSpY4=
github.com/filecoin-project/go-state-types v0.11.0-rc1/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
github.com/filecoin-project/go-state-types v0.11.0-rc2 h1:zUx7aRxEGn56n4A1RS2J8FZzpzAozEMsqF11aXjtmkc=
github.com/filecoin-project/go-state-types v0.11.0-rc2/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk=
github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=
Expand Down
2 changes: 1 addition & 1 deletion node/config/def.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func DefaultStorageMiner() *StorageMiner {
// XXX snap deals wait deals slack if first
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

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

AggregateCommits: true,
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
Expand Down
2 changes: 1 addition & 1 deletion storage/pipeline/precommit_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (p *BasicPreCommitPolicy) getCCSectorLifetime() (abi.ChainEpoch, error) {
var ccLifetimeEpochs = abi.ChainEpoch(uint64(c.CommittedCapacitySectorLifetime.Seconds()) / builtin.EpochDurationSeconds)
// if zero value in config, assume default sector extension
if ccLifetimeEpochs == 0 {
ccLifetimeEpochs = policy.GetDefaultSectorExpirationExtension()
ccLifetimeEpochs = policy.GetMaxSectorExpirationExtension()
}

if minExpiration := abi.ChainEpoch(miner.MinSectorExpiration); ccLifetimeEpochs < minExpiration {
Expand Down
2 changes: 1 addition & 1 deletion storage/pipeline/precommit_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestBasicPolicyEmptySector(t *testing.T) {
require.NoError(t, err)

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

Expand Down