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 9 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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Lotus changelog

# v1.22.0-rc4 / 2023-04-17

This is the fourth release candidate for MANDATORY 1.22.0 release of lotus.

Diff from previous RCs:
- REVERT [Activation bug fix](https://github.com/filecoin-project/builtin-actors/issues/914)
- REVERT [FIP 0052](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0052.md)

Activation bug fix is reverted to reduce upgrade risk in order to expedite the upgrade. This is in hopes of helping improve recent chain quality degregadation along with other long syncing time related issues. FIP 0052 requires the activation bug fix to maintain security invariants and so must also be reverted.

# v1.22.0-rc1 / 2023-04-13


Expand Down
Binary file modified build/actors/v11.tar.zst
Binary file not shown.
238 changes: 119 additions & 119 deletions build/builtin_actors_gen.go

Large diffs are not rendered by default.

Binary file modified build/openrpc/full.json.gz
Binary file not shown.
Binary file modified build/openrpc/gateway.json.gz
Binary file not shown.
Binary file modified build/openrpc/miner.json.gz
Binary file not shown.
Binary file modified build/openrpc/worker.json.gz
Binary file not shown.
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 = 489094

// 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
2 changes: 1 addition & 1 deletion build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func BuildTypeString() string {
}

// BuildVersion is the local build version
const BuildVersion = "1.22.0-rc3"
const BuildVersion = "1.22.0-rc4"

func UserVersion() string {
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
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 documentation/en/cli-lotus-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:
lotus-miner [global options] command [command options] [arguments...]

VERSION:
1.22.0-rc3
1.22.0-rc4

COMMANDS:
init Initialize a lotus miner repo
Expand Down
2 changes: 1 addition & 1 deletion documentation/en/cli-lotus-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:
lotus-worker [global options] command [command options] [arguments...]

VERSION:
1.22.0-rc3
1.22.0-rc4

COMMANDS:
run Start lotus worker
Expand Down
2 changes: 1 addition & 1 deletion documentation/en/cli-lotus.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:
lotus [global options] command [command options] [arguments...]

VERSION:
1.22.0-rc3
1.22.0-rc4

COMMANDS:
daemon Start a lotus daemon process
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