Skip to content

Commit

Permalink
Merge pull request #7932 from filecoin-project/ntwk-butterfly-snapnet
Browse files Browse the repository at this point in the history
feat: build: butterfly SNAPNET
  • Loading branch information
arajasek authored Jan 13, 2022
2 parents 3c57b98 + 52411b1 commit 424c27b
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 15 deletions.
4 changes: 2 additions & 2 deletions build/bootstrap/butterflynet.pi
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWBzv5sf4eTyo8cjJGfGnpxo6QkEPkRShG9GqjE2A5QaW5
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWBo9TSD4XXRFtu6snv6QNYvXgRaSaVb116YiYEsDWgKtq
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWBdRCBLUeKvoy22u5DcXs61adFn31v8WWCZgmBjDCjbsC
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWDUQJBA18njjXnG9RtLxoN3muvdU7PEy55QorUEsdAqdy
Binary file modified build/genesis/butterflynet.car
Binary file not shown.
2 changes: 1 addition & 1 deletion build/params_2k.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)

var UpgradeChocolateHeight = abi.ChainEpoch(-17)

var UpgradeSnapDealsHeight = abi.ChainEpoch(-18)
var UpgradeOhSnapHeight = abi.ChainEpoch(-18)

var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
Expand Down
10 changes: 7 additions & 3 deletions build/params_butterfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}

const GenesisNetworkVersion = network.Version13
const GenesisNetworkVersion = network.Version14

const BootstrappersFile = "butterflynet.pi"
const GenesisFile = "butterflynet.car"
Expand All @@ -40,13 +40,17 @@ const UpgradeTrustHeight = -13
const UpgradeNorwegianHeight = -14
const UpgradeTurboHeight = -15
const UpgradeHyperdriveHeight = -16
const UpgradeChocolateHeight = 6360
const UpgradeSnapDealsHeight = 99999999
const UpgradeChocolateHeight = -17

// 2022-01-17T19:00:00Z
const UpgradeOhSnapHeight = 30262

func init() {
policy.SetConsensusMinerMinPower(abi.NewStoragePower(2 << 30))
policy.SetSupportedProofTypes(
abi.RegisteredSealProof_StackedDrg512MiBV1,
abi.RegisteredSealProof_StackedDrg32GiBV1,
abi.RegisteredSealProof_StackedDrg64GiBV1,
)

SetAddressNetwork(address.Testnet)
Expand Down
2 changes: 1 addition & 1 deletion build/params_calibnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const UpgradeHyperdriveHeight = 420

const UpgradeChocolateHeight = 312746

const UpgradeSnapDealsHeight = 99999999
const UpgradeOhSnapHeight = 99999999

func init() {
policy.SetConsensusMinerMinPower(abi.NewStoragePower(32 << 30))
Expand Down
2 changes: 1 addition & 1 deletion build/params_interop.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var UpgradeTurboHeight = abi.ChainEpoch(-15)

var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)
var UpgradeChocolateHeight = abi.ChainEpoch(-17)
var UpgradeSnapDealsHeight = abi.ChainEpoch(-18)
var UpgradeOhSnapHeight = abi.ChainEpoch(-18)

var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
Expand Down
4 changes: 2 additions & 2 deletions build/params_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ const UpgradeHyperdriveHeight = 892800
// 2021-10-26T13:30:00Z
const UpgradeChocolateHeight = 1231620

var UpgradeSnapDealsHeight = abi.ChainEpoch(999999999999)
var UpgradeOhSnapHeight = abi.ChainEpoch(999999999999)

func init() {
if os.Getenv("LOTUS_USE_TEST_ADDRESSES") != "1" {
SetAddressNetwork(address.Mainnet)
}

if os.Getenv("LOTUS_DISABLE_SNAPDEALS") == "1" {
UpgradeSnapDealsHeight = math.MaxInt64
UpgradeOhSnapHeight = math.MaxInt64
}

Devnet = false
Expand Down
6 changes: 3 additions & 3 deletions build/params_testground.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ var (
UpgradeTurboHeight abi.ChainEpoch = -14
UpgradeHyperdriveHeight abi.ChainEpoch = -15
UpgradeChocolateHeight abi.ChainEpoch = -16
UpgradeSnapDealsHeight abi.ChainEpoch = -17
UpgradeOhSnapHeight abi.ChainEpoch = -17

DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}

GenesisNetworkVersion = network.Version0

NewestNetworkVersion = network.Version14
ActorUpgradeNetworkVersion = network.Version4
NewestNetworkVersion = network.Version15
ActorUpgradeNetworkVersion = network.Version15

Devnet = true
ZeroAddress = MustParseAddress("f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a")
Expand Down
2 changes: 1 addition & 1 deletion chain/consensus/filcns/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func DefaultUpgradeSchedule() stmgr.UpgradeSchedule {
}},
Expensive: true,
}, {
Height: build.UpgradeSnapDealsHeight,
Height: build.UpgradeOhSnapHeight,
Network: network.Version15,
Migration: UpgradeActorsV7,
PreMigrations: []stmgr.PreMigration{{
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 @@ -1557,7 +1557,7 @@ var sectorsMarkForUpgradeCmd = &cli.Command{
return xerrors.Errorf("failed to get chain head: %w", err)
}
twoDays := abi.ChainEpoch(2 * builtin.EpochsInDay)
if head.Height() > (build.UpgradeSnapDealsHeight - twoDays) {
if head.Height() > (build.UpgradeOhSnapHeight - twoDays) {
return xerrors.Errorf("OhSnap is coming soon, " +
"please use `snap-up` to upgrade your cc sectors after the network v15 upgrade!")
}
Expand Down

0 comments on commit 424c27b

Please sign in to comment.